diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperations.cs new file mode 100644 index 000000000000..4b129886e568 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperations.cs @@ -0,0 +1,75 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Operations operations. + /// + public partial interface IOperations + { + /// + /// Returns the list of available operations. + /// + /// + /// Operation to return the list of available operations. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the list of available operations. + /// + /// + /// Operation to return the list of available operations. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperationsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperationsOperations.cs new file mode 100644 index 000000000000..f5435872e1bc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperationsOperations.cs @@ -0,0 +1,51 @@ +// 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.RecoveryServices.SiteRecovery +{ + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// OperationsOperations operations. + /// + public partial interface IOperationsOperations + { + /// + /// Returns the list of available operations. + /// + /// Operation to return the list of available operations. + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the list of available operations. + /// + /// Operation to return the list of available operations. + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IRecoveryPointsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IRecoveryPointsOperations.cs new file mode 100644 index 000000000000..56bdc823e8ad --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IRecoveryPointsOperations.cs @@ -0,0 +1,120 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// RecoveryPointsOperations operations. + /// + public partial interface IRecoveryPointsOperations + { + /// + /// Get a recovery point. + /// + /// + /// Get the details of specified recovery point. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item's name. + /// + /// + /// The recovery point name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get recovery points for a replication protected item. + /// + /// + /// Lists the available recovery points for a replication protected + /// item. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item's name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get recovery points for a replication protected item. + /// + /// + /// Lists the available recovery points for a replication protected + /// item. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationAlertSettingsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationAlertSettingsOperations.cs new file mode 100644 index 000000000000..da3ddfd5ee9b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationAlertSettingsOperations.cs @@ -0,0 +1,133 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationAlertSettingsOperations operations. + /// + public partial interface IReplicationAlertSettingsOperations + { + /// + /// Gets an email notification(alert) configuration. + /// + /// + /// Gets the details of the specified email notification(alert) + /// configuration. + /// + /// + /// The name of the email notification configuration. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string alertSettingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Configures email notifications for this vault. + /// + /// + /// Create or update an email notification(alert) configuration. + /// + /// + /// The name of the email notification(alert) configuration. + /// + /// + /// The input to configure the email notification(alert). + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string alertSettingName, ConfigureAlertRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of configured email notification(alert) + /// configurations. + /// + /// + /// Gets the list of email notification(alert) configurations for the + /// vault. . + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of configured email notification(alert) + /// configurations. + /// + /// + /// Gets the list of email notification(alert) configurations for the + /// vault. . + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationEventsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationEventsOperations.cs new file mode 100644 index 000000000000..4e4f6c7e3612 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationEventsOperations.cs @@ -0,0 +1,100 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationEventsOperations operations. + /// + public partial interface IReplicationEventsOperations + { + /// + /// Get the details of an Azure Site recovery event. + /// + /// + /// The operation to get the details of an Azure Site recovery event. + /// + /// + /// The name of the Azure Site Recovery event. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string eventName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of Azure Site Recovery events. + /// + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of Azure Site Recovery events. + /// + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationFabricsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationFabricsOperations.cs new file mode 100644 index 000000000000..6d20046f0379 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationFabricsOperations.cs @@ -0,0 +1,412 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationFabricsOperations operations. + /// + public partial interface IReplicationFabricsOperations + { + /// + /// Renews certificate for the fabric. + /// + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// Renew certificate input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> RenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInput renewCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Perform failover of the process server. + /// + /// + /// The operation to move replications from a process server to another + /// process server. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The input to the failover process + /// server 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> ReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequest failoverProcessServerRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Checks the consistency of the ASR fabric. + /// + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CheckConsistencyWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the site. + /// + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// ASR fabric to delete + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of an ASR fabric. + /// + /// + /// Gets the details of an Azure Site Recovery fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates an Azure Site Recoery fabric. + /// + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. + /// Hyper-V site) + /// + /// + /// Name of the ASR fabric. + /// + /// + /// Fabric creation input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string fabricName, FabricCreationInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Purges the site. + /// + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// ASR fabric to purge. + /// + /// + /// The 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 + /// + Task PurgeWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of ASR fabrics + /// + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Renews certificate for the fabric. + /// + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// Renew certificate input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginRenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInput renewCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Perform failover of the process server. + /// + /// + /// The operation to move replications from a process server to another + /// process server. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The input to the failover process + /// server 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequest failoverProcessServerRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Checks the consistency of the ASR fabric. + /// + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCheckConsistencyWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the site. + /// + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// ASR fabric to delete + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates an Azure Site Recoery fabric. + /// + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. + /// Hyper-V site) + /// + /// + /// Name of the ASR fabric. + /// + /// + /// Fabric creation input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string fabricName, FabricCreationInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Purges the site. + /// + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// ASR fabric to purge. + /// + /// + /// The 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 + /// + Task BeginPurgeWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of ASR fabrics + /// + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationJobsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationJobsOperations.cs new file mode 100644 index 000000000000..19c90ac0e327 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationJobsOperations.cs @@ -0,0 +1,312 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationJobsOperations operations. + /// + public partial interface IReplicationJobsOperations + { + /// + /// Resumes the specified job. + /// + /// + /// The operation to resume an Azure Site Recovery job + /// + /// + /// Job identifier. + /// + /// + /// Resume rob comments. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> ResumeWithHttpMessagesAsync(string jobName, ResumeJobParams resumeJobParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Restarts the specified job. + /// + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// Job identifier. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> RestartWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Cancels the specified job. + /// + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// Job indentifier. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CancelWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the job details. + /// + /// + /// Get the details of an Azure Site Recovery job. + /// + /// + /// Job identifier + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Exports the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operation to export the details of the Azure Site Recovery jobs + /// of the vault. + /// + /// + /// job query filter. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> ExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of jobs. + /// + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// OData parameters to apply to 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Resumes the specified job. + /// + /// + /// The operation to resume an Azure Site Recovery job + /// + /// + /// Job identifier. + /// + /// + /// Resume rob comments. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginResumeWithHttpMessagesAsync(string jobName, ResumeJobParams resumeJobParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Restarts the specified job. + /// + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// Job identifier. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginRestartWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Cancels the specified job. + /// + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// Job indentifier. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCancelWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Exports the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operation to export the details of the Azure Site Recovery jobs + /// of the vault. + /// + /// + /// job query filter. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of jobs. + /// + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationLogicalNetworksOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationLogicalNetworksOperations.cs new file mode 100644 index 000000000000..fbe70ab01fae --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationLogicalNetworksOperations.cs @@ -0,0 +1,107 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationLogicalNetworksOperations operations. + /// + public partial interface IReplicationLogicalNetworksOperations + { + /// + /// Gets the list of logical networks under a fabric. + /// + /// + /// Lists all the logical networks of the Azure Site Recovery fabric + /// + /// + /// Server Id. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a logical network with specified server id and logical network + /// name. + /// + /// + /// Gets the details of a logical network. + /// + /// + /// Server Id. + /// + /// + /// Logical network name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string logicalNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of logical networks under a fabric. + /// + /// + /// Lists all the logical networks of the Azure Site Recovery fabric + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationNetworkMappingsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationNetworkMappingsOperations.cs new file mode 100644 index 000000000000..bb0e805a9bd7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationNetworkMappingsOperations.cs @@ -0,0 +1,351 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationNetworkMappingsOperations operations. + /// + public partial interface IReplicationNetworkMappingsOperations + { + /// + /// Gets all the network mappings under a vault. + /// + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all the network mappings under a network. + /// + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationNetworksWithHttpMessagesAsync(string fabricName, string networkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets network mapping by name. + /// + /// + /// Gets the details of an ASR network mapping + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates network mapping. + /// + /// + /// The operation to create an ASR network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Create network mapping input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete network mapping. + /// + /// + /// The operation to delete a network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates network mapping. + /// + /// + /// The operation to update an ASR network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Update network mapping input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates network mapping. + /// + /// + /// The operation to create an ASR network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Create network mapping input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete network mapping. + /// + /// + /// The operation to delete a network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates network mapping. + /// + /// + /// The operation to update an ASR network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Update network mapping input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all the network mappings under a vault. + /// + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all the network mappings under a network. + /// + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationNetworksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationNetworksOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationNetworksOperations.cs new file mode 100644 index 000000000000..f49a4d365456 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationNetworksOperations.cs @@ -0,0 +1,153 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationNetworksOperations operations. + /// + public partial interface IReplicationNetworksOperations + { + /// + /// Gets the list of networks. View-only API. + /// + /// + /// Lists the networks available in a vault + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of networks under a fabric. + /// + /// + /// Lists the networks available for a fabric. + /// + /// + /// Fabric name + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a network with specified server id and network name. + /// + /// + /// Gets the details of a network. + /// + /// + /// Server Id. + /// + /// + /// Primary network name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string networkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of networks. View-only API. + /// + /// + /// Lists the networks available in a vault + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of networks under a fabric. + /// + /// + /// Lists the networks available for a fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationPoliciesOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationPoliciesOperations.cs new file mode 100644 index 000000000000..cad844242e93 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationPoliciesOperations.cs @@ -0,0 +1,256 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationPoliciesOperations operations. + /// + public partial interface IReplicationPoliciesOperations + { + /// + /// Gets the requested policy. + /// + /// + /// Gets the details of a replication policy. + /// + /// + /// Replication policy name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates the policy. + /// + /// + /// The operation to create a replication policy + /// + /// + /// Replication policy name + /// + /// + /// Create policy input + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string policyName, CreatePolicyInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete the policy. + /// + /// + /// The operation to delete a replication policy. + /// + /// + /// Replication policy name. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the protection profile. + /// + /// + /// The operation to update a replication policy. + /// + /// + /// Protection profile Id. + /// + /// + /// Update Protection Profile Input + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of replication policies + /// + /// + /// Lists the replication policies for a vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates the policy. + /// + /// + /// The operation to create a replication policy + /// + /// + /// Replication policy name + /// + /// + /// Create policy input + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string policyName, CreatePolicyInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete the policy. + /// + /// + /// The operation to delete a replication policy. + /// + /// + /// Replication policy name. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the protection profile. + /// + /// + /// The operation to update a replication policy. + /// + /// + /// Protection profile Id. + /// + /// + /// Update Protection Profile Input + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of replication policies + /// + /// + /// Lists the replication policies for a vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectableItemsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectableItemsOperations.cs new file mode 100644 index 000000000000..9b39fff9e172 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectableItemsOperations.cs @@ -0,0 +1,112 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationProtectableItemsOperations operations. + /// + public partial interface IReplicationProtectableItemsOperations + { + /// + /// Gets the details of a protectable item. + /// + /// + /// The operation to get the details of a protectable item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protectable item name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string protectableItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of protectable items. + /// + /// + /// Lists the protectable items in a protection container. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of protectable items. + /// + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectedItemsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectedItemsOperations.cs new file mode 100644 index 000000000000..e7c42fd3b9f1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectedItemsOperations.cs @@ -0,0 +1,1065 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationProtectedItemsOperations operations. + /// + public partial interface IReplicationProtectedItemsOperations + { + /// + /// Gets the list of Replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the protection + /// container. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The pagination token. + /// Possible values: "FabricId" or "FabricId_CloudId" or null + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Change or apply recovery point. + /// + /// + /// The operation to change the recovery point of a failed over + /// replication protected item. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item's name. + /// + /// + /// The ApplyRecoveryPointInput. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> ApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Resynchronize or repair replication. + /// + /// + /// The operation to start resynchronize/repair replication for a + /// replication protected item + /// requiring resynchronization. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> RepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update the mobility service on a protected item. + /// + /// + /// The operation to update(push update) the installed mobility service + /// software on a + /// replication protected item to the latest available version. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the + /// protected item. + /// + /// + /// The name of the protected item on which the + /// agent is to be updated. + /// + /// + /// Request to update the mobility + /// service on the protected item. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicationProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute Reverse Replication\Reprotect + /// + /// + /// Operation to reprotect or reverse replicate a failed over + /// replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> ReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInput rrInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute commit failover + /// + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> FailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute test failover cleanup. + /// + /// + /// Operation to clean up the test failover of a replication protected + /// item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> TestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute test failover + /// + /// + /// Operation to perform a test failover of the replication protected + /// item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> TestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute unplanned failover + /// + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> UnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute planned failover + /// + /// + /// Operation to initiate a planned failover of the replication + /// protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> PlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Disables protection. + /// + /// + /// The operation to disable replication on a replication protected + /// item. This will also + /// remove the item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of a Replication protected item. + /// + /// + /// Gets the details of an ASR replication protected item. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Enables protection. + /// + /// + /// The operation to create an ASR replication protected item (Enable + /// replication). + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// Enable Protection Input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Purges protection. + /// + /// + /// The operation to delete or purge a replication protected item. This + /// operation will + /// force delete the replication protected item. Use the remove + /// operation on + /// replication protected item to perform a clean disable replication + /// for the item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The 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 + /// + Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates protection. + /// + /// + /// The operation to update the recovery settings of an ASR replication + /// protected item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Update protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Change or apply recovery point. + /// + /// + /// The operation to change the recovery point of a failed over + /// replication protected item. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item's name. + /// + /// + /// The ApplyRecoveryPointInput. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Resynchronize or repair replication. + /// + /// + /// The operation to start resynchronize/repair replication for a + /// replication protected item + /// requiring resynchronization. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginRepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update the mobility service on a protected item. + /// + /// + /// The operation to update(push update) the installed mobility service + /// software on a + /// replication protected item to the latest available version. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the + /// protected item. + /// + /// + /// The name of the protected item on which the + /// agent is to be updated. + /// + /// + /// Request to update the mobility + /// service on the protected item. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicationProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute Reverse Replication\Reprotect + /// + /// + /// Operation to reprotect or reverse replicate a failed over + /// replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInput rrInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute commit failover + /// + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginFailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute test failover cleanup. + /// + /// + /// Operation to clean up the test failover of a replication protected + /// item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute test failover + /// + /// + /// Operation to perform a test failover of the replication protected + /// item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginTestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute unplanned failover + /// + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute planned failover + /// + /// + /// Operation to initiate a planned failover of the replication + /// protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginPlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Disables protection. + /// + /// + /// The operation to disable replication on a replication protected + /// item. This will also + /// remove the item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Enables protection. + /// + /// + /// The operation to create an ASR replication protected item (Enable + /// replication). + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// Enable Protection Input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Purges protection. + /// + /// + /// The operation to delete or purge a replication protected item. This + /// operation will + /// force delete the replication protected item. Use the remove + /// operation on + /// replication protected item to perform a clean disable replication + /// for the item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The 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 + /// + Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates protection. + /// + /// + /// The operation to update the recovery settings of an ASR replication + /// protected item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Update protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of Replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the protection + /// container. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectionContainerMappingsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectionContainerMappingsOperations.cs new file mode 100644 index 000000000000..0cbcba6c0f83 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectionContainerMappingsOperations.cs @@ -0,0 +1,347 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationProtectionContainerMappingsOperations operations. + /// + public partial interface IReplicationProtectionContainerMappingsOperations + { + /// + /// Remove protection container mapping. + /// + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Removal input. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput removalInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a protection container mapping/ + /// + /// + /// Gets the details of a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection Container mapping name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create protection container mapping. + /// + /// + /// The operation to create a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Mapping creation input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput creationInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Purge protection container mapping. + /// + /// + /// The operation to purge(force delete) a protection container mapping + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The 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 + /// + Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of protection container mappings for a protection + /// container. + /// + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of all protection container mappings in a vault. + /// + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove protection container mapping. + /// + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Removal input. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput removalInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create protection container mapping. + /// + /// + /// The operation to create a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Mapping creation input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput creationInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Purge protection container mapping. + /// + /// + /// The operation to purge(force delete) a protection container mapping + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The 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 + /// + Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of protection container mappings for a protection + /// container. + /// + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of all protection container mappings in a vault. + /// + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectionContainersOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectionContainersOperations.cs new file mode 100644 index 000000000000..e5ffff1f28b8 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationProtectionContainersOperations.cs @@ -0,0 +1,401 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationProtectionContainersOperations operations. + /// + public partial interface IReplicationProtectionContainersOperations + { + /// + /// Switches protection from one container to another or one + /// replication provider to + /// another. + /// + /// + /// Operation to switch protection from one container to another or one + /// replication + /// provider to another. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Switch protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> SwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInput switchInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Removes a protection container. + /// + /// + /// Operation to remove a protection container. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Adds a protectable item to the replication protection container. + /// + /// + /// The operation to a add a protectable item to a protection + /// container(Add physical server.) + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The request object to add a protectable + /// item. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> DiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the protection container details. + /// + /// + /// Gets the details of a protection container. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create a protection container. + /// + /// + /// Operation to create a protection container. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// Creation input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of protection container for a fabric. + /// + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of all protection containers in a vault. + /// + /// + /// Lists the protection containers in a vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Switches protection from one container to another or one + /// replication provider to + /// another. + /// + /// + /// Operation to switch protection from one container to another or one + /// replication + /// provider to another. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Switch protection input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginSwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInput switchInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Removes a protection container. + /// + /// + /// Operation to remove a protection container. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Adds a protectable item to the replication protection container. + /// + /// + /// The operation to a add a protectable item to a protection + /// container(Add physical server.) + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The request object to add a protectable + /// item. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginDiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create a protection container. + /// + /// + /// Operation to create a protection container. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// Creation input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of protection container for a fabric. + /// + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of all protection containers in a vault. + /// + /// + /// Lists the protection containers in a vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationRecoveryPlansOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationRecoveryPlansOperations.cs new file mode 100644 index 000000000000..314e3b8c25fe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationRecoveryPlansOperations.cs @@ -0,0 +1,580 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationRecoveryPlansOperations operations. + /// + public partial interface IReplicationRecoveryPlansOperations + { + /// + /// Execute reprotect of the recovery plan. + /// + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> ReprotectWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute commit failover of the recovery plan. + /// + /// + /// The operation to commit the fail over of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> FailoverCommitWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute test failover cleanup of the recovery plan. + /// + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> TestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute test failover of the recovery plan. + /// + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> TestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute unplanned failover of the recovery plan. + /// + /// + /// The operation to start the failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> UnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute planned failover of the recovery plan. + /// + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> PlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the requested recovery plan. + /// + /// + /// Gets the details of the recovery plan. + /// + /// + /// Name of the recovery plan. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a recovery plan with the given details. + /// + /// + /// The operation to create a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Recovery Plan creation input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified recovery plan. + /// + /// + /// Delete a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the given recovery plan. + /// + /// + /// The operation to update a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Update recovery plan input + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of recovery plans. + /// + /// + /// Lists the recovery plans in the vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute reprotect of the recovery plan. + /// + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginReprotectWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute commit failover of the recovery plan. + /// + /// + /// The operation to commit the fail over of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginFailoverCommitWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute test failover cleanup of the recovery plan. + /// + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute test failover of the recovery plan. + /// + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginTestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute unplanned failover of the recovery plan. + /// + /// + /// The operation to start the failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute planned failover of the recovery plan. + /// + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginPlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a recovery plan with the given details. + /// + /// + /// The operation to create a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Recovery Plan creation input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes the specified recovery plan. + /// + /// + /// Delete a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates the given recovery plan. + /// + /// + /// The operation to update a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Update recovery plan input + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of recovery plans. + /// + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationRecoveryServicesProvidersOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationRecoveryServicesProvidersOperations.cs new file mode 100644 index 000000000000..dde7ee57a231 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationRecoveryServicesProvidersOperations.cs @@ -0,0 +1,337 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationRecoveryServicesProvidersOperations operations. + /// + public partial interface IReplicationRecoveryServicesProvidersOperations + { + /// + /// Refresh details from the recovery services provider. + /// + /// + /// The operation to refresh the information from the recovery services + /// provider. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> RefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes provider from fabric. + /// Note: Deleting provider for any fabric other than SingleHost is + /// unsupported. To + /// maintain backward compatibility for released clients the object + /// "deleteRspInput" is + /// used (if the object is empty we assume that it is old client and + /// continue the old + /// behavior). + /// + /// + /// The operation to removes/delete(unregister) a recovery services + /// provider from the vault + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the details of a recovery services provider. + /// + /// + /// Gets the details of registered recovery services provider. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Purges recovery service provider from fabric + /// + /// + /// The operation to purge(force delete) a recovery services provider + /// from the vault. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The 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 + /// + Task PurgeWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of registered recovery services providers for the + /// fabric. + /// + /// + /// Lists the registered recovery services providers for the specified + /// fabric. + /// + /// + /// Fabric name + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of registered recovery services providers in the + /// vault. + /// This is a view only api. + /// + /// + /// Lists the registered recovery services providers in the vault + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Refresh details from the recovery services provider. + /// + /// + /// The operation to refresh the information from the recovery services + /// provider. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginRefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes provider from fabric. + /// Note: Deleting provider for any fabric other than SingleHost is + /// unsupported. To + /// maintain backward compatibility for released clients the object + /// "deleteRspInput" is + /// used (if the object is empty we assume that it is old client and + /// continue the old + /// behavior). + /// + /// + /// The operation to removes/delete(unregister) a recovery services + /// provider from the vault + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Purges recovery service provider from fabric + /// + /// + /// The operation to purge(force delete) a recovery services provider + /// from the vault. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The 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 + /// + Task BeginPurgeWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of registered recovery services providers for the + /// fabric. + /// + /// + /// Lists the registered recovery services providers for the specified + /// fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of registered recovery services providers in the + /// vault. + /// This is a view only api. + /// + /// + /// Lists the registered recovery services providers in the vault + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationStorageClassificationMappingsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationStorageClassificationMappingsOperations.cs new file mode 100644 index 000000000000..7f0428f95b11 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationStorageClassificationMappingsOperations.cs @@ -0,0 +1,287 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationStorageClassificationMappingsOperations operations. + /// + public partial interface IReplicationStorageClassificationMappingsOperations + { + /// + /// Gets the details of a storage classification mapping. + /// + /// + /// Gets the details of the specified storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create storage classification mapping. + /// + /// + /// The operation to create a storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// Pairing input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput pairingInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a storage classification mapping. + /// + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of storage classification mappings objects under a + /// storage. + /// + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// Fabric name. + /// + /// + /// Storage classfication name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationStorageClassificationsWithHttpMessagesAsync(string fabricName, string storageClassificationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of storage classification mappings objects under a + /// vault. + /// + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create storage classification mapping. + /// + /// + /// The operation to create a storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// Pairing input. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput pairingInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete a storage classification mapping. + /// + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of storage classification mappings objects under a + /// storage. + /// + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of storage classification mappings objects under a + /// vault. + /// + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationStorageClassificationsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationStorageClassificationsOperations.cs new file mode 100644 index 000000000000..200678fc719b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationStorageClassificationsOperations.cs @@ -0,0 +1,155 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationStorageClassificationsOperations operations. + /// + public partial interface IReplicationStorageClassificationsOperations + { + /// + /// Gets the details of a storage classification. + /// + /// + /// Gets the details of the specified storage classification. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of storage classification objects under a fabric. + /// + /// + /// Lists the storage classifications available in the specified + /// fabric. + /// + /// + /// Site name of interest. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of storage classification objects under a vault. + /// + /// + /// Lists the storage classifications in the vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of storage classification objects under a fabric. + /// + /// + /// Lists the storage classifications available in the specified + /// fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of storage classification objects under a vault. + /// + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationvCentersOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationvCentersOperations.cs new file mode 100644 index 000000000000..c1e93cdb1490 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IReplicationvCentersOperations.cs @@ -0,0 +1,330 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationvCentersOperations operations. + /// + public partial interface IReplicationvCentersOperations + { + /// + /// Gets the details of a vCenter. + /// + /// + /// Gets the details of a registered vCenter server(Add vCenter + /// server.) + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string fabricName, string vCenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Add vCenter. + /// + /// + /// The operation to create a vCenter object.. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The input to the add vCenter 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string fabricName, string vCenterName, AddVCenterRequest addVCenterRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove vCenter operation. + /// + /// + /// The operation to remove(unregister) a registered vCenter server + /// from the vault. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The 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 + /// + Task DeleteWithHttpMessagesAsync(string fabricName, string vCenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update vCenter operation. + /// + /// + /// The operation to update a registered vCenter. + /// + /// + /// Fabric name. + /// + /// + /// vCeneter name + /// + /// + /// The input to the update vCenter 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string fabricName, string vCenterName, UpdateVCenterRequest updateVCenterRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of vCenter registered under a fabric. + /// + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of vCenter registered under the vault. + /// + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Add vCenter. + /// + /// + /// The operation to create a vCenter object.. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The input to the add vCenter 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string fabricName, string vCenterName, AddVCenterRequest addVCenterRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove vCenter operation. + /// + /// + /// The operation to remove(unregister) a registered vCenter server + /// from the vault. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The 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 + /// + Task BeginDeleteWithHttpMessagesAsync(string fabricName, string vCenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update vCenter operation. + /// + /// + /// The operation to update a registered vCenter. + /// + /// + /// Fabric name. + /// + /// + /// vCeneter name + /// + /// + /// The input to the update vCenter 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string vCenterName, UpdateVCenterRequest updateVCenterRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of vCenter registered under a fabric. + /// + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of vCenter registered under the vault. + /// + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ISiteRecoveryManagementClient.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ISiteRecoveryManagementClient.cs new file mode 100644 index 000000000000..9740e55b085f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ISiteRecoveryManagementClient.cs @@ -0,0 +1,178 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + + /// + /// + public partial interface ISiteRecoveryManagementClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + ServiceClientCredentials Credentials { get; } + + /// + /// The subscription Id. + /// + string SubscriptionId { get; set; } + + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + string ResourceGroupName { get; set; } + + /// + /// The name of the recovery services vault. + /// + string ResourceName { get; set; } + + /// + /// Client Api Version. + /// + string ApiVersion { get; } + + /// + /// Gets or sets the preferred language for the response. + /// + string AcceptLanguage { get; set; } + + /// + /// Gets or sets the retry timeout in seconds for Long Running + /// Operations. Default value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// When set to true a unique x-ms-client-request-id value is generated + /// and included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set; } + + + /// + /// Gets the IReplicationProtectedItemsOperations. + /// + IReplicationProtectedItemsOperations ReplicationProtectedItems { get; } + + /// + /// Gets the IReplicationNetworkMappingsOperations. + /// + IReplicationNetworkMappingsOperations ReplicationNetworkMappings { get; } + + /// + /// Gets the IReplicationFabricsOperations. + /// + IReplicationFabricsOperations ReplicationFabrics { get; } + + /// + /// Gets the IReplicationvCentersOperations. + /// + IReplicationvCentersOperations ReplicationvCenters { get; } + + /// + /// Gets the IReplicationStorageClassificationMappingsOperations. + /// + IReplicationStorageClassificationMappingsOperations ReplicationStorageClassificationMappings { get; } + + /// + /// Gets the IReplicationStorageClassificationsOperations. + /// + IReplicationStorageClassificationsOperations ReplicationStorageClassifications { get; } + + /// + /// Gets the IReplicationRecoveryServicesProvidersOperations. + /// + IReplicationRecoveryServicesProvidersOperations ReplicationRecoveryServicesProviders { get; } + + /// + /// Gets the IRecoveryPointsOperations. + /// + IRecoveryPointsOperations RecoveryPoints { get; } + + /// + /// Gets the IReplicationRecoveryPlansOperations. + /// + IReplicationRecoveryPlansOperations ReplicationRecoveryPlans { get; } + + /// + /// Gets the IReplicationProtectionContainersOperations. + /// + IReplicationProtectionContainersOperations ReplicationProtectionContainers { get; } + + /// + /// Gets the IReplicationProtectionContainerMappingsOperations. + /// + IReplicationProtectionContainerMappingsOperations ReplicationProtectionContainerMappings { get; } + + /// + /// Gets the IReplicationProtectableItemsOperations. + /// + IReplicationProtectableItemsOperations ReplicationProtectableItems { get; } + + /// + /// Gets the IReplicationPoliciesOperations. + /// + IReplicationPoliciesOperations ReplicationPolicies { get; } + + /// + /// Gets the IOperations. + /// + IOperations Operations { get; } + + /// + /// Gets the IReplicationNetworksOperations. + /// + IReplicationNetworksOperations ReplicationNetworks { get; } + + /// + /// Gets the IReplicationLogicalNetworksOperations. + /// + IReplicationLogicalNetworksOperations ReplicationLogicalNetworks { get; } + + /// + /// Gets the IReplicationJobsOperations. + /// + IReplicationJobsOperations ReplicationJobs { get; } + + /// + /// Gets the IReplicationEventsOperations. + /// + IReplicationEventsOperations ReplicationEvents { get; } + + /// + /// Gets the IReplicationAlertSettingsOperations. + /// + IReplicationAlertSettingsOperations ReplicationAlertSettings { get; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AApplyRecoveryPointInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AApplyRecoveryPointInput.cs new file mode 100644 index 000000000000..c039f87c4f07 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AApplyRecoveryPointInput.cs @@ -0,0 +1,39 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ApplyRecoveryPoint input specific to A2A provider. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2AApplyRecoveryPointInput : ApplyRecoveryPointProviderSpecificInput + { + /// + /// Initializes a new instance of the A2AApplyRecoveryPointInput class. + /// + public A2AApplyRecoveryPointInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AContainerCreationInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AContainerCreationInput.cs new file mode 100644 index 000000000000..86ac83225ee0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AContainerCreationInput.cs @@ -0,0 +1,39 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A2A cloud creation input. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2AContainerCreationInput : ReplicationProviderSpecificContainerCreationInput + { + /// + /// Initializes a new instance of the A2AContainerCreationInput class. + /// + public A2AContainerCreationInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEnableProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEnableProtectionInput.cs new file mode 100644 index 000000000000..babf3e24e33e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEnableProtectionInput.cs @@ -0,0 +1,102 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A2A enable protection input. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2AEnableProtectionInput : EnableProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the A2AEnableProtectionInput class. + /// + public A2AEnableProtectionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2AEnableProtectionInput class. + /// + /// The fabric specific object Id of the + /// virtual machine. + /// The recovery container + /// Id. + /// The recovery resource group + /// Id. Valid for V2 scenarios. + /// The recovery cloud service Id. + /// Valid for V1 scenarios. + /// The recovery availability + /// set Id. + /// The list of vm disk details. + public A2AEnableProtectionInput(string fabricObjectId = default(string), string recoveryContainerId = default(string), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), IList vmDisks = default(IList)) + { + FabricObjectId = fabricObjectId; + RecoveryContainerId = recoveryContainerId; + RecoveryResourceGroupId = recoveryResourceGroupId; + RecoveryCloudServiceId = recoveryCloudServiceId; + RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + VmDisks = vmDisks; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the fabric specific object Id of the virtual machine. + /// + [JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId { get; set; } + + /// + /// Gets or sets the recovery container Id. + /// + [JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId { get; set; } + + /// + /// Gets or sets the recovery resource group Id. Valid for V2 + /// scenarios. + /// + [JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId { get; set; } + + /// + /// Gets or sets the recovery cloud service Id. Valid for V1 scenarios. + /// + [JsonProperty(PropertyName = "recoveryCloudServiceId")] + public string RecoveryCloudServiceId { get; set; } + + /// + /// Gets or sets the recovery availability set Id. + /// + [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId { get; set; } + + /// + /// Gets or sets the list of vm disk details. + /// + [JsonProperty(PropertyName = "vmDisks")] + public IList VmDisks { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEventDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEventDetails.cs new file mode 100644 index 000000000000..d2928c817f88 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEventDetails.cs @@ -0,0 +1,95 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Model class for event details of a A2A event. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2AEventDetails : EventProviderSpecificDetails + { + /// + /// Initializes a new instance of the A2AEventDetails class. + /// + public A2AEventDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2AEventDetails class. + /// + /// The protected item arm + /// name. + /// The azure vm arm id. + /// Fabric arm name. + /// The fabric location. + /// Remote fabric arm name. + /// Remote fabric location. + public A2AEventDetails(string protectedItemName = default(string), string fabricObjectId = default(string), string fabricName = default(string), string fabricLocation = default(string), string remoteFabricName = default(string), string remoteFabricLocation = default(string)) + { + ProtectedItemName = protectedItemName; + FabricObjectId = fabricObjectId; + FabricName = fabricName; + FabricLocation = fabricLocation; + RemoteFabricName = remoteFabricName; + RemoteFabricLocation = remoteFabricLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the protected item arm name. + /// + [JsonProperty(PropertyName = "protectedItemName")] + public string ProtectedItemName { get; set; } + + /// + /// Gets or sets the azure vm arm id. + /// + [JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId { get; set; } + + /// + /// Gets or sets fabric arm name. + /// + [JsonProperty(PropertyName = "fabricName")] + public string FabricName { get; set; } + + /// + /// Gets or sets the fabric location. + /// + [JsonProperty(PropertyName = "fabricLocation")] + public string FabricLocation { get; set; } + + /// + /// Gets or sets remote fabric arm name. + /// + [JsonProperty(PropertyName = "remoteFabricName")] + public string RemoteFabricName { get; set; } + + /// + /// Gets or sets remote fabric location. + /// + [JsonProperty(PropertyName = "remoteFabricLocation")] + public string RemoteFabricLocation { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AFailoverProviderInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AFailoverProviderInput.cs new file mode 100644 index 000000000000..a52773807d61 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AFailoverProviderInput.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A2A provider specific input for failover. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2AFailoverProviderInput : ProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the A2AFailoverProviderInput class. + /// + public A2AFailoverProviderInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2AFailoverProviderInput class. + /// + /// The recovery point id to be passed to + /// failover to a particular recovery + /// point. In case of latest recovery point, null should be + /// passed. + /// A value indicating whether + /// to use recovery cloud service for TFO or not. + public A2AFailoverProviderInput(string recoveryPointId = default(string), string cloudServiceCreationOption = default(string)) + { + RecoveryPointId = recoveryPointId; + CloudServiceCreationOption = cloudServiceCreationOption; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point id to be passed to failover to a + /// particular recovery + /// point. In case of latest recovery point, null should be passed. + /// + [JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId { get; set; } + + /// + /// Gets or sets a value indicating whether to use recovery cloud + /// service for TFO or not. + /// + [JsonProperty(PropertyName = "cloudServiceCreationOption")] + public string CloudServiceCreationOption { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2APolicyCreationInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2APolicyCreationInput.cs new file mode 100644 index 000000000000..d3cda9c2bd0e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2APolicyCreationInput.cs @@ -0,0 +1,99 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A2A Policy creation input. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2APolicyCreationInput : PolicyProviderSpecificInput + { + /// + /// Initializes a new instance of the A2APolicyCreationInput class. + /// + public A2APolicyCreationInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2APolicyCreationInput class. + /// + /// A value indicating whether multi-VM + /// sync has to be enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: + /// 'Enable', 'Disable' + /// The duration in minutes until + /// which the recovery points need to be + /// stored. + /// The crash + /// consistent snapshot frequency (in minutes). + /// The app consistent + /// snapshot frequency (in minutes). + public A2APolicyCreationInput(SetMultiVmSyncStatus multiVmSyncStatus, int? recoveryPointHistory = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { + RecoveryPointHistory = recoveryPointHistory; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + MultiVmSyncStatus = multiVmSyncStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the duration in minutes until which the recovery + /// points need to be + /// stored. + /// + [JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory { get; set; } + + /// + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// + [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets the app consistent snapshot frequency (in minutes). + /// + [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets a value indicating whether multi-VM sync has to be + /// enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: + /// 'Enable', 'Disable' + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public SetMultiVmSyncStatus MultiVmSyncStatus { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2APolicyDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2APolicyDetails.cs new file mode 100644 index 000000000000..610dad381bf3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2APolicyDetails.cs @@ -0,0 +1,95 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A2A specific policy details. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2APolicyDetails : PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the A2APolicyDetails class. + /// + public A2APolicyDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2APolicyDetails class. + /// + /// The recovery point + /// threshold in minutes. + /// The duration in minutes until + /// which the recovery points need to be + /// stored. + /// The app consistent + /// snapshot frequency in minutes. + /// A value indicating whether multi-VM + /// sync has to be enabled. + /// The crash + /// consistent snapshot frequency in minutes. + public A2APolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVmSyncStatus = default(string), int? crashConsistentFrequencyInMinutes = default(int?)) + { + RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + RecoveryPointHistory = recoveryPointHistory; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + MultiVmSyncStatus = multiVmSyncStatus; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point threshold in minutes. + /// + [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes { get; set; } + + /// + /// Gets or sets the duration in minutes until which the recovery + /// points need to be + /// stored. + /// + [JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory { get; set; } + + /// + /// Gets or sets the app consistent snapshot frequency in minutes. + /// + [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets a value indicating whether multi-VM sync has to be + /// enabled. + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVmSyncStatus { get; set; } + + /// + /// Gets or sets the crash consistent snapshot frequency in minutes. + /// + [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedDiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedDiskDetails.cs new file mode 100644 index 000000000000..7292b8da4387 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedDiskDetails.cs @@ -0,0 +1,166 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A2A protected disk details. + /// + public partial class A2AProtectedDiskDetails + { + /// + /// Initializes a new instance of the A2AProtectedDiskDetails class. + /// + public A2AProtectedDiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2AProtectedDiskDetails class. + /// + /// The disk uri. + /// The disk name. + /// The disk capacity in + /// bytes. + /// The recovery disk + /// storage account. + /// The primary + /// staging storage account. + /// The primary disk + /// storage account. + /// Recovery disk uri. + /// The type of disk. + /// A value indicating whether resync is + /// required for this disk. + /// The percentage of the + /// monitoring job. The type of the monitoring job + /// is defined by MonitoringJobType property. + /// The type of the monitoring job. The + /// progress is contained in + /// MonitoringPercentageCompletion property. + /// The data + /// pending for replication in MB at staging account. + /// The data pending at + /// source virtual machine in MB. + public A2AProtectedDiskDetails(string diskUri = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string recoveryAzureStorageAccountId = default(string), string primaryStagingAzureStorageAccountId = default(string), string primaryDiskAzureStorageAccountId = default(string), string recoveryDiskUri = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?)) + { + DiskUri = diskUri; + DiskName = diskName; + DiskCapacityInBytes = diskCapacityInBytes; + RecoveryAzureStorageAccountId = recoveryAzureStorageAccountId; + PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + PrimaryDiskAzureStorageAccountId = primaryDiskAzureStorageAccountId; + RecoveryDiskUri = recoveryDiskUri; + DiskType = diskType; + ResyncRequired = resyncRequired; + MonitoringPercentageCompletion = monitoringPercentageCompletion; + MonitoringJobType = monitoringJobType; + DataPendingInStagingStorageAccountInMB = dataPendingInStagingStorageAccountInMB; + DataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the disk uri. + /// + [JsonProperty(PropertyName = "diskUri")] + public string DiskUri { get; set; } + + /// + /// Gets or sets the disk name. + /// + [JsonProperty(PropertyName = "diskName")] + public string DiskName { get; set; } + + /// + /// Gets or sets the disk capacity in bytes. + /// + [JsonProperty(PropertyName = "diskCapacityInBytes")] + public long? DiskCapacityInBytes { get; set; } + + /// + /// Gets or sets the recovery disk storage account. + /// + [JsonProperty(PropertyName = "recoveryAzureStorageAccountId")] + public string RecoveryAzureStorageAccountId { get; set; } + + /// + /// Gets or sets the primary staging storage account. + /// + [JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] + public string PrimaryStagingAzureStorageAccountId { get; set; } + + /// + /// Gets or sets the primary disk storage account. + /// + [JsonProperty(PropertyName = "primaryDiskAzureStorageAccountId")] + public string PrimaryDiskAzureStorageAccountId { get; set; } + + /// + /// Gets or sets recovery disk uri. + /// + [JsonProperty(PropertyName = "recoveryDiskUri")] + public string RecoveryDiskUri { get; set; } + + /// + /// Gets or sets the type of disk. + /// + [JsonProperty(PropertyName = "diskType")] + public string DiskType { get; set; } + + /// + /// Gets or sets a value indicating whether resync is required for this + /// disk. + /// + [JsonProperty(PropertyName = "resyncRequired")] + public bool? ResyncRequired { get; set; } + + /// + /// Gets or sets the percentage of the monitoring job. The type of the + /// monitoring job + /// is defined by MonitoringJobType property. + /// + [JsonProperty(PropertyName = "monitoringPercentageCompletion")] + public int? MonitoringPercentageCompletion { get; set; } + + /// + /// Gets or sets the type of the monitoring job. The progress is + /// contained in + /// MonitoringPercentageCompletion property. + /// + [JsonProperty(PropertyName = "monitoringJobType")] + public string MonitoringJobType { get; set; } + + /// + /// Gets or sets the data pending for replication in MB at staging + /// account. + /// + [JsonProperty(PropertyName = "dataPendingInStagingStorageAccountInMB")] + public double? DataPendingInStagingStorageAccountInMB { get; set; } + + /// + /// Gets or sets the data pending at source virtual machine in MB. + /// + [JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] + public double? DataPendingAtSourceAgentInMB { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AReplicationDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AReplicationDetails.cs new file mode 100644 index 000000000000..3b2154b7e32f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AReplicationDetails.cs @@ -0,0 +1,286 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A2A provider specific settings. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2AReplicationDetails : ReplicationProviderSpecificSettings + { + /// + /// Initializes a new instance of the A2AReplicationDetails class. + /// + public A2AReplicationDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2AReplicationDetails class. + /// + /// The fabric specific object Id of the + /// virtual machine. + /// The multi vm group Id. + /// The multi vm group name. + /// The management Id. + /// The list of protected disks. + /// Primary fabric + /// location. + /// The recovery fabric + /// location. + /// The type of operating system. + /// The size of recovery virtual + /// machine. + /// The name of recovery virtual + /// machine. + /// The recovery resource + /// group. + /// The recovery cloud + /// service. + /// The recovery availability + /// set. + /// The recovery virtual + /// network. + /// The virtual machine nic details. + /// The synced configuration + /// details. + /// The percentage of the + /// monitoring job. The type of the monitoring job + /// is defined by MonitoringJobType property. + /// The type of the monitoring job. The + /// progress is contained in + /// MonitoringPercentageCompletion property. + /// The last heartbeat received from the + /// source server. + /// The agent version. + /// A value indicating + /// whether replication agent update is required. + /// The recovery fabric object + /// Id. + /// The protection state for the + /// vm. + /// The protection state + /// description for the vm. + /// An id associated with the PE that + /// survives actions like switch protection + /// which change the backing PE/CPE objects internally.The lifecycle id + /// gets carried + /// forward to have a link/continuity in being able to have an Id that + /// denotes the "same" + /// protected item even though other internal Ids/ARM Id might be + /// changing. + public A2AReplicationDetails(string fabricObjectId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string managementId = default(string), IList protectedDisks = default(IList), string primaryFabricLocation = default(string), string recoveryFabricLocation = default(string), string osType = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureVMName = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryCloudService = default(string), string recoveryAvailabilitySet = default(string), string selectedRecoveryAzureNetworkId = default(string), IList vmNics = default(IList), AzureToAzureVmSyncedConfigDetails vmSyncedConfigDetails = default(AzureToAzureVmSyncedConfigDetails), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string agentVersion = default(string), bool? isReplicationAgentUpdateRequired = default(bool?), string recoveryFabricObjectId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), string lifecycleId = default(string)) + { + FabricObjectId = fabricObjectId; + MultiVmGroupId = multiVmGroupId; + MultiVmGroupName = multiVmGroupName; + ManagementId = managementId; + ProtectedDisks = protectedDisks; + PrimaryFabricLocation = primaryFabricLocation; + RecoveryFabricLocation = recoveryFabricLocation; + OsType = osType; + RecoveryAzureVMSize = recoveryAzureVMSize; + RecoveryAzureVMName = recoveryAzureVMName; + RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + RecoveryCloudService = recoveryCloudService; + RecoveryAvailabilitySet = recoveryAvailabilitySet; + SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + VmNics = vmNics; + VmSyncedConfigDetails = vmSyncedConfigDetails; + MonitoringPercentageCompletion = monitoringPercentageCompletion; + MonitoringJobType = monitoringJobType; + LastHeartbeat = lastHeartbeat; + AgentVersion = agentVersion; + IsReplicationAgentUpdateRequired = isReplicationAgentUpdateRequired; + RecoveryFabricObjectId = recoveryFabricObjectId; + VmProtectionState = vmProtectionState; + VmProtectionStateDescription = vmProtectionStateDescription; + LifecycleId = lifecycleId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the fabric specific object Id of the virtual machine. + /// + [JsonProperty(PropertyName = "fabricObjectId")] + public string FabricObjectId { get; set; } + + /// + /// Gets or sets the multi vm group Id. + /// + [JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVmGroupId { get; set; } + + /// + /// Gets or sets the multi vm group name. + /// + [JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVmGroupName { get; set; } + + /// + /// Gets or sets the management Id. + /// + [JsonProperty(PropertyName = "managementId")] + public string ManagementId { get; set; } + + /// + /// Gets or sets the list of protected disks. + /// + [JsonProperty(PropertyName = "protectedDisks")] + public IList ProtectedDisks { get; set; } + + /// + /// Gets or sets primary fabric location. + /// + [JsonProperty(PropertyName = "primaryFabricLocation")] + public string PrimaryFabricLocation { get; set; } + + /// + /// Gets or sets the recovery fabric location. + /// + [JsonProperty(PropertyName = "recoveryFabricLocation")] + public string RecoveryFabricLocation { get; set; } + + /// + /// Gets or sets the type of operating system. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets the size of recovery virtual machine. + /// + [JsonProperty(PropertyName = "recoveryAzureVMSize")] + public string RecoveryAzureVMSize { get; set; } + + /// + /// Gets or sets the name of recovery virtual machine. + /// + [JsonProperty(PropertyName = "recoveryAzureVMName")] + public string RecoveryAzureVMName { get; set; } + + /// + /// Gets or sets the recovery resource group. + /// + [JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] + public string RecoveryAzureResourceGroupId { get; set; } + + /// + /// Gets or sets the recovery cloud service. + /// + [JsonProperty(PropertyName = "recoveryCloudService")] + public string RecoveryCloudService { get; set; } + + /// + /// Gets or sets the recovery availability set. + /// + [JsonProperty(PropertyName = "recoveryAvailabilitySet")] + public string RecoveryAvailabilitySet { get; set; } + + /// + /// Gets or sets the recovery virtual network. + /// + [JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] + public string SelectedRecoveryAzureNetworkId { get; set; } + + /// + /// Gets or sets the virtual machine nic details. + /// + [JsonProperty(PropertyName = "vmNics")] + public IList VmNics { get; set; } + + /// + /// Gets or sets the synced configuration details. + /// + [JsonProperty(PropertyName = "vmSyncedConfigDetails")] + public AzureToAzureVmSyncedConfigDetails VmSyncedConfigDetails { get; set; } + + /// + /// Gets or sets the percentage of the monitoring job. The type of the + /// monitoring job + /// is defined by MonitoringJobType property. + /// + [JsonProperty(PropertyName = "monitoringPercentageCompletion")] + public int? MonitoringPercentageCompletion { get; set; } + + /// + /// Gets or sets the type of the monitoring job. The progress is + /// contained in + /// MonitoringPercentageCompletion property. + /// + [JsonProperty(PropertyName = "monitoringJobType")] + public string MonitoringJobType { get; set; } + + /// + /// Gets or sets the last heartbeat received from the source server. + /// + [JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat { get; set; } + + /// + /// Gets or sets the agent version. + /// + [JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion { get; set; } + + /// + /// Gets or sets a value indicating whether replication agent update is + /// required. + /// + [JsonProperty(PropertyName = "isReplicationAgentUpdateRequired")] + public bool? IsReplicationAgentUpdateRequired { get; set; } + + /// + /// Gets or sets the recovery fabric object Id. + /// + [JsonProperty(PropertyName = "recoveryFabricObjectId")] + public string RecoveryFabricObjectId { get; set; } + + /// + /// Gets or sets the protection state for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionState")] + public string VmProtectionState { get; set; } + + /// + /// Gets or sets the protection state description for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VmProtectionStateDescription { get; set; } + + /// + /// Gets or sets an id associated with the PE that survives actions + /// like switch protection + /// which change the backing PE/CPE objects internally.The lifecycle id + /// gets carried + /// forward to have a link/continuity in being able to have an Id that + /// denotes the "same" + /// protected item even though other internal Ids/ARM Id might be + /// changing. + /// + [JsonProperty(PropertyName = "lifecycleId")] + public string LifecycleId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AReprotectInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AReprotectInput.cs new file mode 100644 index 000000000000..27a37e8fe4da --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AReprotectInput.cs @@ -0,0 +1,101 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure specific reprotect input. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2AReprotectInput : ReverseReplicationProviderSpecificInput + { + /// + /// Initializes a new instance of the A2AReprotectInput class. + /// + public A2AReprotectInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2AReprotectInput class. + /// + /// The recovery container + /// Id. + /// The list of vm disk details. + /// The recovery resource group + /// Id. Valid for V2 scenarios. + /// The recovery cloud service Id. + /// Valid for V1 scenarios. + /// The recovery availability + /// set. + /// The Policy Id. + public A2AReprotectInput(string recoveryContainerId = default(string), IList vmDisks = default(IList), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string policyId = default(string)) + { + RecoveryContainerId = recoveryContainerId; + VmDisks = vmDisks; + RecoveryResourceGroupId = recoveryResourceGroupId; + RecoveryCloudServiceId = recoveryCloudServiceId; + RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + PolicyId = policyId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery container Id. + /// + [JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId { get; set; } + + /// + /// Gets or sets the list of vm disk details. + /// + [JsonProperty(PropertyName = "vmDisks")] + public IList VmDisks { get; set; } + + /// + /// Gets or sets the recovery resource group Id. Valid for V2 + /// scenarios. + /// + [JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId { get; set; } + + /// + /// Gets or sets the recovery cloud service Id. Valid for V1 scenarios. + /// + [JsonProperty(PropertyName = "recoveryCloudServiceId")] + public string RecoveryCloudServiceId { get; set; } + + /// + /// Gets or sets the recovery availability set. + /// + [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId { get; set; } + + /// + /// Gets or sets the Policy Id. + /// + [JsonProperty(PropertyName = "policyId")] + public string PolicyId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ARpRecoveryPointType.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ARpRecoveryPointType.cs new file mode 100644 index 000000000000..e2959f7ce4ea --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ARpRecoveryPointType.cs @@ -0,0 +1,35 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for A2ARpRecoveryPointType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum A2ARpRecoveryPointType + { + [EnumMember(Value = "Latest")] + Latest, + [EnumMember(Value = "LatestApplicationConsistent")] + LatestApplicationConsistent, + [EnumMember(Value = "LatestCrashConsistent")] + LatestCrashConsistent, + [EnumMember(Value = "LatestProcessed")] + LatestProcessed + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ASwitchProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ASwitchProtectionInput.cs new file mode 100644 index 000000000000..d96d6c1046a9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ASwitchProtectionInput.cs @@ -0,0 +1,101 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A2A specific switch protection input. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2ASwitchProtectionInput : SwitchProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the A2ASwitchProtectionInput class. + /// + public A2ASwitchProtectionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2ASwitchProtectionInput class. + /// + /// The recovery container + /// Id. + /// The list of vm disk details. + /// The recovery resource group + /// Id. Valid for V2 scenarios. + /// The recovery cloud service Id. + /// Valid for V1 scenarios. + /// The recovery availability + /// set. + /// The Policy Id. + public A2ASwitchProtectionInput(string recoveryContainerId = default(string), IList vmDisks = default(IList), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string policyId = default(string)) + { + RecoveryContainerId = recoveryContainerId; + VmDisks = vmDisks; + RecoveryResourceGroupId = recoveryResourceGroupId; + RecoveryCloudServiceId = recoveryCloudServiceId; + RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + PolicyId = policyId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery container Id. + /// + [JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId { get; set; } + + /// + /// Gets or sets the list of vm disk details. + /// + [JsonProperty(PropertyName = "vmDisks")] + public IList VmDisks { get; set; } + + /// + /// Gets or sets the recovery resource group Id. Valid for V2 + /// scenarios. + /// + [JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId { get; set; } + + /// + /// Gets or sets the recovery cloud service Id. Valid for V1 scenarios. + /// + [JsonProperty(PropertyName = "recoveryCloudServiceId")] + public string RecoveryCloudServiceId { get; set; } + + /// + /// Gets or sets the recovery availability set. + /// + [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId { get; set; } + + /// + /// Gets or sets the Policy Id. + /// + [JsonProperty(PropertyName = "policyId")] + public string PolicyId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs new file mode 100644 index 000000000000..d62e8bd08a72 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs @@ -0,0 +1,66 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// InMage Azure V2 input to update replication protected item. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class A2AUpdateReplicationProtectedItemInput : UpdateReplicationProtectedItemProviderInput + { + /// + /// Initializes a new instance of the + /// A2AUpdateReplicationProtectedItemInput class. + /// + public A2AUpdateReplicationProtectedItemInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// A2AUpdateReplicationProtectedItemInput class. + /// + /// The target cloud service ARM + /// Id (for V1). + /// The target resource group ARM + /// Id (for V2). + public A2AUpdateReplicationProtectedItemInput(string recoveryCloudServiceId = default(string), string recoveryResourceGroupId = default(string)) + { + RecoveryCloudServiceId = recoveryCloudServiceId; + RecoveryResourceGroupId = recoveryResourceGroupId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the target cloud service ARM Id (for V1). + /// + [JsonProperty(PropertyName = "recoveryCloudServiceId")] + public string RecoveryCloudServiceId { get; set; } + + /// + /// Gets or sets the target resource group ARM Id (for V2). + /// + [JsonProperty(PropertyName = "recoveryResourceGroupId")] + public string RecoveryResourceGroupId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AVmDiskInputDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AVmDiskInputDetails.cs new file mode 100644 index 000000000000..4b56ad516692 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AVmDiskInputDetails.cs @@ -0,0 +1,71 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure VM disk input details. + /// + public partial class A2AVmDiskInputDetails + { + /// + /// Initializes a new instance of the A2AVmDiskInputDetails class. + /// + public A2AVmDiskInputDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the A2AVmDiskInputDetails class. + /// + /// The disk Uri. + /// The recovery VHD + /// storage account Id. + /// The primary + /// staging storage account Id. + public A2AVmDiskInputDetails(string diskUri = default(string), string recoveryAzureStorageAccountId = default(string), string primaryStagingAzureStorageAccountId = default(string)) + { + DiskUri = diskUri; + RecoveryAzureStorageAccountId = recoveryAzureStorageAccountId; + PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the disk Uri. + /// + [JsonProperty(PropertyName = "diskUri")] + public string DiskUri { get; set; } + + /// + /// Gets or sets the recovery VHD storage account Id. + /// + [JsonProperty(PropertyName = "recoveryAzureStorageAccountId")] + public string RecoveryAzureStorageAccountId { get; set; } + + /// + /// Gets or sets the primary staging storage account Id. + /// + [JsonProperty(PropertyName = "primaryStagingAzureStorageAccountId")] + public string PrimaryStagingAzureStorageAccountId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMException.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMException.cs new file mode 100644 index 000000000000..eadd152faefe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMException.cs @@ -0,0 +1,88 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ARM inner exception class. + /// + public partial class ARMException + { + /// + /// Initializes a new instance of the ARMException class. + /// + public ARMException() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ARMException class. + /// + /// Gets HTTP status code for the error. + /// Gets exception message. + /// Gets exception target. + /// Gets service based error details. + /// Gets private data for service + /// debugging. + public ARMException(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), ARMInnerError innererror = default(ARMInnerError)) + { + Code = code; + Message = message; + Target = target; + Details = details; + Innererror = innererror; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets HTTP status code for the error. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets exception message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets exception target. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; set; } + + /// + /// Gets service based error details. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; set; } + + /// + /// Gets private data for service debugging. + /// + [JsonProperty(PropertyName = "innererror")] + public ARMInnerError Innererror { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMExceptionDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMExceptionDetails.cs new file mode 100644 index 000000000000..96b195b3854c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMExceptionDetails.cs @@ -0,0 +1,104 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Service based exception details. + /// + public partial class ARMExceptionDetails + { + /// + /// Initializes a new instance of the ARMExceptionDetails class. + /// + public ARMExceptionDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ARMExceptionDetails class. + /// + /// Gets service error code. + /// Gets error message. + /// Gets possible cause for error. + /// Gets recommended action for the + /// error. + /// Gets the client request Id for the + /// session. + /// Gets the activity Id for the + /// session. + /// Gets exception target. + public ARMExceptionDetails(string code = default(string), string message = default(string), string possibleCauses = default(string), string recommendedAction = default(string), string clientRequestId = default(string), string activityId = default(string), string target = default(string)) + { + Code = code; + Message = message; + PossibleCauses = possibleCauses; + RecommendedAction = recommendedAction; + ClientRequestId = clientRequestId; + ActivityId = activityId; + Target = target; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets service error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets possible cause for error. + /// + [JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses { get; set; } + + /// + /// Gets recommended action for the error. + /// + [JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction { get; set; } + + /// + /// Gets the client request Id for the session. + /// + [JsonProperty(PropertyName = "clientRequestId")] + public string ClientRequestId { get; set; } + + /// + /// Gets the activity Id for the session. + /// + [JsonProperty(PropertyName = "activityId")] + public string ActivityId { get; set; } + + /// + /// Gets exception target. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMInnerError.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMInnerError.cs new file mode 100644 index 000000000000..6b5ce2301796 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMInnerError.cs @@ -0,0 +1,168 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ARM internal error class for providing additional debug data. + /// + public partial class ARMInnerError + { + /// + /// Initializes a new instance of the ARMInnerError class. + /// + public ARMInnerError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ARMInnerError class. + /// + /// Gets complete stack trace of the + /// exception. + /// Gets exception source. + /// Gets data related to method which threw + /// the exception. + /// Gets cloud Id in exception. + /// Gets hyperV host ID. + /// Gets hyperV cluster Id. + /// Gets network Id. + /// Gets Vm Id. + /// Gets Fabric Id. + /// Gets Live Id of the caller. + /// Gets container Id of the caller. + /// Gets resource id used in the call. + /// Gets caller resource name. + /// Gets subscription Id. + /// Gets serialized SRS log + /// context. + public ARMInnerError(string trace = default(string), string source = default(string), MethodCallStatus methodStatus = default(MethodCallStatus), string cloudId = default(string), string hVHostId = default(string), string hVClusterId = default(string), string networkId = default(string), string vmId = default(string), string fabricId = default(string), string liveId = default(string), string containerId = default(string), string resourceId = default(string), string resourceName = default(string), string subscriptionId = default(string), string serializedSRSLogContext = default(string)) + { + Trace = trace; + Source = source; + MethodStatus = methodStatus; + CloudId = cloudId; + HVHostId = hVHostId; + HVClusterId = hVClusterId; + NetworkId = networkId; + VmId = vmId; + FabricId = fabricId; + LiveId = liveId; + ContainerId = containerId; + ResourceId = resourceId; + ResourceName = resourceName; + SubscriptionId = subscriptionId; + SerializedSRSLogContext = serializedSRSLogContext; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets complete stack trace of the exception. + /// + [JsonProperty(PropertyName = "trace")] + public string Trace { get; set; } + + /// + /// Gets exception source. + /// + [JsonProperty(PropertyName = "source")] + public string Source { get; set; } + + /// + /// Gets data related to method which threw the exception. + /// + [JsonProperty(PropertyName = "methodStatus")] + public MethodCallStatus MethodStatus { get; set; } + + /// + /// Gets cloud Id in exception. + /// + [JsonProperty(PropertyName = "cloudId")] + public string CloudId { get; set; } + + /// + /// Gets hyperV host ID. + /// + [JsonProperty(PropertyName = "hVHostId")] + public string HVHostId { get; set; } + + /// + /// Gets hyperV cluster Id. + /// + [JsonProperty(PropertyName = "hVClusterId")] + public string HVClusterId { get; set; } + + /// + /// Gets network Id. + /// + [JsonProperty(PropertyName = "networkId")] + public string NetworkId { get; set; } + + /// + /// Gets Vm Id. + /// + [JsonProperty(PropertyName = "vmId")] + public string VmId { get; set; } + + /// + /// Gets Fabric Id. + /// + [JsonProperty(PropertyName = "fabricId")] + public string FabricId { get; set; } + + /// + /// Gets Live Id of the caller. + /// + [JsonProperty(PropertyName = "liveId")] + public string LiveId { get; set; } + + /// + /// Gets container Id of the caller. + /// + [JsonProperty(PropertyName = "containerId")] + public string ContainerId { get; set; } + + /// + /// Gets resource id used in the call. + /// + [JsonProperty(PropertyName = "resourceId")] + public string ResourceId { get; set; } + + /// + /// Gets caller resource name. + /// + [JsonProperty(PropertyName = "resourceName")] + public string ResourceName { get; set; } + + /// + /// Gets subscription Id. + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; set; } + + /// + /// Gets serialized SRS log context. + /// + [JsonProperty(PropertyName = "serializedSRSLogContext")] + public string SerializedSRSLogContext { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ASRTask.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ASRTask.cs new file mode 100644 index 000000000000..c0fc51d38f52 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ASRTask.cs @@ -0,0 +1,161 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Task of the Job. + /// + public partial class ASRTask + { + /// + /// Initializes a new instance of the ASRTask class. + /// + public ASRTask() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ASRTask class. + /// + /// The Id. + /// The unique Task name. + /// The start time. + /// The end time. + /// The state/actions applicable on this + /// task. + /// The name. + /// The State. It is one of these values - + /// NotStarted, InProgress, + /// Succeeded, Failed, Cancelled, Suspended or Other. + /// The description of the task state. + /// For example - For Succeeded state, + /// description can be Completed, PartiallySucceeded, + /// CompletedWithInformation or Skipped. + /// The type of task. Details in CustomDetails + /// property depend on this type. + /// The custom task details based on the + /// task type. + /// The custom task details based + /// on the task type, if the task type is + /// GroupTaskDetails or one of the types derived from it. + /// The task error details. + public ASRTask(string taskId = default(string), string name = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList allowedActions = default(IList), string friendlyName = default(string), string state = default(string), string stateDescription = default(string), string taskType = default(string), TaskTypeDetails customDetails = default(TaskTypeDetails), GroupTaskDetails groupTaskCustomDetails = default(GroupTaskDetails), IList errors = default(IList)) + { + TaskId = taskId; + Name = name; + StartTime = startTime; + EndTime = endTime; + AllowedActions = allowedActions; + FriendlyName = friendlyName; + State = state; + StateDescription = stateDescription; + TaskType = taskType; + CustomDetails = customDetails; + GroupTaskCustomDetails = groupTaskCustomDetails; + Errors = errors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Id. + /// + [JsonProperty(PropertyName = "taskId")] + public string TaskId { get; set; } + + /// + /// Gets or sets the unique Task name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the start time. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + /// + /// Gets or sets the end time. + /// + [JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime { get; set; } + + /// + /// Gets or sets the state/actions applicable on this task. + /// + [JsonProperty(PropertyName = "allowedActions")] + public IList AllowedActions { get; set; } + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the State. It is one of these values - NotStarted, + /// InProgress, + /// Succeeded, Failed, Cancelled, Suspended or Other. + /// + [JsonProperty(PropertyName = "state")] + public string State { get; set; } + + /// + /// Gets or sets the description of the task state. For example - For + /// Succeeded state, + /// description can be Completed, PartiallySucceeded, + /// CompletedWithInformation or Skipped. + /// + [JsonProperty(PropertyName = "stateDescription")] + public string StateDescription { get; set; } + + /// + /// Gets or sets the type of task. Details in CustomDetails property + /// depend on this type. + /// + [JsonProperty(PropertyName = "taskType")] + public string TaskType { get; set; } + + /// + /// Gets or sets the custom task details based on the task type. + /// + [JsonProperty(PropertyName = "customDetails")] + public TaskTypeDetails CustomDetails { get; set; } + + /// + /// Gets or sets the custom task details based on the task type, if the + /// task type is + /// GroupTaskDetails or one of the types derived from it. + /// + [JsonProperty(PropertyName = "groupTaskCustomDetails")] + public GroupTaskDetails GroupTaskCustomDetails { get; set; } + + /// + /// Gets or sets the task error details. + /// + [JsonProperty(PropertyName = "errors")] + public IList Errors { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AddVCenterRequest.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AddVCenterRequest.cs new file mode 100644 index 000000000000..21ba5429e087 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AddVCenterRequest.cs @@ -0,0 +1,54 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input required to add vCenter. + /// + public partial class AddVCenterRequest + { + /// + /// Initializes a new instance of the AddVCenterRequest class. + /// + public AddVCenterRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AddVCenterRequest class. + /// + /// The properties of an add vCenter + /// request. + public AddVCenterRequest(AddVCenterRequestProperties properties = default(AddVCenterRequestProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the properties of an add vCenter request. + /// + [JsonProperty(PropertyName = "properties")] + public AddVCenterRequestProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AddVCenterRequestProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AddVCenterRequestProperties.cs new file mode 100644 index 000000000000..4e315d6e889c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AddVCenterRequestProperties.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties of an add vCenter request. + /// + public partial class AddVCenterRequestProperties + { + /// + /// Initializes a new instance of the AddVCenterRequestProperties + /// class. + /// + public AddVCenterRequestProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AddVCenterRequestProperties + /// class. + /// + /// The friendly name of the + /// vCenter. + /// The IP address of the vCenter to be + /// discovered. + /// The process server Id from where the + /// discovery is orchestrated. + /// The port number for discovery. + /// The account Id which has privileges to + /// discover the vCenter. + public AddVCenterRequestProperties(string friendlyName = default(string), string ipAddress = default(string), string processServerId = default(string), string port = default(string), string runAsAccountId = default(string)) + { + FriendlyName = friendlyName; + IpAddress = ipAddress; + ProcessServerId = processServerId; + Port = port; + RunAsAccountId = runAsAccountId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the friendly name of the vCenter. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the IP address of the vCenter to be discovered. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the process server Id from where the discovery is + /// orchestrated. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the port number for discovery. + /// + [JsonProperty(PropertyName = "port")] + public string Port { get; set; } + + /// + /// Gets or sets the account Id which has privileges to discover the + /// vCenter. + /// + [JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Alert.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Alert.cs new file mode 100644 index 000000000000..e686cb8b76dd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Alert.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Implements the Alert class. + /// + public partial class Alert : Resource + { + /// + /// Initializes a new instance of the Alert class. + /// + public Alert() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Alert class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// Alert related data. + public Alert(string id = default(string), string name = default(string), string type = default(string), string location = default(string), AlertProperties properties = default(AlertProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets alert related data. + /// + [JsonProperty(PropertyName = "properties")] + public AlertProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AlertProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AlertProperties.cs new file mode 100644 index 000000000000..f9840a73a0ad --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AlertProperties.cs @@ -0,0 +1,74 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The proprties of an alert. + /// + public partial class AlertProperties + { + /// + /// Initializes a new instance of the AlertProperties class. + /// + public AlertProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AlertProperties class. + /// + /// A value indicating whether to send email + /// to subscription administrator. + /// The custom email address for + /// sending emails. + /// The locale for the email notification. + public AlertProperties(string sendToOwners = default(string), IList customEmailAddresses = default(IList), string locale = default(string)) + { + SendToOwners = sendToOwners; + CustomEmailAddresses = customEmailAddresses; + Locale = locale; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating whether to send email to + /// subscription administrator. + /// + [JsonProperty(PropertyName = "sendToOwners")] + public string SendToOwners { get; set; } + + /// + /// Gets or sets the custom email address for sending emails. + /// + [JsonProperty(PropertyName = "customEmailAddresses")] + public IList CustomEmailAddresses { get; set; } + + /// + /// Gets or sets the locale for the email notification. + /// + [JsonProperty(PropertyName = "locale")] + public string Locale { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AlternateLocationRecoveryOption.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AlternateLocationRecoveryOption.cs new file mode 100644 index 000000000000..4ed94c20404a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AlternateLocationRecoveryOption.cs @@ -0,0 +1,31 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for AlternateLocationRecoveryOption. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum AlternateLocationRecoveryOption + { + [EnumMember(Value = "CreateVmIfNotFound")] + CreateVmIfNotFound, + [EnumMember(Value = "NoAction")] + NoAction + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointInput.cs new file mode 100644 index 000000000000..4ba2066e612f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointInput.cs @@ -0,0 +1,54 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input to apply recovery point. + /// + public partial class ApplyRecoveryPointInput + { + /// + /// Initializes a new instance of the ApplyRecoveryPointInput class. + /// + public ApplyRecoveryPointInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApplyRecoveryPointInput class. + /// + /// The input properties to apply recovery + /// point. + public ApplyRecoveryPointInput(ApplyRecoveryPointInputProperties properties = default(ApplyRecoveryPointInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the input properties to apply recovery point. + /// + [JsonProperty(PropertyName = "properties")] + public ApplyRecoveryPointInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointInputProperties.cs new file mode 100644 index 000000000000..38774b755458 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointInputProperties.cs @@ -0,0 +1,64 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input properties to apply recovery point. + /// + public partial class ApplyRecoveryPointInputProperties + { + /// + /// Initializes a new instance of the ApplyRecoveryPointInputProperties + /// class. + /// + public ApplyRecoveryPointInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApplyRecoveryPointInputProperties + /// class. + /// + /// The recovery point Id. + /// Provider specific input for + /// applying recovery point. + public ApplyRecoveryPointInputProperties(string recoveryPointId = default(string), ApplyRecoveryPointProviderSpecificInput providerSpecificDetails = default(ApplyRecoveryPointProviderSpecificInput)) + { + RecoveryPointId = recoveryPointId; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point Id. + /// + [JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId { get; set; } + + /// + /// Gets or sets provider specific input for applying recovery point. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public ApplyRecoveryPointProviderSpecificInput ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointProviderSpecificInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointProviderSpecificInput.cs new file mode 100644 index 000000000000..356c42a5c9bc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ApplyRecoveryPointProviderSpecificInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Provider specific input for apply recovery point. + /// + public partial class ApplyRecoveryPointProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// ApplyRecoveryPointProviderSpecificInput class. + /// + public ApplyRecoveryPointProviderSpecificInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AsrJobDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AsrJobDetails.cs new file mode 100644 index 000000000000..8c2293e176ae --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AsrJobDetails.cs @@ -0,0 +1,51 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class represents job details based on specific job type. + /// + public partial class AsrJobDetails : JobDetails + { + /// + /// Initializes a new instance of the AsrJobDetails class. + /// + public AsrJobDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AsrJobDetails class. + /// + /// The affected object properties + /// like source server, source cloud, target + /// server, target cloud etc. based on the workflow object + /// details. + public AsrJobDetails(IDictionary affectedObjectDetails = default(IDictionary)) + : base(affectedObjectDetails) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AutomationRunbookTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AutomationRunbookTaskDetails.cs new file mode 100644 index 000000000000..763b16d3caab --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AutomationRunbookTaskDetails.cs @@ -0,0 +1,125 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class represents the task details for an automation runbook. + /// + public partial class AutomationRunbookTaskDetails : TaskTypeDetails + { + /// + /// Initializes a new instance of the AutomationRunbookTaskDetails + /// class. + /// + public AutomationRunbookTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AutomationRunbookTaskDetails + /// class. + /// + /// The recovery plan task name. + /// The cloud service of the automation + /// runbook account. + /// The subscription Id of the automation + /// runbook account. + /// The automation account name of the + /// runbook. + /// The runbook Id. + /// The runbook name. + /// The job Id of the runbook execution. + /// The execution output of the + /// runbook. + /// A value indicating whether it is + /// a primary side script or not. + public AutomationRunbookTaskDetails(string name = default(string), string cloudServiceName = default(string), string subscriptionId = default(string), string accountName = default(string), string runbookId = default(string), string runbookName = default(string), string jobId = default(string), string jobOutput = default(string), bool? isPrimarySideScript = default(bool?)) + { + Name = name; + CloudServiceName = cloudServiceName; + SubscriptionId = subscriptionId; + AccountName = accountName; + RunbookId = runbookId; + RunbookName = runbookName; + JobId = jobId; + JobOutput = jobOutput; + IsPrimarySideScript = isPrimarySideScript; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery plan task name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the cloud service of the automation runbook account. + /// + [JsonProperty(PropertyName = "cloudServiceName")] + public string CloudServiceName { get; set; } + + /// + /// Gets or sets the subscription Id of the automation runbook account. + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; set; } + + /// + /// Gets or sets the automation account name of the runbook. + /// + [JsonProperty(PropertyName = "accountName")] + public string AccountName { get; set; } + + /// + /// Gets or sets the runbook Id. + /// + [JsonProperty(PropertyName = "runbookId")] + public string RunbookId { get; set; } + + /// + /// Gets or sets the runbook name. + /// + [JsonProperty(PropertyName = "runbookName")] + public string RunbookName { get; set; } + + /// + /// Gets or sets the job Id of the runbook execution. + /// + [JsonProperty(PropertyName = "jobId")] + public string JobId { get; set; } + + /// + /// Gets or sets the execution output of the runbook. + /// + [JsonProperty(PropertyName = "jobOutput")] + public string JobOutput { get; set; } + + /// + /// Gets or sets a value indicating whether it is a primary side script + /// or not. + /// + [JsonProperty(PropertyName = "isPrimarySideScript")] + public bool? IsPrimarySideScript { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureFabricCreationInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureFabricCreationInput.cs new file mode 100644 index 000000000000..572e1edfaffb --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureFabricCreationInput.cs @@ -0,0 +1,54 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Fabric provider specific settings. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class AzureFabricCreationInput : FabricSpecificCreationInput + { + /// + /// Initializes a new instance of the AzureFabricCreationInput class. + /// + public AzureFabricCreationInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureFabricCreationInput class. + /// + /// The Location. + public AzureFabricCreationInput(string location = default(string)) + { + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureFabricSpecificDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureFabricSpecificDetails.cs new file mode 100644 index 000000000000..1622ee8b704e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureFabricSpecificDetails.cs @@ -0,0 +1,65 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Fabric Specific Details. + /// + [Newtonsoft.Json.JsonObject("Azure")] + public partial class AzureFabricSpecificDetails : FabricSpecificDetails + { + /// + /// Initializes a new instance of the AzureFabricSpecificDetails class. + /// + public AzureFabricSpecificDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureFabricSpecificDetails class. + /// + /// The Location for the Azure fabric. + /// The container Ids for the Azure + /// fabric. + public AzureFabricSpecificDetails(string location = default(string), IList containerIds = default(IList)) + { + Location = location; + ContainerIds = containerIds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Location for the Azure fabric. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets the container Ids for the Azure fabric. + /// + [JsonProperty(PropertyName = "containerIds")] + public IList ContainerIds { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureCreateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureCreateNetworkMappingInput.cs new file mode 100644 index 000000000000..1e6cb011530a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureCreateNetworkMappingInput.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Create network mappings input properties/behaviour specific to Azure to + /// Azure Network + /// mapping. + /// + [Newtonsoft.Json.JsonObject("AzureToAzure")] + public partial class AzureToAzureCreateNetworkMappingInput : FabricSpecificCreateNetworkMappingInput + { + /// + /// Initializes a new instance of the + /// AzureToAzureCreateNetworkMappingInput class. + /// + public AzureToAzureCreateNetworkMappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AzureToAzureCreateNetworkMappingInput class. + /// + /// The primary azure vnet Id. + public AzureToAzureCreateNetworkMappingInput(string primaryNetworkId = default(string)) + { + PrimaryNetworkId = primaryNetworkId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the primary azure vnet Id. + /// + [JsonProperty(PropertyName = "primaryNetworkId")] + public string PrimaryNetworkId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureNetworkMappingSettings.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureNetworkMappingSettings.cs new file mode 100644 index 000000000000..f772a95ae475 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureNetworkMappingSettings.cs @@ -0,0 +1,66 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A2A Network Mapping fabric specific settings. + /// + [Newtonsoft.Json.JsonObject("AzureToAzure")] + public partial class AzureToAzureNetworkMappingSettings : NetworkMappingFabricSpecificSettings + { + /// + /// Initializes a new instance of the + /// AzureToAzureNetworkMappingSettings class. + /// + public AzureToAzureNetworkMappingSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AzureToAzureNetworkMappingSettings class. + /// + /// The primary fabric + /// location. + /// The recovery fabric + /// location. + public AzureToAzureNetworkMappingSettings(string primaryFabricLocation = default(string), string recoveryFabricLocation = default(string)) + { + PrimaryFabricLocation = primaryFabricLocation; + RecoveryFabricLocation = recoveryFabricLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the primary fabric location. + /// + [JsonProperty(PropertyName = "primaryFabricLocation")] + public string PrimaryFabricLocation { get; set; } + + /// + /// Gets or sets the recovery fabric location. + /// + [JsonProperty(PropertyName = "recoveryFabricLocation")] + public string RecoveryFabricLocation { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureUpdateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureUpdateNetworkMappingInput.cs new file mode 100644 index 000000000000..4748395d9bb9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureUpdateNetworkMappingInput.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Updates network mappings input. + /// + [Newtonsoft.Json.JsonObject("AzureToAzure")] + public partial class AzureToAzureUpdateNetworkMappingInput : FabricSpecificUpdateNetworkMappingInput + { + /// + /// Initializes a new instance of the + /// AzureToAzureUpdateNetworkMappingInput class. + /// + public AzureToAzureUpdateNetworkMappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AzureToAzureUpdateNetworkMappingInput class. + /// + /// The primary azure vnet Id. + public AzureToAzureUpdateNetworkMappingInput(string primaryNetworkId = default(string)) + { + PrimaryNetworkId = primaryNetworkId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the primary azure vnet Id. + /// + [JsonProperty(PropertyName = "primaryNetworkId")] + public string PrimaryNetworkId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureVmSyncedConfigDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureVmSyncedConfigDetails.cs new file mode 100644 index 000000000000..4e58c4abef50 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureToAzureVmSyncedConfigDetails.cs @@ -0,0 +1,73 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure to Azure VM synced configuration details. + /// + public partial class AzureToAzureVmSyncedConfigDetails + { + /// + /// Initializes a new instance of the AzureToAzureVmSyncedConfigDetails + /// class. + /// + public AzureToAzureVmSyncedConfigDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureToAzureVmSyncedConfigDetails + /// class. + /// + /// The Azure VM tags. + /// The Azure role assignments. + /// The Azure VM input endpoints. + public AzureToAzureVmSyncedConfigDetails(IDictionary tags = default(IDictionary), IList roleAssignments = default(IList), IList inputEndpoints = default(IList)) + { + Tags = tags; + RoleAssignments = roleAssignments; + InputEndpoints = inputEndpoints; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure VM tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets the Azure role assignments. + /// + [JsonProperty(PropertyName = "roleAssignments")] + public IList RoleAssignments { get; set; } + + /// + /// Gets or sets the Azure VM input endpoints. + /// + [JsonProperty(PropertyName = "inputEndpoints")] + public IList InputEndpoints { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureVmDiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureVmDiskDetails.cs new file mode 100644 index 000000000000..f36adbcad398 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/AzureVmDiskDetails.cs @@ -0,0 +1,103 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Disk details for E2A provider. + /// + public partial class AzureVmDiskDetails + { + /// + /// Initializes a new instance of the AzureVmDiskDetails class. + /// + public AzureVmDiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureVmDiskDetails class. + /// + /// VHD type. + /// The VHD id. + /// VHD name. + /// Max side in MB. + /// Blob uri of the Azure + /// disk. + /// The target Azure disk name. + /// Ordinal\LunId of the disk for the Azure + /// VM. + public AzureVmDiskDetails(string vhdType = default(string), string vhdId = default(string), string vhdName = default(string), string maxSizeMB = default(string), string targetDiskLocation = default(string), string targetDiskName = default(string), string lunId = default(string)) + { + VhdType = vhdType; + VhdId = vhdId; + VhdName = vhdName; + MaxSizeMB = maxSizeMB; + TargetDiskLocation = targetDiskLocation; + TargetDiskName = targetDiskName; + LunId = lunId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets VHD type. + /// + [JsonProperty(PropertyName = "vhdType")] + public string VhdType { get; set; } + + /// + /// Gets or sets the VHD id. + /// + [JsonProperty(PropertyName = "vhdId")] + public string VhdId { get; set; } + + /// + /// Gets or sets VHD name. + /// + [JsonProperty(PropertyName = "vhdName")] + public string VhdName { get; set; } + + /// + /// Gets or sets max side in MB. + /// + [JsonProperty(PropertyName = "maxSizeMB")] + public string MaxSizeMB { get; set; } + + /// + /// Gets or sets blob uri of the Azure disk. + /// + [JsonProperty(PropertyName = "targetDiskLocation")] + public string TargetDiskLocation { get; set; } + + /// + /// Gets or sets the target Azure disk name. + /// + [JsonProperty(PropertyName = "targetDiskName")] + public string TargetDiskName { get; set; } + + /// + /// Gets or sets ordinal\LunId of the disk for the Azure VM. + /// + [JsonProperty(PropertyName = "lunId")] + public string LunId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigurationSettings.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigurationSettings.cs new file mode 100644 index 000000000000..45e734839bbc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigurationSettings.cs @@ -0,0 +1,37 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Replication provider specific settings. + /// + public partial class ConfigurationSettings + { + /// + /// Initializes a new instance of the ConfigurationSettings class. + /// + public ConfigurationSettings() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigureAlertRequest.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigureAlertRequest.cs new file mode 100644 index 000000000000..e866c41ed5a7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigureAlertRequest.cs @@ -0,0 +1,54 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request to configure alerts for the system. + /// + public partial class ConfigureAlertRequest + { + /// + /// Initializes a new instance of the ConfigureAlertRequest class. + /// + public ConfigureAlertRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConfigureAlertRequest class. + /// + /// The properties of a configure alert + /// request. + public ConfigureAlertRequest(ConfigureAlertRequestProperties properties = default(ConfigureAlertRequestProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the properties of a configure alert request. + /// + [JsonProperty(PropertyName = "properties")] + public ConfigureAlertRequestProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigureAlertRequestProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigureAlertRequestProperties.cs new file mode 100644 index 000000000000..90c5496dc16c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConfigureAlertRequestProperties.cs @@ -0,0 +1,76 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of a configure alert request. + /// + public partial class ConfigureAlertRequestProperties + { + /// + /// Initializes a new instance of the ConfigureAlertRequestProperties + /// class. + /// + public ConfigureAlertRequestProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConfigureAlertRequestProperties + /// class. + /// + /// A value indicating whether to send email + /// to subscription administrator. + /// The custom email address for + /// sending emails. + /// The locale for the email notification. + public ConfigureAlertRequestProperties(string sendToOwners = default(string), IList customEmailAddresses = default(IList), string locale = default(string)) + { + SendToOwners = sendToOwners; + CustomEmailAddresses = customEmailAddresses; + Locale = locale; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating whether to send email to + /// subscription administrator. + /// + [JsonProperty(PropertyName = "sendToOwners")] + public string SendToOwners { get; set; } + + /// + /// Gets or sets the custom email address for sending emails. + /// + [JsonProperty(PropertyName = "customEmailAddresses")] + public IList CustomEmailAddresses { get; set; } + + /// + /// Gets or sets the locale for the email notification. + /// + [JsonProperty(PropertyName = "locale")] + public string Locale { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConsistencyCheckTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConsistencyCheckTaskDetails.cs new file mode 100644 index 000000000000..2c2797a3a58e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ConsistencyCheckTaskDetails.cs @@ -0,0 +1,59 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class contains monitoring details of all the inconsistent + /// Protected Entites in Vmm. + /// + public partial class ConsistencyCheckTaskDetails : TaskTypeDetails + { + /// + /// Initializes a new instance of the ConsistencyCheckTaskDetails + /// class. + /// + public ConsistencyCheckTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConsistencyCheckTaskDetails + /// class. + /// + /// The list of inconsistent Vm + /// details. + public ConsistencyCheckTaskDetails(IList vmDetails = default(IList)) + { + VmDetails = vmDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the list of inconsistent Vm details. + /// + [JsonProperty(PropertyName = "vmDetails")] + public IList VmDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateNetworkMappingInput.cs new file mode 100644 index 000000000000..5f324b4639fc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateNetworkMappingInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Create network mappings input. + /// + public partial class CreateNetworkMappingInput + { + /// + /// Initializes a new instance of the CreateNetworkMappingInput class. + /// + public CreateNetworkMappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreateNetworkMappingInput class. + /// + /// Properties. + public CreateNetworkMappingInput(CreateNetworkMappingInputProperties properties = default(CreateNetworkMappingInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties. + /// + [JsonProperty(PropertyName = "properties")] + public CreateNetworkMappingInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateNetworkMappingInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateNetworkMappingInputProperties.cs new file mode 100644 index 000000000000..23db979030a9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateNetworkMappingInputProperties.cs @@ -0,0 +1,72 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Common input details for network mapping operation. + /// + public partial class CreateNetworkMappingInputProperties + { + /// + /// Initializes a new instance of the + /// CreateNetworkMappingInputProperties class. + /// + public CreateNetworkMappingInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateNetworkMappingInputProperties class. + /// + /// Recovery fabric Name. + /// Recovery network Id. + /// Fabric specific input + /// properties. + public CreateNetworkMappingInputProperties(string recoveryFabricName = default(string), string recoveryNetworkId = default(string), FabricSpecificCreateNetworkMappingInput fabricSpecificDetails = default(FabricSpecificCreateNetworkMappingInput)) + { + RecoveryFabricName = recoveryFabricName; + RecoveryNetworkId = recoveryNetworkId; + FabricSpecificDetails = fabricSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets recovery fabric Name. + /// + [JsonProperty(PropertyName = "recoveryFabricName")] + public string RecoveryFabricName { get; set; } + + /// + /// Gets or sets recovery network Id. + /// + [JsonProperty(PropertyName = "recoveryNetworkId")] + public string RecoveryNetworkId { get; set; } + + /// + /// Gets or sets fabric specific input properties. + /// + [JsonProperty(PropertyName = "fabricSpecificDetails")] + public FabricSpecificCreateNetworkMappingInput FabricSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreatePolicyInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreatePolicyInput.cs new file mode 100644 index 000000000000..35440a7a35a1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreatePolicyInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Protection profile input. + /// + public partial class CreatePolicyInput + { + /// + /// Initializes a new instance of the CreatePolicyInput class. + /// + public CreatePolicyInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreatePolicyInput class. + /// + /// Policy creation properties. + public CreatePolicyInput(CreatePolicyInputProperties properties = default(CreatePolicyInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets policy creation properties. + /// + [JsonProperty(PropertyName = "properties")] + public CreatePolicyInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreatePolicyInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreatePolicyInputProperties.cs new file mode 100644 index 000000000000..67dffd25e0f8 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreatePolicyInputProperties.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Policy creation properties. + /// + public partial class CreatePolicyInputProperties + { + /// + /// Initializes a new instance of the CreatePolicyInputProperties + /// class. + /// + public CreatePolicyInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreatePolicyInputProperties + /// class. + /// + /// The + /// ReplicationProviderSettings. + public CreatePolicyInputProperties(PolicyProviderSpecificInput providerSpecificInput = default(PolicyProviderSpecificInput)) + { + ProviderSpecificInput = providerSpecificInput; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ReplicationProviderSettings. + /// + [JsonProperty(PropertyName = "providerSpecificInput")] + public PolicyProviderSpecificInput ProviderSpecificInput { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerInput.cs new file mode 100644 index 000000000000..f09ca995f413 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerInput.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Create protection container input. + /// + public partial class CreateProtectionContainerInput + { + /// + /// Initializes a new instance of the CreateProtectionContainerInput + /// class. + /// + public CreateProtectionContainerInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreateProtectionContainerInput + /// class. + /// + /// Create protection container input + /// properties. + public CreateProtectionContainerInput(CreateProtectionContainerInputProperties properties = default(CreateProtectionContainerInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets create protection container input properties. + /// + [JsonProperty(PropertyName = "properties")] + public CreateProtectionContainerInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerInputProperties.cs new file mode 100644 index 000000000000..ed4fc56017a7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerInputProperties.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Create protection container input properties. + /// + public partial class CreateProtectionContainerInputProperties + { + /// + /// Initializes a new instance of the + /// CreateProtectionContainerInputProperties class. + /// + public CreateProtectionContainerInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateProtectionContainerInputProperties class. + /// + /// Provider specific inputs for + /// container creation. + public CreateProtectionContainerInputProperties(IList providerSpecificInput = default(IList)) + { + ProviderSpecificInput = providerSpecificInput; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets provider specific inputs for container creation. + /// + [JsonProperty(PropertyName = "providerSpecificInput")] + public IList ProviderSpecificInput { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerMappingInput.cs new file mode 100644 index 000000000000..bfb93d435595 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerMappingInput.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Configure pairing input. + /// + public partial class CreateProtectionContainerMappingInput + { + /// + /// Initializes a new instance of the + /// CreateProtectionContainerMappingInput class. + /// + public CreateProtectionContainerMappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateProtectionContainerMappingInput class. + /// + /// Configure protection input + /// properties. + public CreateProtectionContainerMappingInput(CreateProtectionContainerMappingInputProperties properties = default(CreateProtectionContainerMappingInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets configure protection input properties. + /// + [JsonProperty(PropertyName = "properties")] + public CreateProtectionContainerMappingInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerMappingInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerMappingInputProperties.cs new file mode 100644 index 000000000000..6984f7dfebdb --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateProtectionContainerMappingInputProperties.cs @@ -0,0 +1,73 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Configure pairing input properties. + /// + public partial class CreateProtectionContainerMappingInputProperties + { + /// + /// Initializes a new instance of the + /// CreateProtectionContainerMappingInputProperties class. + /// + public CreateProtectionContainerMappingInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateProtectionContainerMappingInputProperties class. + /// + /// The target unique + /// protection container name. + /// Applicable policy. + /// Provider specific input for + /// pairing. + public CreateProtectionContainerMappingInputProperties(string targetProtectionContainerId = default(string), string policyId = default(string), ReplicationProviderSpecificContainerMappingInput providerSpecificInput = default(ReplicationProviderSpecificContainerMappingInput)) + { + TargetProtectionContainerId = targetProtectionContainerId; + PolicyId = policyId; + ProviderSpecificInput = providerSpecificInput; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the target unique protection container name. + /// + [JsonProperty(PropertyName = "targetProtectionContainerId")] + public string TargetProtectionContainerId { get; set; } + + /// + /// Gets or sets applicable policy. + /// + [JsonProperty(PropertyName = "PolicyId")] + public string PolicyId { get; set; } + + /// + /// Gets or sets provider specific input for pairing. + /// + [JsonProperty(PropertyName = "providerSpecificInput")] + public ReplicationProviderSpecificContainerMappingInput ProviderSpecificInput { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateRecoveryPlanInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateRecoveryPlanInput.cs new file mode 100644 index 000000000000..66d37e77361c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateRecoveryPlanInput.cs @@ -0,0 +1,71 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Create recovery plan input class. + /// + public partial class CreateRecoveryPlanInput + { + /// + /// Initializes a new instance of the CreateRecoveryPlanInput class. + /// + public CreateRecoveryPlanInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreateRecoveryPlanInput class. + /// + /// Recovery plan creation properties. + public CreateRecoveryPlanInput(CreateRecoveryPlanInputProperties properties) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets recovery plan creation properties. + /// + [JsonProperty(PropertyName = "properties")] + public CreateRecoveryPlanInputProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateRecoveryPlanInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateRecoveryPlanInputProperties.cs new file mode 100644 index 000000000000..377bb1bde608 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CreateRecoveryPlanInputProperties.cs @@ -0,0 +1,116 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery plan creation properties. + /// + public partial class CreateRecoveryPlanInputProperties + { + /// + /// Initializes a new instance of the CreateRecoveryPlanInputProperties + /// class. + /// + public CreateRecoveryPlanInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreateRecoveryPlanInputProperties + /// class. + /// + /// The primary fabric Id. + /// The recovery fabric Id. + /// The recovery plan groups. + /// The failover deployment + /// model. Possible values include: 'NotApplicable', 'Classic', + /// 'ResourceManager' + public CreateRecoveryPlanInputProperties(string primaryFabricId, string recoveryFabricId, IList groups, FailoverDeploymentModel? failoverDeploymentModel = default(FailoverDeploymentModel?)) + { + PrimaryFabricId = primaryFabricId; + RecoveryFabricId = recoveryFabricId; + FailoverDeploymentModel = failoverDeploymentModel; + Groups = groups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the primary fabric Id. + /// + [JsonProperty(PropertyName = "primaryFabricId")] + public string PrimaryFabricId { get; set; } + + /// + /// Gets or sets the recovery fabric Id. + /// + [JsonProperty(PropertyName = "recoveryFabricId")] + public string RecoveryFabricId { get; set; } + + /// + /// Gets or sets the failover deployment model. Possible values + /// include: 'NotApplicable', 'Classic', 'ResourceManager' + /// + [JsonProperty(PropertyName = "failoverDeploymentModel")] + public FailoverDeploymentModel? FailoverDeploymentModel { get; set; } + + /// + /// Gets or sets the recovery plan groups. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PrimaryFabricId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PrimaryFabricId"); + } + if (RecoveryFabricId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RecoveryFabricId"); + } + if (Groups == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Groups"); + } + if (Groups != null) + { + foreach (var element in Groups) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CurrentScenarioDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CurrentScenarioDetails.cs new file mode 100644 index 000000000000..707f6b7d4e4b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/CurrentScenarioDetails.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Current scenario details of the protected entity. + /// + public partial class CurrentScenarioDetails + { + /// + /// Initializes a new instance of the CurrentScenarioDetails class. + /// + public CurrentScenarioDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CurrentScenarioDetails class. + /// + /// Scenario name. + /// ARM Id of the job being executed. + /// Start time of the workflow. + public CurrentScenarioDetails(string scenarioName = default(string), string jobId = default(string), System.DateTime? startTime = default(System.DateTime?)) + { + ScenarioName = scenarioName; + JobId = jobId; + StartTime = startTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets scenario name. + /// + [JsonProperty(PropertyName = "scenarioName")] + public string ScenarioName { get; set; } + + /// + /// Gets or sets ARM Id of the job being executed. + /// + [JsonProperty(PropertyName = "jobId")] + public string JobId { get; set; } + + /// + /// Gets or sets start time of the workflow. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DataStore.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DataStore.cs new file mode 100644 index 000000000000..8d53315a16ec --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DataStore.cs @@ -0,0 +1,86 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The datastore details of the MT. + /// + public partial class DataStore + { + /// + /// Initializes a new instance of the DataStore class. + /// + public DataStore() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataStore class. + /// + /// The symbolic name of data store. + /// The uuid of data store. + /// The capacity of data store in GBs. + /// The free space of data store in + /// GBs. + /// The type of data store. + public DataStore(string symbolicName = default(string), string uuid = default(string), string capacity = default(string), string freeSpace = default(string), string type = default(string)) + { + SymbolicName = symbolicName; + Uuid = uuid; + Capacity = capacity; + FreeSpace = freeSpace; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the symbolic name of data store. + /// + [JsonProperty(PropertyName = "symbolicName")] + public string SymbolicName { get; set; } + + /// + /// Gets or sets the uuid of data store. + /// + [JsonProperty(PropertyName = "uuid")] + public string Uuid { get; set; } + + /// + /// Gets or sets the capacity of data store in GBs. + /// + [JsonProperty(PropertyName = "capacity")] + public string Capacity { get; set; } + + /// + /// Gets or sets the free space of data store in GBs. + /// + [JsonProperty(PropertyName = "freeSpace")] + public string FreeSpace { get; set; } + + /// + /// Gets or sets the type of data store. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DataSyncStatus.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DataSyncStatus.cs new file mode 100644 index 000000000000..59c7fb1d28b6 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DataSyncStatus.cs @@ -0,0 +1,31 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for DataSyncStatus. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DataSyncStatus + { + [EnumMember(Value = "ForDownTime")] + ForDownTime, + [EnumMember(Value = "ForSynchronization")] + ForSynchronization + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionInput.cs new file mode 100644 index 000000000000..acf6c8e6eb6d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionInput.cs @@ -0,0 +1,54 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Disable protection input. + /// + public partial class DisableProtectionInput + { + /// + /// Initializes a new instance of the DisableProtectionInput class. + /// + public DisableProtectionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DisableProtectionInput class. + /// + /// Disable protection input + /// properties. + public DisableProtectionInput(DisableProtectionInputProperties properties = default(DisableProtectionInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets disable protection input properties. + /// + [JsonProperty(PropertyName = "properties")] + public DisableProtectionInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionInputProperties.cs new file mode 100644 index 000000000000..d47e87fb4ee2 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionInputProperties.cs @@ -0,0 +1,68 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Disable protection input properties. + /// + public partial class DisableProtectionInputProperties + { + /// + /// Initializes a new instance of the DisableProtectionInputProperties + /// class. + /// + public DisableProtectionInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DisableProtectionInputProperties + /// class. + /// + /// Disable protection reason. It + /// can have values NotSpecified/MigrationComplete. Possible values + /// include: 'NotSpecified', 'MigrationComplete' + /// Replication provider + /// specific input. + public DisableProtectionInputProperties(DisableProtectionReason? disableProtectionReason = default(DisableProtectionReason?), DisableProtectionProviderSpecificInput replicationProviderInput = default(DisableProtectionProviderSpecificInput)) + { + DisableProtectionReason = disableProtectionReason; + ReplicationProviderInput = replicationProviderInput; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets disable protection reason. It can have values + /// NotSpecified/MigrationComplete. Possible values include: + /// 'NotSpecified', 'MigrationComplete' + /// + [JsonProperty(PropertyName = "disableProtectionReason")] + public DisableProtectionReason? DisableProtectionReason { get; set; } + + /// + /// Gets or sets replication provider specific input. + /// + [JsonProperty(PropertyName = "replicationProviderInput")] + public DisableProtectionProviderSpecificInput ReplicationProviderInput { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionProviderSpecificInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionProviderSpecificInput.cs new file mode 100644 index 000000000000..1e72a0018b5a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionProviderSpecificInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Disable protection provider specific input. + /// + public partial class DisableProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// DisableProtectionProviderSpecificInput class. + /// + public DisableProtectionProviderSpecificInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionReason.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionReason.cs new file mode 100644 index 000000000000..79c2259d65d0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DisableProtectionReason.cs @@ -0,0 +1,31 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for DisableProtectionReason. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DisableProtectionReason + { + [EnumMember(Value = "NotSpecified")] + NotSpecified, + [EnumMember(Value = "MigrationComplete")] + MigrationComplete + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiscoverProtectableItemRequest.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiscoverProtectableItemRequest.cs new file mode 100644 index 000000000000..f415c62e0fa2 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiscoverProtectableItemRequest.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request to add a physical machine as a protectable item in a container. + /// + public partial class DiscoverProtectableItemRequest + { + /// + /// Initializes a new instance of the DiscoverProtectableItemRequest + /// class. + /// + public DiscoverProtectableItemRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DiscoverProtectableItemRequest + /// class. + /// + /// The properties of a discover protectable + /// item request. + public DiscoverProtectableItemRequest(DiscoverProtectableItemRequestProperties properties = default(DiscoverProtectableItemRequestProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the properties of a discover protectable item request. + /// + [JsonProperty(PropertyName = "properties")] + public DiscoverProtectableItemRequestProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiscoverProtectableItemRequestProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiscoverProtectableItemRequestProperties.cs new file mode 100644 index 000000000000..647eede27a7a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiscoverProtectableItemRequestProperties.cs @@ -0,0 +1,74 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Discover protectable item properties. + /// + public partial class DiscoverProtectableItemRequestProperties + { + /// + /// Initializes a new instance of the + /// DiscoverProtectableItemRequestProperties class. + /// + public DiscoverProtectableItemRequestProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DiscoverProtectableItemRequestProperties class. + /// + /// The friendly name of the physical + /// machine. + /// The IP address of the physical machine to + /// be discovered. + /// The OS type on the physical machine. + public DiscoverProtectableItemRequestProperties(string friendlyName = default(string), string ipAddress = default(string), string osType = default(string)) + { + FriendlyName = friendlyName; + IpAddress = ipAddress; + OsType = osType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the friendly name of the physical machine. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the IP address of the physical machine to be + /// discovered. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the OS type on the physical machine. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskDetails.cs new file mode 100644 index 000000000000..2e2f67e9b429 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskDetails.cs @@ -0,0 +1,77 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Onprem disk details data. + /// + public partial class DiskDetails + { + /// + /// Initializes a new instance of the DiskDetails class. + /// + public DiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DiskDetails class. + /// + /// The hard disk max size in MB. + /// The type of the volume. + /// The VHD Id. + /// The VHD name. + public DiskDetails(long? maxSizeMB = default(long?), string vhdType = default(string), string vhdId = default(string), string vhdName = default(string)) + { + MaxSizeMB = maxSizeMB; + VhdType = vhdType; + VhdId = vhdId; + VhdName = vhdName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the hard disk max size in MB. + /// + [JsonProperty(PropertyName = "maxSizeMB")] + public long? MaxSizeMB { get; set; } + + /// + /// Gets or sets the type of the volume. + /// + [JsonProperty(PropertyName = "vhdType")] + public string VhdType { get; set; } + + /// + /// Gets or sets the VHD Id. + /// + [JsonProperty(PropertyName = "vhdId")] + public string VhdId { get; set; } + + /// + /// Gets or sets the VHD name. + /// + [JsonProperty(PropertyName = "vhdName")] + public string VhdName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskVolumeDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskVolumeDetails.cs new file mode 100644 index 000000000000..911a2cbdfa7a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskVolumeDetails.cs @@ -0,0 +1,61 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Volume details. + /// + public partial class DiskVolumeDetails + { + /// + /// Initializes a new instance of the DiskVolumeDetails class. + /// + public DiskVolumeDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DiskVolumeDetails class. + /// + /// The volume label. + /// The volume name. + public DiskVolumeDetails(string label = default(string), string name = default(string)) + { + Label = label; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the volume label. + /// + [JsonProperty(PropertyName = "label")] + public string Label { get; set; } + + /// + /// Gets or sets the volume name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Display.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Display.cs new file mode 100644 index 000000000000..389ccccc6a3a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Display.cs @@ -0,0 +1,147 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Contains the localized display information for this particular + /// operation / action. These value will be used by several clients for + /// (1) custom role definitions for RBAC; + /// (2) complex query filters for the event service; and + /// (3) audit history / records for management operations. + /// + public partial class Display + { + /// + /// Initializes a new instance of the Display class. + /// + public Display() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Display class. + /// + /// The provider. + /// The localized friendly form of the resource provider name � it is + /// expected to also include the publisher/company responsible. + /// It should use Title Casing and begin with "Microsoft" for 1st party + /// services. + /// e.g. "Microsoft Monitoring Insights" or "Microsoft + /// Compute." + /// The resource. + /// The localized friendly form of the resource related to this + /// action/operation � it should match the public documentation for the + /// resource provider. + /// It should use Title Casing. + /// This value should be unique for a particular URL type (e.g. nested + /// types should *not* reuse their parent�s display.resource field). + /// e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual + /// Machine VM Sizes" or "Scheduler Jobs" + /// The operation. + /// The localized friendly name for the operation, as it should be + /// shown to the user. + /// It should be concise (to fit in drop downs) but clear (i.e. + /// self-documenting). + /// It should use Title Casing. + /// Prescriptive guidance: Read Create or Update Delete + /// 'ActionName' + /// The description. + /// The localized friendly description for the operation, as it should + /// be shown to the user. + /// It should be thorough, yet concise � it will be used in tool tips + /// and detailed views. + /// Prescriptive guidance for namespaces: + /// Read any 'display.provider' resource + /// Create or Update any 'display.provider' resource + /// Delete any 'display.provider' resource + /// Perform any other action on any 'display.provider' resource + /// Prescriptive guidance for namespaces: + /// Read any 'display.resource' Create or Update any + /// 'display.resource' Delete any 'display.resource' 'ActionName' any + /// 'display.resources' + public Display(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the provider. + /// The localized friendly form of the resource provider name � it is + /// expected to also include the publisher/company responsible. + /// It should use Title Casing and begin with "Microsoft" for 1st party + /// services. + /// e.g. "Microsoft Monitoring Insights" or "Microsoft Compute." + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } + + /// + /// Gets or sets the resource. + /// The localized friendly form of the resource related to this + /// action/operation � it should match the public documentation for the + /// resource provider. + /// It should use Title Casing. + /// This value should be unique for a particular URL type (e.g. nested + /// types should *not* reuse their parent�s display.resource field). + /// e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual + /// Machine VM Sizes" or "Scheduler Jobs" + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets the operation. + /// The localized friendly name for the operation, as it should be + /// shown to the user. + /// It should be concise (to fit in drop downs) but clear (i.e. + /// self-documenting). + /// It should use Title Casing. + /// Prescriptive guidance: Read Create or Update Delete 'ActionName' + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; set; } + + /// + /// Gets or sets the description. + /// The localized friendly description for the operation, as it should + /// be shown to the user. + /// It should be thorough, yet concise � it will be used in tool tips + /// and detailed views. + /// Prescriptive guidance for namespaces: + /// Read any 'display.provider' resource + /// Create or Update any 'display.provider' resource + /// Delete any 'display.provider' resource + /// Perform any other action on any 'display.provider' resource + /// Prescriptive guidance for namespaces: + /// Read any 'display.resource' Create or Update any + /// 'display.resource' Delete any 'display.resource' 'ActionName' any + /// 'display.resources' + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionInput.cs new file mode 100644 index 000000000000..cca33aebf4d6 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionInput.cs @@ -0,0 +1,54 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Enable protection input. + /// + public partial class EnableProtectionInput + { + /// + /// Initializes a new instance of the EnableProtectionInput class. + /// + public EnableProtectionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EnableProtectionInput class. + /// + /// Enable protection input + /// properties. + public EnableProtectionInput(EnableProtectionInputProperties properties = default(EnableProtectionInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets enable protection input properties. + /// + [JsonProperty(PropertyName = "properties")] + public EnableProtectionInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionInputProperties.cs new file mode 100644 index 000000000000..a99671a82067 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionInputProperties.cs @@ -0,0 +1,79 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Enable protection input properties. + /// + public partial class EnableProtectionInputProperties + { + /// + /// Initializes a new instance of the EnableProtectionInputProperties + /// class. + /// + public EnableProtectionInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EnableProtectionInputProperties + /// class. + /// + /// The Policy Id. + /// The protectable item Id. + /// The ReplicationProviderInput. + /// For HyperVReplicaAzure provider, it will be + /// AzureEnableProtectionInput object. + /// For San provider, it will be SanEnableProtectionInput object. + /// For HyperVReplicaAzure provider, it can be null. + public EnableProtectionInputProperties(string policyId = default(string), string protectableItemId = default(string), EnableProtectionProviderSpecificInput providerSpecificDetails = default(EnableProtectionProviderSpecificInput)) + { + PolicyId = policyId; + ProtectableItemId = protectableItemId; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Policy Id. + /// + [JsonProperty(PropertyName = "policyId")] + public string PolicyId { get; set; } + + /// + /// Gets or sets the protectable item Id. + /// + [JsonProperty(PropertyName = "protectableItemId")] + public string ProtectableItemId { get; set; } + + /// + /// Gets or sets the ReplicationProviderInput. + /// For HyperVReplicaAzure provider, it will be + /// AzureEnableProtectionInput object. + /// For San provider, it will be SanEnableProtectionInput object. + /// For HyperVReplicaAzure provider, it can be null. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public EnableProtectionProviderSpecificInput ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionProviderSpecificInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionProviderSpecificInput.cs new file mode 100644 index 000000000000..2f3ef302023e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EnableProtectionProviderSpecificInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Enable protection provider specific input. + /// + public partial class EnableProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// EnableProtectionProviderSpecificInput class. + /// + public EnableProtectionProviderSpecificInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EncryptionDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EncryptionDetails.cs new file mode 100644 index 000000000000..1ef35d157785 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EncryptionDetails.cs @@ -0,0 +1,72 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Encryption details for the fabric. + /// + public partial class EncryptionDetails + { + /// + /// Initializes a new instance of the EncryptionDetails class. + /// + public EncryptionDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EncryptionDetails class. + /// + /// The key encryption key state for the + /// Vmm. + /// The key encryption key certificate + /// thumbprint. + /// The key encryption key certificate + /// expiry date. + public EncryptionDetails(string kekState = default(string), string kekCertThumbprint = default(string), System.DateTime? kekCertExpiryDate = default(System.DateTime?)) + { + KekState = kekState; + KekCertThumbprint = kekCertThumbprint; + KekCertExpiryDate = kekCertExpiryDate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the key encryption key state for the Vmm. + /// + [JsonProperty(PropertyName = "kekState")] + public string KekState { get; set; } + + /// + /// Gets or sets the key encryption key certificate thumbprint. + /// + [JsonProperty(PropertyName = "kekCertThumbprint")] + public string KekCertThumbprint { get; set; } + + /// + /// Gets or sets the key encryption key certificate expiry date. + /// + [JsonProperty(PropertyName = "kekCertExpiryDate")] + public System.DateTime? KekCertExpiryDate { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventModel.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventModel.cs new file mode 100644 index 000000000000..f0f5fc2c963e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventModel.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Implements the Event class. + /// + public partial class EventModel : Resource + { + /// + /// Initializes a new instance of the EventModel class. + /// + public EventModel() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EventModel class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// Event related data. + public EventModel(string id = default(string), string name = default(string), string type = default(string), string location = default(string), EventProperties properties = default(EventProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets event related data. + /// + [JsonProperty(PropertyName = "properties")] + public EventProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventProperties.cs new file mode 100644 index 000000000000..0adf80be81c1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventProperties.cs @@ -0,0 +1,140 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The properties of a monitoring event. + /// + public partial class EventProperties + { + /// + /// Initializes a new instance of the EventProperties class. + /// + public EventProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EventProperties class. + /// + /// The Id of the monitoring event. + /// The event name. + /// The type of the event. + /// for example: VM Health, Server Health, Job Failure etc. + /// The friendly name of the + /// source of the event on which it + /// is raised (for example, VM, VMM etc). + /// The severity of the event. + /// The time of occurence of the + /// event. + /// The ARM ID of the fabric. + /// The provider specific + /// settings. + /// The event specific + /// settings. + /// The list of errors / warnings capturing + /// details associated with the + /// issue(s). + public EventProperties(string eventCode = default(string), string description = default(string), string eventType = default(string), string affectedObjectFriendlyName = default(string), string severity = default(string), System.DateTime? timeOfOccurrence = default(System.DateTime?), string fabricId = default(string), EventProviderSpecificDetails providerSpecificDetails = default(EventProviderSpecificDetails), EventSpecificDetails eventSpecificDetails = default(EventSpecificDetails), IList healthErrors = default(IList)) + { + EventCode = eventCode; + Description = description; + EventType = eventType; + AffectedObjectFriendlyName = affectedObjectFriendlyName; + Severity = severity; + TimeOfOccurrence = timeOfOccurrence; + FabricId = fabricId; + ProviderSpecificDetails = providerSpecificDetails; + EventSpecificDetails = eventSpecificDetails; + HealthErrors = healthErrors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Id of the monitoring event. + /// + [JsonProperty(PropertyName = "eventCode")] + public string EventCode { get; set; } + + /// + /// Gets or sets the event name. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets the type of the event. + /// for example: VM Health, Server Health, Job Failure etc. + /// + [JsonProperty(PropertyName = "eventType")] + public string EventType { get; set; } + + /// + /// Gets or sets the friendly name of the source of the event on which + /// it + /// is raised (for example, VM, VMM etc). + /// + [JsonProperty(PropertyName = "affectedObjectFriendlyName")] + public string AffectedObjectFriendlyName { get; set; } + + /// + /// Gets or sets the severity of the event. + /// + [JsonProperty(PropertyName = "severity")] + public string Severity { get; set; } + + /// + /// Gets or sets the time of occurence of the event. + /// + [JsonProperty(PropertyName = "timeOfOccurrence")] + public System.DateTime? TimeOfOccurrence { get; set; } + + /// + /// Gets or sets the ARM ID of the fabric. + /// + [JsonProperty(PropertyName = "fabricId")] + public string FabricId { get; set; } + + /// + /// Gets or sets the provider specific settings. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public EventProviderSpecificDetails ProviderSpecificDetails { get; set; } + + /// + /// Gets or sets the event specific settings. + /// + [JsonProperty(PropertyName = "eventSpecificDetails")] + public EventSpecificDetails EventSpecificDetails { get; set; } + + /// + /// Gets or sets the list of errors / warnings capturing details + /// associated with the + /// issue(s). + /// + [JsonProperty(PropertyName = "healthErrors")] + public IList HealthErrors { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventProviderSpecificDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventProviderSpecificDetails.cs new file mode 100644 index 000000000000..cb329c42a556 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventProviderSpecificDetails.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Model class for provider specific details for an event. + /// + public partial class EventProviderSpecificDetails + { + /// + /// Initializes a new instance of the EventProviderSpecificDetails + /// class. + /// + public EventProviderSpecificDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventSpecificDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventSpecificDetails.cs new file mode 100644 index 000000000000..fd63b833adeb --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/EventSpecificDetails.cs @@ -0,0 +1,37 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Model class for event specific details for an event. + /// + public partial class EventSpecificDetails + { + /// + /// Initializes a new instance of the EventSpecificDetails class. + /// + public EventSpecificDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ExportJobDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ExportJobDetails.cs new file mode 100644 index 000000000000..eb66535d5c7e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ExportJobDetails.cs @@ -0,0 +1,68 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class represents details for export jobs workflow. + /// + public partial class ExportJobDetails : JobDetails + { + /// + /// Initializes a new instance of the ExportJobDetails class. + /// + public ExportJobDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExportJobDetails class. + /// + /// The affected object properties + /// like source server, source cloud, target + /// server, target cloud etc. based on the workflow object + /// details. + /// BlobUri of the exported jobs. + /// The sas token to access blob. + public ExportJobDetails(IDictionary affectedObjectDetails = default(IDictionary), string blobUri = default(string), string sasToken = default(string)) + : base(affectedObjectDetails) + { + BlobUri = blobUri; + SasToken = sasToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets blobUri of the exported jobs. + /// + [JsonProperty(PropertyName = "blobUri")] + public string BlobUri { get; set; } + + /// + /// Gets or sets the sas token to access blob. + /// + [JsonProperty(PropertyName = "sasToken")] + public string SasToken { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Fabric.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Fabric.cs new file mode 100644 index 000000000000..ff2ec7eb12e9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Fabric.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Fabric definition. + /// + public partial class Fabric : Resource + { + /// + /// Initializes a new instance of the Fabric class. + /// + public Fabric() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Fabric class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// Fabric related data. + public Fabric(string id = default(string), string name = default(string), string type = default(string), string location = default(string), FabricProperties properties = default(FabricProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets fabric related data. + /// + [JsonProperty(PropertyName = "properties")] + public FabricProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricCreationInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricCreationInput.cs new file mode 100644 index 000000000000..68f73d05675c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricCreationInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Site details provided during the time of site creation + /// + public partial class FabricCreationInput + { + /// + /// Initializes a new instance of the FabricCreationInput class. + /// + public FabricCreationInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FabricCreationInput class. + /// + /// Fabric creation input. + public FabricCreationInput(FabricCreationInputProperties properties = default(FabricCreationInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets fabric creation input. + /// + [JsonProperty(PropertyName = "properties")] + public FabricCreationInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricCreationInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricCreationInputProperties.cs new file mode 100644 index 000000000000..16544f4c2738 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricCreationInputProperties.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Properties of site details provided during the time of site creation + /// + public partial class FabricCreationInputProperties + { + /// + /// Initializes a new instance of the FabricCreationInputProperties + /// class. + /// + public FabricCreationInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FabricCreationInputProperties + /// class. + /// + /// Fabric provider specific creation + /// input. + public FabricCreationInputProperties(FabricSpecificCreationInput customDetails = default(FabricSpecificCreationInput)) + { + CustomDetails = customDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets fabric provider specific creation input. + /// + [JsonProperty(PropertyName = "customDetails")] + public FabricSpecificCreationInput CustomDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricProperties.cs new file mode 100644 index 000000000000..6064fa9765db --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricProperties.cs @@ -0,0 +1,114 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Fabric properties. + /// + public partial class FabricProperties + { + /// + /// Initializes a new instance of the FabricProperties class. + /// + public FabricProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FabricProperties class. + /// + /// Friendly name of the fabric. + /// Encryption details for the + /// fabric. + /// Rollover encryption details + /// for the fabric. + /// Dra Registration Id. + /// BCDR state of the fabric. + /// Fabric specific settings. + /// Fabric health error + /// details. + /// Health of fabric. + public FabricProperties(string friendlyName = default(string), EncryptionDetails encryptionDetails = default(EncryptionDetails), EncryptionDetails rolloverEncryptionDetails = default(EncryptionDetails), string internalIdentifier = default(string), string bcdrState = default(string), FabricSpecificDetails customDetails = default(FabricSpecificDetails), IList healthErrorDetails = default(IList), string health = default(string)) + { + FriendlyName = friendlyName; + EncryptionDetails = encryptionDetails; + RolloverEncryptionDetails = rolloverEncryptionDetails; + InternalIdentifier = internalIdentifier; + BcdrState = bcdrState; + CustomDetails = customDetails; + HealthErrorDetails = healthErrorDetails; + Health = health; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets friendly name of the fabric. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets encryption details for the fabric. + /// + [JsonProperty(PropertyName = "encryptionDetails")] + public EncryptionDetails EncryptionDetails { get; set; } + + /// + /// Gets or sets rollover encryption details for the fabric. + /// + [JsonProperty(PropertyName = "rolloverEncryptionDetails")] + public EncryptionDetails RolloverEncryptionDetails { get; set; } + + /// + /// Gets or sets dra Registration Id. + /// + [JsonProperty(PropertyName = "internalIdentifier")] + public string InternalIdentifier { get; set; } + + /// + /// Gets or sets BCDR state of the fabric. + /// + [JsonProperty(PropertyName = "bcdrState")] + public string BcdrState { get; set; } + + /// + /// Gets or sets fabric specific settings. + /// + [JsonProperty(PropertyName = "customDetails")] + public FabricSpecificDetails CustomDetails { get; set; } + + /// + /// Gets or sets fabric health error details. + /// + [JsonProperty(PropertyName = "healthErrorDetails")] + public IList HealthErrorDetails { get; set; } + + /// + /// Gets or sets health of fabric. + /// + [JsonProperty(PropertyName = "health")] + public string Health { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricReplicationGroupTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricReplicationGroupTaskDetails.cs new file mode 100644 index 000000000000..314b08901d2a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricReplicationGroupTaskDetails.cs @@ -0,0 +1,72 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class represents the fabric replication group task details. + /// + public partial class FabricReplicationGroupTaskDetails : TaskTypeDetails + { + /// + /// Initializes a new instance of the FabricReplicationGroupTaskDetails + /// class. + /// + public FabricReplicationGroupTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FabricReplicationGroupTaskDetails + /// class. + /// + /// The skipped reason. + /// The skipped reason + /// string. + /// The job entity. + public FabricReplicationGroupTaskDetails(string skippedReason = default(string), string skippedReasonString = default(string), JobEntity jobTask = default(JobEntity)) + { + SkippedReason = skippedReason; + SkippedReasonString = skippedReasonString; + JobTask = jobTask; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the skipped reason. + /// + [JsonProperty(PropertyName = "skippedReason")] + public string SkippedReason { get; set; } + + /// + /// Gets or sets the skipped reason string. + /// + [JsonProperty(PropertyName = "skippedReasonString")] + public string SkippedReasonString { get; set; } + + /// + /// Gets or sets the job entity. + /// + [JsonProperty(PropertyName = "jobTask")] + public JobEntity JobTask { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificCreateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificCreateNetworkMappingInput.cs new file mode 100644 index 000000000000..0de61fd3d6fd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificCreateNetworkMappingInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Input details specific to fabrics during Network Mapping. + /// + public partial class FabricSpecificCreateNetworkMappingInput + { + /// + /// Initializes a new instance of the + /// FabricSpecificCreateNetworkMappingInput class. + /// + public FabricSpecificCreateNetworkMappingInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificCreationInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificCreationInput.cs new file mode 100644 index 000000000000..7f6bf01e2ef7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificCreationInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Fabric provider specific settings. + /// + public partial class FabricSpecificCreationInput + { + /// + /// Initializes a new instance of the FabricSpecificCreationInput + /// class. + /// + public FabricSpecificCreationInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificDetails.cs new file mode 100644 index 000000000000..f849fca90965 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificDetails.cs @@ -0,0 +1,37 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Fabric specific details. + /// + public partial class FabricSpecificDetails + { + /// + /// Initializes a new instance of the FabricSpecificDetails class. + /// + public FabricSpecificDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificUpdateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificUpdateNetworkMappingInput.cs new file mode 100644 index 000000000000..10c276af3e5a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FabricSpecificUpdateNetworkMappingInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Input details specific to fabrics during Network Mapping. + /// + public partial class FabricSpecificUpdateNetworkMappingInput + { + /// + /// Initializes a new instance of the + /// FabricSpecificUpdateNetworkMappingInput class. + /// + public FabricSpecificUpdateNetworkMappingInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverDeploymentModel.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverDeploymentModel.cs new file mode 100644 index 000000000000..391563e3cda0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverDeploymentModel.cs @@ -0,0 +1,33 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for FailoverDeploymentModel. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FailoverDeploymentModel + { + [EnumMember(Value = "NotApplicable")] + NotApplicable, + [EnumMember(Value = "Classic")] + Classic, + [EnumMember(Value = "ResourceManager")] + ResourceManager + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverProcessServerRequest.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverProcessServerRequest.cs new file mode 100644 index 000000000000..6fe70bdac54b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverProcessServerRequest.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request to failover a process server. + /// + public partial class FailoverProcessServerRequest + { + /// + /// Initializes a new instance of the FailoverProcessServerRequest + /// class. + /// + public FailoverProcessServerRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FailoverProcessServerRequest + /// class. + /// + /// The properties of the PS Failover + /// request. + public FailoverProcessServerRequest(FailoverProcessServerRequestProperties properties = default(FailoverProcessServerRequestProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the properties of the PS Failover request. + /// + [JsonProperty(PropertyName = "properties")] + public FailoverProcessServerRequestProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverProcessServerRequestProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverProcessServerRequestProperties.cs new file mode 100644 index 000000000000..780fa22149a4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/FailoverProcessServerRequestProperties.cs @@ -0,0 +1,92 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The properties of the Failover Process Server request. + /// + public partial class FailoverProcessServerRequestProperties + { + /// + /// Initializes a new instance of the + /// FailoverProcessServerRequestProperties class. + /// + public FailoverProcessServerRequestProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// FailoverProcessServerRequestProperties class. + /// + /// The container identifier. + /// The source process + /// server. + /// The new process server. + /// The VMS to migrate. + /// A value for failover type. It can be + /// systemlevel/serverlevel + public FailoverProcessServerRequestProperties(string containerName = default(string), string sourceProcessServerId = default(string), string targetProcessServerId = default(string), IList vmsToMigrate = default(IList), string updateType = default(string)) + { + ContainerName = containerName; + SourceProcessServerId = sourceProcessServerId; + TargetProcessServerId = targetProcessServerId; + VmsToMigrate = vmsToMigrate; + UpdateType = updateType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the container identifier. + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets or sets the source process server. + /// + [JsonProperty(PropertyName = "sourceProcessServerId")] + public string SourceProcessServerId { get; set; } + + /// + /// Gets or sets the new process server. + /// + [JsonProperty(PropertyName = "targetProcessServerId")] + public string TargetProcessServerId { get; set; } + + /// + /// Gets or sets the VMS to migrate. + /// + [JsonProperty(PropertyName = "vmsToMigrate")] + public IList VmsToMigrate { get; set; } + + /// + /// Gets or sets a value for failover type. It can be + /// systemlevel/serverlevel + /// + [JsonProperty(PropertyName = "updateType")] + public string UpdateType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/GroupTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/GroupTaskDetails.cs new file mode 100644 index 000000000000..fb46c87291f9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/GroupTaskDetails.cs @@ -0,0 +1,57 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class represents the group task details when parent child + /// relationship exists + /// in the drill down. + /// + public partial class GroupTaskDetails + { + /// + /// Initializes a new instance of the GroupTaskDetails class. + /// + public GroupTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GroupTaskDetails class. + /// + /// The child tasks. + public GroupTaskDetails(IList childTasks = default(IList)) + { + ChildTasks = childTasks; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the child tasks. + /// + [JsonProperty(PropertyName = "childTasks")] + public IList ChildTasks { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HealthError.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HealthError.cs new file mode 100644 index 000000000000..8365ba7447f5 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HealthError.cs @@ -0,0 +1,111 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The health error class. + /// + public partial class HealthError + { + /// + /// Initializes a new instance of the HealthError class. + /// + public HealthError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HealthError class. + /// + /// Level of error. + /// Error code. + /// Error message. + /// Possible causes of error. + /// Recommended action to resolve + /// error. + /// Error creation time (UTC) + /// DRA error + /// message. + /// ID of the entity. + public HealthError(string errorLevel = default(string), string errorCode = default(string), string errorMessage = default(string), string possibleCauses = default(string), string recommendedAction = default(string), System.DateTime? creationTimeUtc = default(System.DateTime?), string recoveryProviderErrorMessage = default(string), string entityId = default(string)) + { + ErrorLevel = errorLevel; + ErrorCode = errorCode; + ErrorMessage = errorMessage; + PossibleCauses = possibleCauses; + RecommendedAction = recommendedAction; + CreationTimeUtc = creationTimeUtc; + RecoveryProviderErrorMessage = recoveryProviderErrorMessage; + EntityId = entityId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets level of error. + /// + [JsonProperty(PropertyName = "errorLevel")] + public string ErrorLevel { get; set; } + + /// + /// Gets or sets error code. + /// + [JsonProperty(PropertyName = "errorCode")] + public string ErrorCode { get; set; } + + /// + /// Gets or sets error message. + /// + [JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage { get; set; } + + /// + /// Gets or sets possible causes of error. + /// + [JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses { get; set; } + + /// + /// Gets or sets recommended action to resolve error. + /// + [JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction { get; set; } + + /// + /// Gets or sets error creation time (UTC) + /// + [JsonProperty(PropertyName = "creationTimeUtc")] + public System.DateTime? CreationTimeUtc { get; set; } + + /// + /// Gets or sets DRA error message. + /// + [JsonProperty(PropertyName = "recoveryProviderErrorMessage")] + public string RecoveryProviderErrorMessage { get; set; } + + /// + /// Gets or sets ID of the entity. + /// + [JsonProperty(PropertyName = "entityId")] + public string EntityId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplica2012EventDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplica2012EventDetails.cs new file mode 100644 index 000000000000..809184a34db3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplica2012EventDetails.cs @@ -0,0 +1,81 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Model class for event details of a HyperVReplica E2E event. + /// + [Newtonsoft.Json.JsonObject("HyperVReplica2012")] + public partial class HyperVReplica2012EventDetails : EventProviderSpecificDetails + { + /// + /// Initializes a new instance of the HyperVReplica2012EventDetails + /// class. + /// + public HyperVReplica2012EventDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplica2012EventDetails + /// class. + /// + /// The container friendly name. + /// The fabric friendly name. + /// The remote container + /// name. + /// The remote fabric name. + public HyperVReplica2012EventDetails(string containerName = default(string), string fabricName = default(string), string remoteContainerName = default(string), string remoteFabricName = default(string)) + { + ContainerName = containerName; + FabricName = fabricName; + RemoteContainerName = remoteContainerName; + RemoteFabricName = remoteFabricName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the container friendly name. + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets or sets the fabric friendly name. + /// + [JsonProperty(PropertyName = "fabricName")] + public string FabricName { get; set; } + + /// + /// Gets or sets the remote container name. + /// + [JsonProperty(PropertyName = "remoteContainerName")] + public string RemoteContainerName { get; set; } + + /// + /// Gets or sets the remote fabric name. + /// + [JsonProperty(PropertyName = "remoteFabricName")] + public string RemoteFabricName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplica2012R2EventDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplica2012R2EventDetails.cs new file mode 100644 index 000000000000..1fe25eeffe82 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplica2012R2EventDetails.cs @@ -0,0 +1,81 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Model class for event details of a HyperVReplica blue E2E event. + /// + [Newtonsoft.Json.JsonObject("HyperVReplica2012R2")] + public partial class HyperVReplica2012R2EventDetails : EventProviderSpecificDetails + { + /// + /// Initializes a new instance of the HyperVReplica2012R2EventDetails + /// class. + /// + public HyperVReplica2012R2EventDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplica2012R2EventDetails + /// class. + /// + /// The container friendly name. + /// The fabric friendly name. + /// The remote container + /// name. + /// The remote fabric name. + public HyperVReplica2012R2EventDetails(string containerName = default(string), string fabricName = default(string), string remoteContainerName = default(string), string remoteFabricName = default(string)) + { + ContainerName = containerName; + FabricName = fabricName; + RemoteContainerName = remoteContainerName; + RemoteFabricName = remoteFabricName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the container friendly name. + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets or sets the fabric friendly name. + /// + [JsonProperty(PropertyName = "fabricName")] + public string FabricName { get; set; } + + /// + /// Gets or sets the remote container name. + /// + [JsonProperty(PropertyName = "remoteContainerName")] + public string RemoteContainerName { get; set; } + + /// + /// Gets or sets the remote fabric name. + /// + [JsonProperty(PropertyName = "remoteFabricName")] + public string RemoteFabricName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureApplyRecoveryPointInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureApplyRecoveryPointInput.cs new file mode 100644 index 000000000000..2bd321535af1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureApplyRecoveryPointInput.cs @@ -0,0 +1,75 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ApplyRecoveryPoint input specific to HyperVReplicaAzure provider. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzureApplyRecoveryPointInput : ApplyRecoveryPointProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureApplyRecoveryPointInput class. + /// + public HyperVReplicaAzureApplyRecoveryPointInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureApplyRecoveryPointInput class. + /// + /// The vault location where the recovery + /// Vm resides. + /// The primary kek certificate + /// pfx. + /// The secondary kek + /// certificate pfx. + public HyperVReplicaAzureApplyRecoveryPointInput(string vaultLocation = default(string), string primaryKekCertificatePfx = default(string), string secondaryKekCertificatePfx = default(string)) + { + VaultLocation = vaultLocation; + PrimaryKekCertificatePfx = primaryKekCertificatePfx; + SecondaryKekCertificatePfx = secondaryKekCertificatePfx; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the vault location where the recovery Vm resides. + /// + [JsonProperty(PropertyName = "vaultLocation")] + public string VaultLocation { get; set; } + + /// + /// Gets or sets the primary kek certificate pfx. + /// + [JsonProperty(PropertyName = "primaryKekCertificatePfx")] + public string PrimaryKekCertificatePfx { get; set; } + + /// + /// Gets or sets the secondary kek certificate pfx. + /// + [JsonProperty(PropertyName = "secondaryKekCertificatePfx")] + public string SecondaryKekCertificatePfx { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureEnableProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureEnableProtectionInput.cs new file mode 100644 index 000000000000..6213a2bd89fe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureEnableProtectionInput.cs @@ -0,0 +1,183 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure specific enable protection input. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzureEnableProtectionInput : EnableProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureEnableProtectionInput class. + /// + public HyperVReplicaAzureEnableProtectionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureEnableProtectionInput class. + /// + /// The Hyper-V host Vm Id. + /// The Vm Name. + /// The OS type associated with vm. + /// The OS disk VHD id associated with vm. + /// The storage account + /// name. + /// The selected target Azure + /// network Id. + /// The selected target Azure subnet + /// Id. + /// The selected option to enable + /// RDP\SSH on target vm after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} + /// enum. + /// The target azure Vm Name. + /// The storage account to be used + /// for logging during replication. + /// The list of VHD IDs of disks to be + /// protected. + /// The Id of the target + /// resource group (for classic deployment) in which the + /// failover VM is to be created. + /// The Id of the target + /// resource group (for resource manager deployment) in + /// which the failover VM is to be created. + /// A value indicating whether managed + /// disks should be used during failover. + public HyperVReplicaAzureEnableProtectionInput(string hvHostVmId = default(string), string vmName = default(string), string osType = default(string), string vhdId = default(string), string targetStorageAccountId = default(string), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRDPOnTargetOption = default(string), string targetAzureVmName = default(string), string logStorageAccountId = default(string), IList disksToInclude = default(IList), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string)) + { + HvHostVmId = hvHostVmId; + VmName = vmName; + OsType = osType; + VhdId = vhdId; + TargetStorageAccountId = targetStorageAccountId; + TargetAzureNetworkId = targetAzureNetworkId; + TargetAzureSubnetId = targetAzureSubnetId; + EnableRDPOnTargetOption = enableRDPOnTargetOption; + TargetAzureVmName = targetAzureVmName; + LogStorageAccountId = logStorageAccountId; + DisksToInclude = disksToInclude; + TargetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId; + TargetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId; + UseManagedDisks = useManagedDisks; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Hyper-V host Vm Id. + /// + [JsonProperty(PropertyName = "hvHostVmId")] + public string HvHostVmId { get; set; } + + /// + /// Gets or sets the Vm Name. + /// + [JsonProperty(PropertyName = "vmName")] + public string VmName { get; set; } + + /// + /// Gets or sets the OS type associated with vm. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets the OS disk VHD id associated with vm. + /// + [JsonProperty(PropertyName = "vhdId")] + public string VhdId { get; set; } + + /// + /// Gets or sets the storage account name. + /// + [JsonProperty(PropertyName = "targetStorageAccountId")] + public string TargetStorageAccountId { get; set; } + + /// + /// Gets or sets the selected target Azure network Id. + /// + [JsonProperty(PropertyName = "targetAzureNetworkId")] + public string TargetAzureNetworkId { get; set; } + + /// + /// Gets or sets the selected target Azure subnet Id. + /// + [JsonProperty(PropertyName = "targetAzureSubnetId")] + public string TargetAzureSubnetId { get; set; } + + /// + /// Gets or sets the selected option to enable RDP\SSH on target vm + /// after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + /// + [JsonProperty(PropertyName = "enableRDPOnTargetOption")] + public string EnableRDPOnTargetOption { get; set; } + + /// + /// Gets or sets the target azure Vm Name. + /// + [JsonProperty(PropertyName = "targetAzureVmName")] + public string TargetAzureVmName { get; set; } + + /// + /// Gets or sets the storage account to be used for logging during + /// replication. + /// + [JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId { get; set; } + + /// + /// Gets or sets the list of VHD IDs of disks to be protected. + /// + [JsonProperty(PropertyName = "disksToInclude")] + public IList DisksToInclude { get; set; } + + /// + /// Gets or sets the Id of the target resource group (for classic + /// deployment) in which the + /// failover VM is to be created. + /// + [JsonProperty(PropertyName = "targetAzureV1ResourceGroupId")] + public string TargetAzureV1ResourceGroupId { get; set; } + + /// + /// Gets or sets the Id of the target resource group (for resource + /// manager deployment) in + /// which the failover VM is to be created. + /// + [JsonProperty(PropertyName = "targetAzureV2ResourceGroupId")] + public string TargetAzureV2ResourceGroupId { get; set; } + + /// + /// Gets or sets a value indicating whether managed disks should be + /// used during failover. + /// + [JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureEventDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureEventDetails.cs new file mode 100644 index 000000000000..110378476974 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureEventDetails.cs @@ -0,0 +1,73 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Model class for event details of a HyperVReplica E2A event. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzureEventDetails : EventProviderSpecificDetails + { + /// + /// Initializes a new instance of the HyperVReplicaAzureEventDetails + /// class. + /// + public HyperVReplicaAzureEventDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaAzureEventDetails + /// class. + /// + /// The container friendly name. + /// The fabric friendly name. + /// The remote container + /// name. + public HyperVReplicaAzureEventDetails(string containerName = default(string), string fabricName = default(string), string remoteContainerName = default(string)) + { + ContainerName = containerName; + FabricName = fabricName; + RemoteContainerName = remoteContainerName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the container friendly name. + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets or sets the fabric friendly name. + /// + [JsonProperty(PropertyName = "fabricName")] + public string FabricName { get; set; } + + /// + /// Gets or sets the remote container name. + /// + [JsonProperty(PropertyName = "remoteContainerName")] + public string RemoteContainerName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureFailbackProviderInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureFailbackProviderInput.cs new file mode 100644 index 000000000000..1e8c44bfdc7b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureFailbackProviderInput.cs @@ -0,0 +1,74 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// HvrA provider specific input for failback. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzureFailback")] + public partial class HyperVReplicaAzureFailbackProviderInput : ProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureFailbackProviderInput class. + /// + public HyperVReplicaAzureFailbackProviderInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureFailbackProviderInput class. + /// + /// Data sync option. + /// ALR options to create + /// alternate recovery. + /// Provider ID for + /// alternate location + public HyperVReplicaAzureFailbackProviderInput(string dataSyncOption = default(string), string recoveryVmCreationOption = default(string), string providerIdForAlternateRecovery = default(string)) + { + DataSyncOption = dataSyncOption; + RecoveryVmCreationOption = recoveryVmCreationOption; + ProviderIdForAlternateRecovery = providerIdForAlternateRecovery; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets data sync option. + /// + [JsonProperty(PropertyName = "dataSyncOption")] + public string DataSyncOption { get; set; } + + /// + /// Gets or sets ALR options to create alternate recovery. + /// + [JsonProperty(PropertyName = "recoveryVmCreationOption")] + public string RecoveryVmCreationOption { get; set; } + + /// + /// Gets or sets provider ID for alternate location + /// + [JsonProperty(PropertyName = "providerIdForAlternateRecovery")] + public string ProviderIdForAlternateRecovery { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureFailoverProviderInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureFailoverProviderInput.cs new file mode 100644 index 000000000000..6204ee370105 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureFailoverProviderInput.cs @@ -0,0 +1,87 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// HvrA provider specific input for failover. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzureFailoverProviderInput : ProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureFailoverProviderInput class. + /// + public HyperVReplicaAzureFailoverProviderInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureFailoverProviderInput class. + /// + /// Location of the vault. + /// Primary kek certificate + /// pfx. + /// Secondary kek certificate + /// pfx. + /// The recovery point id to be passed to + /// failover to a particular recovery + /// point. In case of latest recovery point, null should be + /// passed. + public HyperVReplicaAzureFailoverProviderInput(string vaultLocation = default(string), string primaryKekCertificatePfx = default(string), string secondaryKekCertificatePfx = default(string), string recoveryPointId = default(string)) + { + VaultLocation = vaultLocation; + PrimaryKekCertificatePfx = primaryKekCertificatePfx; + SecondaryKekCertificatePfx = secondaryKekCertificatePfx; + RecoveryPointId = recoveryPointId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets location of the vault. + /// + [JsonProperty(PropertyName = "vaultLocation")] + public string VaultLocation { get; set; } + + /// + /// Gets or sets primary kek certificate pfx. + /// + [JsonProperty(PropertyName = "primaryKekCertificatePfx")] + public string PrimaryKekCertificatePfx { get; set; } + + /// + /// Gets or sets secondary kek certificate pfx. + /// + [JsonProperty(PropertyName = "secondaryKekCertificatePfx")] + public string SecondaryKekCertificatePfx { get; set; } + + /// + /// Gets or sets the recovery point id to be passed to failover to a + /// particular recovery + /// point. In case of latest recovery point, null should be passed. + /// + [JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzurePolicyDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzurePolicyDetails.cs new file mode 100644 index 000000000000..1517bcc5ec1a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzurePolicyDetails.cs @@ -0,0 +1,113 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Hyper-V Replica Azure specific protection profile details. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzurePolicyDetails : PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the HyperVReplicaAzurePolicyDetails + /// class. + /// + public HyperVReplicaAzurePolicyDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaAzurePolicyDetails + /// class. + /// + /// The duration (in + /// hours) to which point the recovery history needs to be + /// maintained. + /// The + /// interval (in hours) at which Hyper-V Replica should create an + /// application consistent snapshot within the VM. + /// The replication interval. + /// The scheduled start time + /// for the initial replication. If this parameter + /// is Null, the initial replication starts immediately. + /// A value indicating whether encryption is + /// enabled for virtual machines + /// in this cloud. + /// The active storage account + /// Id. + public HyperVReplicaAzurePolicyDetails(int? recoveryPointHistoryDurationInHours = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), int? replicationInterval = default(int?), string onlineReplicationStartTime = default(string), string encryption = default(string), string activeStorageAccountId = default(string)) + { + RecoveryPointHistoryDurationInHours = recoveryPointHistoryDurationInHours; + ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + ReplicationInterval = replicationInterval; + OnlineReplicationStartTime = onlineReplicationStartTime; + Encryption = encryption; + ActiveStorageAccountId = activeStorageAccountId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the duration (in hours) to which point the recovery + /// history needs to be + /// maintained. + /// + [JsonProperty(PropertyName = "recoveryPointHistoryDurationInHours")] + public int? RecoveryPointHistoryDurationInHours { get; set; } + + /// + /// Gets or sets the interval (in hours) at which Hyper-V Replica + /// should create an + /// application consistent snapshot within the VM. + /// + [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + + /// + /// Gets or sets the replication interval. + /// + [JsonProperty(PropertyName = "replicationInterval")] + public int? ReplicationInterval { get; set; } + + /// + /// Gets or sets the scheduled start time for the initial replication. + /// If this parameter + /// is Null, the initial replication starts immediately. + /// + [JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime { get; set; } + + /// + /// Gets or sets a value indicating whether encryption is enabled for + /// virtual machines + /// in this cloud. + /// + [JsonProperty(PropertyName = "encryption")] + public string Encryption { get; set; } + + /// + /// Gets or sets the active storage account Id. + /// + [JsonProperty(PropertyName = "activeStorageAccountId")] + public string ActiveStorageAccountId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzurePolicyInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzurePolicyInput.cs new file mode 100644 index 000000000000..19470bb72d54 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzurePolicyInput.cs @@ -0,0 +1,116 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hyper-V Replica Azure specific input for creating a protection profile. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzurePolicyInput : PolicyProviderSpecificInput + { + /// + /// Initializes a new instance of the HyperVReplicaAzurePolicyInput + /// class. + /// + public HyperVReplicaAzurePolicyInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaAzurePolicyInput + /// class. + /// + /// The duration (in hours) + /// to which point the recovery history needs to be + /// maintained. + /// The + /// interval (in hours) at which Hyper-V Replica should create an + /// application consistent snapshot within the VM. + /// The replication interval. + /// The scheduled start time + /// for the initial replication. If this parameter + /// is Null, the initial replication starts immediately. + /// A value indicating whether encryption + /// needs to be enabled for Vms in this cloud. + /// The list of storage accounts to which + /// the VMs in the primary cloud can + /// replicate to. + public HyperVReplicaAzurePolicyInput(int? recoveryPointHistoryDuration = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), int? replicationInterval = default(int?), string onlineReplicationStartTime = default(string), string encryption = default(string), IList storageAccounts = default(IList)) + { + RecoveryPointHistoryDuration = recoveryPointHistoryDuration; + ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + ReplicationInterval = replicationInterval; + OnlineReplicationStartTime = onlineReplicationStartTime; + Encryption = encryption; + StorageAccounts = storageAccounts; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the duration (in hours) to which point the recovery + /// history needs to be + /// maintained. + /// + [JsonProperty(PropertyName = "recoveryPointHistoryDuration")] + public int? RecoveryPointHistoryDuration { get; set; } + + /// + /// Gets or sets the interval (in hours) at which Hyper-V Replica + /// should create an + /// application consistent snapshot within the VM. + /// + [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + + /// + /// Gets or sets the replication interval. + /// + [JsonProperty(PropertyName = "replicationInterval")] + public int? ReplicationInterval { get; set; } + + /// + /// Gets or sets the scheduled start time for the initial replication. + /// If this parameter + /// is Null, the initial replication starts immediately. + /// + [JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime { get; set; } + + /// + /// Gets or sets a value indicating whether encryption needs to be + /// enabled for Vms in this cloud. + /// + [JsonProperty(PropertyName = "encryption")] + public string Encryption { get; set; } + + /// + /// Gets or sets the list of storage accounts to which the VMs in the + /// primary cloud can + /// replicate to. + /// + [JsonProperty(PropertyName = "storageAccounts")] + public IList StorageAccounts { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureReplicationDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureReplicationDetails.cs new file mode 100644 index 000000000000..a3bf93a2222a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureReplicationDetails.cs @@ -0,0 +1,245 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hyper V Replica Azure provider specific settings. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzureReplicationDetails : ReplicationProviderSpecificSettings + { + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureReplicationDetails class. + /// + public HyperVReplicaAzureReplicationDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureReplicationDetails class. + /// + /// Azure VM Disk details. + /// Recovery Azure given + /// name. + /// The Recovery Azure VM + /// size. + /// The recovery Azure + /// storage account. + /// The ARM id of the + /// log storage acount used for replication. + /// This will be set to null if no log storage account was provided + /// during enable + /// protection. + /// The Last replication time. + /// The virtual machine Id. + /// The protection state for the + /// vm. + /// The protection state + /// description for the vm. + /// Initial replication + /// details. + /// The PE Network details. + /// The selected recovery + /// azure network Id. + /// The encryption info. + /// The operating system info. + /// The RAM size of the VM on the + /// primary side. + /// The CPU count of the VM on the + /// primary side. + /// The selected option to enable + /// RDP\SSH on target vm after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} + /// enum. + /// The target resource + /// group Id. + /// The recovery availability + /// set Id. + /// A value indicating whether managed + /// disks should be used during failover. + /// License Type of the VM to be + /// used. + public HyperVReplicaAzureReplicationDetails(IList azureVMDiskDetails = default(IList), string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureStorageAccount = default(string), string recoveryAzureLogStorageAccountId = default(string), System.DateTime? lastReplicatedTime = default(System.DateTime?), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), IList vmNics = default(IList), string selectedRecoveryAzureNetworkId = default(string), string encryption = default(string), OSDetails oSDetails = default(OSDetails), int? sourceVmRAMSizeInMB = default(int?), int? sourceVmCPUCount = default(int?), string enableRDPOnTargetOption = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryAvailabilitySetId = default(string), string useManagedDisks = default(string), string licenseType = default(string)) + { + AzureVMDiskDetails = azureVMDiskDetails; + RecoveryAzureVMName = recoveryAzureVMName; + RecoveryAzureVMSize = recoveryAzureVMSize; + RecoveryAzureStorageAccount = recoveryAzureStorageAccount; + RecoveryAzureLogStorageAccountId = recoveryAzureLogStorageAccountId; + LastReplicatedTime = lastReplicatedTime; + VmId = vmId; + VmProtectionState = vmProtectionState; + VmProtectionStateDescription = vmProtectionStateDescription; + InitialReplicationDetails = initialReplicationDetails; + VmNics = vmNics; + SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + Encryption = encryption; + OSDetails = oSDetails; + SourceVmRAMSizeInMB = sourceVmRAMSizeInMB; + SourceVmCPUCount = sourceVmCPUCount; + EnableRDPOnTargetOption = enableRDPOnTargetOption; + RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + UseManagedDisks = useManagedDisks; + LicenseType = licenseType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets azure VM Disk details. + /// + [JsonProperty(PropertyName = "azureVMDiskDetails")] + public IList AzureVMDiskDetails { get; set; } + + /// + /// Gets or sets recovery Azure given name. + /// + [JsonProperty(PropertyName = "recoveryAzureVMName")] + public string RecoveryAzureVMName { get; set; } + + /// + /// Gets or sets the Recovery Azure VM size. + /// + [JsonProperty(PropertyName = "recoveryAzureVMSize")] + public string RecoveryAzureVMSize { get; set; } + + /// + /// Gets or sets the recovery Azure storage account. + /// + [JsonProperty(PropertyName = "recoveryAzureStorageAccount")] + public string RecoveryAzureStorageAccount { get; set; } + + /// + /// Gets or sets the ARM id of the log storage acount used for + /// replication. + /// This will be set to null if no log storage account was provided + /// during enable + /// protection. + /// + [JsonProperty(PropertyName = "recoveryAzureLogStorageAccountId")] + public string RecoveryAzureLogStorageAccountId { get; set; } + + /// + /// Gets or sets the Last replication time. + /// + [JsonProperty(PropertyName = "lastReplicatedTime")] + public System.DateTime? LastReplicatedTime { get; set; } + + /// + /// Gets or sets the virtual machine Id. + /// + [JsonProperty(PropertyName = "vmId")] + public string VmId { get; set; } + + /// + /// Gets or sets the protection state for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionState")] + public string VmProtectionState { get; set; } + + /// + /// Gets or sets the protection state description for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VmProtectionStateDescription { get; set; } + + /// + /// Gets or sets initial replication details. + /// + [JsonProperty(PropertyName = "initialReplicationDetails")] + public InitialReplicationDetails InitialReplicationDetails { get; set; } + + /// + /// Gets or sets the PE Network details. + /// + [JsonProperty(PropertyName = "vmNics")] + public IList VmNics { get; set; } + + /// + /// Gets or sets the selected recovery azure network Id. + /// + [JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] + public string SelectedRecoveryAzureNetworkId { get; set; } + + /// + /// Gets or sets the encryption info. + /// + [JsonProperty(PropertyName = "encryption")] + public string Encryption { get; set; } + + /// + /// Gets or sets the operating system info. + /// + [JsonProperty(PropertyName = "oSDetails")] + public OSDetails OSDetails { get; set; } + + /// + /// Gets or sets the RAM size of the VM on the primary side. + /// + [JsonProperty(PropertyName = "sourceVmRAMSizeInMB")] + public int? SourceVmRAMSizeInMB { get; set; } + + /// + /// Gets or sets the CPU count of the VM on the primary side. + /// + [JsonProperty(PropertyName = "sourceVmCPUCount")] + public int? SourceVmCPUCount { get; set; } + + /// + /// Gets or sets the selected option to enable RDP\SSH on target vm + /// after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + /// + [JsonProperty(PropertyName = "enableRDPOnTargetOption")] + public string EnableRDPOnTargetOption { get; set; } + + /// + /// Gets or sets the target resource group Id. + /// + [JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] + public string RecoveryAzureResourceGroupId { get; set; } + + /// + /// Gets or sets the recovery availability set Id. + /// + [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId { get; set; } + + /// + /// Gets or sets a value indicating whether managed disks should be + /// used during failover. + /// + [JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks { get; set; } + + /// + /// Gets or sets license Type of the VM to be used. + /// + [JsonProperty(PropertyName = "licenseType")] + public string LicenseType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureReprotectInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureReprotectInput.cs new file mode 100644 index 000000000000..4eafbcecf7f1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureReprotectInput.cs @@ -0,0 +1,98 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure specific reprotect input. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzureReprotectInput : ReverseReplicationProviderSpecificInput + { + /// + /// Initializes a new instance of the HyperVReplicaAzureReprotectInput + /// class. + /// + public HyperVReplicaAzureReprotectInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaAzureReprotectInput + /// class. + /// + /// The Hyper-V host Vm Id. + /// The Vm Name. + /// The OS type associated with vm. + /// The OS disk VHD id associated with vm. + /// The storage account name. + /// The storage account to be used + /// for logging during replication. + public HyperVReplicaAzureReprotectInput(string hvHostVmId = default(string), string vmName = default(string), string osType = default(string), string vHDId = default(string), string storageAccountId = default(string), string logStorageAccountId = default(string)) + { + HvHostVmId = hvHostVmId; + VmName = vmName; + OsType = osType; + VHDId = vHDId; + StorageAccountId = storageAccountId; + LogStorageAccountId = logStorageAccountId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Hyper-V host Vm Id. + /// + [JsonProperty(PropertyName = "hvHostVmId")] + public string HvHostVmId { get; set; } + + /// + /// Gets or sets the Vm Name. + /// + [JsonProperty(PropertyName = "vmName")] + public string VmName { get; set; } + + /// + /// Gets or sets the OS type associated with vm. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets the OS disk VHD id associated with vm. + /// + [JsonProperty(PropertyName = "vHDId")] + public string VHDId { get; set; } + + /// + /// Gets or sets the storage account name. + /// + [JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId { get; set; } + + /// + /// Gets or sets the storage account to be used for logging during + /// replication. + /// + [JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureRpRecoveryPointType.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureRpRecoveryPointType.cs new file mode 100644 index 000000000000..a4b2d587446c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureRpRecoveryPointType.cs @@ -0,0 +1,33 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for HyperVReplicaAzureRpRecoveryPointType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum HyperVReplicaAzureRpRecoveryPointType + { + [EnumMember(Value = "Latest")] + Latest, + [EnumMember(Value = "LatestApplicationConsistent")] + LatestApplicationConsistent, + [EnumMember(Value = "LatestProcessed")] + LatestProcessed + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs new file mode 100644 index 000000000000..1ea04dfc564d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.cs @@ -0,0 +1,78 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// HyperV replica Azure input to update replication protected item. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class HyperVReplicaAzureUpdateReplicationProtectedItemInput : UpdateReplicationProtectedItemProviderInput + { + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureUpdateReplicationProtectedItemInput class. + /// + public HyperVReplicaAzureUpdateReplicationProtectedItemInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// HyperVReplicaAzureUpdateReplicationProtectedItemInput class. + /// + /// The recovery Azure + /// resource group Id for classic deployment. + /// The recovery Azure + /// resource group Id for resource manager deployment. + /// A value indicating whether managed + /// disks should be used during failover. + public HyperVReplicaAzureUpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string)) + { + RecoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId; + RecoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId; + UseManagedDisks = useManagedDisks; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery Azure resource group Id for classic + /// deployment. + /// + [JsonProperty(PropertyName = "recoveryAzureV1ResourceGroupId")] + public string RecoveryAzureV1ResourceGroupId { get; set; } + + /// + /// Gets or sets the recovery Azure resource group Id for resource + /// manager deployment. + /// + [JsonProperty(PropertyName = "recoveryAzureV2ResourceGroupId")] + public string RecoveryAzureV2ResourceGroupId { get; set; } + + /// + /// Gets or sets a value indicating whether managed disks should be + /// used during failover. + /// + [JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBaseEventDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBaseEventDetails.cs new file mode 100644 index 000000000000..5e69ed112073 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBaseEventDetails.cs @@ -0,0 +1,80 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Abstract model class for event details of a HyperVReplica E2E event. + /// + public partial class HyperVReplicaBaseEventDetails : EventProviderSpecificDetails + { + /// + /// Initializes a new instance of the HyperVReplicaBaseEventDetails + /// class. + /// + public HyperVReplicaBaseEventDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaBaseEventDetails + /// class. + /// + /// The container friendly name. + /// The fabric friendly name. + /// The remote container + /// name. + /// The remote fabric name. + public HyperVReplicaBaseEventDetails(string containerName = default(string), string fabricName = default(string), string remoteContainerName = default(string), string remoteFabricName = default(string)) + { + ContainerName = containerName; + FabricName = fabricName; + RemoteContainerName = remoteContainerName; + RemoteFabricName = remoteFabricName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the container friendly name. + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets or sets the fabric friendly name. + /// + [JsonProperty(PropertyName = "fabricName")] + public string FabricName { get; set; } + + /// + /// Gets or sets the remote container name. + /// + [JsonProperty(PropertyName = "remoteContainerName")] + public string RemoteContainerName { get; set; } + + /// + /// Gets or sets the remote fabric name. + /// + [JsonProperty(PropertyName = "remoteFabricName")] + public string RemoteFabricName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBasePolicyDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBasePolicyDetails.cs new file mode 100644 index 000000000000..01e6ef67fe4b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBasePolicyDetails.cs @@ -0,0 +1,142 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Base class for HyperVReplica policy details. + /// + public partial class HyperVReplicaBasePolicyDetails : PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the HyperVReplicaBasePolicyDetails + /// class. + /// + public HyperVReplicaBasePolicyDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaBasePolicyDetails + /// class. + /// + /// A value indicating the number of + /// recovery points. + /// A value + /// indicating the application consistent frequency. + /// A value indicating whether compression + /// has to be enabled. + /// A value indicating whether + /// IR is online. + /// A value indicating the + /// online IR start time. + /// A value indicating the + /// offline IR import path. + /// A value indicating the + /// offline IR export path. + /// A value indicating the recovery HTTPS + /// port. + /// A value indicating the + /// authentication type. + /// A value indicating whether the + /// VM has to be auto deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud + public HyperVReplicaBasePolicyDetails(int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletionOption = default(string)) + { + RecoveryPoints = recoveryPoints; + ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + Compression = compression; + InitialReplicationMethod = initialReplicationMethod; + OnlineReplicationStartTime = onlineReplicationStartTime; + OfflineReplicationImportPath = offlineReplicationImportPath; + OfflineReplicationExportPath = offlineReplicationExportPath; + ReplicationPort = replicationPort; + AllowedAuthenticationType = allowedAuthenticationType; + ReplicaDeletionOption = replicaDeletionOption; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating the number of recovery points. + /// + [JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints { get; set; } + + /// + /// Gets or sets a value indicating the application consistent + /// frequency. + /// + [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + + /// + /// Gets or sets a value indicating whether compression has to be + /// enabled. + /// + [JsonProperty(PropertyName = "compression")] + public string Compression { get; set; } + + /// + /// Gets or sets a value indicating whether IR is online. + /// + [JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod { get; set; } + + /// + /// Gets or sets a value indicating the online IR start time. + /// + [JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime { get; set; } + + /// + /// Gets or sets a value indicating the offline IR import path. + /// + [JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath { get; set; } + + /// + /// Gets or sets a value indicating the offline IR export path. + /// + [JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath { get; set; } + + /// + /// Gets or sets a value indicating the recovery HTTPS port. + /// + [JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort { get; set; } + + /// + /// Gets or sets a value indicating the authentication type. + /// + [JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType { get; set; } + + /// + /// Gets or sets a value indicating whether the VM has to be auto + /// deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud + /// + [JsonProperty(PropertyName = "replicaDeletionOption")] + public string ReplicaDeletionOption { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBaseReplicationDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBaseReplicationDetails.cs new file mode 100644 index 000000000000..101b43ce39dd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBaseReplicationDetails.cs @@ -0,0 +1,108 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hyper V replica provider specific settings base class. + /// + public partial class HyperVReplicaBaseReplicationDetails : ReplicationProviderSpecificSettings + { + /// + /// Initializes a new instance of the + /// HyperVReplicaBaseReplicationDetails class. + /// + public HyperVReplicaBaseReplicationDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// HyperVReplicaBaseReplicationDetails class. + /// + /// The Last replication time. + /// The PE Network details. + /// The virtual machine Id. + /// The protection state for the + /// vm. + /// The protection state + /// description for the vm. + /// Initial replication + /// details. + /// VM disk details. + public HyperVReplicaBaseReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), IList vmNics = default(IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), IList vMDiskDetails = default(IList)) + { + LastReplicatedTime = lastReplicatedTime; + VmNics = vmNics; + VmId = vmId; + VmProtectionState = vmProtectionState; + VmProtectionStateDescription = vmProtectionStateDescription; + InitialReplicationDetails = initialReplicationDetails; + VMDiskDetails = vMDiskDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Last replication time. + /// + [JsonProperty(PropertyName = "lastReplicatedTime")] + public System.DateTime? LastReplicatedTime { get; set; } + + /// + /// Gets or sets the PE Network details. + /// + [JsonProperty(PropertyName = "vmNics")] + public IList VmNics { get; set; } + + /// + /// Gets or sets the virtual machine Id. + /// + [JsonProperty(PropertyName = "vmId")] + public string VmId { get; set; } + + /// + /// Gets or sets the protection state for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionState")] + public string VmProtectionState { get; set; } + + /// + /// Gets or sets the protection state description for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VmProtectionStateDescription { get; set; } + + /// + /// Gets or sets initial replication details. + /// + [JsonProperty(PropertyName = "initialReplicationDetails")] + public InitialReplicationDetails InitialReplicationDetails { get; set; } + + /// + /// Gets or sets VM disk details. + /// + [JsonProperty(PropertyName = "vMDiskDetails")] + public IList VMDiskDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBluePolicyDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBluePolicyDetails.cs new file mode 100644 index 000000000000..0c6bcc4f7874 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBluePolicyDetails.cs @@ -0,0 +1,152 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Hyper-V Replica Blue specific protection profile details. + /// + [Newtonsoft.Json.JsonObject("HyperVReplica2012R2")] + public partial class HyperVReplicaBluePolicyDetails : PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the HyperVReplicaBluePolicyDetails + /// class. + /// + public HyperVReplicaBluePolicyDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaBluePolicyDetails + /// class. + /// + /// A value indicating the + /// replication interval. + /// A value indicating the number of + /// recovery points. + /// A value + /// indicating the application consistent frequency. + /// A value indicating whether compression + /// has to be enabled. + /// A value indicating whether + /// IR is online. + /// A value indicating the + /// online IR start time. + /// A value indicating the + /// offline IR import path. + /// A value indicating the + /// offline IR export path. + /// A value indicating the recovery HTTPS + /// port. + /// A value indicating the + /// authentication type. + /// A value indicating whether the + /// VM has to be auto deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud + public HyperVReplicaBluePolicyDetails(int? replicationFrequencyInSeconds = default(int?), int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletionOption = default(string)) + { + ReplicationFrequencyInSeconds = replicationFrequencyInSeconds; + RecoveryPoints = recoveryPoints; + ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + Compression = compression; + InitialReplicationMethod = initialReplicationMethod; + OnlineReplicationStartTime = onlineReplicationStartTime; + OfflineReplicationImportPath = offlineReplicationImportPath; + OfflineReplicationExportPath = offlineReplicationExportPath; + ReplicationPort = replicationPort; + AllowedAuthenticationType = allowedAuthenticationType; + ReplicaDeletionOption = replicaDeletionOption; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating the replication interval. + /// + [JsonProperty(PropertyName = "replicationFrequencyInSeconds")] + public int? ReplicationFrequencyInSeconds { get; set; } + + /// + /// Gets or sets a value indicating the number of recovery points. + /// + [JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints { get; set; } + + /// + /// Gets or sets a value indicating the application consistent + /// frequency. + /// + [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + + /// + /// Gets or sets a value indicating whether compression has to be + /// enabled. + /// + [JsonProperty(PropertyName = "compression")] + public string Compression { get; set; } + + /// + /// Gets or sets a value indicating whether IR is online. + /// + [JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod { get; set; } + + /// + /// Gets or sets a value indicating the online IR start time. + /// + [JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime { get; set; } + + /// + /// Gets or sets a value indicating the offline IR import path. + /// + [JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath { get; set; } + + /// + /// Gets or sets a value indicating the offline IR export path. + /// + [JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath { get; set; } + + /// + /// Gets or sets a value indicating the recovery HTTPS port. + /// + [JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort { get; set; } + + /// + /// Gets or sets a value indicating the authentication type. + /// + [JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType { get; set; } + + /// + /// Gets or sets a value indicating whether the VM has to be auto + /// deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud + /// + [JsonProperty(PropertyName = "replicaDeletionOption")] + public string ReplicaDeletionOption { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBluePolicyInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBluePolicyInput.cs new file mode 100644 index 000000000000..cb45ba01a4dd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBluePolicyInput.cs @@ -0,0 +1,150 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// HyperV Replica Blue policy input. + /// + [Newtonsoft.Json.JsonObject("HyperVReplica2012R2")] + public partial class HyperVReplicaBluePolicyInput : PolicyProviderSpecificInput + { + /// + /// Initializes a new instance of the HyperVReplicaBluePolicyInput + /// class. + /// + public HyperVReplicaBluePolicyInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaBluePolicyInput + /// class. + /// + /// A value indicating the + /// replication interval. + /// A value indicating the number of + /// recovery points. + /// A value + /// indicating the application consistent frequency. + /// A value indicating whether compression + /// has to be enabled. + /// A value indicating whether + /// IR is online. + /// A value indicating the + /// online IR start time. + /// A value indicating the + /// offline IR import path. + /// A value indicating the + /// offline IR export path. + /// A value indicating the recovery HTTPS + /// port. + /// A value indicating the + /// authentication type. + /// A value indicating whether the VM has + /// to be auto deleted. + public HyperVReplicaBluePolicyInput(int? replicationFrequencyInSeconds = default(int?), int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletion = default(string)) + { + ReplicationFrequencyInSeconds = replicationFrequencyInSeconds; + RecoveryPoints = recoveryPoints; + ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + Compression = compression; + InitialReplicationMethod = initialReplicationMethod; + OnlineReplicationStartTime = onlineReplicationStartTime; + OfflineReplicationImportPath = offlineReplicationImportPath; + OfflineReplicationExportPath = offlineReplicationExportPath; + ReplicationPort = replicationPort; + AllowedAuthenticationType = allowedAuthenticationType; + ReplicaDeletion = replicaDeletion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating the replication interval. + /// + [JsonProperty(PropertyName = "replicationFrequencyInSeconds")] + public int? ReplicationFrequencyInSeconds { get; set; } + + /// + /// Gets or sets a value indicating the number of recovery points. + /// + [JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints { get; set; } + + /// + /// Gets or sets a value indicating the application consistent + /// frequency. + /// + [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + + /// + /// Gets or sets a value indicating whether compression has to be + /// enabled. + /// + [JsonProperty(PropertyName = "compression")] + public string Compression { get; set; } + + /// + /// Gets or sets a value indicating whether IR is online. + /// + [JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod { get; set; } + + /// + /// Gets or sets a value indicating the online IR start time. + /// + [JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime { get; set; } + + /// + /// Gets or sets a value indicating the offline IR import path. + /// + [JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath { get; set; } + + /// + /// Gets or sets a value indicating the offline IR export path. + /// + [JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath { get; set; } + + /// + /// Gets or sets a value indicating the recovery HTTPS port. + /// + [JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort { get; set; } + + /// + /// Gets or sets a value indicating the authentication type. + /// + [JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType { get; set; } + + /// + /// Gets or sets a value indicating whether the VM has to be auto + /// deleted. + /// + [JsonProperty(PropertyName = "replicaDeletion")] + public string ReplicaDeletion { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBlueReplicationDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBlueReplicationDetails.cs new file mode 100644 index 000000000000..8a93e3cd067b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaBlueReplicationDetails.cs @@ -0,0 +1,109 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HyperV replica 2012 R2 (Blue) replication details. + /// + [Newtonsoft.Json.JsonObject("HyperVReplica2012R2")] + public partial class HyperVReplicaBlueReplicationDetails : ReplicationProviderSpecificSettings + { + /// + /// Initializes a new instance of the + /// HyperVReplicaBlueReplicationDetails class. + /// + public HyperVReplicaBlueReplicationDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// HyperVReplicaBlueReplicationDetails class. + /// + /// The Last replication time. + /// The PE Network details. + /// The virtual machine Id. + /// The protection state for the + /// vm. + /// The protection state + /// description for the vm. + /// Initial replication + /// details. + /// VM disk details. + public HyperVReplicaBlueReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), IList vmNics = default(IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), IList vMDiskDetails = default(IList)) + { + LastReplicatedTime = lastReplicatedTime; + VmNics = vmNics; + VmId = vmId; + VmProtectionState = vmProtectionState; + VmProtectionStateDescription = vmProtectionStateDescription; + InitialReplicationDetails = initialReplicationDetails; + VMDiskDetails = vMDiskDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Last replication time. + /// + [JsonProperty(PropertyName = "lastReplicatedTime")] + public System.DateTime? LastReplicatedTime { get; set; } + + /// + /// Gets or sets the PE Network details. + /// + [JsonProperty(PropertyName = "vmNics")] + public IList VmNics { get; set; } + + /// + /// Gets or sets the virtual machine Id. + /// + [JsonProperty(PropertyName = "vmId")] + public string VmId { get; set; } + + /// + /// Gets or sets the protection state for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionState")] + public string VmProtectionState { get; set; } + + /// + /// Gets or sets the protection state description for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VmProtectionStateDescription { get; set; } + + /// + /// Gets or sets initial replication details. + /// + [JsonProperty(PropertyName = "initialReplicationDetails")] + public InitialReplicationDetails InitialReplicationDetails { get; set; } + + /// + /// Gets or sets VM disk details. + /// + [JsonProperty(PropertyName = "vMDiskDetails")] + public IList VMDiskDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaPolicyDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaPolicyDetails.cs new file mode 100644 index 000000000000..934ff9d5da6f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaPolicyDetails.cs @@ -0,0 +1,141 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Hyper-V Replica Blue specific protection profile details. + /// + [Newtonsoft.Json.JsonObject("HyperVReplica2012")] + public partial class HyperVReplicaPolicyDetails : PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the HyperVReplicaPolicyDetails class. + /// + public HyperVReplicaPolicyDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaPolicyDetails class. + /// + /// A value indicating the number of + /// recovery points. + /// A value + /// indicating the application consistent frequency. + /// A value indicating whether compression + /// has to be enabled. + /// A value indicating whether + /// IR is online. + /// A value indicating the + /// online IR start time. + /// A value indicating the + /// offline IR import path. + /// A value indicating the + /// offline IR export path. + /// A value indicating the recovery HTTPS + /// port. + /// A value indicating the + /// authentication type. + /// A value indicating whether the + /// VM has to be auto deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud + public HyperVReplicaPolicyDetails(int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletionOption = default(string)) + { + RecoveryPoints = recoveryPoints; + ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + Compression = compression; + InitialReplicationMethod = initialReplicationMethod; + OnlineReplicationStartTime = onlineReplicationStartTime; + OfflineReplicationImportPath = offlineReplicationImportPath; + OfflineReplicationExportPath = offlineReplicationExportPath; + ReplicationPort = replicationPort; + AllowedAuthenticationType = allowedAuthenticationType; + ReplicaDeletionOption = replicaDeletionOption; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating the number of recovery points. + /// + [JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints { get; set; } + + /// + /// Gets or sets a value indicating the application consistent + /// frequency. + /// + [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + + /// + /// Gets or sets a value indicating whether compression has to be + /// enabled. + /// + [JsonProperty(PropertyName = "compression")] + public string Compression { get; set; } + + /// + /// Gets or sets a value indicating whether IR is online. + /// + [JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod { get; set; } + + /// + /// Gets or sets a value indicating the online IR start time. + /// + [JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime { get; set; } + + /// + /// Gets or sets a value indicating the offline IR import path. + /// + [JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath { get; set; } + + /// + /// Gets or sets a value indicating the offline IR export path. + /// + [JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath { get; set; } + + /// + /// Gets or sets a value indicating the recovery HTTPS port. + /// + [JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort { get; set; } + + /// + /// Gets or sets a value indicating the authentication type. + /// + [JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType { get; set; } + + /// + /// Gets or sets a value indicating whether the VM has to be auto + /// deleted. + /// Supported Values: String.Empty, None, OnRecoveryCloud + /// + [JsonProperty(PropertyName = "replicaDeletionOption")] + public string ReplicaDeletionOption { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaPolicyInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaPolicyInput.cs new file mode 100644 index 000000000000..d8e26ac903d1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaPolicyInput.cs @@ -0,0 +1,139 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Hyper-V Replica specific protection profile Input. + /// + [Newtonsoft.Json.JsonObject("HyperVReplica2012")] + public partial class HyperVReplicaPolicyInput : PolicyProviderSpecificInput + { + /// + /// Initializes a new instance of the HyperVReplicaPolicyInput class. + /// + public HyperVReplicaPolicyInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaPolicyInput class. + /// + /// A value indicating the number of + /// recovery points. + /// A value + /// indicating the application consistent frequency. + /// A value indicating whether compression + /// has to be enabled. + /// A value indicating whether + /// IR is online. + /// A value indicating the + /// online IR start time. + /// A value indicating the + /// offline IR import path. + /// A value indicating the + /// offline IR export path. + /// A value indicating the recovery HTTPS + /// port. + /// A value indicating the + /// authentication type. + /// A value indicating whether the VM has + /// to be auto deleted. + public HyperVReplicaPolicyInput(int? recoveryPoints = default(int?), int? applicationConsistentSnapshotFrequencyInHours = default(int?), string compression = default(string), string initialReplicationMethod = default(string), string onlineReplicationStartTime = default(string), string offlineReplicationImportPath = default(string), string offlineReplicationExportPath = default(string), int? replicationPort = default(int?), int? allowedAuthenticationType = default(int?), string replicaDeletion = default(string)) + { + RecoveryPoints = recoveryPoints; + ApplicationConsistentSnapshotFrequencyInHours = applicationConsistentSnapshotFrequencyInHours; + Compression = compression; + InitialReplicationMethod = initialReplicationMethod; + OnlineReplicationStartTime = onlineReplicationStartTime; + OfflineReplicationImportPath = offlineReplicationImportPath; + OfflineReplicationExportPath = offlineReplicationExportPath; + ReplicationPort = replicationPort; + AllowedAuthenticationType = allowedAuthenticationType; + ReplicaDeletion = replicaDeletion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating the number of recovery points. + /// + [JsonProperty(PropertyName = "recoveryPoints")] + public int? RecoveryPoints { get; set; } + + /// + /// Gets or sets a value indicating the application consistent + /// frequency. + /// + [JsonProperty(PropertyName = "applicationConsistentSnapshotFrequencyInHours")] + public int? ApplicationConsistentSnapshotFrequencyInHours { get; set; } + + /// + /// Gets or sets a value indicating whether compression has to be + /// enabled. + /// + [JsonProperty(PropertyName = "compression")] + public string Compression { get; set; } + + /// + /// Gets or sets a value indicating whether IR is online. + /// + [JsonProperty(PropertyName = "initialReplicationMethod")] + public string InitialReplicationMethod { get; set; } + + /// + /// Gets or sets a value indicating the online IR start time. + /// + [JsonProperty(PropertyName = "onlineReplicationStartTime")] + public string OnlineReplicationStartTime { get; set; } + + /// + /// Gets or sets a value indicating the offline IR import path. + /// + [JsonProperty(PropertyName = "offlineReplicationImportPath")] + public string OfflineReplicationImportPath { get; set; } + + /// + /// Gets or sets a value indicating the offline IR export path. + /// + [JsonProperty(PropertyName = "offlineReplicationExportPath")] + public string OfflineReplicationExportPath { get; set; } + + /// + /// Gets or sets a value indicating the recovery HTTPS port. + /// + [JsonProperty(PropertyName = "replicationPort")] + public int? ReplicationPort { get; set; } + + /// + /// Gets or sets a value indicating the authentication type. + /// + [JsonProperty(PropertyName = "allowedAuthenticationType")] + public int? AllowedAuthenticationType { get; set; } + + /// + /// Gets or sets a value indicating whether the VM has to be auto + /// deleted. + /// + [JsonProperty(PropertyName = "replicaDeletion")] + public string ReplicaDeletion { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaReplicationDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaReplicationDetails.cs new file mode 100644 index 000000000000..abe0a2961fb9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVReplicaReplicationDetails.cs @@ -0,0 +1,109 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HyperV replica 2012 replication details. + /// + [Newtonsoft.Json.JsonObject("HyperVReplica2012")] + public partial class HyperVReplicaReplicationDetails : ReplicationProviderSpecificSettings + { + /// + /// Initializes a new instance of the HyperVReplicaReplicationDetails + /// class. + /// + public HyperVReplicaReplicationDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVReplicaReplicationDetails + /// class. + /// + /// The Last replication time. + /// The PE Network details. + /// The virtual machine Id. + /// The protection state for the + /// vm. + /// The protection state + /// description for the vm. + /// Initial replication + /// details. + /// VM disk details. + public HyperVReplicaReplicationDetails(System.DateTime? lastReplicatedTime = default(System.DateTime?), IList vmNics = default(IList), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails initialReplicationDetails = default(InitialReplicationDetails), IList vMDiskDetails = default(IList)) + { + LastReplicatedTime = lastReplicatedTime; + VmNics = vmNics; + VmId = vmId; + VmProtectionState = vmProtectionState; + VmProtectionStateDescription = vmProtectionStateDescription; + InitialReplicationDetails = initialReplicationDetails; + VMDiskDetails = vMDiskDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Last replication time. + /// + [JsonProperty(PropertyName = "lastReplicatedTime")] + public System.DateTime? LastReplicatedTime { get; set; } + + /// + /// Gets or sets the PE Network details. + /// + [JsonProperty(PropertyName = "vmNics")] + public IList VmNics { get; set; } + + /// + /// Gets or sets the virtual machine Id. + /// + [JsonProperty(PropertyName = "vmId")] + public string VmId { get; set; } + + /// + /// Gets or sets the protection state for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionState")] + public string VmProtectionState { get; set; } + + /// + /// Gets or sets the protection state description for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VmProtectionStateDescription { get; set; } + + /// + /// Gets or sets initial replication details. + /// + [JsonProperty(PropertyName = "initialReplicationDetails")] + public InitialReplicationDetails InitialReplicationDetails { get; set; } + + /// + /// Gets or sets VM disk details. + /// + [JsonProperty(PropertyName = "vMDiskDetails")] + public IList VMDiskDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVSiteDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVSiteDetails.cs new file mode 100644 index 000000000000..8ea1c8706cea --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVSiteDetails.cs @@ -0,0 +1,39 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// HyperVSite fabric specific details. + /// + [Newtonsoft.Json.JsonObject("HyperVSite")] + public partial class HyperVSiteDetails : FabricSpecificDetails + { + /// + /// Initializes a new instance of the HyperVSiteDetails class. + /// + public HyperVSiteDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVVirtualMachineDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVVirtualMachineDetails.cs new file mode 100644 index 000000000000..6b70bf3a5bad --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/HyperVVirtualMachineDetails.cs @@ -0,0 +1,83 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hyper V replica provider specific settings + /// + [Newtonsoft.Json.JsonObject("HyperVVirtualMachine")] + public partial class HyperVVirtualMachineDetails : ConfigurationSettings + { + /// + /// Initializes a new instance of the HyperVVirtualMachineDetails + /// class. + /// + public HyperVVirtualMachineDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HyperVVirtualMachineDetails + /// class. + /// + /// The source id of the object. + /// The id of the object in fabric. + /// The Last replication time. + /// The Last successful failover + /// time. + public HyperVVirtualMachineDetails(string sourceItemId = default(string), string generation = default(string), OSDetails osDetails = default(OSDetails), IList diskDetails = default(IList)) + { + SourceItemId = sourceItemId; + Generation = generation; + OsDetails = osDetails; + DiskDetails = diskDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the source id of the object. + /// + [JsonProperty(PropertyName = "sourceItemId")] + public string SourceItemId { get; set; } + + /// + /// Gets or sets the id of the object in fabric. + /// + [JsonProperty(PropertyName = "generation")] + public string Generation { get; set; } + + /// + /// Gets or sets the Last replication time. + /// + [JsonProperty(PropertyName = "osDetails")] + public OSDetails OsDetails { get; set; } + + /// + /// Gets or sets the Last successful failover time. + /// + [JsonProperty(PropertyName = "diskDetails")] + public IList DiskDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAgentDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAgentDetails.cs new file mode 100644 index 000000000000..20b38fd43fce --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAgentDetails.cs @@ -0,0 +1,73 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The details of the InMage agent. + /// + public partial class InMageAgentDetails + { + /// + /// Initializes a new instance of the InMageAgentDetails class. + /// + public InMageAgentDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageAgentDetails class. + /// + /// The agent version. + /// A value indicating whether + /// installed agent needs to be updated. + /// A value indicating whether + /// reboot is required after update is applied. + public InMageAgentDetails(string agentVersion = default(string), string agentUpdateStatus = default(string), string postUpdateRebootStatus = default(string)) + { + AgentVersion = agentVersion; + AgentUpdateStatus = agentUpdateStatus; + PostUpdateRebootStatus = postUpdateRebootStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the agent version. + /// + [JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion { get; set; } + + /// + /// Gets or sets a value indicating whether installed agent needs to be + /// updated. + /// + [JsonProperty(PropertyName = "agentUpdateStatus")] + public string AgentUpdateStatus { get; set; } + + /// + /// Gets or sets a value indicating whether reboot is required after + /// update is applied. + /// + [JsonProperty(PropertyName = "postUpdateRebootStatus")] + public string PostUpdateRebootStatus { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ApplyRecoveryPointInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ApplyRecoveryPointInput.cs new file mode 100644 index 000000000000..66f098e69728 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ApplyRecoveryPointInput.cs @@ -0,0 +1,57 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ApplyRecoveryPoint input specific to InMageAzureV2 provider. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2ApplyRecoveryPointInput : ApplyRecoveryPointProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// InMageAzureV2ApplyRecoveryPointInput class. + /// + public InMageAzureV2ApplyRecoveryPointInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// InMageAzureV2ApplyRecoveryPointInput class. + /// + /// The vault location where the recovery + /// Vm resides. + public InMageAzureV2ApplyRecoveryPointInput(string vaultLocation = default(string)) + { + VaultLocation = vaultLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the vault location where the recovery Vm resides. + /// + [JsonProperty(PropertyName = "vaultLocation")] + public string VaultLocation { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2EnableProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2EnableProtectionInput.cs new file mode 100644 index 000000000000..d0f7b512b3ff --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2EnableProtectionInput.cs @@ -0,0 +1,204 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// VMware Azure specific enable protection input. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2EnableProtectionInput : EnableProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// InMageAzureV2EnableProtectionInput class. + /// + public InMageAzureV2EnableProtectionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// InMageAzureV2EnableProtectionInput class. + /// + /// The storage account name. + /// The Master target Id. + /// The Process Server Id. + /// The CS account Id. + /// The multi vm group Id. + /// The multi vm group name. + /// The disks to include list. + /// The selected target Azure + /// network Id. + /// The selected target Azure subnet + /// Id. + /// The selected option to enable + /// RDP\SSH on target vm after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} + /// enum. + /// The target azure Vm Name. + /// The storage account to be used + /// for logging + /// during replication. + /// The Id of the target + /// resource group (for classic deployment) in which the + /// failover VM is to be created. + /// The Id of the target + /// resource group (for resource manager deployment) in + /// which the failover VM is to be created. + /// A value indicating whether managed + /// disks should be used during failover. + public InMageAzureV2EnableProtectionInput(string storageAccountId, string masterTargetId = default(string), string processServerId = default(string), string runAsAccountId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), IList disksToInclude = default(IList), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRDPOnTargetOption = default(string), string targetAzureVmName = default(string), string logStorageAccountId = default(string), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string)) + { + MasterTargetId = masterTargetId; + ProcessServerId = processServerId; + StorageAccountId = storageAccountId; + RunAsAccountId = runAsAccountId; + MultiVmGroupId = multiVmGroupId; + MultiVmGroupName = multiVmGroupName; + DisksToInclude = disksToInclude; + TargetAzureNetworkId = targetAzureNetworkId; + TargetAzureSubnetId = targetAzureSubnetId; + EnableRDPOnTargetOption = enableRDPOnTargetOption; + TargetAzureVmName = targetAzureVmName; + LogStorageAccountId = logStorageAccountId; + TargetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId; + TargetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId; + UseManagedDisks = useManagedDisks; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Master target Id. + /// + [JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId { get; set; } + + /// + /// Gets or sets the Process Server Id. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the storage account name. + /// + [JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId { get; set; } + + /// + /// Gets or sets the CS account Id. + /// + [JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId { get; set; } + + /// + /// Gets or sets the multi vm group Id. + /// + [JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVmGroupId { get; set; } + + /// + /// Gets or sets the multi vm group name. + /// + [JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVmGroupName { get; set; } + + /// + /// Gets or sets the disks to include list. + /// + [JsonProperty(PropertyName = "disksToInclude")] + public IList DisksToInclude { get; set; } + + /// + /// Gets or sets the selected target Azure network Id. + /// + [JsonProperty(PropertyName = "targetAzureNetworkId")] + public string TargetAzureNetworkId { get; set; } + + /// + /// Gets or sets the selected target Azure subnet Id. + /// + [JsonProperty(PropertyName = "targetAzureSubnetId")] + public string TargetAzureSubnetId { get; set; } + + /// + /// Gets or sets the selected option to enable RDP\SSH on target vm + /// after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + /// + [JsonProperty(PropertyName = "enableRDPOnTargetOption")] + public string EnableRDPOnTargetOption { get; set; } + + /// + /// Gets or sets the target azure Vm Name. + /// + [JsonProperty(PropertyName = "targetAzureVmName")] + public string TargetAzureVmName { get; set; } + + /// + /// Gets or sets the storage account to be used for logging + /// during replication. + /// + [JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId { get; set; } + + /// + /// Gets or sets the Id of the target resource group (for classic + /// deployment) in which the + /// failover VM is to be created. + /// + [JsonProperty(PropertyName = "targetAzureV1ResourceGroupId")] + public string TargetAzureV1ResourceGroupId { get; set; } + + /// + /// Gets or sets the Id of the target resource group (for resource + /// manager deployment) in + /// which the failover VM is to be created. + /// + [JsonProperty(PropertyName = "targetAzureV2ResourceGroupId")] + public string TargetAzureV2ResourceGroupId { get; set; } + + /// + /// Gets or sets a value indicating whether managed disks should be + /// used during failover. + /// + [JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StorageAccountId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StorageAccountId"); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2EventDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2EventDetails.cs new file mode 100644 index 000000000000..11d43e954a96 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2EventDetails.cs @@ -0,0 +1,107 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Model class for event details of a VMwareAzureV2 event. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2EventDetails : EventProviderSpecificDetails + { + /// + /// Initializes a new instance of the InMageAzureV2EventDetails class. + /// + public InMageAzureV2EventDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageAzureV2EventDetails class. + /// + /// InMage Event type. + /// Takes one of the values of + /// {InMageDataContract.InMageMonitoringEventType}. + /// InMage Event Category. + /// InMage Event Component. + /// Corrective Action string for the + /// event. + /// InMage Event Details. + /// InMage Event Summary. + /// VMware Site name. + public InMageAzureV2EventDetails(string eventType = default(string), string category = default(string), string component = default(string), string correctiveAction = default(string), string details = default(string), string summary = default(string), string siteName = default(string)) + { + EventType = eventType; + Category = category; + Component = component; + CorrectiveAction = correctiveAction; + Details = details; + Summary = summary; + SiteName = siteName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets inMage Event type. + /// Takes one of the values of + /// {InMageDataContract.InMageMonitoringEventType}. + /// + [JsonProperty(PropertyName = "eventType")] + public string EventType { get; set; } + + /// + /// Gets or sets inMage Event Category. + /// + [JsonProperty(PropertyName = "category")] + public string Category { get; set; } + + /// + /// Gets or sets inMage Event Component. + /// + [JsonProperty(PropertyName = "component")] + public string Component { get; set; } + + /// + /// Gets or sets corrective Action string for the event. + /// + [JsonProperty(PropertyName = "correctiveAction")] + public string CorrectiveAction { get; set; } + + /// + /// Gets or sets inMage Event Details. + /// + [JsonProperty(PropertyName = "details")] + public string Details { get; set; } + + /// + /// Gets or sets inMage Event Summary. + /// + [JsonProperty(PropertyName = "summary")] + public string Summary { get; set; } + + /// + /// Gets or sets vMware Site name. + /// + [JsonProperty(PropertyName = "siteName")] + public string SiteName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2FailoverProviderInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2FailoverProviderInput.cs new file mode 100644 index 000000000000..dd4c4f58b59c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2FailoverProviderInput.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// InMageAzureV2 provider specific input for failover. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2FailoverProviderInput : ProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the + /// InMageAzureV2FailoverProviderInput class. + /// + public InMageAzureV2FailoverProviderInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// InMageAzureV2FailoverProviderInput class. + /// + /// Location of the vault. + /// The recovery point id to be passed to + /// failover to a particular recovery + /// point. In case of latest recovery point, null should be + /// passed. + public InMageAzureV2FailoverProviderInput(string vaultLocation = default(string), string recoveryPointId = default(string)) + { + VaultLocation = vaultLocation; + RecoveryPointId = recoveryPointId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets location of the vault. + /// + [JsonProperty(PropertyName = "vaultLocation")] + public string VaultLocation { get; set; } + + /// + /// Gets or sets the recovery point id to be passed to failover to a + /// particular recovery + /// point. In case of latest recovery point, null should be passed. + /// + [JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2PolicyDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2PolicyDetails.cs new file mode 100644 index 000000000000..09a940d8399e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2PolicyDetails.cs @@ -0,0 +1,95 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// InMage Azure v2 specific protection profile details. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2PolicyDetails : PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the InMageAzureV2PolicyDetails class. + /// + public InMageAzureV2PolicyDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageAzureV2PolicyDetails class. + /// + /// The crash + /// consistent snapshot frequency in minutes. + /// The recovery point + /// threshold in minutes. + /// The duration in minutes until + /// which the recovery points need to be + /// stored. + /// The app consistent + /// snapshot frequency in minutes. + /// A value indicating whether multi-VM + /// sync has to be enabled. + public InMageAzureV2PolicyDetails(int? crashConsistentFrequencyInMinutes = default(int?), int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVmSyncStatus = default(string)) + { + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + RecoveryPointHistory = recoveryPointHistory; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + MultiVmSyncStatus = multiVmSyncStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the crash consistent snapshot frequency in minutes. + /// + [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets the recovery point threshold in minutes. + /// + [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes { get; set; } + + /// + /// Gets or sets the duration in minutes until which the recovery + /// points need to be + /// stored. + /// + [JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory { get; set; } + + /// + /// Gets or sets the app consistent snapshot frequency in minutes. + /// + [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets a value indicating whether multi-VM sync has to be + /// enabled. + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVmSyncStatus { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2PolicyInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2PolicyInput.cs new file mode 100644 index 000000000000..f040b1844b9f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2PolicyInput.cs @@ -0,0 +1,108 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// VMWare Azure specific protection profile Input. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2PolicyInput : PolicyProviderSpecificInput + { + /// + /// Initializes a new instance of the InMageAzureV2PolicyInput class. + /// + public InMageAzureV2PolicyInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageAzureV2PolicyInput class. + /// + /// A value indicating whether multi-VM + /// sync has to be enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: + /// 'Enable', 'Disable' + /// The recovery point + /// threshold in minutes. + /// The duration in minutes until + /// which the recovery points need to be + /// stored. + /// The crash + /// consistent snapshot frequency (in minutes). + /// The app consistent + /// snapshot frequency (in minutes). + public InMageAzureV2PolicyInput(SetMultiVmSyncStatus multiVmSyncStatus, int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? crashConsistentFrequencyInMinutes = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { + RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + RecoveryPointHistory = recoveryPointHistory; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + MultiVmSyncStatus = multiVmSyncStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point threshold in minutes. + /// + [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes { get; set; } + + /// + /// Gets or sets the duration in minutes until which the recovery + /// points need to be + /// stored. + /// + [JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory { get; set; } + + /// + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// + [JsonProperty(PropertyName = "crashConsistentFrequencyInMinutes")] + public int? CrashConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets the app consistent snapshot frequency (in minutes). + /// + [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets a value indicating whether multi-VM sync has to be + /// enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: + /// 'Enable', 'Disable' + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public SetMultiVmSyncStatus MultiVmSyncStatus { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ProtectedDiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ProtectedDiskDetails.cs new file mode 100644 index 000000000000..889d8e9ba677 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ProtectedDiskDetails.cs @@ -0,0 +1,169 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// InMageAzureV2 protected disk details. + /// + public partial class InMageAzureV2ProtectedDiskDetails + { + /// + /// Initializes a new instance of the InMageAzureV2ProtectedDiskDetails + /// class. + /// + public InMageAzureV2ProtectedDiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageAzureV2ProtectedDiskDetails + /// class. + /// + /// The disk id. + /// The disk name. + /// The protection stage. + /// The health error code for the + /// disk. + /// The RPO in seconds. + /// A value indicating whether resync is + /// required for this disk. + /// The resync progress + /// percentage. + /// The resync duration in + /// seconds. + /// The disk capacity in + /// bytes. + /// The disk file system + /// capacity in bytes. + /// The source data transit in + /// MB. + /// The PS data transit in MB. + /// The target data transit in + /// MB. + /// A value indicating whether disk is + /// resized. + public InMageAzureV2ProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string protectionStage = default(string), string healthErrorCode = default(string), long? rpoInSeconds = default(long?), string resyncRequired = default(string), int? resyncProgressPercentage = default(int?), long? resyncDurationInSeconds = default(long?), long? diskCapacityInBytes = default(long?), long? fileSystemCapacityInBytes = default(long?), double? sourceDataInMegaBytes = default(double?), double? psDataInMegaBytes = default(double?), double? targetDataInMegaBytes = default(double?), string diskResized = default(string)) + { + DiskId = diskId; + DiskName = diskName; + ProtectionStage = protectionStage; + HealthErrorCode = healthErrorCode; + RpoInSeconds = rpoInSeconds; + ResyncRequired = resyncRequired; + ResyncProgressPercentage = resyncProgressPercentage; + ResyncDurationInSeconds = resyncDurationInSeconds; + DiskCapacityInBytes = diskCapacityInBytes; + FileSystemCapacityInBytes = fileSystemCapacityInBytes; + SourceDataInMegaBytes = sourceDataInMegaBytes; + PsDataInMegaBytes = psDataInMegaBytes; + TargetDataInMegaBytes = targetDataInMegaBytes; + DiskResized = diskResized; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the disk id. + /// + [JsonProperty(PropertyName = "diskId")] + public string DiskId { get; set; } + + /// + /// Gets or sets the disk name. + /// + [JsonProperty(PropertyName = "diskName")] + public string DiskName { get; set; } + + /// + /// Gets or sets the protection stage. + /// + [JsonProperty(PropertyName = "protectionStage")] + public string ProtectionStage { get; set; } + + /// + /// Gets or sets the health error code for the disk. + /// + [JsonProperty(PropertyName = "healthErrorCode")] + public string HealthErrorCode { get; set; } + + /// + /// Gets or sets the RPO in seconds. + /// + [JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds { get; set; } + + /// + /// Gets or sets a value indicating whether resync is required for this + /// disk. + /// + [JsonProperty(PropertyName = "resyncRequired")] + public string ResyncRequired { get; set; } + + /// + /// Gets or sets the resync progress percentage. + /// + [JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage { get; set; } + + /// + /// Gets or sets the resync duration in seconds. + /// + [JsonProperty(PropertyName = "resyncDurationInSeconds")] + public long? ResyncDurationInSeconds { get; set; } + + /// + /// Gets or sets the disk capacity in bytes. + /// + [JsonProperty(PropertyName = "diskCapacityInBytes")] + public long? DiskCapacityInBytes { get; set; } + + /// + /// Gets or sets the disk file system capacity in bytes. + /// + [JsonProperty(PropertyName = "fileSystemCapacityInBytes")] + public long? FileSystemCapacityInBytes { get; set; } + + /// + /// Gets or sets the source data transit in MB. + /// + [JsonProperty(PropertyName = "sourceDataInMegaBytes")] + public double? SourceDataInMegaBytes { get; set; } + + /// + /// Gets or sets the PS data transit in MB. + /// + [JsonProperty(PropertyName = "psDataInMegaBytes")] + public double? PsDataInMegaBytes { get; set; } + + /// + /// Gets or sets the target data transit in MB. + /// + [JsonProperty(PropertyName = "targetDataInMegaBytes")] + public double? TargetDataInMegaBytes { get; set; } + + /// + /// Gets or sets a value indicating whether disk is resized. + /// + [JsonProperty(PropertyName = "diskResized")] + public string DiskResized { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ReplicationDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ReplicationDetails.cs new file mode 100644 index 000000000000..f197837cd6cb --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ReplicationDetails.cs @@ -0,0 +1,450 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// InMageAzureV2 provider specific settings + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2ReplicationDetails : ReplicationProviderSpecificSettings + { + /// + /// Initializes a new instance of the InMageAzureV2ReplicationDetails + /// class. + /// + public InMageAzureV2ReplicationDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageAzureV2ReplicationDetails + /// class. + /// + /// The infrastructure VM Id. + /// The vCenter infrastructure + /// Id. + /// The protection stage. + /// The virtual machine Id. + /// The protection state for the + /// vm. + /// The protection state + /// description for the vm. + /// The resync progress + /// percentage. + /// The RPO in seconds. + /// The compressed data change + /// rate in MB. + /// The uncompressed data change + /// rate in MB. + /// The source IP address. + /// The agent version. + /// A value indicating whether + /// installed agent needs to be updated. + /// A value indicating + /// whether the source server requires a restart after + /// update. + /// The last heartbeat received from the + /// source server. + /// The process server Id. + /// The multi vm group Id. + /// The multi vm group name. + /// A value indicating whether multi vm + /// sync is enabled or disabled. + /// The list of protected disks. + /// A value indicating whether any disk is + /// resized for this VM. + /// The master target Id. + /// The CPU count of the VM on the + /// primary side. + /// The RAM size of the VM on the + /// primary side. + /// The type of the OS on the VM. + /// The OS disk VHD name. + /// The id of the disk containing the + /// OS. + /// Azure VM Disk details. + /// Recovery Azure given + /// name. + /// The Recovery Azure VM + /// size. + /// The recovery Azure + /// storage account. + /// The ARM id of the + /// log storage acount used for replication. + /// This will be set to null if no log storage account was provided + /// during enable + /// protection. + /// The PE Network details. + /// The selected recovery + /// azure network Id. + /// A value inidicating the discovery type + /// of the machine. + /// Value can be vCenter or physical. + /// The selected option to enable + /// RDP\SSH on target vm after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} + /// enum. + /// The datastores of the on-premise machine. + /// Value can be list of strings that contain datastore names. + /// The ARM Id of the target Azure VM. + /// This value will be null until the VM is failed over. + /// Only after failure it will be populated with the ARM Id of the + /// Azure VM. + /// The target resource + /// group Id. + /// The recovery availability + /// set Id. + /// A value indicating whether managed + /// disks should be used during failover. + /// License Type of the VM to be + /// used. + /// The validation errors of the + /// on-premise machine + /// Value can be list of validation errors. + public InMageAzureV2ReplicationDetails(string infrastructureVmId = default(string), string vCenterInfrastructureId = default(string), string protectionStage = default(string), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), int? resyncProgressPercentage = default(int?), long? rpoInSeconds = default(long?), double? compressedDataRateInMB = default(double?), double? uncompressedDataRateInMB = default(double?), string ipAddress = default(string), string agentVersion = default(string), string isAgentUpdateRequired = default(string), string isRebootAfterUpdateRequired = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string processServerId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string multiVmSyncStatus = default(string), IList protectedDisks = default(IList), string diskResized = default(string), string masterTargetId = default(string), int? sourceVmCPUCount = default(int?), int? sourceVmRAMSizeInMB = default(int?), string osType = default(string), string vhdName = default(string), string osDiskId = default(string), IList azureVMDiskDetails = default(IList), string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureStorageAccount = default(string), string recoveryAzureLogStorageAccountId = default(string), IList vmNics = default(IList), string selectedRecoveryAzureNetworkId = default(string), string discoveryType = default(string), string enableRDPOnTargetOption = default(string), IList datastores = default(IList), string targetVmId = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryAvailabilitySetId = default(string), string useManagedDisks = default(string), string licenseType = default(string), IList validationErrors = default(IList)) + { + InfrastructureVmId = infrastructureVmId; + VCenterInfrastructureId = vCenterInfrastructureId; + ProtectionStage = protectionStage; + VmId = vmId; + VmProtectionState = vmProtectionState; + VmProtectionStateDescription = vmProtectionStateDescription; + ResyncProgressPercentage = resyncProgressPercentage; + RpoInSeconds = rpoInSeconds; + CompressedDataRateInMB = compressedDataRateInMB; + UncompressedDataRateInMB = uncompressedDataRateInMB; + IpAddress = ipAddress; + AgentVersion = agentVersion; + IsAgentUpdateRequired = isAgentUpdateRequired; + IsRebootAfterUpdateRequired = isRebootAfterUpdateRequired; + LastHeartbeat = lastHeartbeat; + ProcessServerId = processServerId; + MultiVmGroupId = multiVmGroupId; + MultiVmGroupName = multiVmGroupName; + MultiVmSyncStatus = multiVmSyncStatus; + ProtectedDisks = protectedDisks; + DiskResized = diskResized; + MasterTargetId = masterTargetId; + SourceVmCPUCount = sourceVmCPUCount; + SourceVmRAMSizeInMB = sourceVmRAMSizeInMB; + OsType = osType; + VhdName = vhdName; + OsDiskId = osDiskId; + AzureVMDiskDetails = azureVMDiskDetails; + RecoveryAzureVMName = recoveryAzureVMName; + RecoveryAzureVMSize = recoveryAzureVMSize; + RecoveryAzureStorageAccount = recoveryAzureStorageAccount; + RecoveryAzureLogStorageAccountId = recoveryAzureLogStorageAccountId; + VmNics = vmNics; + SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + DiscoveryType = discoveryType; + EnableRDPOnTargetOption = enableRDPOnTargetOption; + Datastores = datastores; + TargetVmId = targetVmId; + RecoveryAzureResourceGroupId = recoveryAzureResourceGroupId; + RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + UseManagedDisks = useManagedDisks; + LicenseType = licenseType; + ValidationErrors = validationErrors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the infrastructure VM Id. + /// + [JsonProperty(PropertyName = "infrastructureVmId")] + public string InfrastructureVmId { get; set; } + + /// + /// Gets or sets the vCenter infrastructure Id. + /// + [JsonProperty(PropertyName = "vCenterInfrastructureId")] + public string VCenterInfrastructureId { get; set; } + + /// + /// Gets or sets the protection stage. + /// + [JsonProperty(PropertyName = "protectionStage")] + public string ProtectionStage { get; set; } + + /// + /// Gets or sets the virtual machine Id. + /// + [JsonProperty(PropertyName = "vmId")] + public string VmId { get; set; } + + /// + /// Gets or sets the protection state for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionState")] + public string VmProtectionState { get; set; } + + /// + /// Gets or sets the protection state description for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VmProtectionStateDescription { get; set; } + + /// + /// Gets or sets the resync progress percentage. + /// + [JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage { get; set; } + + /// + /// Gets or sets the RPO in seconds. + /// + [JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds { get; set; } + + /// + /// Gets or sets the compressed data change rate in MB. + /// + [JsonProperty(PropertyName = "compressedDataRateInMB")] + public double? CompressedDataRateInMB { get; set; } + + /// + /// Gets or sets the uncompressed data change rate in MB. + /// + [JsonProperty(PropertyName = "uncompressedDataRateInMB")] + public double? UncompressedDataRateInMB { get; set; } + + /// + /// Gets or sets the source IP address. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the agent version. + /// + [JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion { get; set; } + + /// + /// Gets or sets a value indicating whether installed agent needs to be + /// updated. + /// + [JsonProperty(PropertyName = "isAgentUpdateRequired")] + public string IsAgentUpdateRequired { get; set; } + + /// + /// Gets or sets a value indicating whether the source server requires + /// a restart after + /// update. + /// + [JsonProperty(PropertyName = "isRebootAfterUpdateRequired")] + public string IsRebootAfterUpdateRequired { get; set; } + + /// + /// Gets or sets the last heartbeat received from the source server. + /// + [JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat { get; set; } + + /// + /// Gets or sets the process server Id. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the multi vm group Id. + /// + [JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVmGroupId { get; set; } + + /// + /// Gets or sets the multi vm group name. + /// + [JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVmGroupName { get; set; } + + /// + /// Gets or sets a value indicating whether multi vm sync is enabled or + /// disabled. + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVmSyncStatus { get; set; } + + /// + /// Gets or sets the list of protected disks. + /// + [JsonProperty(PropertyName = "protectedDisks")] + public IList ProtectedDisks { get; set; } + + /// + /// Gets or sets a value indicating whether any disk is resized for + /// this VM. + /// + [JsonProperty(PropertyName = "diskResized")] + public string DiskResized { get; set; } + + /// + /// Gets or sets the master target Id. + /// + [JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId { get; set; } + + /// + /// Gets or sets the CPU count of the VM on the primary side. + /// + [JsonProperty(PropertyName = "sourceVmCPUCount")] + public int? SourceVmCPUCount { get; set; } + + /// + /// Gets or sets the RAM size of the VM on the primary side. + /// + [JsonProperty(PropertyName = "sourceVmRAMSizeInMB")] + public int? SourceVmRAMSizeInMB { get; set; } + + /// + /// Gets or sets the type of the OS on the VM. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets the OS disk VHD name. + /// + [JsonProperty(PropertyName = "vhdName")] + public string VhdName { get; set; } + + /// + /// Gets or sets the id of the disk containing the OS. + /// + [JsonProperty(PropertyName = "osDiskId")] + public string OsDiskId { get; set; } + + /// + /// Gets or sets azure VM Disk details. + /// + [JsonProperty(PropertyName = "azureVMDiskDetails")] + public IList AzureVMDiskDetails { get; set; } + + /// + /// Gets or sets recovery Azure given name. + /// + [JsonProperty(PropertyName = "recoveryAzureVMName")] + public string RecoveryAzureVMName { get; set; } + + /// + /// Gets or sets the Recovery Azure VM size. + /// + [JsonProperty(PropertyName = "recoveryAzureVMSize")] + public string RecoveryAzureVMSize { get; set; } + + /// + /// Gets or sets the recovery Azure storage account. + /// + [JsonProperty(PropertyName = "recoveryAzureStorageAccount")] + public string RecoveryAzureStorageAccount { get; set; } + + /// + /// Gets or sets the ARM id of the log storage acount used for + /// replication. + /// This will be set to null if no log storage account was provided + /// during enable + /// protection. + /// + [JsonProperty(PropertyName = "recoveryAzureLogStorageAccountId")] + public string RecoveryAzureLogStorageAccountId { get; set; } + + /// + /// Gets or sets the PE Network details. + /// + [JsonProperty(PropertyName = "vmNics")] + public IList VmNics { get; set; } + + /// + /// Gets or sets the selected recovery azure network Id. + /// + [JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] + public string SelectedRecoveryAzureNetworkId { get; set; } + + /// + /// Gets or sets a value inidicating the discovery type of the machine. + /// Value can be vCenter or physical. + /// + [JsonProperty(PropertyName = "discoveryType")] + public string DiscoveryType { get; set; } + + /// + /// Gets or sets the selected option to enable RDP\SSH on target vm + /// after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + /// + [JsonProperty(PropertyName = "enableRDPOnTargetOption")] + public string EnableRDPOnTargetOption { get; set; } + + /// + /// Gets or sets the datastores of the on-premise machine. + /// Value can be list of strings that contain datastore names. + /// + [JsonProperty(PropertyName = "datastores")] + public IList Datastores { get; set; } + + /// + /// Gets or sets the ARM Id of the target Azure VM. + /// This value will be null until the VM is failed over. + /// Only after failure it will be populated with the ARM Id of the + /// Azure VM. + /// + [JsonProperty(PropertyName = "targetVmId")] + public string TargetVmId { get; set; } + + /// + /// Gets or sets the target resource group Id. + /// + [JsonProperty(PropertyName = "recoveryAzureResourceGroupId")] + public string RecoveryAzureResourceGroupId { get; set; } + + /// + /// Gets or sets the recovery availability set Id. + /// + [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId { get; set; } + + /// + /// Gets or sets a value indicating whether managed disks should be + /// used during failover. + /// + [JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks { get; set; } + + /// + /// Gets or sets license Type of the VM to be used. + /// + [JsonProperty(PropertyName = "licenseType")] + public string LicenseType { get; set; } + + /// + /// Gets or sets the validation errors of the on-premise machine + /// Value can be list of validation errors. + /// + [JsonProperty(PropertyName = "validationErrors")] + public IList ValidationErrors { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ReprotectInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ReprotectInput.cs new file mode 100644 index 000000000000..0331d058f159 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2ReprotectInput.cs @@ -0,0 +1,109 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// InMageAzureV2 specific provider input. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2ReprotectInput : ReverseReplicationProviderSpecificInput + { + /// + /// Initializes a new instance of the InMageAzureV2ReprotectInput + /// class. + /// + public InMageAzureV2ReprotectInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageAzureV2ReprotectInput + /// class. + /// + /// The Master target Id. + /// The Process Server Id. + /// The storage account id. + /// The CS account Id. + /// The Policy Id. + /// The storage account to be used + /// for logging + /// during replication. + /// The disks to include list. + public InMageAzureV2ReprotectInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string policyId = default(string), string logStorageAccountId = default(string), IList disksToInclude = default(IList)) + { + MasterTargetId = masterTargetId; + ProcessServerId = processServerId; + StorageAccountId = storageAccountId; + RunAsAccountId = runAsAccountId; + PolicyId = policyId; + LogStorageAccountId = logStorageAccountId; + DisksToInclude = disksToInclude; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Master target Id. + /// + [JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId { get; set; } + + /// + /// Gets or sets the Process Server Id. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the storage account id. + /// + [JsonProperty(PropertyName = "storageAccountId")] + public string StorageAccountId { get; set; } + + /// + /// Gets or sets the CS account Id. + /// + [JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId { get; set; } + + /// + /// Gets or sets the Policy Id. + /// + [JsonProperty(PropertyName = "policyId")] + public string PolicyId { get; set; } + + /// + /// Gets or sets the storage account to be used for logging + /// during replication. + /// + [JsonProperty(PropertyName = "logStorageAccountId")] + public string LogStorageAccountId { get; set; } + + /// + /// Gets or sets the disks to include list. + /// + [JsonProperty(PropertyName = "disksToInclude")] + public IList DisksToInclude { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2UpdateReplicationProtectedItemInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2UpdateReplicationProtectedItemInput.cs new file mode 100644 index 000000000000..3a1765378be7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageAzureV2UpdateReplicationProtectedItemInput.cs @@ -0,0 +1,78 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// InMage Azure V2 input to update replication protected item. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class InMageAzureV2UpdateReplicationProtectedItemInput : UpdateReplicationProtectedItemProviderInput + { + /// + /// Initializes a new instance of the + /// InMageAzureV2UpdateReplicationProtectedItemInput class. + /// + public InMageAzureV2UpdateReplicationProtectedItemInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// InMageAzureV2UpdateReplicationProtectedItemInput class. + /// + /// The recovery Azure + /// resource group Id for classic deployment. + /// The recovery Azure + /// resource group Id for resource manager deployment. + /// A value indicating whether managed + /// disks should be used during failover. + public InMageAzureV2UpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string)) + { + RecoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId; + RecoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId; + UseManagedDisks = useManagedDisks; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery Azure resource group Id for classic + /// deployment. + /// + [JsonProperty(PropertyName = "recoveryAzureV1ResourceGroupId")] + public string RecoveryAzureV1ResourceGroupId { get; set; } + + /// + /// Gets or sets the recovery Azure resource group Id for resource + /// manager deployment. + /// + [JsonProperty(PropertyName = "recoveryAzureV2ResourceGroupId")] + public string RecoveryAzureV2ResourceGroupId { get; set; } + + /// + /// Gets or sets a value indicating whether managed disks should be + /// used during failover. + /// + [JsonProperty(PropertyName = "useManagedDisks")] + public string UseManagedDisks { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageBasePolicyDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageBasePolicyDetails.cs new file mode 100644 index 000000000000..f3697dfc9c65 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageBasePolicyDetails.cs @@ -0,0 +1,85 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Base class for the policies of providers using InMage replication. + /// + public partial class InMageBasePolicyDetails : PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the InMageBasePolicyDetails class. + /// + public InMageBasePolicyDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageBasePolicyDetails class. + /// + /// The recovery point + /// threshold in minutes. + /// The duration in minutes until + /// which the recovery points need to be + /// stored. + /// The app consistent + /// snapshot frequency in minutes. + /// A value indicating whether multi-VM + /// sync has to be enabled. + public InMageBasePolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVmSyncStatus = default(string)) + { + RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + RecoveryPointHistory = recoveryPointHistory; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + MultiVmSyncStatus = multiVmSyncStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point threshold in minutes. + /// + [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes { get; set; } + + /// + /// Gets or sets the duration in minutes until which the recovery + /// points need to be + /// stored. + /// + [JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory { get; set; } + + /// + /// Gets or sets the app consistent snapshot frequency in minutes. + /// + [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets a value indicating whether multi-VM sync has to be + /// enabled. + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVmSyncStatus { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDisableProtectionProviderSpecificInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDisableProtectionProviderSpecificInput.cs new file mode 100644 index 000000000000..0b2f1945cf64 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDisableProtectionProviderSpecificInput.cs @@ -0,0 +1,60 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// InMage disable protection provider specific input. + /// + [Newtonsoft.Json.JsonObject("InMage")] + public partial class InMageDisableProtectionProviderSpecificInput : DisableProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// InMageDisableProtectionProviderSpecificInput class. + /// + public InMageDisableProtectionProviderSpecificInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// InMageDisableProtectionProviderSpecificInput class. + /// + /// A value indicating whether + /// the replica VM should be destroyed or retained. + /// Values from Delete and Retain. + public InMageDisableProtectionProviderSpecificInput(string replicaVmDeletionStatus = default(string)) + { + ReplicaVmDeletionStatus = replicaVmDeletionStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating whether the replica VM should be + /// destroyed or retained. + /// Values from Delete and Retain. + /// + [JsonProperty(PropertyName = "replicaVmDeletionStatus")] + public string ReplicaVmDeletionStatus { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskDetails.cs new file mode 100644 index 000000000000..469b514d003f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskDetails.cs @@ -0,0 +1,97 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// VMware/Physical specific Disk Details + /// + public partial class InMageDiskDetails + { + /// + /// Initializes a new instance of the InMageDiskDetails class. + /// + public InMageDiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageDiskDetails class. + /// + /// The disk Id. + /// The disk name. + /// The disk size in MB. + /// Whether disk is system disk or data + /// disk. + /// Whether disk is dynamic disk or + /// basic disk. + /// Volumes of the disk. + public InMageDiskDetails(string diskId = default(string), string diskName = default(string), string diskSizeInMB = default(string), string diskType = default(string), string diskConfiguration = default(string), IList volumeList = default(IList)) + { + DiskId = diskId; + DiskName = diskName; + DiskSizeInMB = diskSizeInMB; + DiskType = diskType; + DiskConfiguration = diskConfiguration; + VolumeList = volumeList; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the disk Id. + /// + [JsonProperty(PropertyName = "diskId")] + public string DiskId { get; set; } + + /// + /// Gets or sets the disk name. + /// + [JsonProperty(PropertyName = "diskName")] + public string DiskName { get; set; } + + /// + /// Gets or sets the disk size in MB. + /// + [JsonProperty(PropertyName = "diskSizeInMB")] + public string DiskSizeInMB { get; set; } + + /// + /// Gets or sets whether disk is system disk or data disk. + /// + [JsonProperty(PropertyName = "diskType")] + public string DiskType { get; set; } + + /// + /// Gets or sets whether disk is dynamic disk or basic disk. + /// + [JsonProperty(PropertyName = "diskConfiguration")] + public string DiskConfiguration { get; set; } + + /// + /// Gets or sets volumes of the disk. + /// + [JsonProperty(PropertyName = "volumeList")] + public IList VolumeList { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskExclusionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskExclusionInput.cs new file mode 100644 index 000000000000..6174f309dbb1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskExclusionInput.cs @@ -0,0 +1,67 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DiskExclusionInput when doing enable protection of virtual machine in + /// InMage provider. + /// + public partial class InMageDiskExclusionInput + { + /// + /// Initializes a new instance of the InMageDiskExclusionInput class. + /// + public InMageDiskExclusionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageDiskExclusionInput class. + /// + /// The volume label based option for disk + /// exclusion. + /// The guest disk signature based + /// option for disk exclusion. + public InMageDiskExclusionInput(IList volumeOptions = default(IList), IList diskSignatureOptions = default(IList)) + { + VolumeOptions = volumeOptions; + DiskSignatureOptions = diskSignatureOptions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the volume label based option for disk exclusion. + /// + [JsonProperty(PropertyName = "volumeOptions")] + public IList VolumeOptions { get; set; } + + /// + /// Gets or sets the guest disk signature based option for disk + /// exclusion. + /// + [JsonProperty(PropertyName = "diskSignatureOptions")] + public IList DiskSignatureOptions { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskSignatureExclusionOptions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskSignatureExclusionOptions.cs new file mode 100644 index 000000000000..6a6d83e998dd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageDiskSignatureExclusionOptions.cs @@ -0,0 +1,59 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Guest disk signature based disk exclusion option when doing enable + /// protection of + /// virtual machine in InMage provider. + /// + public partial class InMageDiskSignatureExclusionOptions + { + /// + /// Initializes a new instance of the + /// InMageDiskSignatureExclusionOptions class. + /// + public InMageDiskSignatureExclusionOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// InMageDiskSignatureExclusionOptions class. + /// + /// The guest signature of disk to be + /// excluded from replication. + public InMageDiskSignatureExclusionOptions(string diskSignature = default(string)) + { + DiskSignature = diskSignature; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the guest signature of disk to be excluded from + /// replication. + /// + [JsonProperty(PropertyName = "diskSignature")] + public string DiskSignature { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageEnableProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageEnableProtectionInput.cs new file mode 100644 index 000000000000..24c80d91f27f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageEnableProtectionInput.cs @@ -0,0 +1,132 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// VMware Azure specific enable protection input. + /// + [Newtonsoft.Json.JsonObject("InMage")] + public partial class InMageEnableProtectionInput : EnableProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the InMageEnableProtectionInput + /// class. + /// + public InMageEnableProtectionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageEnableProtectionInput + /// class. + /// + /// The Vm Name. + /// The Master Target Id. + /// The Process Server Id. + /// The retention drive to use on the + /// MT. + /// The CS account Id. + /// The multi vm group Id. + /// The multi vm group name. + /// The target datastore name. + /// The enable disk exclusion + /// input. + /// The disks to include list. + public InMageEnableProtectionInput(string vmFriendlyName = default(string), string masterTargetId = default(string), string processServerId = default(string), string retentionDrive = default(string), string runAsAccountId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string datastoreName = default(string), InMageDiskExclusionInput diskExclusionInput = default(InMageDiskExclusionInput), IList disksToInclude = default(IList)) + { + VmFriendlyName = vmFriendlyName; + MasterTargetId = masterTargetId; + ProcessServerId = processServerId; + RetentionDrive = retentionDrive; + RunAsAccountId = runAsAccountId; + MultiVmGroupId = multiVmGroupId; + MultiVmGroupName = multiVmGroupName; + DatastoreName = datastoreName; + DiskExclusionInput = diskExclusionInput; + DisksToInclude = disksToInclude; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Vm Name. + /// + [JsonProperty(PropertyName = "vmFriendlyName")] + public string VmFriendlyName { get; set; } + + /// + /// Gets or sets the Master Target Id. + /// + [JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId { get; set; } + + /// + /// Gets or sets the Process Server Id. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the retention drive to use on the MT. + /// + [JsonProperty(PropertyName = "retentionDrive")] + public string RetentionDrive { get; set; } + + /// + /// Gets or sets the CS account Id. + /// + [JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId { get; set; } + + /// + /// Gets or sets the multi vm group Id. + /// + [JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVmGroupId { get; set; } + + /// + /// Gets or sets the multi vm group name. + /// + [JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVmGroupName { get; set; } + + /// + /// Gets or sets the target datastore name. + /// + [JsonProperty(PropertyName = "datastoreName")] + public string DatastoreName { get; set; } + + /// + /// Gets or sets the enable disk exclusion input. + /// + [JsonProperty(PropertyName = "diskExclusionInput")] + public InMageDiskExclusionInput DiskExclusionInput { get; set; } + + /// + /// Gets or sets the disks to include list. + /// + [JsonProperty(PropertyName = "disksToInclude")] + public IList DisksToInclude { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageFailoverProviderInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageFailoverProviderInput.cs new file mode 100644 index 000000000000..5ef531807f44 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageFailoverProviderInput.cs @@ -0,0 +1,80 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Provider specific input for InMage failover. + /// + [Newtonsoft.Json.JsonObject("InMage")] + public partial class InMageFailoverProviderInput : ProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the InMageFailoverProviderInput + /// class. + /// + public InMageFailoverProviderInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageFailoverProviderInput + /// class. + /// + /// The recovery point type. Values + /// from LatestTime, + /// LatestTag or Custom. In the case of custom, the recovery point + /// provided by + /// RecoveryPointId will be used. In the other two cases, recovery + /// point id + /// will be ignored. + /// The recovery point id to be passed to + /// failover to a particular recovery + /// point. In case of latest recovery point, null should be + /// passed. + public InMageFailoverProviderInput(string recoveryPointType = default(string), string recoveryPointId = default(string)) + { + RecoveryPointType = recoveryPointType; + RecoveryPointId = recoveryPointId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point type. Values from LatestTime, + /// LatestTag or Custom. In the case of custom, the recovery point + /// provided by + /// RecoveryPointId will be used. In the other two cases, recovery + /// point id + /// will be ignored. + /// + [JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType { get; set; } + + /// + /// Gets or sets the recovery point id to be passed to failover to a + /// particular recovery + /// point. In case of latest recovery point, null should be passed. + /// + [JsonProperty(PropertyName = "recoveryPointId")] + public string RecoveryPointId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMagePolicyDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMagePolicyDetails.cs new file mode 100644 index 000000000000..cdb18fecc2ee --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMagePolicyDetails.cs @@ -0,0 +1,86 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// InMage specific protection profile details. + /// + [Newtonsoft.Json.JsonObject("InMage")] + public partial class InMagePolicyDetails : PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the InMagePolicyDetails class. + /// + public InMagePolicyDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMagePolicyDetails class. + /// + /// The recovery point + /// threshold in minutes. + /// The duration in minutes until + /// which the recovery points need to be + /// stored. + /// The app consistent + /// snapshot frequency in minutes. + /// A value indicating whether multi-VM + /// sync has to be enabled. + public InMagePolicyDetails(int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?), string multiVmSyncStatus = default(string)) + { + RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + RecoveryPointHistory = recoveryPointHistory; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + MultiVmSyncStatus = multiVmSyncStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point threshold in minutes. + /// + [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes { get; set; } + + /// + /// Gets or sets the duration in minutes until which the recovery + /// points need to be + /// stored. + /// + [JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory { get; set; } + + /// + /// Gets or sets the app consistent snapshot frequency in minutes. + /// + [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets a value indicating whether multi-VM sync has to be + /// enabled. + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVmSyncStatus { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMagePolicyInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMagePolicyInput.cs new file mode 100644 index 000000000000..2ea6f6a6a115 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMagePolicyInput.cs @@ -0,0 +1,99 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// VMWare Azure specific protection profile Input. + /// + [Newtonsoft.Json.JsonObject("InMage")] + public partial class InMagePolicyInput : PolicyProviderSpecificInput + { + /// + /// Initializes a new instance of the InMagePolicyInput class. + /// + public InMagePolicyInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMagePolicyInput class. + /// + /// A value indicating whether multi-VM + /// sync has to be enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: + /// 'Enable', 'Disable' + /// The recovery point + /// threshold in minutes. + /// The duration in minutes until + /// which the recovery points need to be + /// stored. + /// The app consistent + /// snapshot frequency (in minutes). + public InMagePolicyInput(SetMultiVmSyncStatus multiVmSyncStatus, int? recoveryPointThresholdInMinutes = default(int?), int? recoveryPointHistory = default(int?), int? appConsistentFrequencyInMinutes = default(int?)) + { + RecoveryPointThresholdInMinutes = recoveryPointThresholdInMinutes; + RecoveryPointHistory = recoveryPointHistory; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + MultiVmSyncStatus = multiVmSyncStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point threshold in minutes. + /// + [JsonProperty(PropertyName = "recoveryPointThresholdInMinutes")] + public int? RecoveryPointThresholdInMinutes { get; set; } + + /// + /// Gets or sets the duration in minutes until which the recovery + /// points need to be + /// stored. + /// + [JsonProperty(PropertyName = "recoveryPointHistory")] + public int? RecoveryPointHistory { get; set; } + + /// + /// Gets or sets the app consistent snapshot frequency (in minutes). + /// + [JsonProperty(PropertyName = "appConsistentFrequencyInMinutes")] + public int? AppConsistentFrequencyInMinutes { get; set; } + + /// + /// Gets or sets a value indicating whether multi-VM sync has to be + /// enabled. + /// Value should be 'Enabled' or 'Disabled'. Possible values include: + /// 'Enable', 'Disable' + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public SetMultiVmSyncStatus MultiVmSyncStatus { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageProtectedDiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageProtectedDiskDetails.cs new file mode 100644 index 000000000000..345f466d80bd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageProtectedDiskDetails.cs @@ -0,0 +1,165 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// InMage protected disk details. + /// + public partial class InMageProtectedDiskDetails + { + /// + /// Initializes a new instance of the InMageProtectedDiskDetails class. + /// + public InMageProtectedDiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageProtectedDiskDetails class. + /// + /// The disk id. + /// The disk name. + /// The protection stage. + /// The health error code for the + /// disk. + /// The RPO in seconds. + /// A value indicating whether resync is + /// required for this disk. + /// The resync progress + /// percentage. + /// The resync duration in + /// seconds. + /// The disk capacity in + /// bytes. + /// The file system capacity in + /// bytes. + /// The source data transit in MB. + /// The PS data transit in MB. + /// The target data transit in MB. + /// A value indicating whether disk is + /// resized. + public InMageProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string protectionStage = default(string), string healthErrorCode = default(string), long? rpoInSeconds = default(long?), string resyncRequired = default(string), int? resyncProgressPercentage = default(int?), long? resyncDurationInSeconds = default(long?), long? diskCapacityInBytes = default(long?), long? fileSystemCapacityInBytes = default(long?), double? sourceDataInMB = default(double?), double? psDataInMB = default(double?), double? targetDataInMB = default(double?), string diskResized = default(string)) + { + DiskId = diskId; + DiskName = diskName; + ProtectionStage = protectionStage; + HealthErrorCode = healthErrorCode; + RpoInSeconds = rpoInSeconds; + ResyncRequired = resyncRequired; + ResyncProgressPercentage = resyncProgressPercentage; + ResyncDurationInSeconds = resyncDurationInSeconds; + DiskCapacityInBytes = diskCapacityInBytes; + FileSystemCapacityInBytes = fileSystemCapacityInBytes; + SourceDataInMB = sourceDataInMB; + PsDataInMB = psDataInMB; + TargetDataInMB = targetDataInMB; + DiskResized = diskResized; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the disk id. + /// + [JsonProperty(PropertyName = "diskId")] + public string DiskId { get; set; } + + /// + /// Gets or sets the disk name. + /// + [JsonProperty(PropertyName = "diskName")] + public string DiskName { get; set; } + + /// + /// Gets or sets the protection stage. + /// + [JsonProperty(PropertyName = "protectionStage")] + public string ProtectionStage { get; set; } + + /// + /// Gets or sets the health error code for the disk. + /// + [JsonProperty(PropertyName = "healthErrorCode")] + public string HealthErrorCode { get; set; } + + /// + /// Gets or sets the RPO in seconds. + /// + [JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds { get; set; } + + /// + /// Gets or sets a value indicating whether resync is required for this + /// disk. + /// + [JsonProperty(PropertyName = "resyncRequired")] + public string ResyncRequired { get; set; } + + /// + /// Gets or sets the resync progress percentage. + /// + [JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage { get; set; } + + /// + /// Gets or sets the resync duration in seconds. + /// + [JsonProperty(PropertyName = "resyncDurationInSeconds")] + public long? ResyncDurationInSeconds { get; set; } + + /// + /// Gets or sets the disk capacity in bytes. + /// + [JsonProperty(PropertyName = "diskCapacityInBytes")] + public long? DiskCapacityInBytes { get; set; } + + /// + /// Gets or sets the file system capacity in bytes. + /// + [JsonProperty(PropertyName = "fileSystemCapacityInBytes")] + public long? FileSystemCapacityInBytes { get; set; } + + /// + /// Gets or sets the source data transit in MB. + /// + [JsonProperty(PropertyName = "sourceDataInMB")] + public double? SourceDataInMB { get; set; } + + /// + /// Gets or sets the PS data transit in MB. + /// + [JsonProperty(PropertyName = "psDataInMB")] + public double? PsDataInMB { get; set; } + + /// + /// Gets or sets the target data transit in MB. + /// + [JsonProperty(PropertyName = "targetDataInMB")] + public double? TargetDataInMB { get; set; } + + /// + /// Gets or sets a value indicating whether disk is resized. + /// + [JsonProperty(PropertyName = "diskResized")] + public string DiskResized { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageReplicationDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageReplicationDetails.cs new file mode 100644 index 000000000000..81dd2baa94ca --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageReplicationDetails.cs @@ -0,0 +1,354 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// InMage provider specific settings + /// + [Newtonsoft.Json.JsonObject("InMage")] + public partial class InMageReplicationDetails : ReplicationProviderSpecificSettings + { + /// + /// Initializes a new instance of the InMageReplicationDetails class. + /// + public InMageReplicationDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageReplicationDetails class. + /// + /// The active location of the VM. If the + /// VM is being protected + /// from Azure, this field will take values from { Azure, OnPrem }. If + /// the VM + /// is being protected between two data-centers, this field will be + /// OnPrem always. + /// The CPU count of the VM on the + /// primary side. + /// The RAM size of the VM on the + /// primary side. + /// The OS details. + /// The protection stage. + /// The virtual machine Id. + /// The protection state for the + /// vm. + /// The protection state + /// description for the vm. + /// The resync details of the + /// machine + /// The retention window start + /// time. + /// The retention window end + /// time. + /// The compressed data change + /// rate in MB. + /// The uncompressed data change + /// rate in MB. + /// The RPO in seconds. + /// The list of protected disks. + /// The source IP address. + /// The last heartbeat received from the + /// source server. + /// The process server Id. + /// The master target Id. + /// The collection of Consistency + /// points. + /// A value indicating whether any disk is + /// resized for this VM. + /// A value indicating whether + /// the source server requires a restart after + /// update. + /// The multi vm group Id, if any. + /// The multi vm group name, if + /// any. + /// A value indicating whether the + /// multi vm sync is enabled or disabled. + /// The agent details. + /// The vCenter infrastructure + /// Id. + /// The infrastructure VM Id. + /// The PE Network details. + /// A value inidicating the discovery type + /// of the machine. + /// A value indicating the + /// underlying Azure storage account. If + /// the VM is not running in Azure, this value shall be set to + /// null. + /// The datastores of the on-premise machine + /// Value can be list of strings that contain datastore names + /// The validation errors of the + /// on-premise machine + /// Value can be list of validation errors + public InMageReplicationDetails(string activeSiteType = default(string), int? sourceVmCPUCount = default(int?), int? sourceVmRAMSizeInMB = default(int?), OSDiskDetails osDetails = default(OSDiskDetails), string protectionStage = default(string), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), InitialReplicationDetails resyncDetails = default(InitialReplicationDetails), System.DateTime? retentionWindowStart = default(System.DateTime?), System.DateTime? retentionWindowEnd = default(System.DateTime?), double? compressedDataRateInMB = default(double?), double? uncompressedDataRateInMB = default(double?), long? rpoInSeconds = default(long?), IList protectedDisks = default(IList), string ipAddress = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string processServerId = default(string), string masterTargetId = default(string), IDictionary consistencyPoints = default(IDictionary), string diskResized = default(string), string rebootAfterUpdateStatus = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string multiVmSyncStatus = default(string), InMageAgentDetails agentDetails = default(InMageAgentDetails), string vCenterInfrastructureId = default(string), string infrastructureVmId = default(string), IList vmNics = default(IList), string discoveryType = default(string), string azureStorageAccountId = default(string), IList datastores = default(IList), IList validationErrors = default(IList)) + { + ActiveSiteType = activeSiteType; + SourceVmCPUCount = sourceVmCPUCount; + SourceVmRAMSizeInMB = sourceVmRAMSizeInMB; + OsDetails = osDetails; + ProtectionStage = protectionStage; + VmId = vmId; + VmProtectionState = vmProtectionState; + VmProtectionStateDescription = vmProtectionStateDescription; + ResyncDetails = resyncDetails; + RetentionWindowStart = retentionWindowStart; + RetentionWindowEnd = retentionWindowEnd; + CompressedDataRateInMB = compressedDataRateInMB; + UncompressedDataRateInMB = uncompressedDataRateInMB; + RpoInSeconds = rpoInSeconds; + ProtectedDisks = protectedDisks; + IpAddress = ipAddress; + LastHeartbeat = lastHeartbeat; + ProcessServerId = processServerId; + MasterTargetId = masterTargetId; + ConsistencyPoints = consistencyPoints; + DiskResized = diskResized; + RebootAfterUpdateStatus = rebootAfterUpdateStatus; + MultiVmGroupId = multiVmGroupId; + MultiVmGroupName = multiVmGroupName; + MultiVmSyncStatus = multiVmSyncStatus; + AgentDetails = agentDetails; + VCenterInfrastructureId = vCenterInfrastructureId; + InfrastructureVmId = infrastructureVmId; + VmNics = vmNics; + DiscoveryType = discoveryType; + AzureStorageAccountId = azureStorageAccountId; + Datastores = datastores; + ValidationErrors = validationErrors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the active location of the VM. If the VM is being + /// protected + /// from Azure, this field will take values from { Azure, OnPrem }. If + /// the VM + /// is being protected between two data-centers, this field will be + /// OnPrem always. + /// + [JsonProperty(PropertyName = "activeSiteType")] + public string ActiveSiteType { get; set; } + + /// + /// Gets or sets the CPU count of the VM on the primary side. + /// + [JsonProperty(PropertyName = "sourceVmCPUCount")] + public int? SourceVmCPUCount { get; set; } + + /// + /// Gets or sets the RAM size of the VM on the primary side. + /// + [JsonProperty(PropertyName = "sourceVmRAMSizeInMB")] + public int? SourceVmRAMSizeInMB { get; set; } + + /// + /// Gets or sets the OS details. + /// + [JsonProperty(PropertyName = "osDetails")] + public OSDiskDetails OsDetails { get; set; } + + /// + /// Gets or sets the protection stage. + /// + [JsonProperty(PropertyName = "protectionStage")] + public string ProtectionStage { get; set; } + + /// + /// Gets or sets the virtual machine Id. + /// + [JsonProperty(PropertyName = "vmId")] + public string VmId { get; set; } + + /// + /// Gets or sets the protection state for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionState")] + public string VmProtectionState { get; set; } + + /// + /// Gets or sets the protection state description for the vm. + /// + [JsonProperty(PropertyName = "vmProtectionStateDescription")] + public string VmProtectionStateDescription { get; set; } + + /// + /// Gets or sets the resync details of the machine + /// + [JsonProperty(PropertyName = "resyncDetails")] + public InitialReplicationDetails ResyncDetails { get; set; } + + /// + /// Gets or sets the retention window start time. + /// + [JsonProperty(PropertyName = "retentionWindowStart")] + public System.DateTime? RetentionWindowStart { get; set; } + + /// + /// Gets or sets the retention window end time. + /// + [JsonProperty(PropertyName = "retentionWindowEnd")] + public System.DateTime? RetentionWindowEnd { get; set; } + + /// + /// Gets or sets the compressed data change rate in MB. + /// + [JsonProperty(PropertyName = "compressedDataRateInMB")] + public double? CompressedDataRateInMB { get; set; } + + /// + /// Gets or sets the uncompressed data change rate in MB. + /// + [JsonProperty(PropertyName = "uncompressedDataRateInMB")] + public double? UncompressedDataRateInMB { get; set; } + + /// + /// Gets or sets the RPO in seconds. + /// + [JsonProperty(PropertyName = "rpoInSeconds")] + public long? RpoInSeconds { get; set; } + + /// + /// Gets or sets the list of protected disks. + /// + [JsonProperty(PropertyName = "protectedDisks")] + public IList ProtectedDisks { get; set; } + + /// + /// Gets or sets the source IP address. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the last heartbeat received from the source server. + /// + [JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat { get; set; } + + /// + /// Gets or sets the process server Id. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the master target Id. + /// + [JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId { get; set; } + + /// + /// Gets or sets the collection of Consistency points. + /// + [JsonProperty(PropertyName = "consistencyPoints")] + public IDictionary ConsistencyPoints { get; set; } + + /// + /// Gets or sets a value indicating whether any disk is resized for + /// this VM. + /// + [JsonProperty(PropertyName = "diskResized")] + public string DiskResized { get; set; } + + /// + /// Gets or sets a value indicating whether the source server requires + /// a restart after + /// update. + /// + [JsonProperty(PropertyName = "rebootAfterUpdateStatus")] + public string RebootAfterUpdateStatus { get; set; } + + /// + /// Gets or sets the multi vm group Id, if any. + /// + [JsonProperty(PropertyName = "multiVmGroupId")] + public string MultiVmGroupId { get; set; } + + /// + /// Gets or sets the multi vm group name, if any. + /// + [JsonProperty(PropertyName = "multiVmGroupName")] + public string MultiVmGroupName { get; set; } + + /// + /// Gets or sets a value indicating whether the multi vm sync is + /// enabled or disabled. + /// + [JsonProperty(PropertyName = "multiVmSyncStatus")] + public string MultiVmSyncStatus { get; set; } + + /// + /// Gets or sets the agent details. + /// + [JsonProperty(PropertyName = "agentDetails")] + public InMageAgentDetails AgentDetails { get; set; } + + /// + /// Gets or sets the vCenter infrastructure Id. + /// + [JsonProperty(PropertyName = "vCenterInfrastructureId")] + public string VCenterInfrastructureId { get; set; } + + /// + /// Gets or sets the infrastructure VM Id. + /// + [JsonProperty(PropertyName = "infrastructureVmId")] + public string InfrastructureVmId { get; set; } + + /// + /// Gets or sets the PE Network details. + /// + [JsonProperty(PropertyName = "vmNics")] + public IList VmNics { get; set; } + + /// + /// Gets or sets a value inidicating the discovery type of the machine. + /// + [JsonProperty(PropertyName = "discoveryType")] + public string DiscoveryType { get; set; } + + /// + /// Gets or sets a value indicating the underlying Azure storage + /// account. If + /// the VM is not running in Azure, this value shall be set to null. + /// + [JsonProperty(PropertyName = "azureStorageAccountId")] + public string AzureStorageAccountId { get; set; } + + /// + /// Gets or sets the datastores of the on-premise machine + /// Value can be list of strings that contain datastore names + /// + [JsonProperty(PropertyName = "datastores")] + public IList Datastores { get; set; } + + /// + /// Gets or sets the validation errors of the on-premise machine + /// Value can be list of validation errors + /// + [JsonProperty(PropertyName = "validationErrors")] + public IList ValidationErrors { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageReprotectInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageReprotectInput.cs new file mode 100644 index 000000000000..402e173d4d80 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageReprotectInput.cs @@ -0,0 +1,114 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// InMageAzureV2 specific provider input. + /// + [Newtonsoft.Json.JsonObject("InMage")] + public partial class InMageReprotectInput : ReverseReplicationProviderSpecificInput + { + /// + /// Initializes a new instance of the InMageReprotectInput class. + /// + public InMageReprotectInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageReprotectInput class. + /// + /// The Master Target Id. + /// The Process Server Id. + /// The retention drive to use on the + /// MT. + /// The CS account Id. + /// The target datastore name. + /// The enable disk exclusion + /// input. + /// The Policy Id. + /// The disks to include list. + public InMageReprotectInput(string masterTargetId = default(string), string processServerId = default(string), string retentionDrive = default(string), string runAsAccountId = default(string), string datastoreName = default(string), InMageDiskExclusionInput diskExclusionInput = default(InMageDiskExclusionInput), string profileId = default(string), IList disksToInclude = default(IList)) + { + MasterTargetId = masterTargetId; + ProcessServerId = processServerId; + RetentionDrive = retentionDrive; + RunAsAccountId = runAsAccountId; + DatastoreName = datastoreName; + DiskExclusionInput = diskExclusionInput; + ProfileId = profileId; + DisksToInclude = disksToInclude; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Master Target Id. + /// + [JsonProperty(PropertyName = "masterTargetId")] + public string MasterTargetId { get; set; } + + /// + /// Gets or sets the Process Server Id. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the retention drive to use on the MT. + /// + [JsonProperty(PropertyName = "retentionDrive")] + public string RetentionDrive { get; set; } + + /// + /// Gets or sets the CS account Id. + /// + [JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId { get; set; } + + /// + /// Gets or sets the target datastore name. + /// + [JsonProperty(PropertyName = "datastoreName")] + public string DatastoreName { get; set; } + + /// + /// Gets or sets the enable disk exclusion input. + /// + [JsonProperty(PropertyName = "diskExclusionInput")] + public InMageDiskExclusionInput DiskExclusionInput { get; set; } + + /// + /// Gets or sets the Policy Id. + /// + [JsonProperty(PropertyName = "profileId")] + public string ProfileId { get; set; } + + /// + /// Gets or sets the disks to include list. + /// + [JsonProperty(PropertyName = "disksToInclude")] + public IList DisksToInclude { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageV2RpRecoveryPointType.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageV2RpRecoveryPointType.cs new file mode 100644 index 000000000000..87f9111bf626 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageV2RpRecoveryPointType.cs @@ -0,0 +1,35 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for InMageV2RpRecoveryPointType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum InMageV2RpRecoveryPointType + { + [EnumMember(Value = "Latest")] + Latest, + [EnumMember(Value = "LatestApplicationConsistent")] + LatestApplicationConsistent, + [EnumMember(Value = "LatestCrashConsistent")] + LatestCrashConsistent, + [EnumMember(Value = "LatestProcessed")] + LatestProcessed + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageVolumeExclusionOptions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageVolumeExclusionOptions.cs new file mode 100644 index 000000000000..5c4fd5bef37c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InMageVolumeExclusionOptions.cs @@ -0,0 +1,79 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Guest disk signature based disk exclusion option when doing enable + /// protection of + /// virtual machine in InMage provider. + /// + public partial class InMageVolumeExclusionOptions + { + /// + /// Initializes a new instance of the InMageVolumeExclusionOptions + /// class. + /// + public InMageVolumeExclusionOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InMageVolumeExclusionOptions + /// class. + /// + /// The volume label. The disk having any + /// volume with this label will be + /// excluded from replication. + /// The value indicating + /// whether to exclude multi volume disk or not. + /// If a disk has multiple volumes and one of the volume has label + /// matching with + /// VolumeLabel this disk will be excluded from replication if + /// OnlyExcludeIfSingleVolume is false. + public InMageVolumeExclusionOptions(string volumeLabel = default(string), string onlyExcludeIfSingleVolume = default(string)) + { + VolumeLabel = volumeLabel; + OnlyExcludeIfSingleVolume = onlyExcludeIfSingleVolume; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the volume label. The disk having any volume with this + /// label will be + /// excluded from replication. + /// + [JsonProperty(PropertyName = "volumeLabel")] + public string VolumeLabel { get; set; } + + /// + /// Gets or sets the value indicating whether to exclude multi volume + /// disk or not. + /// If a disk has multiple volumes and one of the volume has label + /// matching with + /// VolumeLabel this disk will be excluded from replication if + /// OnlyExcludeIfSingleVolume is false. + /// + [JsonProperty(PropertyName = "OnlyExcludeIfSingleVolume")] + public string OnlyExcludeIfSingleVolume { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InconsistentVmDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InconsistentVmDetails.cs new file mode 100644 index 000000000000..1835ce4b618a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InconsistentVmDetails.cs @@ -0,0 +1,82 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class stores the monitoring details for consistency check of + /// inconsistent Protected Entity. + /// + public partial class InconsistentVmDetails + { + /// + /// Initializes a new instance of the InconsistentVmDetails class. + /// + public InconsistentVmDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InconsistentVmDetails class. + /// + /// The Vm name. + /// The Cloud name. + /// The list of details regarding state of the + /// Protected Entity in SRS and On prem. + /// The list of error ids. + public InconsistentVmDetails(string vmName = default(string), string cloudName = default(string), IList details = default(IList), IList errorIds = default(IList)) + { + VmName = vmName; + CloudName = cloudName; + Details = details; + ErrorIds = errorIds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Vm name. + /// + [JsonProperty(PropertyName = "vmName")] + public string VmName { get; set; } + + /// + /// Gets or sets the Cloud name. + /// + [JsonProperty(PropertyName = "cloudName")] + public string CloudName { get; set; } + + /// + /// Gets or sets the list of details regarding state of the + /// Protected Entity in SRS and On prem. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; set; } + + /// + /// Gets or sets the list of error ids. + /// + [JsonProperty(PropertyName = "errorIds")] + public IList ErrorIds { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InitialReplicationDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InitialReplicationDetails.cs new file mode 100644 index 000000000000..f55a51c7a728 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InitialReplicationDetails.cs @@ -0,0 +1,63 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Initial replication details. + /// + public partial class InitialReplicationDetails + { + /// + /// Initializes a new instance of the InitialReplicationDetails class. + /// + public InitialReplicationDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InitialReplicationDetails class. + /// + /// Initial replication + /// type. + /// The initial + /// replication progress percentage. + public InitialReplicationDetails(string initialReplicationType = default(string), string initialReplicationProgressPercentage = default(string)) + { + InitialReplicationType = initialReplicationType; + InitialReplicationProgressPercentage = initialReplicationProgressPercentage; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets initial replication type. + /// + [JsonProperty(PropertyName = "initialReplicationType")] + public string InitialReplicationType { get; set; } + + /// + /// Gets or sets the initial replication progress percentage. + /// + [JsonProperty(PropertyName = "initialReplicationProgressPercentage")] + public string InitialReplicationProgressPercentage { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InlineWorkflowTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InlineWorkflowTaskDetails.cs new file mode 100644 index 000000000000..ac213727a619 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InlineWorkflowTaskDetails.cs @@ -0,0 +1,57 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class represents the inline workflow task details. + /// + public partial class InlineWorkflowTaskDetails : GroupTaskDetails + { + /// + /// Initializes a new instance of the InlineWorkflowTaskDetails class. + /// + public InlineWorkflowTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InlineWorkflowTaskDetails class. + /// + /// The child tasks. + /// The list of child workflow ids. + public InlineWorkflowTaskDetails(IList childTasks = default(IList), IList workflowIds = default(IList)) + : base(childTasks) + { + WorkflowIds = workflowIds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the list of child workflow ids. + /// + [JsonProperty(PropertyName = "workflowIds")] + public IList WorkflowIds { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InputEndpoint.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InputEndpoint.cs new file mode 100644 index 000000000000..55099f78b7ed --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/InputEndpoint.cs @@ -0,0 +1,77 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure VM input endpoint details. + /// + public partial class InputEndpoint + { + /// + /// Initializes a new instance of the InputEndpoint class. + /// + public InputEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InputEndpoint class. + /// + /// The input endpoint name. + /// The input endpoint private port. + /// The input endpoint public port. + /// The input endpoint protocol. + public InputEndpoint(string endpointName = default(string), int? privatePort = default(int?), int? publicPort = default(int?), string protocol = default(string)) + { + EndpointName = endpointName; + PrivatePort = privatePort; + PublicPort = publicPort; + Protocol = protocol; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the input endpoint name. + /// + [JsonProperty(PropertyName = "endpointName")] + public string EndpointName { get; set; } + + /// + /// Gets or sets the input endpoint private port. + /// + [JsonProperty(PropertyName = "privatePort")] + public int? PrivatePort { get; set; } + + /// + /// Gets or sets the input endpoint public port. + /// + [JsonProperty(PropertyName = "publicPort")] + public int? PublicPort { get; set; } + + /// + /// Gets or sets the input endpoint protocol. + /// + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Job.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Job.cs new file mode 100644 index 000000000000..ce70a88bd80e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Job.cs @@ -0,0 +1,98 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Job details. + /// + public partial class Job : Resource + { + /// + /// Initializes a new instance of the Job class. + /// + public Job() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Job class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The custom data. + /// The status of the Job. ARM expects the + /// terminal status to be one of + /// (1) Succeeded, (2) Failed or (3) Canceled. + /// All other values imply that the operation is still running / being + /// applied. + /// The error. + /// The start time. + /// The start time. + public Job(string id = default(string), string name = default(string), string type = default(string), string location = default(string), JobProperties properties = default(JobProperties), string status = default(string), ARMException error = default(ARMException), string startTime = default(string), string endTime = default(string)) + : base(id, name, type, location) + { + Properties = properties; + Status = status; + Error = error; + StartTime = startTime; + EndTime = endTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the custom data. + /// + [JsonProperty(PropertyName = "properties")] + public JobProperties Properties { get; set; } + + /// + /// Gets or sets the status of the Job. ARM expects the terminal status + /// to be one of + /// (1) Succeeded, (2) Failed or (3) Canceled. + /// All other values imply that the operation is still running / being + /// applied. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the error. + /// + [JsonProperty(PropertyName = "error")] + public ARMException Error { get; set; } + + /// + /// Gets or sets the start time. + /// + [JsonProperty(PropertyName = "startTime")] + public string StartTime { get; set; } + + /// + /// Gets or sets the start time. + /// + [JsonProperty(PropertyName = "endTime")] + public string EndTime { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobDetails.cs new file mode 100644 index 000000000000..116ad1b66b6b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobDetails.cs @@ -0,0 +1,60 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Job details based on specific job type. + /// + public partial class JobDetails + { + /// + /// Initializes a new instance of the JobDetails class. + /// + public JobDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobDetails class. + /// + /// The affected object properties + /// like source server, source cloud, target + /// server, target cloud etc. based on the workflow object + /// details. + public JobDetails(IDictionary affectedObjectDetails = default(IDictionary)) + { + AffectedObjectDetails = affectedObjectDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the affected object properties like source server, + /// source cloud, target + /// server, target cloud etc. based on the workflow object details. + /// + [JsonProperty(PropertyName = "affectedObjectDetails")] + public IDictionary AffectedObjectDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobEntity.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobEntity.cs new file mode 100644 index 000000000000..399774276f1f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobEntity.cs @@ -0,0 +1,96 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class contains the minimal job details required to navigate to the + /// desired drill down. + /// + public partial class JobEntity + { + /// + /// Initializes a new instance of the JobEntity class. + /// + public JobEntity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobEntity class. + /// + /// The job id. + /// The job display name. + /// The object id. + /// The object name. + /// The workflow affected object + /// type. + /// The job name. Enum type + /// ScenarioName. + public JobEntity(string jobId = default(string), string jobFriendlyName = default(string), string targetObjectId = default(string), string targetObjectName = default(string), string targetInstanceType = default(string), string jobScenarioName = default(string)) + { + JobId = jobId; + JobFriendlyName = jobFriendlyName; + TargetObjectId = targetObjectId; + TargetObjectName = targetObjectName; + TargetInstanceType = targetInstanceType; + JobScenarioName = jobScenarioName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the job id. + /// + [JsonProperty(PropertyName = "jobId")] + public string JobId { get; set; } + + /// + /// Gets or sets the job display name. + /// + [JsonProperty(PropertyName = "jobFriendlyName")] + public string JobFriendlyName { get; set; } + + /// + /// Gets or sets the object id. + /// + [JsonProperty(PropertyName = "targetObjectId")] + public string TargetObjectId { get; set; } + + /// + /// Gets or sets the object name. + /// + [JsonProperty(PropertyName = "targetObjectName")] + public string TargetObjectName { get; set; } + + /// + /// Gets or sets the workflow affected object type. + /// + [JsonProperty(PropertyName = "targetInstanceType")] + public string TargetInstanceType { get; set; } + + /// + /// Gets or sets the job name. Enum type ScenarioName. + /// + [JsonProperty(PropertyName = "jobScenarioName")] + public string JobScenarioName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobErrorDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobErrorDetails.cs new file mode 100644 index 000000000000..d79d610cd9d1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobErrorDetails.cs @@ -0,0 +1,87 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class contains the error details per object. + /// + public partial class JobErrorDetails + { + /// + /// Initializes a new instance of the JobErrorDetails class. + /// + public JobErrorDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobErrorDetails class. + /// + /// The Service error + /// details. + /// The Provider error + /// details. + /// Error level of error. + /// The creation time of job error. + /// The Id of the task. + public JobErrorDetails(ServiceError serviceErrorDetails = default(ServiceError), ProviderError providerErrorDetails = default(ProviderError), string errorLevel = default(string), System.DateTime? creationTime = default(System.DateTime?), string taskId = default(string)) + { + ServiceErrorDetails = serviceErrorDetails; + ProviderErrorDetails = providerErrorDetails; + ErrorLevel = errorLevel; + CreationTime = creationTime; + TaskId = taskId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Service error details. + /// + [JsonProperty(PropertyName = "serviceErrorDetails")] + public ServiceError ServiceErrorDetails { get; set; } + + /// + /// Gets or sets the Provider error details. + /// + [JsonProperty(PropertyName = "providerErrorDetails")] + public ProviderError ProviderErrorDetails { get; set; } + + /// + /// Gets or sets error level of error. + /// + [JsonProperty(PropertyName = "errorLevel")] + public string ErrorLevel { get; set; } + + /// + /// Gets or sets the creation time of job error. + /// + [JsonProperty(PropertyName = "creationTime")] + public System.DateTime? CreationTime { get; set; } + + /// + /// Gets or sets the Id of the task. + /// + [JsonProperty(PropertyName = "taskId")] + public string TaskId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobProperties.cs new file mode 100644 index 000000000000..267dcec7d8be --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobProperties.cs @@ -0,0 +1,176 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Job custom data details. + /// + public partial class JobProperties + { + /// + /// Initializes a new instance of the JobProperties class. + /// + public JobProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobProperties class. + /// + /// The activity id. + /// The ScenarioName. + /// The DisplayName. + /// The status of the Job. It is one of these + /// values - NotStarted, InProgress, + /// Succeeded, Failed, Cancelled, Suspended or Other. + /// The description of the state of the + /// Job. For e.g. - For Succeeded state, + /// description can be Completed, PartiallySucceeded, + /// CompletedWithInformation or Skipped. + /// The tasks. + /// The errors. + /// The start time. + /// The end time. + /// The Allowed action the job. + /// The affected Object Id. + /// The name of the affected + /// object. + /// The type of the affected object + /// which is + /// of {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} + /// class. + /// The custom job details like test + /// failover job details. + public JobProperties(string activityId = default(string), string scenarioName = default(string), string friendlyName = default(string), string state = default(string), string stateDescription = default(string), IList tasks = default(IList), IList errors = default(IList), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList allowedActions = default(IList), string targetObjectId = default(string), string targetObjectName = default(string), string targetInstanceType = default(string), JobDetails customDetails = default(JobDetails)) + { + ActivityId = activityId; + ScenarioName = scenarioName; + FriendlyName = friendlyName; + State = state; + StateDescription = stateDescription; + Tasks = tasks; + Errors = errors; + StartTime = startTime; + EndTime = endTime; + AllowedActions = allowedActions; + TargetObjectId = targetObjectId; + TargetObjectName = targetObjectName; + TargetInstanceType = targetInstanceType; + CustomDetails = customDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the activity id. + /// + [JsonProperty(PropertyName = "activityId")] + public string ActivityId { get; set; } + + /// + /// Gets or sets the ScenarioName. + /// + [JsonProperty(PropertyName = "scenarioName")] + public string ScenarioName { get; set; } + + /// + /// Gets or sets the DisplayName. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the status of the Job. It is one of these values - + /// NotStarted, InProgress, + /// Succeeded, Failed, Cancelled, Suspended or Other. + /// + [JsonProperty(PropertyName = "state")] + public string State { get; set; } + + /// + /// Gets or sets the description of the state of the Job. For e.g. - + /// For Succeeded state, + /// description can be Completed, PartiallySucceeded, + /// CompletedWithInformation or Skipped. + /// + [JsonProperty(PropertyName = "stateDescription")] + public string StateDescription { get; set; } + + /// + /// Gets or sets the tasks. + /// + [JsonProperty(PropertyName = "tasks")] + public IList Tasks { get; set; } + + /// + /// Gets or sets the errors. + /// + [JsonProperty(PropertyName = "errors")] + public IList Errors { get; set; } + + /// + /// Gets or sets the start time. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + /// + /// Gets or sets the end time. + /// + [JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime { get; set; } + + /// + /// Gets or sets the Allowed action the job. + /// + [JsonProperty(PropertyName = "allowedActions")] + public IList AllowedActions { get; set; } + + /// + /// Gets or sets the affected Object Id. + /// + [JsonProperty(PropertyName = "targetObjectId")] + public string TargetObjectId { get; set; } + + /// + /// Gets or sets the name of the affected object. + /// + [JsonProperty(PropertyName = "targetObjectName")] + public string TargetObjectName { get; set; } + + /// + /// Gets or sets the type of the affected object which is + /// of {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} + /// class. + /// + [JsonProperty(PropertyName = "targetInstanceType")] + public string TargetInstanceType { get; set; } + + /// + /// Gets or sets the custom job details like test failover job details. + /// + [JsonProperty(PropertyName = "customDetails")] + public JobDetails CustomDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobQueryParameter.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobQueryParameter.cs new file mode 100644 index 000000000000..34a38eb1081d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobQueryParameter.cs @@ -0,0 +1,89 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Query parameter to enumerate jobs. + /// + public partial class JobQueryParameter + { + /// + /// Initializes a new instance of the JobQueryParameter class. + /// + public JobQueryParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobQueryParameter class. + /// + /// Date time to get jobs from. + /// Date time to get jobs upto. + /// The Id of the fabric to search jobs + /// under. + /// The type of objects. + /// The states of the job to be filtered can be + /// in. + public JobQueryParameter(string startTime = default(string), string endTime = default(string), string fabricId = default(string), IList affectedObjectTypes = default(IList), IList jobStatus = default(IList)) + { + StartTime = startTime; + EndTime = endTime; + FabricId = fabricId; + AffectedObjectTypes = affectedObjectTypes; + JobStatus = jobStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets date time to get jobs from. + /// + [JsonProperty(PropertyName = "startTime")] + public string StartTime { get; set; } + + /// + /// Gets or sets date time to get jobs upto. + /// + [JsonProperty(PropertyName = "endTime")] + public string EndTime { get; set; } + + /// + /// Gets or sets the Id of the fabric to search jobs under. + /// + [JsonProperty(PropertyName = "fabricId")] + public string FabricId { get; set; } + + /// + /// Gets or sets the type of objects. + /// + [JsonProperty(PropertyName = "affectedObjectTypes")] + public IList AffectedObjectTypes { get; set; } + + /// + /// Gets or sets the states of the job to be filtered can be in. + /// + [JsonProperty(PropertyName = "jobStatus")] + public IList JobStatus { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobStatusEventDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobStatusEventDetails.cs new file mode 100644 index 000000000000..331cd46e0357 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobStatusEventDetails.cs @@ -0,0 +1,79 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Model class for event details of a job status event. + /// + [Newtonsoft.Json.JsonObject("JobStatus")] + public partial class JobStatusEventDetails : EventSpecificDetails + { + /// + /// Initializes a new instance of the JobStatusEventDetails class. + /// + public JobStatusEventDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobStatusEventDetails class. + /// + /// Job arm id for the event. + /// JobName for the Event. + /// JobStatus for the Event. + /// AffectedObjectType for the + /// event. + public JobStatusEventDetails(string jobId = default(string), string jobFriendlyName = default(string), string jobStatus = default(string), string affectedObjectType = default(string)) + { + JobId = jobId; + JobFriendlyName = jobFriendlyName; + JobStatus = jobStatus; + AffectedObjectType = affectedObjectType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets job arm id for the event. + /// + [JsonProperty(PropertyName = "jobId")] + public string JobId { get; set; } + + /// + /// Gets or sets jobName for the Event. + /// + [JsonProperty(PropertyName = "jobFriendlyName")] + public string JobFriendlyName { get; set; } + + /// + /// Gets or sets jobStatus for the Event. + /// + [JsonProperty(PropertyName = "jobStatus")] + public string JobStatus { get; set; } + + /// + /// Gets or sets affectedObjectType for the event. + /// + [JsonProperty(PropertyName = "affectedObjectType")] + public string AffectedObjectType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobTaskDetails.cs new file mode 100644 index 000000000000..fc63eb18fb30 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/JobTaskDetails.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class represents a task which is actually a workflow so that one + /// can navigate + /// to its individual drill down. + /// + public partial class JobTaskDetails : TaskTypeDetails + { + /// + /// Initializes a new instance of the JobTaskDetails class. + /// + public JobTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JobTaskDetails class. + /// + /// The job entity. + public JobTaskDetails(JobEntity jobTask = default(JobEntity)) + { + JobTask = jobTask; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the job entity. + /// + [JsonProperty(PropertyName = "jobTask")] + public JobEntity JobTask { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LicenseType.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LicenseType.cs new file mode 100644 index 000000000000..7079903d7b5d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LicenseType.cs @@ -0,0 +1,33 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for LicenseType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum LicenseType + { + [EnumMember(Value = "NotSpecified")] + NotSpecified, + [EnumMember(Value = "NoLicenseType")] + NoLicenseType, + [EnumMember(Value = "WindowsServer")] + WindowsServer + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LogicalNetwork.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LogicalNetwork.cs new file mode 100644 index 000000000000..7cd1c690f4a2 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LogicalNetwork.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Logical network data model. + /// + public partial class LogicalNetwork : Resource + { + /// + /// Initializes a new instance of the LogicalNetwork class. + /// + public LogicalNetwork() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LogicalNetwork class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The Logical Network Properties. + public LogicalNetwork(string id = default(string), string name = default(string), string type = default(string), string location = default(string), LogicalNetworkProperties properties = default(LogicalNetworkProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Logical Network Properties. + /// + [JsonProperty(PropertyName = "properties")] + public LogicalNetworkProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LogicalNetworkProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LogicalNetworkProperties.cs new file mode 100644 index 000000000000..14a4f910d888 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/LogicalNetworkProperties.cs @@ -0,0 +1,85 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Logical Network Properties. + /// + public partial class LogicalNetworkProperties + { + /// + /// Initializes a new instance of the LogicalNetworkProperties class. + /// + public LogicalNetworkProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LogicalNetworkProperties class. + /// + /// The Friendly Name. + /// A value indicating + /// whether Network Virtualization is enabled for the logical + /// network. + /// A value indicating whether + /// logical network is used as private test network by test + /// failover. + /// A value indicating + /// whether logical network definitions are isolated. + public LogicalNetworkProperties(string friendlyName = default(string), string networkVirtualizationStatus = default(string), string logicalNetworkUsage = default(string), string logicalNetworkDefinitionsStatus = default(string)) + { + FriendlyName = friendlyName; + NetworkVirtualizationStatus = networkVirtualizationStatus; + LogicalNetworkUsage = logicalNetworkUsage; + LogicalNetworkDefinitionsStatus = logicalNetworkDefinitionsStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Friendly Name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets a value indicating whether Network Virtualization is + /// enabled for the logical network. + /// + [JsonProperty(PropertyName = "networkVirtualizationStatus")] + public string NetworkVirtualizationStatus { get; set; } + + /// + /// Gets or sets a value indicating whether logical network is used as + /// private test network by test failover. + /// + [JsonProperty(PropertyName = "logicalNetworkUsage")] + public string LogicalNetworkUsage { get; set; } + + /// + /// Gets or sets a value indicating whether logical network definitions + /// are isolated. + /// + [JsonProperty(PropertyName = "logicalNetworkDefinitionsStatus")] + public string LogicalNetworkDefinitionsStatus { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ManualActionTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ManualActionTaskDetails.cs new file mode 100644 index 000000000000..eed7d958ea08 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ManualActionTaskDetails.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class represents the manual action task details. + /// + public partial class ManualActionTaskDetails : TaskTypeDetails + { + /// + /// Initializes a new instance of the ManualActionTaskDetails class. + /// + public ManualActionTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManualActionTaskDetails class. + /// + /// The name. + /// The instructions. + /// The observation. + public ManualActionTaskDetails(string name = default(string), string instructions = default(string), string observation = default(string)) + { + Name = name; + Instructions = instructions; + Observation = observation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the instructions. + /// + [JsonProperty(PropertyName = "instructions")] + public string Instructions { get; set; } + + /// + /// Gets or sets the observation. + /// + [JsonProperty(PropertyName = "observation")] + public string Observation { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MasterTargetServer.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MasterTargetServer.cs new file mode 100644 index 000000000000..23e144adad92 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MasterTargetServer.cs @@ -0,0 +1,131 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Details of a Master Target Server. + /// + public partial class MasterTargetServer + { + /// + /// Initializes a new instance of the MasterTargetServer class. + /// + public MasterTargetServer() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MasterTargetServer class. + /// + /// The server Id. + /// The IP address of the server. + /// The server name. + /// The OS type of the server. + /// The version of the scout component on + /// the server. + /// The last heartbeat received from the + /// server. + /// Version status + /// The retention volumes of Master + /// target Server. + /// The list of data stores in the + /// fabric. + /// Validation errors. + public MasterTargetServer(string id = default(string), string ipAddress = default(string), string name = default(string), string osType = default(string), string agentVersion = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), IList retentionVolumes = default(IList), IList dataStores = default(IList), IList validationErrors = default(IList)) + { + Id = id; + IpAddress = ipAddress; + Name = name; + OsType = osType; + AgentVersion = agentVersion; + LastHeartbeat = lastHeartbeat; + VersionStatus = versionStatus; + RetentionVolumes = retentionVolumes; + DataStores = dataStores; + ValidationErrors = validationErrors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the server Id. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the IP address of the server. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the server name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the OS type of the server. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets the version of the scout component on the server. + /// + [JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion { get; set; } + + /// + /// Gets or sets the last heartbeat received from the server. + /// + [JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat { get; set; } + + /// + /// Gets or sets version status + /// + [JsonProperty(PropertyName = "versionStatus")] + public string VersionStatus { get; set; } + + /// + /// Gets or sets the retention volumes of Master target Server. + /// + [JsonProperty(PropertyName = "retentionVolumes")] + public IList RetentionVolumes { get; set; } + + /// + /// Gets or sets the list of data stores in the fabric. + /// + [JsonProperty(PropertyName = "dataStores")] + public IList DataStores { get; set; } + + /// + /// Gets or sets validation errors. + /// + [JsonProperty(PropertyName = "validationErrors")] + public IList ValidationErrors { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MethodCallStatus.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MethodCallStatus.cs new file mode 100644 index 000000000000..04901204f6a7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MethodCallStatus.cs @@ -0,0 +1,74 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Reports method status where exception was raised. + /// + public partial class MethodCallStatus + { + /// + /// Initializes a new instance of the MethodCallStatus class. + /// + public MethodCallStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MethodCallStatus class. + /// + /// Gets a value indicating whether called + /// method was virtual + /// Gets parameter list passed to + /// method. + /// Gets a value indicating + /// whether method container generic params. + public MethodCallStatus(string isVirtual = default(string), IList parameters = default(IList), string containsGenericParameters = default(string)) + { + IsVirtual = isVirtual; + Parameters = parameters; + ContainsGenericParameters = containsGenericParameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets a value indicating whether called method was virtual + /// + [JsonProperty(PropertyName = "isVirtual")] + public string IsVirtual { get; set; } + + /// + /// Gets parameter list passed to method. + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; set; } + + /// + /// Gets a value indicating whether method container generic params. + /// + [JsonProperty(PropertyName = "containsGenericParameters")] + public string ContainsGenericParameters { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MobilityServiceUpdate.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MobilityServiceUpdate.cs new file mode 100644 index 000000000000..14722975755d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MobilityServiceUpdate.cs @@ -0,0 +1,71 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Mobility Service update details. + /// + public partial class MobilityServiceUpdate + { + /// + /// Initializes a new instance of the MobilityServiceUpdate class. + /// + public MobilityServiceUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MobilityServiceUpdate class. + /// + /// The version of the latest update. + /// The reboot status of the update - + /// whether it is required or not. + /// The OS type. + public MobilityServiceUpdate(string version = default(string), string rebootStatus = default(string), string osType = default(string)) + { + Version = version; + RebootStatus = rebootStatus; + OsType = osType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the version of the latest update. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Gets or sets the reboot status of the update - whether it is + /// required or not. + /// + [JsonProperty(PropertyName = "rebootStatus")] + public string RebootStatus { get; set; } + + /// + /// Gets or sets the OS type. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Network.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Network.cs new file mode 100644 index 000000000000..0fdaf13cb7fc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Network.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Network model. + /// + public partial class Network : Resource + { + /// + /// Initializes a new instance of the Network class. + /// + public Network() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Network class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The Network Properties. + public Network(string id = default(string), string name = default(string), string type = default(string), string location = default(string), NetworkProperties properties = default(NetworkProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Network Properties. + /// + [JsonProperty(PropertyName = "properties")] + public NetworkProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMapping.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMapping.cs new file mode 100644 index 000000000000..40cef582b0c6 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMapping.cs @@ -0,0 +1,68 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Network Mapping model. + /// Ideally it should have been possible to inherit this class from prev + /// version in + /// InheritedModels as long as there is no difference in structure or + /// method signature. + /// Since there were no base Models for certain fields and methods viz + /// NetworkMappingProperties + /// and Load with required return type, the class has been introduced in + /// its entirety with + /// references to base models to facilitate exensions in subsequent + /// versions. + /// + public partial class NetworkMapping : Resource + { + /// + /// Initializes a new instance of the NetworkMapping class. + /// + public NetworkMapping() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NetworkMapping class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The Network Mapping Properties. + public NetworkMapping(string id = default(string), string name = default(string), string type = default(string), string location = default(string), NetworkMappingProperties properties = default(NetworkMappingProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Network Mapping Properties. + /// + [JsonProperty(PropertyName = "properties")] + public NetworkMappingProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMappingFabricSpecificSettings.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMappingFabricSpecificSettings.cs new file mode 100644 index 000000000000..94d9f75db968 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMappingFabricSpecificSettings.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Network Mapping fabric specific settings. + /// + public partial class NetworkMappingFabricSpecificSettings + { + /// + /// Initializes a new instance of the + /// NetworkMappingFabricSpecificSettings class. + /// + public NetworkMappingFabricSpecificSettings() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMappingProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMappingProperties.cs new file mode 100644 index 000000000000..5f91df971cd5 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkMappingProperties.cs @@ -0,0 +1,125 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Network Mapping Properties. + /// + public partial class NetworkMappingProperties + { + /// + /// Initializes a new instance of the NetworkMappingProperties class. + /// + public NetworkMappingProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NetworkMappingProperties class. + /// + /// The pairing state for network mapping. + /// The primary network + /// friendly name. + /// The primary network id for network + /// mapping. + /// The primary fabric friendly + /// name. + /// The recovery network + /// friendly name. + /// The recovery network id for network + /// mapping. + /// The recovery fabric ARM + /// id. + /// The recovery fabric + /// friendly name. + /// The fabric specific + /// settings. + public NetworkMappingProperties(string state = default(string), string primaryNetworkFriendlyName = default(string), string primaryNetworkId = default(string), string primaryFabricFriendlyName = default(string), string recoveryNetworkFriendlyName = default(string), string recoveryNetworkId = default(string), string recoveryFabricArmId = default(string), string recoveryFabricFriendlyName = default(string), NetworkMappingFabricSpecificSettings fabricSpecificSettings = default(NetworkMappingFabricSpecificSettings)) + { + State = state; + PrimaryNetworkFriendlyName = primaryNetworkFriendlyName; + PrimaryNetworkId = primaryNetworkId; + PrimaryFabricFriendlyName = primaryFabricFriendlyName; + RecoveryNetworkFriendlyName = recoveryNetworkFriendlyName; + RecoveryNetworkId = recoveryNetworkId; + RecoveryFabricArmId = recoveryFabricArmId; + RecoveryFabricFriendlyName = recoveryFabricFriendlyName; + FabricSpecificSettings = fabricSpecificSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the pairing state for network mapping. + /// + [JsonProperty(PropertyName = "state")] + public string State { get; set; } + + /// + /// Gets or sets the primary network friendly name. + /// + [JsonProperty(PropertyName = "primaryNetworkFriendlyName")] + public string PrimaryNetworkFriendlyName { get; set; } + + /// + /// Gets or sets the primary network id for network mapping. + /// + [JsonProperty(PropertyName = "primaryNetworkId")] + public string PrimaryNetworkId { get; set; } + + /// + /// Gets or sets the primary fabric friendly name. + /// + [JsonProperty(PropertyName = "primaryFabricFriendlyName")] + public string PrimaryFabricFriendlyName { get; set; } + + /// + /// Gets or sets the recovery network friendly name. + /// + [JsonProperty(PropertyName = "recoveryNetworkFriendlyName")] + public string RecoveryNetworkFriendlyName { get; set; } + + /// + /// Gets or sets the recovery network id for network mapping. + /// + [JsonProperty(PropertyName = "recoveryNetworkId")] + public string RecoveryNetworkId { get; set; } + + /// + /// Gets or sets the recovery fabric ARM id. + /// + [JsonProperty(PropertyName = "recoveryFabricArmId")] + public string RecoveryFabricArmId { get; set; } + + /// + /// Gets or sets the recovery fabric friendly name. + /// + [JsonProperty(PropertyName = "recoveryFabricFriendlyName")] + public string RecoveryFabricFriendlyName { get; set; } + + /// + /// Gets or sets the fabric specific settings. + /// + [JsonProperty(PropertyName = "fabricSpecificSettings")] + public NetworkMappingFabricSpecificSettings FabricSpecificSettings { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkProperties.cs new file mode 100644 index 000000000000..105ddc5a21b4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/NetworkProperties.cs @@ -0,0 +1,79 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Network Properties + /// + public partial class NetworkProperties + { + /// + /// Initializes a new instance of the NetworkProperties class. + /// + public NetworkProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NetworkProperties class. + /// + /// The Fabric Type. + /// The List of subnets. + /// The Friendly Name. + /// The Network Type. + public NetworkProperties(string fabricType = default(string), IList subnets = default(IList), string friendlyName = default(string), string networkType = default(string)) + { + FabricType = fabricType; + Subnets = subnets; + FriendlyName = friendlyName; + NetworkType = networkType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Fabric Type. + /// + [JsonProperty(PropertyName = "fabricType")] + public string FabricType { get; set; } + + /// + /// Gets or sets the List of subnets. + /// + [JsonProperty(PropertyName = "subnets")] + public IList Subnets { get; set; } + + /// + /// Gets or sets the Friendly Name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the Network Type. + /// + [JsonProperty(PropertyName = "networkType")] + public string NetworkType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OSDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OSDetails.cs new file mode 100644 index 000000000000..596533aad44c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OSDetails.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Disk Details. + /// + public partial class OSDetails + { + /// + /// Initializes a new instance of the OSDetails class. + /// + public OSDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OSDetails class. + /// + /// VM Disk details. + /// ProductType. + /// The OSEdition. + /// The OS Version. + /// The OS Major Version. + /// The OS Minor Version. + public OSDetails(string osType = default(string), string productType = default(string), string osEdition = default(string), string oSVersion = default(string), string oSMajorVersion = default(string), string oSMinorVersion = default(string)) + { + OsType = osType; + ProductType = productType; + OsEdition = osEdition; + OSVersion = oSVersion; + OSMajorVersion = oSMajorVersion; + OSMinorVersion = oSMinorVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets VM Disk details. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets productType. + /// + [JsonProperty(PropertyName = "productType")] + public string ProductType { get; set; } + + /// + /// Gets or sets the OSEdition. + /// + [JsonProperty(PropertyName = "osEdition")] + public string OsEdition { get; set; } + + /// + /// Gets or sets the OS Version. + /// + [JsonProperty(PropertyName = "oSVersion")] + public string OSVersion { get; set; } + + /// + /// Gets or sets the OS Major Version. + /// + [JsonProperty(PropertyName = "oSMajorVersion")] + public string OSMajorVersion { get; set; } + + /// + /// Gets or sets the OS Minor Version. + /// + [JsonProperty(PropertyName = "oSMinorVersion")] + public string OSMinorVersion { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OSDiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OSDiskDetails.cs new file mode 100644 index 000000000000..ed48606248ca --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OSDiskDetails.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Details of the OS Disk. + /// + public partial class OSDiskDetails + { + /// + /// Initializes a new instance of the OSDiskDetails class. + /// + public OSDiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OSDiskDetails class. + /// + /// The id of the disk containing the OS. + /// The type of the OS on the VM. + /// The OS disk VHD name. + public OSDiskDetails(string osVhdId = default(string), string osType = default(string), string vhdName = default(string)) + { + OsVhdId = osVhdId; + OsType = osType; + VhdName = vhdName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the id of the disk containing the OS. + /// + [JsonProperty(PropertyName = "osVhdId")] + public string OsVhdId { get; set; } + + /// + /// Gets or sets the type of the OS on the VM. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets the OS disk VHD name. + /// + [JsonProperty(PropertyName = "vhdName")] + public string VhdName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OperationsDiscovery.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OperationsDiscovery.cs new file mode 100644 index 000000000000..cccfa91d6bfe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/OperationsDiscovery.cs @@ -0,0 +1,132 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Operations discovery class. + /// + public partial class OperationsDiscovery + { + /// + /// Initializes a new instance of the OperationsDiscovery class. + /// + public OperationsDiscovery() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationsDiscovery class. + /// + /// Name of the API. + /// The name of the operation being performed on this particular + /// object. It should match the action name that appears in RBAC / the + /// event service. + /// Examples of operations include: + /// * Microsoft.Compute/virtualMachine/capture/action + /// * Microsoft.Compute/virtualMachine/restart/action + /// * Microsoft.Compute/virtualMachine/write + /// * Microsoft.Compute/virtualMachine/read + /// * Microsoft.Compute/virtualMachine/delete + /// Each action should include, in order: + /// (1) Resource Provider Namespace + /// (2) Type hierarchy for which the action applies (e.g. + /// server/databases for a SQL Azure database) + /// (3) Read, Write, Action or Delete indicating which type applies. If + /// it is a PUT/PATCH on a collection or named value, Write should be + /// used. + /// If it is a GET, Read should be used. If it is a DELETE, Delete + /// should be used. If it is a POST, Action should be used. + /// As a note: all resource providers would need to include the + /// "{Resource Provider Namespace}/register/action" operation in their + /// response. + /// This API is used to register for their service, and should include + /// details about the operation (e.g. a localized name for the resource + /// provider + any special considerations like PII release) + /// Object type + /// Origin. + /// The intended executor of the operation; governs the display of the + /// operation in the RBAC UX and the audit logs UX. + /// Default value is "user,system" + /// Properties. Reserved for future + /// use. + public OperationsDiscovery(string name = default(string), Display display = default(Display), string origin = default(string), object properties = default(object)) + { + Name = name; + Display = display; + Origin = origin; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the API. + /// The name of the operation being performed on this particular + /// object. It should match the action name that appears in RBAC / the + /// event service. + /// Examples of operations include: + /// * Microsoft.Compute/virtualMachine/capture/action + /// * Microsoft.Compute/virtualMachine/restart/action + /// * Microsoft.Compute/virtualMachine/write + /// * Microsoft.Compute/virtualMachine/read + /// * Microsoft.Compute/virtualMachine/delete + /// Each action should include, in order: + /// (1) Resource Provider Namespace + /// (2) Type hierarchy for which the action applies (e.g. + /// server/databases for a SQL Azure database) + /// (3) Read, Write, Action or Delete indicating which type applies. If + /// it is a PUT/PATCH on a collection or named value, Write should be + /// used. + /// If it is a GET, Read should be used. If it is a DELETE, Delete + /// should be used. If it is a POST, Action should be used. + /// As a note: all resource providers would need to include the + /// "{Resource Provider Namespace}/register/action" operation in their + /// response. + /// This API is used to register for their service, and should include + /// details about the operation (e.g. a localized name for the resource + /// provider + any special considerations like PII release) + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets object type + /// + [JsonProperty(PropertyName = "display")] + public Display Display { get; set; } + + /// + /// Gets or sets origin. + /// The intended executor of the operation; governs the display of the + /// operation in the RBAC UX and the audit logs UX. + /// Default value is "user,system" + /// + [JsonProperty(PropertyName = "origin")] + public string Origin { get; set; } + + /// + /// Gets or sets properties. Reserved for future use. + /// + [JsonProperty(PropertyName = "properties")] + public object Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Page.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Page.cs new file mode 100644 index 000000000000..82efbbfcb657 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Page.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("nextLink")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PlannedFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PlannedFailoverInput.cs new file mode 100644 index 000000000000..70274088b01a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PlannedFailoverInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input definition for planned failover. + /// + public partial class PlannedFailoverInput + { + /// + /// Initializes a new instance of the PlannedFailoverInput class. + /// + public PlannedFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PlannedFailoverInput class. + /// + /// Planned failover input properties + public PlannedFailoverInput(PlannedFailoverInputProperties properties = default(PlannedFailoverInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets planned failover input properties + /// + [JsonProperty(PropertyName = "properties")] + public PlannedFailoverInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PlannedFailoverInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PlannedFailoverInputProperties.cs new file mode 100644 index 000000000000..466f74ec9a52 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PlannedFailoverInputProperties.cs @@ -0,0 +1,64 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input definition for planned failover input properties. + /// + public partial class PlannedFailoverInputProperties + { + /// + /// Initializes a new instance of the PlannedFailoverInputProperties + /// class. + /// + public PlannedFailoverInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PlannedFailoverInputProperties + /// class. + /// + /// Failover direction. + /// Provider specific + /// settings + public PlannedFailoverInputProperties(string failoverDirection = default(string), ProviderSpecificFailoverInput providerSpecificDetails = default(ProviderSpecificFailoverInput)) + { + FailoverDirection = failoverDirection; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets failover direction. + /// + [JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection { get; set; } + + /// + /// Gets or sets provider specific settings + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public ProviderSpecificFailoverInput ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Policy.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Policy.cs new file mode 100644 index 000000000000..f30df4cbfcab --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Policy.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Protection profile details. + /// + public partial class Policy : Resource + { + /// + /// Initializes a new instance of the Policy class. + /// + public Policy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Policy class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The custom data. + public Policy(string id = default(string), string name = default(string), string type = default(string), string location = default(string), PolicyProperties properties = default(PolicyProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the custom data. + /// + [JsonProperty(PropertyName = "properties")] + public PolicyProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProperties.cs new file mode 100644 index 000000000000..22ad7ff97260 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProperties.cs @@ -0,0 +1,62 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Protection profile custom data details. + /// + public partial class PolicyProperties + { + /// + /// Initializes a new instance of the PolicyProperties class. + /// + public PolicyProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PolicyProperties class. + /// + /// The FriendlyName. + /// The + /// ReplicationChannelSetting. + public PolicyProperties(string friendlyName = default(string), PolicyProviderSpecificDetails providerSpecificDetails = default(PolicyProviderSpecificDetails)) + { + FriendlyName = friendlyName; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the FriendlyName. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the ReplicationChannelSetting. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public PolicyProviderSpecificDetails ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProviderSpecificDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProviderSpecificDetails.cs new file mode 100644 index 000000000000..89266389d290 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProviderSpecificDetails.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Base class for Provider specific details for policies. + /// + public partial class PolicyProviderSpecificDetails + { + /// + /// Initializes a new instance of the PolicyProviderSpecificDetails + /// class. + /// + public PolicyProviderSpecificDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProviderSpecificInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProviderSpecificInput.cs new file mode 100644 index 000000000000..db5b45a4b1ab --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PolicyProviderSpecificInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Base class for provider specific input + /// + public partial class PolicyProviderSpecificInput + { + /// + /// Initializes a new instance of the PolicyProviderSpecificInput + /// class. + /// + public PolicyProviderSpecificInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PossibleOperationsDirections.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PossibleOperationsDirections.cs new file mode 100644 index 000000000000..cf2c593acc0b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/PossibleOperationsDirections.cs @@ -0,0 +1,31 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for PossibleOperationsDirections. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PossibleOperationsDirections + { + [EnumMember(Value = "PrimaryToRecovery")] + PrimaryToRecovery, + [EnumMember(Value = "RecoveryToPrimary")] + RecoveryToPrimary + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProcessServer.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProcessServer.cs new file mode 100644 index 000000000000..78c0c1375c26 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProcessServer.cs @@ -0,0 +1,250 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Details of the Process Server. + /// + public partial class ProcessServer + { + /// + /// Initializes a new instance of the ProcessServer class. + /// + public ProcessServer() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProcessServer class. + /// + /// The Process Server's friendly + /// name. + /// The Process Server Id. + /// The IP address of the server. + /// The OS type of the server. + /// The version of the scout component on + /// the server. + /// The last heartbeat received from the + /// server. + /// Version status + /// The list of the mobility + /// service updates available on the + /// Process Server. + /// The agent generated Id. + /// The servers configured with this + /// PS. + /// The number of replication pairs + /// configured in this PS. + /// The percentage of the system load. + /// The system load status. + /// The percentage of the CPU load. + /// The CPU load status. + /// The total memory. + /// The available memory. + /// The memory usage status. + /// The total space. + /// The available space. + /// The space usage status. + /// The PS service status. + /// The PS SSL cert expiry + /// date. + /// CS SSL cert expiry + /// date. + public ProcessServer(string friendlyName = default(string), string id = default(string), string ipAddress = default(string), string osType = default(string), string agentVersion = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), IList mobilityServiceUpdates = default(IList), string hostId = default(string), string machineCount = default(string), string replicationPairCount = default(string), string systemLoad = default(string), string systemLoadStatus = default(string), string cpuLoad = default(string), string cpuLoadStatus = default(string), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), string memoryUsageStatus = default(string), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), string spaceUsageStatus = default(string), string psServiceStatus = default(string), System.DateTime? sslCertExpiryDate = default(System.DateTime?), int? sslCertExpiryRemainingDays = default(int?)) + { + FriendlyName = friendlyName; + Id = id; + IpAddress = ipAddress; + OsType = osType; + AgentVersion = agentVersion; + LastHeartbeat = lastHeartbeat; + VersionStatus = versionStatus; + MobilityServiceUpdates = mobilityServiceUpdates; + HostId = hostId; + MachineCount = machineCount; + ReplicationPairCount = replicationPairCount; + SystemLoad = systemLoad; + SystemLoadStatus = systemLoadStatus; + CpuLoad = cpuLoad; + CpuLoadStatus = cpuLoadStatus; + TotalMemoryInBytes = totalMemoryInBytes; + AvailableMemoryInBytes = availableMemoryInBytes; + MemoryUsageStatus = memoryUsageStatus; + TotalSpaceInBytes = totalSpaceInBytes; + AvailableSpaceInBytes = availableSpaceInBytes; + SpaceUsageStatus = spaceUsageStatus; + PsServiceStatus = psServiceStatus; + SslCertExpiryDate = sslCertExpiryDate; + SslCertExpiryRemainingDays = sslCertExpiryRemainingDays; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Process Server's friendly name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the Process Server Id. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the IP address of the server. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the OS type of the server. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets the version of the scout component on the server. + /// + [JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion { get; set; } + + /// + /// Gets or sets the last heartbeat received from the server. + /// + [JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat { get; set; } + + /// + /// Gets or sets version status + /// + [JsonProperty(PropertyName = "versionStatus")] + public string VersionStatus { get; set; } + + /// + /// Gets or sets the list of the mobility service updates available on + /// the + /// Process Server. + /// + [JsonProperty(PropertyName = "mobilityServiceUpdates")] + public IList MobilityServiceUpdates { get; set; } + + /// + /// Gets or sets the agent generated Id. + /// + [JsonProperty(PropertyName = "hostId")] + public string HostId { get; set; } + + /// + /// Gets or sets the servers configured with this PS. + /// + [JsonProperty(PropertyName = "machineCount")] + public string MachineCount { get; set; } + + /// + /// Gets or sets the number of replication pairs configured in this PS. + /// + [JsonProperty(PropertyName = "replicationPairCount")] + public string ReplicationPairCount { get; set; } + + /// + /// Gets or sets the percentage of the system load. + /// + [JsonProperty(PropertyName = "systemLoad")] + public string SystemLoad { get; set; } + + /// + /// Gets or sets the system load status. + /// + [JsonProperty(PropertyName = "systemLoadStatus")] + public string SystemLoadStatus { get; set; } + + /// + /// Gets or sets the percentage of the CPU load. + /// + [JsonProperty(PropertyName = "cpuLoad")] + public string CpuLoad { get; set; } + + /// + /// Gets or sets the CPU load status. + /// + [JsonProperty(PropertyName = "cpuLoadStatus")] + public string CpuLoadStatus { get; set; } + + /// + /// Gets or sets the total memory. + /// + [JsonProperty(PropertyName = "totalMemoryInBytes")] + public long? TotalMemoryInBytes { get; set; } + + /// + /// Gets or sets the available memory. + /// + [JsonProperty(PropertyName = "availableMemoryInBytes")] + public long? AvailableMemoryInBytes { get; set; } + + /// + /// Gets or sets the memory usage status. + /// + [JsonProperty(PropertyName = "memoryUsageStatus")] + public string MemoryUsageStatus { get; set; } + + /// + /// Gets or sets the total space. + /// + [JsonProperty(PropertyName = "totalSpaceInBytes")] + public long? TotalSpaceInBytes { get; set; } + + /// + /// Gets or sets the available space. + /// + [JsonProperty(PropertyName = "availableSpaceInBytes")] + public long? AvailableSpaceInBytes { get; set; } + + /// + /// Gets or sets the space usage status. + /// + [JsonProperty(PropertyName = "spaceUsageStatus")] + public string SpaceUsageStatus { get; set; } + + /// + /// Gets or sets the PS service status. + /// + [JsonProperty(PropertyName = "psServiceStatus")] + public string PsServiceStatus { get; set; } + + /// + /// Gets or sets the PS SSL cert expiry date. + /// + [JsonProperty(PropertyName = "sslCertExpiryDate")] + public System.DateTime? SslCertExpiryDate { get; set; } + + /// + /// Gets or sets CS SSL cert expiry date. + /// + [JsonProperty(PropertyName = "sslCertExpiryRemainingDays")] + public int? SslCertExpiryRemainingDays { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectableItem.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectableItem.cs new file mode 100644 index 000000000000..59857d8cb4bc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectableItem.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Replication protected item + /// + public partial class ProtectableItem : Resource + { + /// + /// Initializes a new instance of the ProtectableItem class. + /// + public ProtectableItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProtectableItem class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The custom data. + public ProtectableItem(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ProtectableItemProperties properties = default(ProtectableItemProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the custom data. + /// + [JsonProperty(PropertyName = "properties")] + public ProtectableItemProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectableItemProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectableItemProperties.cs new file mode 100644 index 000000000000..74f392a6d294 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectableItemProperties.cs @@ -0,0 +1,109 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Replication protected item custom data details. + /// + public partial class ProtectableItemProperties + { + /// + /// Initializes a new instance of the ProtectableItemProperties class. + /// + public ProtectableItemProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProtectableItemProperties class. + /// + /// The name. + /// The protection status. + /// The ARM resource of + /// protected items. + /// The recovery provider ARM + /// Id. + /// The Current protection + /// readiness errors. + /// The list of replication + /// providers supported for the protectable item. + /// The Replication provider custom + /// settings. + public ProtectableItemProperties(string friendlyName = default(string), string protectionStatus = default(string), string replicationProtectedItemId = default(string), string recoveryServicesProviderId = default(string), IList protectionReadinessErrors = default(IList), IList supportedReplicationProviders = default(IList), ConfigurationSettings customDetails = default(ConfigurationSettings)) + { + FriendlyName = friendlyName; + ProtectionStatus = protectionStatus; + ReplicationProtectedItemId = replicationProtectedItemId; + RecoveryServicesProviderId = recoveryServicesProviderId; + ProtectionReadinessErrors = protectionReadinessErrors; + SupportedReplicationProviders = supportedReplicationProviders; + CustomDetails = customDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the protection status. + /// + [JsonProperty(PropertyName = "protectionStatus")] + public string ProtectionStatus { get; set; } + + /// + /// Gets or sets the ARM resource of protected items. + /// + [JsonProperty(PropertyName = "replicationProtectedItemId")] + public string ReplicationProtectedItemId { get; set; } + + /// + /// Gets or sets the recovery provider ARM Id. + /// + [JsonProperty(PropertyName = "recoveryServicesProviderId")] + public string RecoveryServicesProviderId { get; set; } + + /// + /// Gets or sets the Current protection readiness errors. + /// + [JsonProperty(PropertyName = "protectionReadinessErrors")] + public IList ProtectionReadinessErrors { get; set; } + + /// + /// Gets or sets the list of replication providers supported for the + /// protectable item. + /// + [JsonProperty(PropertyName = "supportedReplicationProviders")] + public IList SupportedReplicationProviders { get; set; } + + /// + /// Gets or sets the Replication provider custom settings. + /// + [JsonProperty(PropertyName = "customDetails")] + public ConfigurationSettings CustomDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectedItemsQueryParameter.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectedItemsQueryParameter.cs new file mode 100644 index 000000000000..710c13ad141b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectedItemsQueryParameter.cs @@ -0,0 +1,64 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Query parameter to enumerate protected items. + /// + public partial class ProtectedItemsQueryParameter + { + /// + /// Initializes a new instance of the ProtectedItemsQueryParameter + /// class. + /// + public ProtectedItemsQueryParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProtectedItemsQueryParameter + /// class. + /// + /// The source fabric name + /// filter. + /// The recovery plan filter. + public ProtectedItemsQueryParameter(string sourceFabricName = default(string), string recoveryPlanName = default(string)) + { + SourceFabricName = sourceFabricName; + RecoveryPlanName = recoveryPlanName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the source fabric name filter. + /// + [JsonProperty(PropertyName = "sourceFabricName")] + public string SourceFabricName { get; set; } + + /// + /// Gets or sets the recovery plan filter. + /// + [JsonProperty(PropertyName = "recoveryPlanName")] + public string RecoveryPlanName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainer.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainer.cs new file mode 100644 index 000000000000..b894e8bad39d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainer.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Protection container details. + /// + public partial class ProtectionContainer : Resource + { + /// + /// Initializes a new instance of the ProtectionContainer class. + /// + public ProtectionContainer() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProtectionContainer class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The custom data. + public ProtectionContainer(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ProtectionContainerProperties properties = default(ProtectionContainerProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the custom data. + /// + [JsonProperty(PropertyName = "properties")] + public ProtectionContainerProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerFabricSpecificDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerFabricSpecificDetails.cs new file mode 100644 index 000000000000..fd901c61542e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerFabricSpecificDetails.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Base class for fabric specific details of container. + /// + public partial class ProtectionContainerFabricSpecificDetails + { + /// + /// Initializes a new instance of the + /// ProtectionContainerFabricSpecificDetails class. + /// + public ProtectionContainerFabricSpecificDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ProtectionContainerFabricSpecificDetails class. + /// + /// Gets the class type. Overriden in + /// derived classes. + public ProtectionContainerFabricSpecificDetails(string instanceType = default(string)) + { + InstanceType = instanceType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the class type. Overriden in derived classes. + /// + [JsonProperty(PropertyName = "instanceType")] + public string InstanceType { get; private set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMapping.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMapping.cs new file mode 100644 index 000000000000..7beed5d83e4e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMapping.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Protection container mapping object. + /// + public partial class ProtectionContainerMapping : Resource + { + /// + /// Initializes a new instance of the ProtectionContainerMapping class. + /// + public ProtectionContainerMapping() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProtectionContainerMapping class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The custom data. + public ProtectionContainerMapping(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ProtectionContainerMappingProperties properties = default(ProtectionContainerMappingProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the custom data. + /// + [JsonProperty(PropertyName = "properties")] + public ProtectionContainerMappingProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMappingProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMappingProperties.cs new file mode 100644 index 000000000000..45c5a33a368c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMappingProperties.cs @@ -0,0 +1,144 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Protection container mapping properties. + /// + public partial class ProtectionContainerMappingProperties + { + /// + /// Initializes a new instance of the + /// ProtectionContainerMappingProperties class. + /// + public ProtectionContainerMappingProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ProtectionContainerMappingProperties class. + /// + /// Paired protection + /// container ARM ID. + /// Friendly name + /// of paired container. + /// Provider specific provider + /// details. + /// Health of pairing. + /// Health error. + /// Policy ARM Id. + /// Association Status + /// Friendly name + /// of source protection container. + /// Friendly name of source + /// fabric. + /// Friendly name of target + /// fabric. + /// Friendly name of replication + /// policy. + public ProtectionContainerMappingProperties(string targetProtectionContainerId = default(string), string targetProtectionContainerFriendlyName = default(string), ProtectionContainerMappingProviderSpecificDetails providerSpecificDetails = default(ProtectionContainerMappingProviderSpecificDetails), string health = default(string), IList healthErrorDetails = default(IList), string policyId = default(string), string state = default(string), string sourceProtectionContainerFriendlyName = default(string), string sourceFabricFriendlyName = default(string), string targetFabricFriendlyName = default(string), string policyFriendlyName = default(string)) + { + TargetProtectionContainerId = targetProtectionContainerId; + TargetProtectionContainerFriendlyName = targetProtectionContainerFriendlyName; + ProviderSpecificDetails = providerSpecificDetails; + Health = health; + HealthErrorDetails = healthErrorDetails; + PolicyId = policyId; + State = state; + SourceProtectionContainerFriendlyName = sourceProtectionContainerFriendlyName; + SourceFabricFriendlyName = sourceFabricFriendlyName; + TargetFabricFriendlyName = targetFabricFriendlyName; + PolicyFriendlyName = policyFriendlyName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets paired protection container ARM ID. + /// + [JsonProperty(PropertyName = "targetProtectionContainerId")] + public string TargetProtectionContainerId { get; set; } + + /// + /// Gets or sets friendly name of paired container. + /// + [JsonProperty(PropertyName = "targetProtectionContainerFriendlyName")] + public string TargetProtectionContainerFriendlyName { get; set; } + + /// + /// Gets or sets provider specific provider details. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public ProtectionContainerMappingProviderSpecificDetails ProviderSpecificDetails { get; set; } + + /// + /// Gets or sets health of pairing. + /// + [JsonProperty(PropertyName = "health")] + public string Health { get; set; } + + /// + /// Gets or sets health error. + /// + [JsonProperty(PropertyName = "healthErrorDetails")] + public IList HealthErrorDetails { get; set; } + + /// + /// Gets or sets policy ARM Id. + /// + [JsonProperty(PropertyName = "policyId")] + public string PolicyId { get; set; } + + /// + /// Gets or sets association Status + /// + [JsonProperty(PropertyName = "state")] + public string State { get; set; } + + /// + /// Gets or sets friendly name of source protection container. + /// + [JsonProperty(PropertyName = "sourceProtectionContainerFriendlyName")] + public string SourceProtectionContainerFriendlyName { get; set; } + + /// + /// Gets or sets friendly name of source fabric. + /// + [JsonProperty(PropertyName = "sourceFabricFriendlyName")] + public string SourceFabricFriendlyName { get; set; } + + /// + /// Gets or sets friendly name of target fabric. + /// + [JsonProperty(PropertyName = "targetFabricFriendlyName")] + public string TargetFabricFriendlyName { get; set; } + + /// + /// Gets or sets friendly name of replication policy. + /// + [JsonProperty(PropertyName = "policyFriendlyName")] + public string PolicyFriendlyName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMappingProviderSpecificDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMappingProviderSpecificDetails.cs new file mode 100644 index 000000000000..006409f3250d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerMappingProviderSpecificDetails.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Container mapping provider specific details. + /// + public partial class ProtectionContainerMappingProviderSpecificDetails + { + /// + /// Initializes a new instance of the + /// ProtectionContainerMappingProviderSpecificDetails class. + /// + public ProtectionContainerMappingProviderSpecificDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ProtectionContainerMappingProviderSpecificDetails class. + /// + /// Gets the class type. Overriden in + /// derived classes. + public ProtectionContainerMappingProviderSpecificDetails(string instanceType = default(string)) + { + InstanceType = instanceType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the class type. Overriden in derived classes. + /// + [JsonProperty(PropertyName = "instanceType")] + public string InstanceType { get; private set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerProperties.cs new file mode 100644 index 000000000000..616572ce2ad3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProtectionContainerProperties.cs @@ -0,0 +1,105 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Protection profile custom data details. + /// + public partial class ProtectionContainerProperties + { + /// + /// Initializes a new instance of the ProtectionContainerProperties + /// class. + /// + public ProtectionContainerProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProtectionContainerProperties + /// class. + /// + /// Fabric friendly name. + /// The name. + /// The fabric type. + /// Number of protected PEs + /// The pairing status of this + /// cloud. + /// The role of this cloud. + /// Fabric specific + /// details. + public ProtectionContainerProperties(string fabricFriendlyName = default(string), string friendlyName = default(string), string fabricType = default(string), int? protectedItemCount = default(int?), string pairingStatus = default(string), string role = default(string), ProtectionContainerFabricSpecificDetails fabricSpecificDetails = default(ProtectionContainerFabricSpecificDetails)) + { + FabricFriendlyName = fabricFriendlyName; + FriendlyName = friendlyName; + FabricType = fabricType; + ProtectedItemCount = protectedItemCount; + PairingStatus = pairingStatus; + Role = role; + FabricSpecificDetails = fabricSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets fabric friendly name. + /// + [JsonProperty(PropertyName = "fabricFriendlyName")] + public string FabricFriendlyName { get; set; } + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the fabric type. + /// + [JsonProperty(PropertyName = "fabricType")] + public string FabricType { get; set; } + + /// + /// Gets or sets number of protected PEs + /// + [JsonProperty(PropertyName = "protectedItemCount")] + public int? ProtectedItemCount { get; set; } + + /// + /// Gets or sets the pairing status of this cloud. + /// + [JsonProperty(PropertyName = "pairingStatus")] + public string PairingStatus { get; set; } + + /// + /// Gets or sets the role of this cloud. + /// + [JsonProperty(PropertyName = "role")] + public string Role { get; set; } + + /// + /// Gets or sets fabric specific details. + /// + [JsonProperty(PropertyName = "fabricSpecificDetails")] + public ProtectionContainerFabricSpecificDetails FabricSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProviderError.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProviderError.cs new file mode 100644 index 000000000000..21db30d761ee --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProviderError.cs @@ -0,0 +1,87 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class contains the error details per object. + /// + public partial class ProviderError + { + /// + /// Initializes a new instance of the ProviderError class. + /// + public ProviderError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ProviderError class. + /// + /// The Error code. + /// The Error message. + /// The Provider error Id. + /// The possible causes for the + /// error. + /// The recommended action to resolve + /// the error. + public ProviderError(int? errorCode = default(int?), string errorMessage = default(string), string errorId = default(string), string possibleCauses = default(string), string recommendedAction = default(string)) + { + ErrorCode = errorCode; + ErrorMessage = errorMessage; + ErrorId = errorId; + PossibleCauses = possibleCauses; + RecommendedAction = recommendedAction; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Error code. + /// + [JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode { get; set; } + + /// + /// Gets or sets the Error message. + /// + [JsonProperty(PropertyName = "errorMessage")] + public string ErrorMessage { get; set; } + + /// + /// Gets or sets the Provider error Id. + /// + [JsonProperty(PropertyName = "errorId")] + public string ErrorId { get; set; } + + /// + /// Gets or sets the possible causes for the error. + /// + [JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses { get; set; } + + /// + /// Gets or sets the recommended action to resolve the error. + /// + [JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProviderSpecificFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProviderSpecificFailoverInput.cs new file mode 100644 index 000000000000..9d0137f39743 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ProviderSpecificFailoverInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Provider specific failover input. + /// + public partial class ProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the ProviderSpecificFailoverInput + /// class. + /// + public ProviderSpecificFailoverInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlan.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlan.cs new file mode 100644 index 000000000000..d961b8a124a8 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlan.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan details. + /// + public partial class RecoveryPlan : Resource + { + /// + /// Initializes a new instance of the RecoveryPlan class. + /// + public RecoveryPlan() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlan class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The custom details. + public RecoveryPlan(string id = default(string), string name = default(string), string type = default(string), string location = default(string), RecoveryPlanProperties properties = default(RecoveryPlanProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the custom details. + /// + [JsonProperty(PropertyName = "properties")] + public RecoveryPlanProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanA2AFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanA2AFailoverInput.cs new file mode 100644 index 000000000000..535ab1107829 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanA2AFailoverInput.cs @@ -0,0 +1,79 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan A2A failover input. + /// + [Newtonsoft.Json.JsonObject("A2A")] + public partial class RecoveryPlanA2AFailoverInput : RecoveryPlanProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the RecoveryPlanA2AFailoverInput + /// class. + /// + public RecoveryPlanA2AFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanA2AFailoverInput + /// class. + /// + /// The recovery point type. Possible + /// values include: 'Latest', 'LatestApplicationConsistent', + /// 'LatestCrashConsistent', 'LatestProcessed' + /// A value indicating whether + /// to use recovery cloud service for TFO or not. + public RecoveryPlanA2AFailoverInput(A2ARpRecoveryPointType recoveryPointType, string cloudServiceCreationOption = default(string)) + { + RecoveryPointType = recoveryPointType; + CloudServiceCreationOption = cloudServiceCreationOption; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point type. Possible values include: + /// 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', + /// 'LatestProcessed' + /// + [JsonProperty(PropertyName = "recoveryPointType")] + public A2ARpRecoveryPointType RecoveryPointType { get; set; } + + /// + /// Gets or sets a value indicating whether to use recovery cloud + /// service for TFO or not. + /// + [JsonProperty(PropertyName = "cloudServiceCreationOption")] + public string CloudServiceCreationOption { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanAction.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanAction.cs new file mode 100644 index 000000000000..227abc05bd15 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanAction.cs @@ -0,0 +1,106 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery plan action details. + /// + public partial class RecoveryPlanAction + { + /// + /// Initializes a new instance of the RecoveryPlanAction class. + /// + public RecoveryPlanAction() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanAction class. + /// + /// The action name. + /// The list of failover types. + /// The list of failover + /// directions. + /// The custom details. + public RecoveryPlanAction(string actionName, IList failoverTypes, IList failoverDirections, RecoveryPlanActionDetails customDetails) + { + ActionName = actionName; + FailoverTypes = failoverTypes; + FailoverDirections = failoverDirections; + CustomDetails = customDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the action name. + /// + [JsonProperty(PropertyName = "actionName")] + public string ActionName { get; set; } + + /// + /// Gets or sets the list of failover types. + /// + [JsonProperty(PropertyName = "failoverTypes")] + public IList FailoverTypes { get; set; } + + /// + /// Gets or sets the list of failover directions. + /// + [JsonProperty(PropertyName = "failoverDirections")] + public IList FailoverDirections { get; set; } + + /// + /// Gets or sets the custom details. + /// + [JsonProperty(PropertyName = "customDetails")] + public RecoveryPlanActionDetails CustomDetails { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ActionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ActionName"); + } + if (FailoverTypes == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FailoverTypes"); + } + if (FailoverDirections == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FailoverDirections"); + } + if (CustomDetails == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CustomDetails"); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanActionDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanActionDetails.cs new file mode 100644 index 000000000000..73313a9edd63 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanActionDetails.cs @@ -0,0 +1,37 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Recovery plan action custom details. + /// + public partial class RecoveryPlanActionDetails + { + /// + /// Initializes a new instance of the RecoveryPlanActionDetails class. + /// + public RecoveryPlanActionDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanActionLocation.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanActionLocation.cs new file mode 100644 index 000000000000..316bae8897cc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanActionLocation.cs @@ -0,0 +1,31 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for RecoveryPlanActionLocation. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RecoveryPlanActionLocation + { + [EnumMember(Value = "Primary")] + Primary, + [EnumMember(Value = "Recovery")] + Recovery + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanAutomationRunbookActionDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanAutomationRunbookActionDetails.cs new file mode 100644 index 000000000000..bdf092737ffe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanAutomationRunbookActionDetails.cs @@ -0,0 +1,83 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan Automation runbook action details. + /// + [Newtonsoft.Json.JsonObject("AutomationRunbookActionDetails")] + public partial class RecoveryPlanAutomationRunbookActionDetails : RecoveryPlanActionDetails + { + /// + /// Initializes a new instance of the + /// RecoveryPlanAutomationRunbookActionDetails class. + /// + public RecoveryPlanAutomationRunbookActionDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanAutomationRunbookActionDetails class. + /// + /// The fabric location. Possible values + /// include: 'Primary', 'Recovery' + /// The runbook ARM Id. + /// The runbook timeout. + public RecoveryPlanAutomationRunbookActionDetails(RecoveryPlanActionLocation fabricLocation, string runbookId = default(string), string timeout = default(string)) + { + RunbookId = runbookId; + Timeout = timeout; + FabricLocation = fabricLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the runbook ARM Id. + /// + [JsonProperty(PropertyName = "runbookId")] + public string RunbookId { get; set; } + + /// + /// Gets or sets the runbook timeout. + /// + [JsonProperty(PropertyName = "timeout")] + public string Timeout { get; set; } + + /// + /// Gets or sets the fabric location. Possible values include: + /// 'Primary', 'Recovery' + /// + [JsonProperty(PropertyName = "fabricLocation")] + public RecoveryPlanActionLocation FabricLocation { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroup.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroup.cs new file mode 100644 index 000000000000..3702f8c691d9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroup.cs @@ -0,0 +1,111 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery plan group details. + /// + public partial class RecoveryPlanGroup + { + /// + /// Initializes a new instance of the RecoveryPlanGroup class. + /// + public RecoveryPlanGroup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanGroup class. + /// + /// The group type. Possible values include: + /// 'Shutdown', 'Boot', 'Failover' + /// The list of protected + /// items. + /// The start group actions. + /// The end group actions. + public RecoveryPlanGroup(RecoveryPlanGroupType groupType, IList replicationProtectedItems = default(IList), IList startGroupActions = default(IList), IList endGroupActions = default(IList)) + { + GroupType = groupType; + ReplicationProtectedItems = replicationProtectedItems; + StartGroupActions = startGroupActions; + EndGroupActions = endGroupActions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the group type. Possible values include: 'Shutdown', + /// 'Boot', 'Failover' + /// + [JsonProperty(PropertyName = "groupType")] + public RecoveryPlanGroupType GroupType { get; set; } + + /// + /// Gets or sets the list of protected items. + /// + [JsonProperty(PropertyName = "replicationProtectedItems")] + public IList ReplicationProtectedItems { get; set; } + + /// + /// Gets or sets the start group actions. + /// + [JsonProperty(PropertyName = "startGroupActions")] + public IList StartGroupActions { get; set; } + + /// + /// Gets or sets the end group actions. + /// + [JsonProperty(PropertyName = "endGroupActions")] + public IList EndGroupActions { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StartGroupActions != null) + { + foreach (var element in StartGroupActions) + { + if (element != null) + { + element.Validate(); + } + } + } + if (EndGroupActions != null) + { + foreach (var element1 in EndGroupActions) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroupTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroupTaskDetails.cs new file mode 100644 index 000000000000..aacc7603a313 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroupTaskDetails.cs @@ -0,0 +1,75 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class represents the recovery plan group task. + /// + public partial class RecoveryPlanGroupTaskDetails : GroupTaskDetails + { + /// + /// Initializes a new instance of the RecoveryPlanGroupTaskDetails + /// class. + /// + public RecoveryPlanGroupTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanGroupTaskDetails + /// class. + /// + /// The child tasks. + /// The name. + /// The group identifier. + /// The group type. + public RecoveryPlanGroupTaskDetails(IList childTasks = default(IList), string name = default(string), string groupId = default(string), string rpGroupType = default(string)) + : base(childTasks) + { + Name = name; + GroupId = groupId; + RpGroupType = rpGroupType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the group identifier. + /// + [JsonProperty(PropertyName = "groupId")] + public string GroupId { get; set; } + + /// + /// Gets or sets the group type. + /// + [JsonProperty(PropertyName = "rpGroupType")] + public string RpGroupType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroupType.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroupType.cs new file mode 100644 index 000000000000..35363a1f87b0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanGroupType.cs @@ -0,0 +1,33 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for RecoveryPlanGroupType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RecoveryPlanGroupType + { + [EnumMember(Value = "Shutdown")] + Shutdown, + [EnumMember(Value = "Boot")] + Boot, + [EnumMember(Value = "Failover")] + Failover + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanHyperVReplicaAzureFailbackInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanHyperVReplicaAzureFailbackInput.cs new file mode 100644 index 000000000000..a7b833e7a16b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanHyperVReplicaAzureFailbackInput.cs @@ -0,0 +1,77 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan HVR Azure failback input. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzureFailback")] + public partial class RecoveryPlanHyperVReplicaAzureFailbackInput : RecoveryPlanProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the + /// RecoveryPlanHyperVReplicaAzureFailbackInput class. + /// + public RecoveryPlanHyperVReplicaAzureFailbackInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanHyperVReplicaAzureFailbackInput class. + /// + /// The data sync option. Possible values + /// include: 'ForDownTime', 'ForSynchronization' + /// The ALR option. Possible + /// values include: 'CreateVmIfNotFound', 'NoAction' + public RecoveryPlanHyperVReplicaAzureFailbackInput(DataSyncStatus dataSyncOption, AlternateLocationRecoveryOption recoveryVmCreationOption) + { + DataSyncOption = dataSyncOption; + RecoveryVmCreationOption = recoveryVmCreationOption; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the data sync option. Possible values include: + /// 'ForDownTime', 'ForSynchronization' + /// + [JsonProperty(PropertyName = "dataSyncOption")] + public DataSyncStatus DataSyncOption { get; set; } + + /// + /// Gets or sets the ALR option. Possible values include: + /// 'CreateVmIfNotFound', 'NoAction' + /// + [JsonProperty(PropertyName = "recoveryVmCreationOption")] + public AlternateLocationRecoveryOption RecoveryVmCreationOption { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanHyperVReplicaAzureFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanHyperVReplicaAzureFailoverInput.cs new file mode 100644 index 000000000000..87061cbcec69 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanHyperVReplicaAzureFailoverInput.cs @@ -0,0 +1,99 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan HVR Azure failover input. + /// + [Newtonsoft.Json.JsonObject("HyperVReplicaAzure")] + public partial class RecoveryPlanHyperVReplicaAzureFailoverInput : RecoveryPlanProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the + /// RecoveryPlanHyperVReplicaAzureFailoverInput class. + /// + public RecoveryPlanHyperVReplicaAzureFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanHyperVReplicaAzureFailoverInput class. + /// + /// The vault location. + /// The primary KEK certificate + /// PFX. + /// The secondary KEK + /// certificate PFX. + /// The recovery point type. Possible + /// values include: 'Latest', 'LatestApplicationConsistent', + /// 'LatestProcessed' + public RecoveryPlanHyperVReplicaAzureFailoverInput(string vaultLocation, string primaryKekCertificatePfx = default(string), string secondaryKekCertificatePfx = default(string), HyperVReplicaAzureRpRecoveryPointType? recoveryPointType = default(HyperVReplicaAzureRpRecoveryPointType?)) + { + VaultLocation = vaultLocation; + PrimaryKekCertificatePfx = primaryKekCertificatePfx; + SecondaryKekCertificatePfx = secondaryKekCertificatePfx; + RecoveryPointType = recoveryPointType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the vault location. + /// + [JsonProperty(PropertyName = "vaultLocation")] + public string VaultLocation { get; set; } + + /// + /// Gets or sets the primary KEK certificate PFX. + /// + [JsonProperty(PropertyName = "primaryKekCertificatePfx")] + public string PrimaryKekCertificatePfx { get; set; } + + /// + /// Gets or sets the secondary KEK certificate PFX. + /// + [JsonProperty(PropertyName = "secondaryKekCertificatePfx")] + public string SecondaryKekCertificatePfx { get; set; } + + /// + /// Gets or sets the recovery point type. Possible values include: + /// 'Latest', 'LatestApplicationConsistent', 'LatestProcessed' + /// + [JsonProperty(PropertyName = "recoveryPointType")] + public HyperVReplicaAzureRpRecoveryPointType? RecoveryPointType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (VaultLocation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VaultLocation"); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanInMageAzureV2FailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanInMageAzureV2FailoverInput.cs new file mode 100644 index 000000000000..3b243e2df974 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanInMageAzureV2FailoverInput.cs @@ -0,0 +1,82 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan InMageAzureV2 failover input. + /// + [Newtonsoft.Json.JsonObject("InMageAzureV2")] + public partial class RecoveryPlanInMageAzureV2FailoverInput : RecoveryPlanProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the + /// RecoveryPlanInMageAzureV2FailoverInput class. + /// + public RecoveryPlanInMageAzureV2FailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanInMageAzureV2FailoverInput class. + /// + /// The vault location. + /// The recovery point type. Possible + /// values include: 'Latest', 'LatestApplicationConsistent', + /// 'LatestCrashConsistent', 'LatestProcessed' + public RecoveryPlanInMageAzureV2FailoverInput(string vaultLocation, InMageV2RpRecoveryPointType recoveryPointType) + { + VaultLocation = vaultLocation; + RecoveryPointType = recoveryPointType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the vault location. + /// + [JsonProperty(PropertyName = "vaultLocation")] + public string VaultLocation { get; set; } + + /// + /// Gets or sets the recovery point type. Possible values include: + /// 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', + /// 'LatestProcessed' + /// + [JsonProperty(PropertyName = "recoveryPointType")] + public InMageV2RpRecoveryPointType RecoveryPointType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (VaultLocation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VaultLocation"); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanInMageFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanInMageFailoverInput.cs new file mode 100644 index 000000000000..161da70d958a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanInMageFailoverInput.cs @@ -0,0 +1,67 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan InMage failover input. + /// + [Newtonsoft.Json.JsonObject("InMage")] + public partial class RecoveryPlanInMageFailoverInput : RecoveryPlanProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the RecoveryPlanInMageFailoverInput + /// class. + /// + public RecoveryPlanInMageFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanInMageFailoverInput + /// class. + /// + /// The recovery point type. Possible + /// values include: 'LatestTime', 'LatestTag', 'Custom' + public RecoveryPlanInMageFailoverInput(RpInMageRecoveryPointType recoveryPointType) + { + RecoveryPointType = recoveryPointType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point type. Possible values include: + /// 'LatestTime', 'LatestTag', 'Custom' + /// + [JsonProperty(PropertyName = "recoveryPointType")] + public RpInMageRecoveryPointType RecoveryPointType { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanManualActionDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanManualActionDetails.cs new file mode 100644 index 000000000000..f37e1d5a46df --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanManualActionDetails.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan manual action details. + /// + [Newtonsoft.Json.JsonObject("ManualActionDetails")] + public partial class RecoveryPlanManualActionDetails : RecoveryPlanActionDetails + { + /// + /// Initializes a new instance of the RecoveryPlanManualActionDetails + /// class. + /// + public RecoveryPlanManualActionDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanManualActionDetails + /// class. + /// + /// The manual action description. + public RecoveryPlanManualActionDetails(string description = default(string)) + { + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the manual action description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanPlannedFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanPlannedFailoverInput.cs new file mode 100644 index 000000000000..d02d8915b5e2 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanPlannedFailoverInput.cs @@ -0,0 +1,74 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan planned failover input. + /// + public partial class RecoveryPlanPlannedFailoverInput + { + /// + /// Initializes a new instance of the RecoveryPlanPlannedFailoverInput + /// class. + /// + public RecoveryPlanPlannedFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanPlannedFailoverInput + /// class. + /// + /// The recovery plan planned failover input + /// properties. + public RecoveryPlanPlannedFailoverInput(RecoveryPlanPlannedFailoverInputProperties properties) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery plan planned failover input properties. + /// + [JsonProperty(PropertyName = "properties")] + public RecoveryPlanPlannedFailoverInputProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanPlannedFailoverInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanPlannedFailoverInputProperties.cs new file mode 100644 index 000000000000..18d83e607853 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanPlannedFailoverInputProperties.cs @@ -0,0 +1,77 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery plan planned failover input properties. + /// + public partial class RecoveryPlanPlannedFailoverInputProperties + { + /// + /// Initializes a new instance of the + /// RecoveryPlanPlannedFailoverInputProperties class. + /// + public RecoveryPlanPlannedFailoverInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanPlannedFailoverInputProperties class. + /// + /// The failover direction. Possible + /// values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + /// The provider specific + /// properties. + public RecoveryPlanPlannedFailoverInputProperties(PossibleOperationsDirections failoverDirection, IList providerSpecificDetails = default(IList)) + { + FailoverDirection = failoverDirection; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the failover direction. Possible values include: + /// 'PrimaryToRecovery', 'RecoveryToPrimary' + /// + [JsonProperty(PropertyName = "failoverDirection")] + public PossibleOperationsDirections FailoverDirection { get; set; } + + /// + /// Gets or sets the provider specific properties. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public IList ProviderSpecificDetails { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProperties.cs new file mode 100644 index 000000000000..2a0131fe5e09 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProperties.cs @@ -0,0 +1,168 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery plan custom details. + /// + public partial class RecoveryPlanProperties + { + /// + /// Initializes a new instance of the RecoveryPlanProperties class. + /// + public RecoveryPlanProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanProperties class. + /// + /// The friendly name. + /// The primary fabric Id. + /// The primary fabric friendly + /// name. + /// The recovery fabric Id. + /// The recovery fabric + /// friendly name. + /// The failover deployment + /// model. + /// The list of replication + /// providers. + /// The list of allowed + /// operations. + /// The start time of the last + /// planned failover. + /// The start time of the last test + /// failover. + /// The current scenario details. + /// The recovery plan + /// status. + /// The recovery plan + /// status description. + /// The recovery plan groups. + public RecoveryPlanProperties(string friendlyName = default(string), string primaryFabricId = default(string), string primaryFabricFriendlyName = default(string), string recoveryFabricId = default(string), string recoveryFabricFriendlyName = default(string), string failoverDeploymentModel = default(string), IList replicationProviders = default(IList), IList allowedOperations = default(IList), System.DateTime? lastPlannedFailoverTime = default(System.DateTime?), System.DateTime? lastTestFailoverTime = default(System.DateTime?), CurrentScenarioDetails currentScenario = default(CurrentScenarioDetails), string currentScenarioStatus = default(string), string currentScenarioStatusDescription = default(string), IList groups = default(IList)) + { + FriendlyName = friendlyName; + PrimaryFabricId = primaryFabricId; + PrimaryFabricFriendlyName = primaryFabricFriendlyName; + RecoveryFabricId = recoveryFabricId; + RecoveryFabricFriendlyName = recoveryFabricFriendlyName; + FailoverDeploymentModel = failoverDeploymentModel; + ReplicationProviders = replicationProviders; + AllowedOperations = allowedOperations; + LastPlannedFailoverTime = lastPlannedFailoverTime; + LastTestFailoverTime = lastTestFailoverTime; + CurrentScenario = currentScenario; + CurrentScenarioStatus = currentScenarioStatus; + CurrentScenarioStatusDescription = currentScenarioStatusDescription; + Groups = groups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the friendly name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the primary fabric Id. + /// + [JsonProperty(PropertyName = "primaryFabricId")] + public string PrimaryFabricId { get; set; } + + /// + /// Gets or sets the primary fabric friendly name. + /// + [JsonProperty(PropertyName = "primaryFabricFriendlyName")] + public string PrimaryFabricFriendlyName { get; set; } + + /// + /// Gets or sets the recovery fabric Id. + /// + [JsonProperty(PropertyName = "recoveryFabricId")] + public string RecoveryFabricId { get; set; } + + /// + /// Gets or sets the recovery fabric friendly name. + /// + [JsonProperty(PropertyName = "recoveryFabricFriendlyName")] + public string RecoveryFabricFriendlyName { get; set; } + + /// + /// Gets or sets the failover deployment model. + /// + [JsonProperty(PropertyName = "failoverDeploymentModel")] + public string FailoverDeploymentModel { get; set; } + + /// + /// Gets or sets the list of replication providers. + /// + [JsonProperty(PropertyName = "replicationProviders")] + public IList ReplicationProviders { get; set; } + + /// + /// Gets or sets the list of allowed operations. + /// + [JsonProperty(PropertyName = "allowedOperations")] + public IList AllowedOperations { get; set; } + + /// + /// Gets or sets the start time of the last planned failover. + /// + [JsonProperty(PropertyName = "lastPlannedFailoverTime")] + public System.DateTime? LastPlannedFailoverTime { get; set; } + + /// + /// Gets or sets the start time of the last test failover. + /// + [JsonProperty(PropertyName = "lastTestFailoverTime")] + public System.DateTime? LastTestFailoverTime { get; set; } + + /// + /// Gets or sets the current scenario details. + /// + [JsonProperty(PropertyName = "currentScenario")] + public CurrentScenarioDetails CurrentScenario { get; set; } + + /// + /// Gets or sets the recovery plan status. + /// + [JsonProperty(PropertyName = "currentScenarioStatus")] + public string CurrentScenarioStatus { get; set; } + + /// + /// Gets or sets the recovery plan status description. + /// + [JsonProperty(PropertyName = "currentScenarioStatusDescription")] + public string CurrentScenarioStatusDescription { get; set; } + + /// + /// Gets or sets the recovery plan groups. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProtectedItem.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProtectedItem.cs new file mode 100644 index 000000000000..c07db9a54402 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProtectedItem.cs @@ -0,0 +1,62 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan protected item. + /// + public partial class RecoveryPlanProtectedItem + { + /// + /// Initializes a new instance of the RecoveryPlanProtectedItem class. + /// + public RecoveryPlanProtectedItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanProtectedItem class. + /// + /// The ARM Id of the recovery plan protected + /// item. + /// The virtual machine Id. + public RecoveryPlanProtectedItem(string id = default(string), string virtualMachineId = default(string)) + { + Id = id; + VirtualMachineId = virtualMachineId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ARM Id of the recovery plan protected item. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the virtual machine Id. + /// + [JsonProperty(PropertyName = "virtualMachineId")] + public string VirtualMachineId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProviderSpecificFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProviderSpecificFailoverInput.cs new file mode 100644 index 000000000000..dccb43370cfc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanProviderSpecificFailoverInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Recovery plan provider specific failover input base class. + /// + public partial class RecoveryPlanProviderSpecificFailoverInput + { + /// + /// Initializes a new instance of the + /// RecoveryPlanProviderSpecificFailoverInput class. + /// + public RecoveryPlanProviderSpecificFailoverInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanScriptActionDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanScriptActionDetails.cs new file mode 100644 index 000000000000..9436c2b60354 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanScriptActionDetails.cs @@ -0,0 +1,88 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan script action details. + /// + [Newtonsoft.Json.JsonObject("ScriptActionDetails")] + public partial class RecoveryPlanScriptActionDetails : RecoveryPlanActionDetails + { + /// + /// Initializes a new instance of the RecoveryPlanScriptActionDetails + /// class. + /// + public RecoveryPlanScriptActionDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanScriptActionDetails + /// class. + /// + /// The script path. + /// The fabric location. Possible values + /// include: 'Primary', 'Recovery' + /// The script timeout. + public RecoveryPlanScriptActionDetails(string path, RecoveryPlanActionLocation fabricLocation, string timeout = default(string)) + { + Path = path; + Timeout = timeout; + FabricLocation = fabricLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the script path. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets the script timeout. + /// + [JsonProperty(PropertyName = "timeout")] + public string Timeout { get; set; } + + /// + /// Gets or sets the fabric location. Possible values include: + /// 'Primary', 'Recovery' + /// + [JsonProperty(PropertyName = "fabricLocation")] + public RecoveryPlanActionLocation FabricLocation { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanShutdownGroupTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanShutdownGroupTaskDetails.cs new file mode 100644 index 000000000000..ed20c74ac4a0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanShutdownGroupTaskDetails.cs @@ -0,0 +1,75 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class represents the recovery plan shutdown group task details. + /// + public partial class RecoveryPlanShutdownGroupTaskDetails : GroupTaskDetails + { + /// + /// Initializes a new instance of the + /// RecoveryPlanShutdownGroupTaskDetails class. + /// + public RecoveryPlanShutdownGroupTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanShutdownGroupTaskDetails class. + /// + /// The child tasks. + /// The name. + /// The group identifier. + /// The group type. + public RecoveryPlanShutdownGroupTaskDetails(IList childTasks = default(IList), string name = default(string), string groupId = default(string), string rpGroupType = default(string)) + : base(childTasks) + { + Name = name; + GroupId = groupId; + RpGroupType = rpGroupType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the group identifier. + /// + [JsonProperty(PropertyName = "groupId")] + public string GroupId { get; set; } + + /// + /// Gets or sets the group type. + /// + [JsonProperty(PropertyName = "rpGroupType")] + public string RpGroupType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverCleanupInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverCleanupInput.cs new file mode 100644 index 000000000000..b12a2785395a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverCleanupInput.cs @@ -0,0 +1,71 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan test failover cleanup input. + /// + public partial class RecoveryPlanTestFailoverCleanupInput + { + /// + /// Initializes a new instance of the + /// RecoveryPlanTestFailoverCleanupInput class. + /// + public RecoveryPlanTestFailoverCleanupInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanTestFailoverCleanupInput class. + /// + /// The recovery plan test failover cleanup + /// input properties. + public RecoveryPlanTestFailoverCleanupInput(RecoveryPlanTestFailoverCleanupInputProperties properties) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery plan test failover cleanup input + /// properties. + /// + [JsonProperty(PropertyName = "properties")] + public RecoveryPlanTestFailoverCleanupInputProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverCleanupInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverCleanupInputProperties.cs new file mode 100644 index 000000000000..6ca23824b08f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverCleanupInputProperties.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan test failover cleanup input properties. + /// + public partial class RecoveryPlanTestFailoverCleanupInputProperties + { + /// + /// Initializes a new instance of the + /// RecoveryPlanTestFailoverCleanupInputProperties class. + /// + public RecoveryPlanTestFailoverCleanupInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanTestFailoverCleanupInputProperties class. + /// + /// The test failover cleanup comments. + public RecoveryPlanTestFailoverCleanupInputProperties(string comments = default(string)) + { + Comments = comments; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the test failover cleanup comments. + /// + [JsonProperty(PropertyName = "comments")] + public string Comments { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverInput.cs new file mode 100644 index 000000000000..bf8cd456dd30 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverInput.cs @@ -0,0 +1,74 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan test failover input. + /// + public partial class RecoveryPlanTestFailoverInput + { + /// + /// Initializes a new instance of the RecoveryPlanTestFailoverInput + /// class. + /// + public RecoveryPlanTestFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPlanTestFailoverInput + /// class. + /// + /// The recovery plan test failover input + /// properties. + public RecoveryPlanTestFailoverInput(RecoveryPlanTestFailoverInputProperties properties) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery plan test failover input properties. + /// + [JsonProperty(PropertyName = "properties")] + public RecoveryPlanTestFailoverInputProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverInputProperties.cs new file mode 100644 index 000000000000..a74317fbb41c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanTestFailoverInputProperties.cs @@ -0,0 +1,110 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery plan test failover input properties. + /// + public partial class RecoveryPlanTestFailoverInputProperties + { + /// + /// Initializes a new instance of the + /// RecoveryPlanTestFailoverInputProperties class. + /// + public RecoveryPlanTestFailoverInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanTestFailoverInputProperties class. + /// + /// The failover direction. Possible + /// values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + /// The network type to be used for test + /// failover. + /// The Id of the network to be used for test + /// failover. + /// A value indicating whether + /// the test failover cleanup is to be skipped. + /// The provider specific + /// properties. + public RecoveryPlanTestFailoverInputProperties(PossibleOperationsDirections failoverDirection, string networkType, string networkId = default(string), string skipTestFailoverCleanup = default(string), IList providerSpecificDetails = default(IList)) + { + FailoverDirection = failoverDirection; + NetworkType = networkType; + NetworkId = networkId; + SkipTestFailoverCleanup = skipTestFailoverCleanup; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the failover direction. Possible values include: + /// 'PrimaryToRecovery', 'RecoveryToPrimary' + /// + [JsonProperty(PropertyName = "failoverDirection")] + public PossibleOperationsDirections FailoverDirection { get; set; } + + /// + /// Gets or sets the network type to be used for test failover. + /// + [JsonProperty(PropertyName = "networkType")] + public string NetworkType { get; set; } + + /// + /// Gets or sets the Id of the network to be used for test failover. + /// + [JsonProperty(PropertyName = "networkId")] + public string NetworkId { get; set; } + + /// + /// Gets or sets a value indicating whether the test failover cleanup + /// is to be skipped. + /// + [JsonProperty(PropertyName = "skipTestFailoverCleanup")] + public string SkipTestFailoverCleanup { get; set; } + + /// + /// Gets or sets the provider specific properties. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public IList ProviderSpecificDetails { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (NetworkType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "NetworkType"); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanUnplannedFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanUnplannedFailoverInput.cs new file mode 100644 index 000000000000..0563803dc4cf --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanUnplannedFailoverInput.cs @@ -0,0 +1,74 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery plan unplanned failover input. + /// + public partial class RecoveryPlanUnplannedFailoverInput + { + /// + /// Initializes a new instance of the + /// RecoveryPlanUnplannedFailoverInput class. + /// + public RecoveryPlanUnplannedFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanUnplannedFailoverInput class. + /// + /// The recovery plan unplanned failover input + /// properties. + public RecoveryPlanUnplannedFailoverInput(RecoveryPlanUnplannedFailoverInputProperties properties) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery plan unplanned failover input properties. + /// + [JsonProperty(PropertyName = "properties")] + public RecoveryPlanUnplannedFailoverInputProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanUnplannedFailoverInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanUnplannedFailoverInputProperties.cs new file mode 100644 index 000000000000..f8d782a5dbb3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPlanUnplannedFailoverInputProperties.cs @@ -0,0 +1,88 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery plan unplanned failover input properties. + /// + public partial class RecoveryPlanUnplannedFailoverInputProperties + { + /// + /// Initializes a new instance of the + /// RecoveryPlanUnplannedFailoverInputProperties class. + /// + public RecoveryPlanUnplannedFailoverInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryPlanUnplannedFailoverInputProperties class. + /// + /// The failover direction. Possible + /// values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + /// A value indicating whether + /// source site operations are required. Possible values include: + /// 'Required', 'NotRequired' + /// The provider specific + /// properties. + public RecoveryPlanUnplannedFailoverInputProperties(PossibleOperationsDirections failoverDirection, SourceSiteOperations sourceSiteOperations, IList providerSpecificDetails = default(IList)) + { + FailoverDirection = failoverDirection; + SourceSiteOperations = sourceSiteOperations; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the failover direction. Possible values include: + /// 'PrimaryToRecovery', 'RecoveryToPrimary' + /// + [JsonProperty(PropertyName = "failoverDirection")] + public PossibleOperationsDirections FailoverDirection { get; set; } + + /// + /// Gets or sets a value indicating whether source site operations are + /// required. Possible values include: 'Required', 'NotRequired' + /// + [JsonProperty(PropertyName = "sourceSiteOperations")] + public SourceSiteOperations SourceSiteOperations { get; set; } + + /// + /// Gets or sets the provider specific properties. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public IList ProviderSpecificDetails { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPoint.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPoint.cs new file mode 100644 index 000000000000..4db9dfe28c0f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPoint.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Base class representing a recovery point. + /// + public partial class RecoveryPoint : Resource + { + /// + /// Initializes a new instance of the RecoveryPoint class. + /// + public RecoveryPoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPoint class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// Recovery point related data. + public RecoveryPoint(string id = default(string), string name = default(string), string type = default(string), string location = default(string), RecoveryPointProperties properties = default(RecoveryPointProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets recovery point related data. + /// + [JsonProperty(PropertyName = "properties")] + public RecoveryPointProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPointProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPointProperties.cs new file mode 100644 index 000000000000..42c0d0c0b2d7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryPointProperties.cs @@ -0,0 +1,63 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Recovery point properties. + /// + public partial class RecoveryPointProperties + { + /// + /// Initializes a new instance of the RecoveryPointProperties class. + /// + public RecoveryPointProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryPointProperties class. + /// + /// The recovery point time. + /// The recovery point type: + /// ApplicationConsistent, CrashConsistent. + public RecoveryPointProperties(System.DateTime? recoveryPointTime = default(System.DateTime?), string recoveryPointType = default(string)) + { + RecoveryPointTime = recoveryPointTime; + RecoveryPointType = recoveryPointType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery point time. + /// + [JsonProperty(PropertyName = "recoveryPointTime")] + public System.DateTime? RecoveryPointTime { get; set; } + + /// + /// Gets or sets the recovery point type: ApplicationConsistent, + /// CrashConsistent. + /// + [JsonProperty(PropertyName = "recoveryPointType")] + public string RecoveryPointType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryServicesProvider.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryServicesProvider.cs new file mode 100644 index 000000000000..42ca0ebc32a4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryServicesProvider.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Provider details. + /// + public partial class RecoveryServicesProvider : Resource + { + /// + /// Initializes a new instance of the RecoveryServicesProvider class. + /// + public RecoveryServicesProvider() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecoveryServicesProvider class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// Provider properties. + public RecoveryServicesProvider(string id = default(string), string name = default(string), string type = default(string), string location = default(string), RecoveryServicesProviderProperties properties = default(RecoveryServicesProviderProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets provider properties. + /// + [JsonProperty(PropertyName = "properties")] + public RecoveryServicesProviderProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryServicesProviderProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryServicesProviderProperties.cs new file mode 100644 index 000000000000..9c4bd4361ab4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RecoveryServicesProviderProperties.cs @@ -0,0 +1,151 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery services provider properties. + /// + public partial class RecoveryServicesProviderProperties + { + /// + /// Initializes a new instance of the + /// RecoveryServicesProviderProperties class. + /// + public RecoveryServicesProviderProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecoveryServicesProviderProperties class. + /// + /// Type of the site. + /// Friendly name of the DRA. + /// The provider version. + /// The fabric provider. + /// DRA version status. + /// Expiry date if the version + /// is deprecated. + /// The fabric friendly name. + /// Time when last heartbeat was sent by + /// the DRA. + /// A value indicating whether DRA is + /// responsive. + /// Number of protected VMs currently + /// managed by the DRA. + /// The scenarions allowed on this + /// provider. + /// The recovery services provider + /// health error details. + public RecoveryServicesProviderProperties(string fabricType = default(string), string friendlyName = default(string), string providerVersion = default(string), string serverVersion = default(string), string providerVersionState = default(string), System.DateTime? providerVersionExpiryDate = default(System.DateTime?), string fabricFriendlyName = default(string), System.DateTime? lastHeartBeat = default(System.DateTime?), string connectionStatus = default(string), int? protectedItemCount = default(int?), IList allowedScenarios = default(IList), IList healthErrorDetails = default(IList)) + { + FabricType = fabricType; + FriendlyName = friendlyName; + ProviderVersion = providerVersion; + ServerVersion = serverVersion; + ProviderVersionState = providerVersionState; + ProviderVersionExpiryDate = providerVersionExpiryDate; + FabricFriendlyName = fabricFriendlyName; + LastHeartBeat = lastHeartBeat; + ConnectionStatus = connectionStatus; + ProtectedItemCount = protectedItemCount; + AllowedScenarios = allowedScenarios; + HealthErrorDetails = healthErrorDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets type of the site. + /// + [JsonProperty(PropertyName = "fabricType")] + public string FabricType { get; set; } + + /// + /// Gets or sets friendly name of the DRA. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the provider version. + /// + [JsonProperty(PropertyName = "providerVersion")] + public string ProviderVersion { get; set; } + + /// + /// Gets or sets the fabric provider. + /// + [JsonProperty(PropertyName = "serverVersion")] + public string ServerVersion { get; set; } + + /// + /// Gets or sets DRA version status. + /// + [JsonProperty(PropertyName = "providerVersionState")] + public string ProviderVersionState { get; set; } + + /// + /// Gets or sets expiry date if the version is deprecated. + /// + [JsonProperty(PropertyName = "providerVersionExpiryDate")] + public System.DateTime? ProviderVersionExpiryDate { get; set; } + + /// + /// Gets or sets the fabric friendly name. + /// + [JsonProperty(PropertyName = "fabricFriendlyName")] + public string FabricFriendlyName { get; set; } + + /// + /// Gets or sets time when last heartbeat was sent by the DRA. + /// + [JsonProperty(PropertyName = "lastHeartBeat")] + public System.DateTime? LastHeartBeat { get; set; } + + /// + /// Gets or sets a value indicating whether DRA is responsive. + /// + [JsonProperty(PropertyName = "connectionStatus")] + public string ConnectionStatus { get; set; } + + /// + /// Gets or sets number of protected VMs currently managed by the DRA. + /// + [JsonProperty(PropertyName = "protectedItemCount")] + public int? ProtectedItemCount { get; set; } + + /// + /// Gets or sets the scenarions allowed on this provider. + /// + [JsonProperty(PropertyName = "allowedScenarios")] + public IList AllowedScenarios { get; set; } + + /// + /// Gets or sets the recovery services provider health error details. + /// + [JsonProperty(PropertyName = "healthErrorDetails")] + public IList HealthErrorDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RemoveProtectionContainerMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RemoveProtectionContainerMappingInput.cs new file mode 100644 index 000000000000..22e5193106d5 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RemoveProtectionContainerMappingInput.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Container unpairing input. + /// + public partial class RemoveProtectionContainerMappingInput + { + /// + /// Initializes a new instance of the + /// RemoveProtectionContainerMappingInput class. + /// + public RemoveProtectionContainerMappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RemoveProtectionContainerMappingInput class. + /// + /// Configure protection input + /// properties. + public RemoveProtectionContainerMappingInput(RemoveProtectionContainerMappingInputProperties properties = default(RemoveProtectionContainerMappingInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets configure protection input properties. + /// + [JsonProperty(PropertyName = "properties")] + public RemoveProtectionContainerMappingInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RemoveProtectionContainerMappingInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RemoveProtectionContainerMappingInputProperties.cs new file mode 100644 index 000000000000..7e0a04cb5eb9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RemoveProtectionContainerMappingInputProperties.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Unpairing input properties. + /// + public partial class RemoveProtectionContainerMappingInputProperties + { + /// + /// Initializes a new instance of the + /// RemoveProtectionContainerMappingInputProperties class. + /// + public RemoveProtectionContainerMappingInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RemoveProtectionContainerMappingInputProperties class. + /// + /// Provider specific input for + /// unpairing. + public RemoveProtectionContainerMappingInputProperties(ReplicationProviderContainerUnmappingInput providerSpecificInput = default(ReplicationProviderContainerUnmappingInput)) + { + ProviderSpecificInput = providerSpecificInput; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets provider specific input for unpairing. + /// + [JsonProperty(PropertyName = "providerSpecificInput")] + public ReplicationProviderContainerUnmappingInput ProviderSpecificInput { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RenewCertificateInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RenewCertificateInput.cs new file mode 100644 index 000000000000..3fbddcedca64 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RenewCertificateInput.cs @@ -0,0 +1,54 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Certificate renewal input. + /// + public partial class RenewCertificateInput + { + /// + /// Initializes a new instance of the RenewCertificateInput class. + /// + public RenewCertificateInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RenewCertificateInput class. + /// + /// Renew certificate input + /// properties. + public RenewCertificateInput(RenewCertificateInputProperties properties = default(RenewCertificateInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets renew certificate input properties. + /// + [JsonProperty(PropertyName = "properties")] + public RenewCertificateInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RenewCertificateInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RenewCertificateInputProperties.cs new file mode 100644 index 000000000000..8cd4cdb8867f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RenewCertificateInputProperties.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Renew Certificate input properties. + /// + public partial class RenewCertificateInputProperties + { + /// + /// Initializes a new instance of the RenewCertificateInputProperties + /// class. + /// + public RenewCertificateInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RenewCertificateInputProperties + /// class. + /// + /// Renew certificate type. + public RenewCertificateInputProperties(string renewCertificateType = default(string)) + { + RenewCertificateType = renewCertificateType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets renew certificate type. + /// + [JsonProperty(PropertyName = "renewCertificateType")] + public string RenewCertificateType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationGroupDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationGroupDetails.cs new file mode 100644 index 000000000000..7f7374245f59 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationGroupDetails.cs @@ -0,0 +1,37 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Replication group details. This will be used in case of San and Wvr. + /// + public partial class ReplicationGroupDetails : ConfigurationSettings + { + /// + /// Initializes a new instance of the ReplicationGroupDetails class. + /// + public ReplicationGroupDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItem.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItem.cs new file mode 100644 index 000000000000..6e04fc160a29 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItem.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Replication protected item. + /// + public partial class ReplicationProtectedItem : Resource + { + /// + /// Initializes a new instance of the ReplicationProtectedItem class. + /// + public ReplicationProtectedItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ReplicationProtectedItem class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// The custom data. + public ReplicationProtectedItem(string id = default(string), string name = default(string), string type = default(string), string location = default(string), ReplicationProtectedItemProperties properties = default(ReplicationProtectedItemProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the custom data. + /// + [JsonProperty(PropertyName = "properties")] + public ReplicationProtectedItemProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItemOperation.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItemOperation.cs new file mode 100644 index 000000000000..859b9a5a8696 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItemOperation.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ReplicationProtectedItemOperation. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ReplicationProtectedItemOperation + { + [EnumMember(Value = "ReverseReplicate")] + ReverseReplicate, + [EnumMember(Value = "Commit")] + Commit, + [EnumMember(Value = "PlannedFailover")] + PlannedFailover, + [EnumMember(Value = "UnplannedFailover")] + UnplannedFailover, + [EnumMember(Value = "DisableProtection")] + DisableProtection, + [EnumMember(Value = "TestFailover")] + TestFailover, + [EnumMember(Value = "TestFailoverCleanup")] + TestFailoverCleanup, + [EnumMember(Value = "Failback")] + Failback, + [EnumMember(Value = "FinalizeFailback")] + FinalizeFailback, + [EnumMember(Value = "ChangePit")] + ChangePit, + [EnumMember(Value = "RepairReplication")] + RepairReplication, + [EnumMember(Value = "SwitchProtection")] + SwitchProtection, + [EnumMember(Value = "CompleteMigration")] + CompleteMigration + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItemProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItemProperties.cs new file mode 100644 index 000000000000..b505b96cfc55 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProtectedItemProperties.cs @@ -0,0 +1,280 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Replication protected item custom data details. + /// + public partial class ReplicationProtectedItemProperties + { + /// + /// Initializes a new instance of the + /// ReplicationProtectedItemProperties class. + /// + public ReplicationProtectedItemProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ReplicationProtectedItemProperties class. + /// + /// The name. + /// The type of protected item + /// type. + /// The protected item ARM Id. + /// The recovery provider ARM + /// Id. + /// The friendly name of the + /// primary fabric. + /// The friendly name of + /// recovery fabric. + /// The Arm Id of recovery + /// fabric. + /// The name of + /// primary protection container friendly name. + /// The name of + /// recovery container friendly name. + /// The protection status. + /// The protection state + /// description. + /// The Current active location of the + /// PE. + /// The Test failover state. + /// The Test failover state + /// description. + /// The allowed operations on the + /// Replication protected item. + /// The consolidated protection health + /// for the VM taking any issues with SRS + /// as well as all the replication units associated with the VM's + /// replication group into + /// account. This is a string representation of the ProtectionHealth + /// enumeration. + /// List of replication health + /// errors. + /// The ID of Policy governing this PE. + /// The name of Policy governing this + /// PE. + /// The Last successful + /// failover time. + /// The Last successful + /// test failover time. + /// The current scenario. + /// The recovery point ARM Id to + /// which the Vm was failed over. + /// The Replication provider + /// custom settings. + /// The recovery container + /// Id. + public ReplicationProtectedItemProperties(string friendlyName = default(string), string protectedItemType = default(string), string protectableItemId = default(string), string recoveryServicesProviderId = default(string), string primaryFabricFriendlyName = default(string), string recoveryFabricFriendlyName = default(string), string recoveryFabricId = default(string), string primaryProtectionContainerFriendlyName = default(string), string recoveryProtectionContainerFriendlyName = default(string), string protectionState = default(string), string protectionStateDescription = default(string), string activeLocation = default(string), string testFailoverState = default(string), string testFailoverStateDescription = default(string), IList allowedOperations = default(IList), string replicationHealth = default(string), IList replicationHealthErrors = default(IList), string policyId = default(string), string policyFriendlyName = default(string), System.DateTime? lastSuccessfulFailoverTime = default(System.DateTime?), System.DateTime? lastSuccessfulTestFailoverTime = default(System.DateTime?), CurrentScenarioDetails currentScenario = default(CurrentScenarioDetails), string failoverRecoveryPointId = default(string), ReplicationProviderSpecificSettings providerSpecificDetails = default(ReplicationProviderSpecificSettings), string recoveryContainerId = default(string)) + { + FriendlyName = friendlyName; + ProtectedItemType = protectedItemType; + ProtectableItemId = protectableItemId; + RecoveryServicesProviderId = recoveryServicesProviderId; + PrimaryFabricFriendlyName = primaryFabricFriendlyName; + RecoveryFabricFriendlyName = recoveryFabricFriendlyName; + RecoveryFabricId = recoveryFabricId; + PrimaryProtectionContainerFriendlyName = primaryProtectionContainerFriendlyName; + RecoveryProtectionContainerFriendlyName = recoveryProtectionContainerFriendlyName; + ProtectionState = protectionState; + ProtectionStateDescription = protectionStateDescription; + ActiveLocation = activeLocation; + TestFailoverState = testFailoverState; + TestFailoverStateDescription = testFailoverStateDescription; + AllowedOperations = allowedOperations; + ReplicationHealth = replicationHealth; + ReplicationHealthErrors = replicationHealthErrors; + PolicyId = policyId; + PolicyFriendlyName = policyFriendlyName; + LastSuccessfulFailoverTime = lastSuccessfulFailoverTime; + LastSuccessfulTestFailoverTime = lastSuccessfulTestFailoverTime; + CurrentScenario = currentScenario; + FailoverRecoveryPointId = failoverRecoveryPointId; + ProviderSpecificDetails = providerSpecificDetails; + RecoveryContainerId = recoveryContainerId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the type of protected item type. + /// + [JsonProperty(PropertyName = "protectedItemType")] + public string ProtectedItemType { get; set; } + + /// + /// Gets or sets the protected item ARM Id. + /// + [JsonProperty(PropertyName = "protectableItemId")] + public string ProtectableItemId { get; set; } + + /// + /// Gets or sets the recovery provider ARM Id. + /// + [JsonProperty(PropertyName = "recoveryServicesProviderId")] + public string RecoveryServicesProviderId { get; set; } + + /// + /// Gets or sets the friendly name of the primary fabric. + /// + [JsonProperty(PropertyName = "primaryFabricFriendlyName")] + public string PrimaryFabricFriendlyName { get; set; } + + /// + /// Gets or sets the friendly name of recovery fabric. + /// + [JsonProperty(PropertyName = "recoveryFabricFriendlyName")] + public string RecoveryFabricFriendlyName { get; set; } + + /// + /// Gets or sets the Arm Id of recovery fabric. + /// + [JsonProperty(PropertyName = "recoveryFabricId")] + public string RecoveryFabricId { get; set; } + + /// + /// Gets or sets the name of primary protection container friendly + /// name. + /// + [JsonProperty(PropertyName = "primaryProtectionContainerFriendlyName")] + public string PrimaryProtectionContainerFriendlyName { get; set; } + + /// + /// Gets or sets the name of recovery container friendly name. + /// + [JsonProperty(PropertyName = "recoveryProtectionContainerFriendlyName")] + public string RecoveryProtectionContainerFriendlyName { get; set; } + + /// + /// Gets or sets the protection status. + /// + [JsonProperty(PropertyName = "protectionState")] + public string ProtectionState { get; set; } + + /// + /// Gets or sets the protection state description. + /// + [JsonProperty(PropertyName = "protectionStateDescription")] + public string ProtectionStateDescription { get; set; } + + /// + /// Gets or sets the Current active location of the PE. + /// + [JsonProperty(PropertyName = "activeLocation")] + public string ActiveLocation { get; set; } + + /// + /// Gets or sets the Test failover state. + /// + [JsonProperty(PropertyName = "testFailoverState")] + public string TestFailoverState { get; set; } + + /// + /// Gets or sets the Test failover state description. + /// + [JsonProperty(PropertyName = "testFailoverStateDescription")] + public string TestFailoverStateDescription { get; set; } + + /// + /// Gets or sets the allowed operations on the Replication protected + /// item. + /// + [JsonProperty(PropertyName = "allowedOperations")] + public IList AllowedOperations { get; set; } + + /// + /// Gets or sets the consolidated protection health for the VM taking + /// any issues with SRS + /// as well as all the replication units associated with the VM's + /// replication group into + /// account. This is a string representation of the ProtectionHealth + /// enumeration. + /// + [JsonProperty(PropertyName = "replicationHealth")] + public string ReplicationHealth { get; set; } + + /// + /// Gets or sets list of replication health errors. + /// + [JsonProperty(PropertyName = "replicationHealthErrors")] + public IList ReplicationHealthErrors { get; set; } + + /// + /// Gets or sets the ID of Policy governing this PE. + /// + [JsonProperty(PropertyName = "policyId")] + public string PolicyId { get; set; } + + /// + /// Gets or sets the name of Policy governing this PE. + /// + [JsonProperty(PropertyName = "policyFriendlyName")] + public string PolicyFriendlyName { get; set; } + + /// + /// Gets or sets the Last successful failover time. + /// + [JsonProperty(PropertyName = "lastSuccessfulFailoverTime")] + public System.DateTime? LastSuccessfulFailoverTime { get; set; } + + /// + /// Gets or sets the Last successful test failover time. + /// + [JsonProperty(PropertyName = "lastSuccessfulTestFailoverTime")] + public System.DateTime? LastSuccessfulTestFailoverTime { get; set; } + + /// + /// Gets or sets the current scenario. + /// + [JsonProperty(PropertyName = "currentScenario")] + public CurrentScenarioDetails CurrentScenario { get; set; } + + /// + /// Gets or sets the recovery point ARM Id to which the Vm was failed + /// over. + /// + [JsonProperty(PropertyName = "failoverRecoveryPointId")] + public string FailoverRecoveryPointId { get; set; } + + /// + /// Gets or sets the Replication provider custom settings. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public ReplicationProviderSpecificSettings ProviderSpecificDetails { get; set; } + + /// + /// Gets or sets the recovery container Id. + /// + [JsonProperty(PropertyName = "recoveryContainerId")] + public string RecoveryContainerId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderContainerUnmappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderContainerUnmappingInput.cs new file mode 100644 index 000000000000..781179070791 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderContainerUnmappingInput.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Provider specific input for unpairing operations. + /// + public partial class ReplicationProviderContainerUnmappingInput + { + /// + /// Initializes a new instance of the + /// ReplicationProviderContainerUnmappingInput class. + /// + public ReplicationProviderContainerUnmappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ReplicationProviderContainerUnmappingInput class. + /// + /// The class type. + public ReplicationProviderContainerUnmappingInput(string instanceType = default(string)) + { + InstanceType = instanceType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the class type. + /// + [JsonProperty(PropertyName = "instanceType")] + public string InstanceType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificContainerCreationInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificContainerCreationInput.cs new file mode 100644 index 000000000000..f49d57f94664 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificContainerCreationInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Provider specific input for container creation operation. + /// + public partial class ReplicationProviderSpecificContainerCreationInput + { + /// + /// Initializes a new instance of the + /// ReplicationProviderSpecificContainerCreationInput class. + /// + public ReplicationProviderSpecificContainerCreationInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificContainerMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificContainerMappingInput.cs new file mode 100644 index 000000000000..d2a3ff33b5c7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificContainerMappingInput.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Provider specific input for pairing operations. + /// + public partial class ReplicationProviderSpecificContainerMappingInput + { + /// + /// Initializes a new instance of the + /// ReplicationProviderSpecificContainerMappingInput class. + /// + public ReplicationProviderSpecificContainerMappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ReplicationProviderSpecificContainerMappingInput class. + /// + /// The class type. + public ReplicationProviderSpecificContainerMappingInput(string instanceType = default(string)) + { + InstanceType = instanceType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the class type. + /// + [JsonProperty(PropertyName = "instanceType")] + public string InstanceType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificSettings.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificSettings.cs new file mode 100644 index 000000000000..612f654eb0f6 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReplicationProviderSpecificSettings.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Replication provider specific settings. + /// + public partial class ReplicationProviderSpecificSettings + { + /// + /// Initializes a new instance of the + /// ReplicationProviderSpecificSettings class. + /// + public ReplicationProviderSpecificSettings() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Resource.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Resource.cs new file mode 100644 index 000000000000..565bf6d54b30 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Resource.cs @@ -0,0 +1,79 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure resource. + /// + public partial class Resource : IResource + { + /// + /// Initializes a new instance of the Resource class. + /// + public Resource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Resource class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string)) + { + Id = id; + Name = name; + Type = type; + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource Id + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets resource Name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource Type + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets resource Location + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ResumeJobParams.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ResumeJobParams.cs new file mode 100644 index 000000000000..2024677df390 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ResumeJobParams.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resume job params. + /// + public partial class ResumeJobParams + { + /// + /// Initializes a new instance of the ResumeJobParams class. + /// + public ResumeJobParams() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResumeJobParams class. + /// + /// Resume job properties. + public ResumeJobParams(ResumeJobParamsProperties properties = default(ResumeJobParamsProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resume job properties. + /// + [JsonProperty(PropertyName = "properties")] + public ResumeJobParamsProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ResumeJobParamsProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ResumeJobParamsProperties.cs new file mode 100644 index 000000000000..dc720453115f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ResumeJobParamsProperties.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resume job properties. + /// + public partial class ResumeJobParamsProperties + { + /// + /// Initializes a new instance of the ResumeJobParamsProperties class. + /// + public ResumeJobParamsProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResumeJobParamsProperties class. + /// + /// Resume job comments. + public ResumeJobParamsProperties(string comments = default(string)) + { + Comments = comments; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resume job comments. + /// + [JsonProperty(PropertyName = "comments")] + public string Comments { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RetentionVolume.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RetentionVolume.cs new file mode 100644 index 000000000000..0d51115bd451 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RetentionVolume.cs @@ -0,0 +1,78 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The retention details of the MT. + /// + public partial class RetentionVolume + { + /// + /// Initializes a new instance of the RetentionVolume class. + /// + public RetentionVolume() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RetentionVolume class. + /// + /// The volume name. + /// The volume capacity. + /// The free space available in this + /// volume. + /// The threshold percentage. + public RetentionVolume(string volumeName = default(string), long? capacityInBytes = default(long?), long? freeSpaceInBytes = default(long?), int? thresholdPercentage = default(int?)) + { + VolumeName = volumeName; + CapacityInBytes = capacityInBytes; + FreeSpaceInBytes = freeSpaceInBytes; + ThresholdPercentage = thresholdPercentage; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the volume name. + /// + [JsonProperty(PropertyName = "volumeName")] + public string VolumeName { get; set; } + + /// + /// Gets or sets the volume capacity. + /// + [JsonProperty(PropertyName = "capacityInBytes")] + public long? CapacityInBytes { get; set; } + + /// + /// Gets or sets the free space available in this volume. + /// + [JsonProperty(PropertyName = "freeSpaceInBytes")] + public long? FreeSpaceInBytes { get; set; } + + /// + /// Gets or sets the threshold percentage. + /// + [JsonProperty(PropertyName = "thresholdPercentage")] + public int? ThresholdPercentage { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationInput.cs new file mode 100644 index 000000000000..50e0e346afdd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Reverse replication input. + /// + public partial class ReverseReplicationInput + { + /// + /// Initializes a new instance of the ReverseReplicationInput class. + /// + public ReverseReplicationInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ReverseReplicationInput class. + /// + /// Reverse replication properties + public ReverseReplicationInput(ReverseReplicationInputProperties properties = default(ReverseReplicationInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reverse replication properties + /// + [JsonProperty(PropertyName = "properties")] + public ReverseReplicationInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationInputProperties.cs new file mode 100644 index 000000000000..01f016bb63fb --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationInputProperties.cs @@ -0,0 +1,64 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Reverse replication input properties. + /// + public partial class ReverseReplicationInputProperties + { + /// + /// Initializes a new instance of the ReverseReplicationInputProperties + /// class. + /// + public ReverseReplicationInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ReverseReplicationInputProperties + /// class. + /// + /// Failover direction. + /// Provider specific reverse + /// replication input. + public ReverseReplicationInputProperties(string failoverDirection = default(string), ReverseReplicationProviderSpecificInput providerSpecificDetails = default(ReverseReplicationProviderSpecificInput)) + { + FailoverDirection = failoverDirection; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets failover direction. + /// + [JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection { get; set; } + + /// + /// Gets or sets provider specific reverse replication input. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public ReverseReplicationProviderSpecificInput ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationProviderSpecificInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationProviderSpecificInput.cs new file mode 100644 index 000000000000..b11786912278 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ReverseReplicationProviderSpecificInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Provider specific reverse replication input. + /// + public partial class ReverseReplicationProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// ReverseReplicationProviderSpecificInput class. + /// + public ReverseReplicationProviderSpecificInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RoleAssignment.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RoleAssignment.cs new file mode 100644 index 000000000000..2e25a15a9cb3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RoleAssignment.cs @@ -0,0 +1,85 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure role assignment details. + /// + public partial class RoleAssignment + { + /// + /// Initializes a new instance of the RoleAssignment class. + /// + public RoleAssignment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RoleAssignment class. + /// + /// The ARM Id of the role assignment. + /// The name of the role assignment. + /// Role assignment scope. + /// Principal Id. + /// Role definition id. + public RoleAssignment(string id = default(string), string name = default(string), string scope = default(string), string principalId = default(string), string roleDefinitionId = default(string)) + { + Id = id; + Name = name; + Scope = scope; + PrincipalId = principalId; + RoleDefinitionId = roleDefinitionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ARM Id of the role assignment. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the name of the role assignment. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets role assignment scope. + /// + [JsonProperty(PropertyName = "scope")] + public string Scope { get; set; } + + /// + /// Gets or sets principal Id. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; set; } + + /// + /// Gets or sets role definition id. + /// + [JsonProperty(PropertyName = "roleDefinitionId")] + public string RoleDefinitionId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RpInMageRecoveryPointType.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RpInMageRecoveryPointType.cs new file mode 100644 index 000000000000..ae577e65547b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RpInMageRecoveryPointType.cs @@ -0,0 +1,33 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for RpInMageRecoveryPointType. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RpInMageRecoveryPointType + { + [EnumMember(Value = "LatestTime")] + LatestTime, + [EnumMember(Value = "LatestTag")] + LatestTag, + [EnumMember(Value = "Custom")] + Custom + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RunAsAccount.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RunAsAccount.cs new file mode 100644 index 000000000000..935499ee8fff --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/RunAsAccount.cs @@ -0,0 +1,61 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// CS Accounts Details. + /// + public partial class RunAsAccount + { + /// + /// Initializes a new instance of the RunAsAccount class. + /// + public RunAsAccount() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RunAsAccount class. + /// + /// The CS RunAs account Id. + /// The CS RunAs account name. + public RunAsAccount(string accountId = default(string), string accountName = default(string)) + { + AccountId = accountId; + AccountName = accountName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the CS RunAs account Id. + /// + [JsonProperty(PropertyName = "accountId")] + public string AccountId { get; set; } + + /// + /// Gets or sets the CS RunAs account name. + /// + [JsonProperty(PropertyName = "accountName")] + public string AccountName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SanEnableProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SanEnableProtectionInput.cs new file mode 100644 index 000000000000..578880811307 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SanEnableProtectionInput.cs @@ -0,0 +1,39 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// San enable protection provider specific input. + /// + [Newtonsoft.Json.JsonObject("San")] + public partial class SanEnableProtectionInput : EnableProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the SanEnableProtectionInput class. + /// + public SanEnableProtectionInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ScriptActionTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ScriptActionTaskDetails.cs new file mode 100644 index 000000000000..bff2e2eaf6c0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ScriptActionTaskDetails.cs @@ -0,0 +1,79 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class represents the script action task details. + /// + public partial class ScriptActionTaskDetails : TaskTypeDetails + { + /// + /// Initializes a new instance of the ScriptActionTaskDetails class. + /// + public ScriptActionTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScriptActionTaskDetails class. + /// + /// The name. + /// The path. + /// The output. + /// A value indicating whether it is + /// a primary side script or not. + public ScriptActionTaskDetails(string name = default(string), string path = default(string), string output = default(string), bool? isPrimarySideScript = default(bool?)) + { + Name = name; + Path = path; + Output = output; + IsPrimarySideScript = isPrimarySideScript; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the path. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets the output. + /// + [JsonProperty(PropertyName = "output")] + public string Output { get; set; } + + /// + /// Gets or sets a value indicating whether it is a primary side script + /// or not. + /// + [JsonProperty(PropertyName = "isPrimarySideScript")] + public bool? IsPrimarySideScript { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ServiceError.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ServiceError.cs new file mode 100644 index 000000000000..198e404b57c0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ServiceError.cs @@ -0,0 +1,86 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ASR error model + /// + public partial class ServiceError + { + /// + /// Initializes a new instance of the ServiceError class. + /// + public ServiceError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceError class. + /// + /// Error code. + /// Error message. + /// Possible causes of error. + /// Recommended action to resolve + /// error. + /// Activity Id. + public ServiceError(string code = default(string), string message = default(string), string possibleCauses = default(string), string recommendedAction = default(string), string activityId = default(string)) + { + Code = code; + Message = message; + PossibleCauses = possibleCauses; + RecommendedAction = recommendedAction; + ActivityId = activityId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets or sets error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets possible causes of error. + /// + [JsonProperty(PropertyName = "possibleCauses")] + public string PossibleCauses { get; set; } + + /// + /// Gets or sets recommended action to resolve error. + /// + [JsonProperty(PropertyName = "recommendedAction")] + public string RecommendedAction { get; set; } + + /// + /// Gets or sets activity Id. + /// + [JsonProperty(PropertyName = "activityId")] + public string ActivityId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SetMultiVmSyncStatus.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SetMultiVmSyncStatus.cs new file mode 100644 index 000000000000..5f0ec1d7284b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SetMultiVmSyncStatus.cs @@ -0,0 +1,31 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SetMultiVmSyncStatus. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SetMultiVmSyncStatus + { + [EnumMember(Value = "Enable")] + Enable, + [EnumMember(Value = "Disable")] + Disable + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SourceSiteOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SourceSiteOperations.cs new file mode 100644 index 000000000000..bcad5767e054 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SourceSiteOperations.cs @@ -0,0 +1,31 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SourceSiteOperations. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SourceSiteOperations + { + [EnumMember(Value = "Required")] + Required, + [EnumMember(Value = "NotRequired")] + NotRequired + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassification.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassification.cs new file mode 100644 index 000000000000..82ea8abfc5f2 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassification.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Storage object definition. + /// + public partial class StorageClassification : Resource + { + /// + /// Initializes a new instance of the StorageClassification class. + /// + public StorageClassification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StorageClassification class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// Proprties of the storage object. + public StorageClassification(string id = default(string), string name = default(string), string type = default(string), string location = default(string), StorageClassificationProperties properties = default(StorageClassificationProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets proprties of the storage object. + /// + [JsonProperty(PropertyName = "properties")] + public StorageClassificationProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMapping.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMapping.cs new file mode 100644 index 000000000000..40e463499df8 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMapping.cs @@ -0,0 +1,61 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Storage mapping object. + /// + public partial class StorageClassificationMapping : Resource + { + /// + /// Initializes a new instance of the StorageClassificationMapping + /// class. + /// + public StorageClassificationMapping() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StorageClassificationMapping + /// class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// Proprties of the storage mappping + /// object. + public StorageClassificationMapping(string id = default(string), string name = default(string), string type = default(string), string location = default(string), StorageClassificationMappingProperties properties = default(StorageClassificationMappingProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets proprties of the storage mappping object. + /// + [JsonProperty(PropertyName = "properties")] + public StorageClassificationMappingProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMappingInput.cs new file mode 100644 index 000000000000..400ceb18b49f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMappingInput.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Storage mapping input. + /// + public partial class StorageClassificationMappingInput + { + /// + /// Initializes a new instance of the StorageClassificationMappingInput + /// class. + /// + public StorageClassificationMappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StorageClassificationMappingInput + /// class. + /// + /// Storage mapping input properties. + public StorageClassificationMappingInput(StorageMappingInputProperties properties = default(StorageMappingInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets storage mapping input properties. + /// + [JsonProperty(PropertyName = "properties")] + public StorageMappingInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMappingProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMappingProperties.cs new file mode 100644 index 000000000000..711c1c9efdfb --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationMappingProperties.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Storage mapping properties. + /// + public partial class StorageClassificationMappingProperties + { + /// + /// Initializes a new instance of the + /// StorageClassificationMappingProperties class. + /// + public StorageClassificationMappingProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// StorageClassificationMappingProperties class. + /// + /// Target storage object + /// Id. + public StorageClassificationMappingProperties(string targetStorageClassificationId = default(string)) + { + TargetStorageClassificationId = targetStorageClassificationId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets target storage object Id. + /// + [JsonProperty(PropertyName = "targetStorageClassificationId")] + public string TargetStorageClassificationId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationProperties.cs new file mode 100644 index 000000000000..d5357cd38c02 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageClassificationProperties.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Storage object properties. + /// + public partial class StorageClassificationProperties + { + /// + /// Initializes a new instance of the StorageClassificationProperties + /// class. + /// + public StorageClassificationProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StorageClassificationProperties + /// class. + /// + /// Friendly name of the Storage + /// classification. + public StorageClassificationProperties(string friendlyName = default(string)) + { + FriendlyName = friendlyName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets friendly name of the Storage classification. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageMappingInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageMappingInputProperties.cs new file mode 100644 index 000000000000..86556b43aaab --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/StorageMappingInputProperties.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Storage mapping input properties. + /// + public partial class StorageMappingInputProperties + { + /// + /// Initializes a new instance of the StorageMappingInputProperties + /// class. + /// + public StorageMappingInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StorageMappingInputProperties + /// class. + /// + /// The ID of the storage + /// object. + public StorageMappingInputProperties(string targetStorageClassificationId = default(string)) + { + TargetStorageClassificationId = targetStorageClassificationId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of the storage object. + /// + [JsonProperty(PropertyName = "targetStorageClassificationId")] + public string TargetStorageClassificationId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Subnet.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Subnet.cs new file mode 100644 index 000000000000..58173ce92bfe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/Subnet.cs @@ -0,0 +1,72 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Subnets of the network. + /// + public partial class Subnet + { + /// + /// Initializes a new instance of the Subnet class. + /// + public Subnet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Subnet class. + /// + /// The subnet name. + /// The subnet friendly name. + /// The list of addresses for the + /// subnet. + public Subnet(string name = default(string), string friendlyName = default(string), IList addressList = default(IList)) + { + Name = name; + FriendlyName = friendlyName; + AddressList = addressList; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the subnet name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the subnet friendly name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the list of addresses for the subnet. + /// + [JsonProperty(PropertyName = "addressList")] + public IList AddressList { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionInput.cs new file mode 100644 index 000000000000..8e2d7e621b61 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Switch protection input. + /// + public partial class SwitchProtectionInput + { + /// + /// Initializes a new instance of the SwitchProtectionInput class. + /// + public SwitchProtectionInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SwitchProtectionInput class. + /// + /// Switch protection properties + public SwitchProtectionInput(SwitchProtectionInputProperties properties = default(SwitchProtectionInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets switch protection properties + /// + [JsonProperty(PropertyName = "properties")] + public SwitchProtectionInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionInputProperties.cs new file mode 100644 index 000000000000..d8dbeb98c087 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionInputProperties.cs @@ -0,0 +1,65 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Switch protection input properties. + /// + public partial class SwitchProtectionInputProperties + { + /// + /// Initializes a new instance of the SwitchProtectionInputProperties + /// class. + /// + public SwitchProtectionInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SwitchProtectionInputProperties + /// class. + /// + /// The unique replication + /// protected item name. + /// Provider specific switch + /// protection input. + public SwitchProtectionInputProperties(string replicationProtectedItemName = default(string), SwitchProtectionProviderSpecificInput providerSpecificDetails = default(SwitchProtectionProviderSpecificInput)) + { + ReplicationProtectedItemName = replicationProtectedItemName; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the unique replication protected item name. + /// + [JsonProperty(PropertyName = "replicationProtectedItemName")] + public string ReplicationProtectedItemName { get; set; } + + /// + /// Gets or sets provider specific switch protection input. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public SwitchProtectionProviderSpecificInput ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionJobDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionJobDetails.cs new file mode 100644 index 000000000000..df093d16af4b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionJobDetails.cs @@ -0,0 +1,61 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class represents details for switch protection job. + /// + public partial class SwitchProtectionJobDetails : JobDetails + { + /// + /// Initializes a new instance of the SwitchProtectionJobDetails class. + /// + public SwitchProtectionJobDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SwitchProtectionJobDetails class. + /// + /// The affected object properties + /// like source server, source cloud, target + /// server, target cloud etc. based on the workflow object + /// details. + /// ARM Id of the new + /// replication protected item. + public SwitchProtectionJobDetails(IDictionary affectedObjectDetails = default(IDictionary), string newReplicationProtectedItemId = default(string)) + : base(affectedObjectDetails) + { + NewReplicationProtectedItemId = newReplicationProtectedItemId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ARM Id of the new replication protected item. + /// + [JsonProperty(PropertyName = "newReplicationProtectedItemId")] + public string NewReplicationProtectedItemId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionProviderSpecificInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionProviderSpecificInput.cs new file mode 100644 index 000000000000..e3b7d47c4115 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/SwitchProtectionProviderSpecificInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Provider specific switch protection input. + /// + public partial class SwitchProtectionProviderSpecificInput + { + /// + /// Initializes a new instance of the + /// SwitchProtectionProviderSpecificInput class. + /// + public SwitchProtectionProviderSpecificInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TaskTypeDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TaskTypeDetails.cs new file mode 100644 index 000000000000..53d429a7669e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TaskTypeDetails.cs @@ -0,0 +1,37 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Task details based on specific task type. + /// + public partial class TaskTypeDetails + { + /// + /// Initializes a new instance of the TaskTypeDetails class. + /// + public TaskTypeDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverCleanupInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverCleanupInput.cs new file mode 100644 index 000000000000..ba410049aafb --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverCleanupInput.cs @@ -0,0 +1,68 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input definition for test failover cleanup. + /// + public partial class TestFailoverCleanupInput + { + /// + /// Initializes a new instance of the TestFailoverCleanupInput class. + /// + public TestFailoverCleanupInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TestFailoverCleanupInput class. + /// + /// Test failover cleanup input + /// properties. + public TestFailoverCleanupInput(TestFailoverCleanupInputProperties properties) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets test failover cleanup input properties. + /// + [JsonProperty(PropertyName = "properties")] + public TestFailoverCleanupInputProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverCleanupInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverCleanupInputProperties.cs new file mode 100644 index 000000000000..5834ee9db54e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverCleanupInputProperties.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input definition for test failover cleanup input properties. + /// + public partial class TestFailoverCleanupInputProperties + { + /// + /// Initializes a new instance of the + /// TestFailoverCleanupInputProperties class. + /// + public TestFailoverCleanupInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// TestFailoverCleanupInputProperties class. + /// + /// Test failover cleanup comments. + public TestFailoverCleanupInputProperties(string comments = default(string)) + { + Comments = comments; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets test failover cleanup comments. + /// + [JsonProperty(PropertyName = "comments")] + public string Comments { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverInput.cs new file mode 100644 index 000000000000..552faf9e9e41 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input definition for planned failover. + /// + public partial class TestFailoverInput + { + /// + /// Initializes a new instance of the TestFailoverInput class. + /// + public TestFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TestFailoverInput class. + /// + /// Planned failover input properties + public TestFailoverInput(TestFailoverInputProperties properties = default(TestFailoverInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets planned failover input properties + /// + [JsonProperty(PropertyName = "properties")] + public TestFailoverInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverInputProperties.cs new file mode 100644 index 000000000000..280de7cb0e14 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverInputProperties.cs @@ -0,0 +1,92 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input definition for planned failover input properties. + /// + public partial class TestFailoverInputProperties + { + /// + /// Initializes a new instance of the TestFailoverInputProperties + /// class. + /// + public TestFailoverInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TestFailoverInputProperties + /// class. + /// + /// Failover direction. + /// Network type to be used for test + /// failover. + /// The id of the network to be used for test + /// failover + /// A value indicating whether + /// the test failover cleanup is to be skipped. + /// Provider specific + /// settings + public TestFailoverInputProperties(string failoverDirection = default(string), string networkType = default(string), string networkId = default(string), string skipTestFailoverCleanup = default(string), ProviderSpecificFailoverInput providerSpecificDetails = default(ProviderSpecificFailoverInput)) + { + FailoverDirection = failoverDirection; + NetworkType = networkType; + NetworkId = networkId; + SkipTestFailoverCleanup = skipTestFailoverCleanup; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets failover direction. + /// + [JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection { get; set; } + + /// + /// Gets or sets network type to be used for test failover. + /// + [JsonProperty(PropertyName = "networkType")] + public string NetworkType { get; set; } + + /// + /// Gets or sets the id of the network to be used for test failover + /// + [JsonProperty(PropertyName = "networkId")] + public string NetworkId { get; set; } + + /// + /// Gets or sets a value indicating whether the test failover cleanup + /// is to be skipped. + /// + [JsonProperty(PropertyName = "skipTestFailoverCleanup")] + public string SkipTestFailoverCleanup { get; set; } + + /// + /// Gets or sets provider specific settings + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public ProviderSpecificFailoverInput ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverJobDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverJobDetails.cs new file mode 100644 index 000000000000..a00119b7bc06 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverJobDetails.cs @@ -0,0 +1,103 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This class represents the details for a test failover job. + /// + public partial class TestFailoverJobDetails : JobDetails + { + /// + /// Initializes a new instance of the TestFailoverJobDetails class. + /// + public TestFailoverJobDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TestFailoverJobDetails class. + /// + /// The affected object properties + /// like source server, source cloud, target + /// server, target cloud etc. based on the workflow object + /// details. + /// The test failover status. + /// The test failover comments. + /// The test network name. + /// The test network friendly + /// name. + /// The test network type (see + /// TestFailoverInput enum for possible values). + /// The test VM details. + public TestFailoverJobDetails(IDictionary affectedObjectDetails = default(IDictionary), string testFailoverStatus = default(string), string comments = default(string), string networkName = default(string), string networkFriendlyName = default(string), string networkType = default(string), IList protectedItemDetails = default(IList)) + : base(affectedObjectDetails) + { + TestFailoverStatus = testFailoverStatus; + Comments = comments; + NetworkName = networkName; + NetworkFriendlyName = networkFriendlyName; + NetworkType = networkType; + ProtectedItemDetails = protectedItemDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the test failover status. + /// + [JsonProperty(PropertyName = "testFailoverStatus")] + public string TestFailoverStatus { get; set; } + + /// + /// Gets or sets the test failover comments. + /// + [JsonProperty(PropertyName = "comments")] + public string Comments { get; set; } + + /// + /// Gets or sets the test network name. + /// + [JsonProperty(PropertyName = "networkName")] + public string NetworkName { get; set; } + + /// + /// Gets or sets the test network friendly name. + /// + [JsonProperty(PropertyName = "networkFriendlyName")] + public string NetworkFriendlyName { get; set; } + + /// + /// Gets or sets the test network type (see TestFailoverInput enum for + /// possible values). + /// + [JsonProperty(PropertyName = "networkType")] + public string NetworkType { get; set; } + + /// + /// Gets or sets the test VM details. + /// + [JsonProperty(PropertyName = "protectedItemDetails")] + public IList ProtectedItemDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverReplicationProtectedItemDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverReplicationProtectedItemDetails.cs new file mode 100644 index 000000000000..e151603cdf46 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverReplicationProtectedItemDetails.cs @@ -0,0 +1,105 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Test failover details for a replication protected item. + /// + public partial class TestFailoverReplicationProtectedItemDetails + { + /// + /// Initializes a new instance of the + /// TestFailoverReplicationProtectedItemDetails class. + /// + public TestFailoverReplicationProtectedItemDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// TestFailoverReplicationProtectedItemDetails class. + /// + /// The name. + /// The friendly name. + /// The test Vm name. + /// The test Vm friendly name. + /// The network connection + /// status. + /// The network friendly + /// name. + /// The network subnet. + public TestFailoverReplicationProtectedItemDetails(string name = default(string), string friendlyName = default(string), string testVmName = default(string), string testVmFriendlyName = default(string), string networkConnectionStatus = default(string), string networkFriendlyName = default(string), string subnet = default(string)) + { + Name = name; + FriendlyName = friendlyName; + TestVmName = testVmName; + TestVmFriendlyName = testVmFriendlyName; + NetworkConnectionStatus = networkConnectionStatus; + NetworkFriendlyName = networkFriendlyName; + Subnet = subnet; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the friendly name. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the test Vm name. + /// + [JsonProperty(PropertyName = "testVmName")] + public string TestVmName { get; set; } + + /// + /// Gets or sets the test Vm friendly name. + /// + [JsonProperty(PropertyName = "testVmFriendlyName")] + public string TestVmFriendlyName { get; set; } + + /// + /// Gets or sets the network connection status. + /// + [JsonProperty(PropertyName = "networkConnectionStatus")] + public string NetworkConnectionStatus { get; set; } + + /// + /// Gets or sets the network friendly name. + /// + [JsonProperty(PropertyName = "networkFriendlyName")] + public string NetworkFriendlyName { get; set; } + + /// + /// Gets or sets the network subnet. + /// + [JsonProperty(PropertyName = "subnet")] + public string Subnet { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UnplannedFailoverInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UnplannedFailoverInput.cs new file mode 100644 index 000000000000..00d88a29e014 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UnplannedFailoverInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input definition for planned failover. + /// + public partial class UnplannedFailoverInput + { + /// + /// Initializes a new instance of the UnplannedFailoverInput class. + /// + public UnplannedFailoverInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UnplannedFailoverInput class. + /// + /// Planned failover input properties + public UnplannedFailoverInput(UnplannedFailoverInputProperties properties = default(UnplannedFailoverInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets planned failover input properties + /// + [JsonProperty(PropertyName = "properties")] + public UnplannedFailoverInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UnplannedFailoverInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UnplannedFailoverInputProperties.cs new file mode 100644 index 000000000000..abd8d5b4f0f9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UnplannedFailoverInputProperties.cs @@ -0,0 +1,73 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input definition for planned failover input properties. + /// + public partial class UnplannedFailoverInputProperties + { + /// + /// Initializes a new instance of the UnplannedFailoverInputProperties + /// class. + /// + public UnplannedFailoverInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UnplannedFailoverInputProperties + /// class. + /// + /// Failover direction. + /// Source site operations + /// status + /// Provider specific + /// settings + public UnplannedFailoverInputProperties(string failoverDirection = default(string), string sourceSiteOperations = default(string), ProviderSpecificFailoverInput providerSpecificDetails = default(ProviderSpecificFailoverInput)) + { + FailoverDirection = failoverDirection; + SourceSiteOperations = sourceSiteOperations; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets failover direction. + /// + [JsonProperty(PropertyName = "failoverDirection")] + public string FailoverDirection { get; set; } + + /// + /// Gets or sets source site operations status + /// + [JsonProperty(PropertyName = "sourceSiteOperations")] + public string SourceSiteOperations { get; set; } + + /// + /// Gets or sets provider specific settings + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public ProviderSpecificFailoverInput ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateMobilityServiceRequest.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateMobilityServiceRequest.cs new file mode 100644 index 000000000000..cc9e5aac899c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateMobilityServiceRequest.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request to update the mobility service on a protected item. + /// + public partial class UpdateMobilityServiceRequest + { + /// + /// Initializes a new instance of the UpdateMobilityServiceRequest + /// class. + /// + public UpdateMobilityServiceRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdateMobilityServiceRequest + /// class. + /// + /// The properties of the update mobility + /// service request. + public UpdateMobilityServiceRequest(UpdateMobilityServiceRequestProperties properties = default(UpdateMobilityServiceRequestProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the properties of the update mobility service request. + /// + [JsonProperty(PropertyName = "properties")] + public UpdateMobilityServiceRequestProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateMobilityServiceRequestProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateMobilityServiceRequestProperties.cs new file mode 100644 index 000000000000..328b1eb5de3c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateMobilityServiceRequestProperties.cs @@ -0,0 +1,55 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties of an update mobility service request. + /// + public partial class UpdateMobilityServiceRequestProperties + { + /// + /// Initializes a new instance of the + /// UpdateMobilityServiceRequestProperties class. + /// + public UpdateMobilityServiceRequestProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// UpdateMobilityServiceRequestProperties class. + /// + /// The CS run as account Id. + public UpdateMobilityServiceRequestProperties(string runAsAccountId = default(string)) + { + RunAsAccountId = runAsAccountId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the CS run as account Id. + /// + [JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateNetworkMappingInput.cs new file mode 100644 index 000000000000..e0ef0a4b4f0e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateNetworkMappingInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update network mapping input. + /// + public partial class UpdateNetworkMappingInput + { + /// + /// Initializes a new instance of the UpdateNetworkMappingInput class. + /// + public UpdateNetworkMappingInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdateNetworkMappingInput class. + /// + /// Properties. + public UpdateNetworkMappingInput(UpdateNetworkMappingInputProperties properties = default(UpdateNetworkMappingInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties. + /// + [JsonProperty(PropertyName = "properties")] + public UpdateNetworkMappingInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateNetworkMappingInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateNetworkMappingInputProperties.cs new file mode 100644 index 000000000000..c6bd0790b05c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateNetworkMappingInputProperties.cs @@ -0,0 +1,72 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Common input details for network mapping operation. + /// + public partial class UpdateNetworkMappingInputProperties + { + /// + /// Initializes a new instance of the + /// UpdateNetworkMappingInputProperties class. + /// + public UpdateNetworkMappingInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// UpdateNetworkMappingInputProperties class. + /// + /// Recovery fabric name. + /// Recovery network Id. + /// Fabrics specific input network + /// Id. + public UpdateNetworkMappingInputProperties(string recoveryFabricName = default(string), string recoveryNetworkId = default(string), FabricSpecificUpdateNetworkMappingInput fabricSpecificDetails = default(FabricSpecificUpdateNetworkMappingInput)) + { + RecoveryFabricName = recoveryFabricName; + RecoveryNetworkId = recoveryNetworkId; + FabricSpecificDetails = fabricSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets recovery fabric name. + /// + [JsonProperty(PropertyName = "recoveryFabricName")] + public string RecoveryFabricName { get; set; } + + /// + /// Gets or sets recovery network Id. + /// + [JsonProperty(PropertyName = "recoveryNetworkId")] + public string RecoveryNetworkId { get; set; } + + /// + /// Gets or sets fabrics specific input network Id. + /// + [JsonProperty(PropertyName = "fabricSpecificDetails")] + public FabricSpecificUpdateNetworkMappingInput FabricSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdatePolicyInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdatePolicyInput.cs new file mode 100644 index 000000000000..4b801ad70ba9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdatePolicyInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update protection profile input. + /// + public partial class UpdatePolicyInput + { + /// + /// Initializes a new instance of the UpdatePolicyInput class. + /// + public UpdatePolicyInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdatePolicyInput class. + /// + /// The ReplicationProviderSettings. + public UpdatePolicyInput(UpdatePolicyInputProperties properties = default(UpdatePolicyInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ReplicationProviderSettings. + /// + [JsonProperty(PropertyName = "properties")] + public UpdatePolicyInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdatePolicyInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdatePolicyInputProperties.cs new file mode 100644 index 000000000000..eadcb3cdb2fc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdatePolicyInputProperties.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Policy update properties. + /// + public partial class UpdatePolicyInputProperties + { + /// + /// Initializes a new instance of the UpdatePolicyInputProperties + /// class. + /// + public UpdatePolicyInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdatePolicyInputProperties + /// class. + /// + /// The + /// ReplicationProviderSettings. + public UpdatePolicyInputProperties(PolicyProviderSpecificInput replicationProviderSettings = default(PolicyProviderSpecificInput)) + { + ReplicationProviderSettings = replicationProviderSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ReplicationProviderSettings. + /// + [JsonProperty(PropertyName = "replicationProviderSettings")] + public PolicyProviderSpecificInput ReplicationProviderSettings { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateRecoveryPlanInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateRecoveryPlanInput.cs new file mode 100644 index 000000000000..9585a2f99ba4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateRecoveryPlanInput.cs @@ -0,0 +1,53 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update recovery plan input class. + /// + public partial class UpdateRecoveryPlanInput + { + /// + /// Initializes a new instance of the UpdateRecoveryPlanInput class. + /// + public UpdateRecoveryPlanInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdateRecoveryPlanInput class. + /// + /// Recovery plan update properties. + public UpdateRecoveryPlanInput(UpdateRecoveryPlanInputProperties properties = default(UpdateRecoveryPlanInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets recovery plan update properties. + /// + [JsonProperty(PropertyName = "properties")] + public UpdateRecoveryPlanInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateRecoveryPlanInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateRecoveryPlanInputProperties.cs new file mode 100644 index 000000000000..5ed7660ff489 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateRecoveryPlanInputProperties.cs @@ -0,0 +1,57 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Recovery plan updation properties. + /// + public partial class UpdateRecoveryPlanInputProperties + { + /// + /// Initializes a new instance of the UpdateRecoveryPlanInputProperties + /// class. + /// + public UpdateRecoveryPlanInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdateRecoveryPlanInputProperties + /// class. + /// + /// The recovery plan groups. + public UpdateRecoveryPlanInputProperties(IList groups = default(IList)) + { + Groups = groups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery plan groups. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemInput.cs new file mode 100644 index 000000000000..ad6ca2e2a6f9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemInput.cs @@ -0,0 +1,56 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update replication protected item input. + /// + public partial class UpdateReplicationProtectedItemInput + { + /// + /// Initializes a new instance of the + /// UpdateReplicationProtectedItemInput class. + /// + public UpdateReplicationProtectedItemInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// UpdateReplicationProtectedItemInput class. + /// + /// Update replication protected item + /// properties. + public UpdateReplicationProtectedItemInput(UpdateReplicationProtectedItemInputProperties properties = default(UpdateReplicationProtectedItemInputProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets update replication protected item properties. + /// + [JsonProperty(PropertyName = "properties")] + public UpdateReplicationProtectedItemInputProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemInputProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemInputProperties.cs new file mode 100644 index 000000000000..1787e247e258 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemInputProperties.cs @@ -0,0 +1,125 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Update protected item input properties. + /// + public partial class UpdateReplicationProtectedItemInputProperties + { + /// + /// Initializes a new instance of the + /// UpdateReplicationProtectedItemInputProperties class. + /// + public UpdateReplicationProtectedItemInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// UpdateReplicationProtectedItemInputProperties class. + /// + /// Target azure VM name given by the + /// user. + /// Target Azure Vm size. + /// Target Azure Network + /// Id. + /// The selected option to enable + /// RDP\SSH on target vm after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} + /// enum. + /// The list of vm nic details. + /// LicenseType. Possible values include: + /// 'NotSpecified', 'NoLicenseType', 'WindowsServer' + /// The target availability set + /// id. + /// The provider specific input + /// to update replication protected item. + public UpdateReplicationProtectedItemInputProperties(string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string selectedRecoveryAzureNetworkId = default(string), string enableRDPOnTargetOption = default(string), IList vmNics = default(IList), LicenseType? licenseType = default(LicenseType?), string recoveryAvailabilitySetId = default(string), UpdateReplicationProtectedItemProviderInput providerSpecificDetails = default(UpdateReplicationProtectedItemProviderInput)) + { + RecoveryAzureVMName = recoveryAzureVMName; + RecoveryAzureVMSize = recoveryAzureVMSize; + SelectedRecoveryAzureNetworkId = selectedRecoveryAzureNetworkId; + EnableRDPOnTargetOption = enableRDPOnTargetOption; + VmNics = vmNics; + LicenseType = licenseType; + RecoveryAvailabilitySetId = recoveryAvailabilitySetId; + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets target azure VM name given by the user. + /// + [JsonProperty(PropertyName = "recoveryAzureVMName")] + public string RecoveryAzureVMName { get; set; } + + /// + /// Gets or sets target Azure Vm size. + /// + [JsonProperty(PropertyName = "recoveryAzureVMSize")] + public string RecoveryAzureVMSize { get; set; } + + /// + /// Gets or sets target Azure Network Id. + /// + [JsonProperty(PropertyName = "selectedRecoveryAzureNetworkId")] + public string SelectedRecoveryAzureNetworkId { get; set; } + + /// + /// Gets or sets the selected option to enable RDP\SSH on target vm + /// after failover. + /// String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + /// + [JsonProperty(PropertyName = "enableRDPOnTargetOption")] + public string EnableRDPOnTargetOption { get; set; } + + /// + /// Gets or sets the list of vm nic details. + /// + [JsonProperty(PropertyName = "vmNics")] + public IList VmNics { get; set; } + + /// + /// Gets or sets licenseType. Possible values include: 'NotSpecified', + /// 'NoLicenseType', 'WindowsServer' + /// + [JsonProperty(PropertyName = "licenseType")] + public LicenseType? LicenseType { get; set; } + + /// + /// Gets or sets the target availability set id. + /// + [JsonProperty(PropertyName = "recoveryAvailabilitySetId")] + public string RecoveryAvailabilitySetId { get; set; } + + /// + /// Gets or sets the provider specific input to update replication + /// protected item. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public UpdateReplicationProtectedItemProviderInput ProviderSpecificDetails { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemProviderInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemProviderInput.cs new file mode 100644 index 000000000000..d63d0f10c3a9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateReplicationProtectedItemProviderInput.cs @@ -0,0 +1,38 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using System.Linq; + + /// + /// Update replication protected item provider specific input. + /// + public partial class UpdateReplicationProtectedItemProviderInput + { + /// + /// Initializes a new instance of the + /// UpdateReplicationProtectedItemProviderInput class. + /// + public UpdateReplicationProtectedItemProviderInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateVCenterRequest.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateVCenterRequest.cs new file mode 100644 index 000000000000..802aa1d9c55f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateVCenterRequest.cs @@ -0,0 +1,54 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Input required to update vCenter. + /// + public partial class UpdateVCenterRequest + { + /// + /// Initializes a new instance of the UpdateVCenterRequest class. + /// + public UpdateVCenterRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdateVCenterRequest class. + /// + /// The update VCenter Request + /// Properties. + public UpdateVCenterRequest(UpdateVCenterRequestProperties properties = default(UpdateVCenterRequestProperties)) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the update VCenter Request Properties. + /// + [JsonProperty(PropertyName = "properties")] + public UpdateVCenterRequestProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateVCenterRequestProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateVCenterRequestProperties.cs new file mode 100644 index 000000000000..3a9657d61ad5 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/UpdateVCenterRequestProperties.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The properties of an update vCenter request. + /// + public partial class UpdateVCenterRequestProperties + { + /// + /// Initializes a new instance of the UpdateVCenterRequestProperties + /// class. + /// + public UpdateVCenterRequestProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdateVCenterRequestProperties + /// class. + /// + /// The friendly name of the + /// vCenter. + /// The IP address of the vCenter to be + /// discovered. + /// The process server Id from where the + /// update can be orchestrated. + /// The port number for discovery. + /// The CS account Id which has priviliges + /// to update the vCenter. + public UpdateVCenterRequestProperties(string friendlyName = default(string), string ipAddress = default(string), string processServerId = default(string), string port = default(string), string runAsAccountId = default(string)) + { + FriendlyName = friendlyName; + IpAddress = ipAddress; + ProcessServerId = processServerId; + Port = port; + RunAsAccountId = runAsAccountId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the friendly name of the vCenter. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets the IP address of the vCenter to be discovered. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the process server Id from where the update can be + /// orchestrated. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the port number for discovery. + /// + [JsonProperty(PropertyName = "port")] + public string Port { get; set; } + + /// + /// Gets or sets the CS account Id which has priviliges to update the + /// vCenter. + /// + [JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VCenter.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VCenter.cs new file mode 100644 index 000000000000..340e5911cc04 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VCenter.cs @@ -0,0 +1,58 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// vCenter definition. + /// + public partial class VCenter : Resource + { + /// + /// Initializes a new instance of the VCenter class. + /// + public VCenter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VCenter class. + /// + /// Resource Id + /// Resource Name + /// Resource Type + /// Resource Location + /// VCenter related data. + public VCenter(string id = default(string), string name = default(string), string type = default(string), string location = default(string), VCenterProperties properties = default(VCenterProperties)) + : base(id, name, type, location) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets vCenter related data. + /// + [JsonProperty(PropertyName = "properties")] + public VCenterProperties Properties { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VCenterProperties.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VCenterProperties.cs new file mode 100644 index 000000000000..f1d1b84a6814 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VCenterProperties.cs @@ -0,0 +1,132 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// vCenter properties. + /// + public partial class VCenterProperties + { + /// + /// Initializes a new instance of the VCenterProperties class. + /// + public VCenterProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VCenterProperties class. + /// + /// Friendly name of the vCenter. + /// VCenter internal ID. + /// The time when the last heartbeat was + /// reveived by vCenter. + /// The VCenter discovery status. + /// The process server Id. + /// The IP address of the vCenter. + /// The infrastructure Id of + /// vCenter. + /// The port number for discovery. + /// The account Id which has privileges to + /// discover the vCenter. + /// The ARM resource name of the + /// fabric containing this VCenter. + public VCenterProperties(string friendlyName = default(string), string internalId = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string discoveryStatus = default(string), string processServerId = default(string), string ipAddress = default(string), string infrastructureId = default(string), string port = default(string), string runAsAccountId = default(string), string fabricArmResourceName = default(string)) + { + FriendlyName = friendlyName; + InternalId = internalId; + LastHeartbeat = lastHeartbeat; + DiscoveryStatus = discoveryStatus; + ProcessServerId = processServerId; + IpAddress = ipAddress; + InfrastructureId = infrastructureId; + Port = port; + RunAsAccountId = runAsAccountId; + FabricArmResourceName = fabricArmResourceName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets friendly name of the vCenter. + /// + [JsonProperty(PropertyName = "friendlyName")] + public string FriendlyName { get; set; } + + /// + /// Gets or sets vCenter internal ID. + /// + [JsonProperty(PropertyName = "internalId")] + public string InternalId { get; set; } + + /// + /// Gets or sets the time when the last heartbeat was reveived by + /// vCenter. + /// + [JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat { get; set; } + + /// + /// Gets or sets the VCenter discovery status. + /// + [JsonProperty(PropertyName = "discoveryStatus")] + public string DiscoveryStatus { get; set; } + + /// + /// Gets or sets the process server Id. + /// + [JsonProperty(PropertyName = "processServerId")] + public string ProcessServerId { get; set; } + + /// + /// Gets or sets the IP address of the vCenter. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the infrastructure Id of vCenter. + /// + [JsonProperty(PropertyName = "infrastructureId")] + public string InfrastructureId { get; set; } + + /// + /// Gets or sets the port number for discovery. + /// + [JsonProperty(PropertyName = "port")] + public string Port { get; set; } + + /// + /// Gets or sets the account Id which has privileges to discover the + /// vCenter. + /// + [JsonProperty(PropertyName = "runAsAccountId")] + public string RunAsAccountId { get; set; } + + /// + /// Gets or sets the ARM resource name of the fabric containing this + /// VCenter. + /// + [JsonProperty(PropertyName = "fabricArmResourceName")] + public string FabricArmResourceName { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicDetails.cs new file mode 100644 index 000000000000..b873712fb604 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicDetails.cs @@ -0,0 +1,135 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Hyper V VM network details. + /// + public partial class VMNicDetails + { + /// + /// Initializes a new instance of the VMNicDetails class. + /// + public VMNicDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VMNicDetails class. + /// + /// The nic Id. + /// The replica nic Id. + /// The source nic ARM Id. + /// VM subnet name. + /// VM network name. + /// Recovery VM network Id. + /// Recovery VM subnet name. + /// Ip address type. + /// Primary nic static IP + /// address. + /// Replica nic static IP + /// address. + /// Selection type for failover. + public VMNicDetails(string nicId = default(string), string replicaNicId = default(string), string sourceNicArmId = default(string), string vMSubnetName = default(string), string vMNetworkName = default(string), string recoveryVMNetworkId = default(string), string recoveryVMSubnetName = default(string), string ipAddressType = default(string), string primaryNicStaticIPAddress = default(string), string replicaNicStaticIPAddress = default(string), string selectionType = default(string)) + { + NicId = nicId; + ReplicaNicId = replicaNicId; + SourceNicArmId = sourceNicArmId; + VMSubnetName = vMSubnetName; + VMNetworkName = vMNetworkName; + RecoveryVMNetworkId = recoveryVMNetworkId; + RecoveryVMSubnetName = recoveryVMSubnetName; + IpAddressType = ipAddressType; + PrimaryNicStaticIPAddress = primaryNicStaticIPAddress; + ReplicaNicStaticIPAddress = replicaNicStaticIPAddress; + SelectionType = selectionType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the nic Id. + /// + [JsonProperty(PropertyName = "nicId")] + public string NicId { get; set; } + + /// + /// Gets or sets the replica nic Id. + /// + [JsonProperty(PropertyName = "replicaNicId")] + public string ReplicaNicId { get; set; } + + /// + /// Gets or sets the source nic ARM Id. + /// + [JsonProperty(PropertyName = "sourceNicArmId")] + public string SourceNicArmId { get; set; } + + /// + /// Gets or sets VM subnet name. + /// + [JsonProperty(PropertyName = "vMSubnetName")] + public string VMSubnetName { get; set; } + + /// + /// Gets or sets VM network name. + /// + [JsonProperty(PropertyName = "vMNetworkName")] + public string VMNetworkName { get; set; } + + /// + /// Gets or sets recovery VM network Id. + /// + [JsonProperty(PropertyName = "recoveryVMNetworkId")] + public string RecoveryVMNetworkId { get; set; } + + /// + /// Gets or sets recovery VM subnet name. + /// + [JsonProperty(PropertyName = "recoveryVMSubnetName")] + public string RecoveryVMSubnetName { get; set; } + + /// + /// Gets or sets ip address type. + /// + [JsonProperty(PropertyName = "ipAddressType")] + public string IpAddressType { get; set; } + + /// + /// Gets or sets primary nic static IP address. + /// + [JsonProperty(PropertyName = "primaryNicStaticIPAddress")] + public string PrimaryNicStaticIPAddress { get; set; } + + /// + /// Gets or sets replica nic static IP address. + /// + [JsonProperty(PropertyName = "replicaNicStaticIPAddress")] + public string ReplicaNicStaticIPAddress { get; set; } + + /// + /// Gets or sets selection type for failover. + /// + [JsonProperty(PropertyName = "selectionType")] + public string SelectionType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicInputDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicInputDetails.cs new file mode 100644 index 000000000000..dd3f81718d5f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicInputDetails.cs @@ -0,0 +1,78 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Hyper V VM network input details. + /// + public partial class VMNicInputDetails + { + /// + /// Initializes a new instance of the VMNicInputDetails class. + /// + public VMNicInputDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VMNicInputDetails class. + /// + /// The nic Id. + /// Recovery VM subnet name. + /// Replica nic static IP + /// address. + /// Selection type for failover. + public VMNicInputDetails(string nicId = default(string), string recoveryVMSubnetName = default(string), string replicaNicStaticIPAddress = default(string), string selectionType = default(string)) + { + NicId = nicId; + RecoveryVMSubnetName = recoveryVMSubnetName; + ReplicaNicStaticIPAddress = replicaNicStaticIPAddress; + SelectionType = selectionType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the nic Id. + /// + [JsonProperty(PropertyName = "nicId")] + public string NicId { get; set; } + + /// + /// Gets or sets recovery VM subnet name. + /// + [JsonProperty(PropertyName = "recoveryVMSubnetName")] + public string RecoveryVMSubnetName { get; set; } + + /// + /// Gets or sets replica nic static IP address. + /// + [JsonProperty(PropertyName = "replicaNicStaticIPAddress")] + public string ReplicaNicStaticIPAddress { get; set; } + + /// + /// Gets or sets selection type for failover. + /// + [JsonProperty(PropertyName = "selectionType")] + public string SelectionType { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMwareDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMwareDetails.cs new file mode 100644 index 000000000000..b2cce2ec646c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMwareDetails.cs @@ -0,0 +1,302 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Store the fabric details specific to the VMware fabric. + /// + [Newtonsoft.Json.JsonObject("VMware")] + public partial class VMwareDetails : FabricSpecificDetails + { + /// + /// Initializes a new instance of the VMwareDetails class. + /// + public VMwareDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VMwareDetails class. + /// + /// The list of Process Servers associated + /// with the fabric. + /// The list of Master Target servers + /// associated with + /// the fabric. + /// The list of run as accounts created on + /// the server. + /// The number of replication pairs + /// configured in this CS. + /// The number of process + /// servers. + /// The number of source and target servers + /// configured to talk to this CS. + /// The number of protected + /// servers. + /// The percentage of the system load. + /// The system load status. + /// The percentage of the CPU load. + /// The CPU load status. + /// The total memory. + /// The available memory. + /// The memory usage status. + /// The total space. + /// The available space. + /// The space usage status. + /// The web load. + /// The web load status. + /// The database server load. + /// The database server load + /// status. + /// The CS service status. + /// The IP address. + /// The agent Version. + /// The host name. + /// The last heartbeat received from CS + /// server. + /// Version status + /// CS SSL cert expiry date. + /// CS SSL cert expiry + /// date. + /// PS template version. + public VMwareDetails(IList processServers = default(IList), IList masterTargetServers = default(IList), IList runAsAccounts = default(IList), string replicationPairCount = default(string), string processServerCount = default(string), string agentCount = default(string), string protectedServers = default(string), string systemLoad = default(string), string systemLoadStatus = default(string), string cpuLoad = default(string), string cpuLoadStatus = default(string), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), string memoryUsageStatus = default(string), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), string spaceUsageStatus = default(string), string webLoad = default(string), string webLoadStatus = default(string), string databaseServerLoad = default(string), string databaseServerLoadStatus = default(string), string csServiceStatus = default(string), string ipAddress = default(string), string agentVersion = default(string), string hostName = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), System.DateTime? sslCertExpiryDate = default(System.DateTime?), int? sslCertExpiryRemainingDays = default(int?), string psTemplateVersion = default(string)) + { + ProcessServers = processServers; + MasterTargetServers = masterTargetServers; + RunAsAccounts = runAsAccounts; + ReplicationPairCount = replicationPairCount; + ProcessServerCount = processServerCount; + AgentCount = agentCount; + ProtectedServers = protectedServers; + SystemLoad = systemLoad; + SystemLoadStatus = systemLoadStatus; + CpuLoad = cpuLoad; + CpuLoadStatus = cpuLoadStatus; + TotalMemoryInBytes = totalMemoryInBytes; + AvailableMemoryInBytes = availableMemoryInBytes; + MemoryUsageStatus = memoryUsageStatus; + TotalSpaceInBytes = totalSpaceInBytes; + AvailableSpaceInBytes = availableSpaceInBytes; + SpaceUsageStatus = spaceUsageStatus; + WebLoad = webLoad; + WebLoadStatus = webLoadStatus; + DatabaseServerLoad = databaseServerLoad; + DatabaseServerLoadStatus = databaseServerLoadStatus; + CsServiceStatus = csServiceStatus; + IpAddress = ipAddress; + AgentVersion = agentVersion; + HostName = hostName; + LastHeartbeat = lastHeartbeat; + VersionStatus = versionStatus; + SslCertExpiryDate = sslCertExpiryDate; + SslCertExpiryRemainingDays = sslCertExpiryRemainingDays; + PsTemplateVersion = psTemplateVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the list of Process Servers associated with the + /// fabric. + /// + [JsonProperty(PropertyName = "processServers")] + public IList ProcessServers { get; set; } + + /// + /// Gets or sets the list of Master Target servers associated with + /// the fabric. + /// + [JsonProperty(PropertyName = "masterTargetServers")] + public IList MasterTargetServers { get; set; } + + /// + /// Gets or sets the list of run as accounts created on the server. + /// + [JsonProperty(PropertyName = "runAsAccounts")] + public IList RunAsAccounts { get; set; } + + /// + /// Gets or sets the number of replication pairs configured in this CS. + /// + [JsonProperty(PropertyName = "replicationPairCount")] + public string ReplicationPairCount { get; set; } + + /// + /// Gets or sets the number of process servers. + /// + [JsonProperty(PropertyName = "processServerCount")] + public string ProcessServerCount { get; set; } + + /// + /// Gets or sets the number of source and target servers configured to + /// talk to this CS. + /// + [JsonProperty(PropertyName = "agentCount")] + public string AgentCount { get; set; } + + /// + /// Gets or sets the number of protected servers. + /// + [JsonProperty(PropertyName = "protectedServers")] + public string ProtectedServers { get; set; } + + /// + /// Gets or sets the percentage of the system load. + /// + [JsonProperty(PropertyName = "systemLoad")] + public string SystemLoad { get; set; } + + /// + /// Gets or sets the system load status. + /// + [JsonProperty(PropertyName = "systemLoadStatus")] + public string SystemLoadStatus { get; set; } + + /// + /// Gets or sets the percentage of the CPU load. + /// + [JsonProperty(PropertyName = "cpuLoad")] + public string CpuLoad { get; set; } + + /// + /// Gets or sets the CPU load status. + /// + [JsonProperty(PropertyName = "cpuLoadStatus")] + public string CpuLoadStatus { get; set; } + + /// + /// Gets or sets the total memory. + /// + [JsonProperty(PropertyName = "totalMemoryInBytes")] + public long? TotalMemoryInBytes { get; set; } + + /// + /// Gets or sets the available memory. + /// + [JsonProperty(PropertyName = "availableMemoryInBytes")] + public long? AvailableMemoryInBytes { get; set; } + + /// + /// Gets or sets the memory usage status. + /// + [JsonProperty(PropertyName = "memoryUsageStatus")] + public string MemoryUsageStatus { get; set; } + + /// + /// Gets or sets the total space. + /// + [JsonProperty(PropertyName = "totalSpaceInBytes")] + public long? TotalSpaceInBytes { get; set; } + + /// + /// Gets or sets the available space. + /// + [JsonProperty(PropertyName = "availableSpaceInBytes")] + public long? AvailableSpaceInBytes { get; set; } + + /// + /// Gets or sets the space usage status. + /// + [JsonProperty(PropertyName = "spaceUsageStatus")] + public string SpaceUsageStatus { get; set; } + + /// + /// Gets or sets the web load. + /// + [JsonProperty(PropertyName = "webLoad")] + public string WebLoad { get; set; } + + /// + /// Gets or sets the web load status. + /// + [JsonProperty(PropertyName = "webLoadStatus")] + public string WebLoadStatus { get; set; } + + /// + /// Gets or sets the database server load. + /// + [JsonProperty(PropertyName = "databaseServerLoad")] + public string DatabaseServerLoad { get; set; } + + /// + /// Gets or sets the database server load status. + /// + [JsonProperty(PropertyName = "databaseServerLoadStatus")] + public string DatabaseServerLoadStatus { get; set; } + + /// + /// Gets or sets the CS service status. + /// + [JsonProperty(PropertyName = "csServiceStatus")] + public string CsServiceStatus { get; set; } + + /// + /// Gets or sets the IP address. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the agent Version. + /// + [JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion { get; set; } + + /// + /// Gets or sets the host name. + /// + [JsonProperty(PropertyName = "hostName")] + public string HostName { get; set; } + + /// + /// Gets or sets the last heartbeat received from CS server. + /// + [JsonProperty(PropertyName = "lastHeartbeat")] + public System.DateTime? LastHeartbeat { get; set; } + + /// + /// Gets or sets version status + /// + [JsonProperty(PropertyName = "versionStatus")] + public string VersionStatus { get; set; } + + /// + /// Gets or sets CS SSL cert expiry date. + /// + [JsonProperty(PropertyName = "sslCertExpiryDate")] + public System.DateTime? SslCertExpiryDate { get; set; } + + /// + /// Gets or sets CS SSL cert expiry date. + /// + [JsonProperty(PropertyName = "sslCertExpiryRemainingDays")] + public int? SslCertExpiryRemainingDays { get; set; } + + /// + /// Gets or sets PS template version. + /// + [JsonProperty(PropertyName = "psTemplateVersion")] + public string PsTemplateVersion { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMwareVirtualMachineDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMwareVirtualMachineDetails.cs new file mode 100644 index 000000000000..8fba1bbad2aa --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMwareVirtualMachineDetails.cs @@ -0,0 +1,141 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// VMware provider specific settings + /// + [Newtonsoft.Json.JsonObject("VMwareVirtualMachine")] + public partial class VMwareVirtualMachineDetails : ConfigurationSettings + { + /// + /// Initializes a new instance of the VMwareVirtualMachineDetails + /// class. + /// + public VMwareVirtualMachineDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VMwareVirtualMachineDetails + /// class. + /// + /// The ID generated by the InMage agent + /// after it gets installed on guest. This is the ID + /// to be used during InMage CreateProtection. + /// The value indicating if InMage scout + /// agent is installed on guest. + /// The OsType installed on VM. + /// The agent version. + /// The IP address. + /// The value indicating whether VM is powered + /// on. + /// The VCenter infrastructure + /// Id. + /// A value inidicating the discovery type + /// of the machine. + /// Value can be vCenter or physical. + /// The disk details. + /// The validation errors. + public VMwareVirtualMachineDetails(string agentGeneratedId = default(string), string agentInstalled = default(string), string osType = default(string), string agentVersion = default(string), string ipAddress = default(string), string poweredOn = default(string), string vCenterInfrastructureId = default(string), string discoveryType = default(string), IList diskDetails = default(IList), IList validationErrors = default(IList)) + { + AgentGeneratedId = agentGeneratedId; + AgentInstalled = agentInstalled; + OsType = osType; + AgentVersion = agentVersion; + IpAddress = ipAddress; + PoweredOn = poweredOn; + VCenterInfrastructureId = vCenterInfrastructureId; + DiscoveryType = discoveryType; + DiskDetails = diskDetails; + ValidationErrors = validationErrors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID generated by the InMage agent after it gets + /// installed on guest. This is the ID + /// to be used during InMage CreateProtection. + /// + [JsonProperty(PropertyName = "agentGeneratedId")] + public string AgentGeneratedId { get; set; } + + /// + /// Gets or sets the value indicating if InMage scout agent is + /// installed on guest. + /// + [JsonProperty(PropertyName = "agentInstalled")] + public string AgentInstalled { get; set; } + + /// + /// Gets or sets the OsType installed on VM. + /// + [JsonProperty(PropertyName = "osType")] + public string OsType { get; set; } + + /// + /// Gets or sets the agent version. + /// + [JsonProperty(PropertyName = "agentVersion")] + public string AgentVersion { get; set; } + + /// + /// Gets or sets the IP address. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; set; } + + /// + /// Gets or sets the value indicating whether VM is powered on. + /// + [JsonProperty(PropertyName = "poweredOn")] + public string PoweredOn { get; set; } + + /// + /// Gets or sets the VCenter infrastructure Id. + /// + [JsonProperty(PropertyName = "vCenterInfrastructureId")] + public string VCenterInfrastructureId { get; set; } + + /// + /// Gets or sets a value inidicating the discovery type of the machine. + /// Value can be vCenter or physical. + /// + [JsonProperty(PropertyName = "discoveryType")] + public string DiscoveryType { get; set; } + + /// + /// Gets or sets the disk details. + /// + [JsonProperty(PropertyName = "diskDetails")] + public IList DiskDetails { get; set; } + + /// + /// Gets or sets the validation errors. + /// + [JsonProperty(PropertyName = "validationErrors")] + public IList ValidationErrors { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VirtualMachineTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VirtualMachineTaskDetails.cs new file mode 100644 index 000000000000..cebf1f945919 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VirtualMachineTaskDetails.cs @@ -0,0 +1,70 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class represents the virtual machine task details. + /// + public partial class VirtualMachineTaskDetails : TaskTypeDetails + { + /// + /// Initializes a new instance of the VirtualMachineTaskDetails class. + /// + public VirtualMachineTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineTaskDetails class. + /// + /// The skipped reason. + /// The skipped reason + /// string. + /// The job entity. + public VirtualMachineTaskDetails(string skippedReason = default(string), string skippedReasonString = default(string), JobEntity jobTask = default(JobEntity)) + { + SkippedReason = skippedReason; + SkippedReasonString = skippedReasonString; + JobTask = jobTask; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the skipped reason. + /// + [JsonProperty(PropertyName = "skippedReason")] + public string SkippedReason { get; set; } + + /// + /// Gets or sets the skipped reason string. + /// + [JsonProperty(PropertyName = "skippedReasonString")] + public string SkippedReasonString { get; set; } + + /// + /// Gets or sets the job entity. + /// + [JsonProperty(PropertyName = "jobTask")] + public JobEntity JobTask { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmNicUpdatesTaskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmNicUpdatesTaskDetails.cs new file mode 100644 index 000000000000..9beb02cf4d40 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmNicUpdatesTaskDetails.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// This class represents the vm NicUpdates task details. + /// + public partial class VmNicUpdatesTaskDetails : TaskTypeDetails + { + /// + /// Initializes a new instance of the VmNicUpdatesTaskDetails class. + /// + public VmNicUpdatesTaskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VmNicUpdatesTaskDetails class. + /// + /// VmId. + /// NicId. + /// Name. + public VmNicUpdatesTaskDetails(string vmId = default(string), string nicId = default(string), string name = default(string)) + { + VmId = vmId; + NicId = nicId; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets vmId. + /// + [JsonProperty(PropertyName = "vmId")] + public string VmId { get; set; } + + /// + /// Gets or sets nicId. + /// + [JsonProperty(PropertyName = "nicId")] + public string NicId { get; set; } + + /// + /// Gets or sets name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmDetails.cs new file mode 100644 index 000000000000..3ab6535bf735 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmDetails.cs @@ -0,0 +1,39 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// VMM fabric specific details. + /// + [Newtonsoft.Json.JsonObject("VMM")] + public partial class VmmDetails : FabricSpecificDetails + { + /// + /// Initializes a new instance of the VmmDetails class. + /// + public VmmDetails() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureCreateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureCreateNetworkMappingInput.cs new file mode 100644 index 000000000000..2f3ffd15274a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureCreateNetworkMappingInput.cs @@ -0,0 +1,42 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Create network mappings input properties/behaviour specific to Vmm to + /// Azure Network + /// mapping. + /// + [Newtonsoft.Json.JsonObject("VmmToAzure")] + public partial class VmmToAzureCreateNetworkMappingInput : FabricSpecificCreateNetworkMappingInput + { + /// + /// Initializes a new instance of the + /// VmmToAzureCreateNetworkMappingInput class. + /// + public VmmToAzureCreateNetworkMappingInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureNetworkMappingSettings.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureNetworkMappingSettings.cs new file mode 100644 index 000000000000..c5b9e578e08a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureNetworkMappingSettings.cs @@ -0,0 +1,40 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// E2A Network Mapping fabric specific settings. + /// + [Newtonsoft.Json.JsonObject("VmmToAzure")] + public partial class VmmToAzureNetworkMappingSettings : NetworkMappingFabricSpecificSettings + { + /// + /// Initializes a new instance of the VmmToAzureNetworkMappingSettings + /// class. + /// + public VmmToAzureNetworkMappingSettings() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureUpdateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureUpdateNetworkMappingInput.cs new file mode 100644 index 000000000000..3234861b18ea --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToAzureUpdateNetworkMappingInput.cs @@ -0,0 +1,41 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update network mappings input properties/behaviour specific to vmm to + /// azure. + /// + [Newtonsoft.Json.JsonObject("VmmToAzure")] + public partial class VmmToAzureUpdateNetworkMappingInput : FabricSpecificUpdateNetworkMappingInput + { + /// + /// Initializes a new instance of the + /// VmmToAzureUpdateNetworkMappingInput class. + /// + public VmmToAzureUpdateNetworkMappingInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmCreateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmCreateNetworkMappingInput.cs new file mode 100644 index 000000000000..2d6c5df84eee --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmCreateNetworkMappingInput.cs @@ -0,0 +1,41 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Create network mappings input properties/behaviour specific to vmm to + /// vmm Network mapping. + /// + [Newtonsoft.Json.JsonObject("VmmToVmm")] + public partial class VmmToVmmCreateNetworkMappingInput : FabricSpecificCreateNetworkMappingInput + { + /// + /// Initializes a new instance of the VmmToVmmCreateNetworkMappingInput + /// class. + /// + public VmmToVmmCreateNetworkMappingInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmNetworkMappingSettings.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmNetworkMappingSettings.cs new file mode 100644 index 000000000000..f315dcbc5977 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmNetworkMappingSettings.cs @@ -0,0 +1,40 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// E2E Network Mapping fabric specific settings. + /// + [Newtonsoft.Json.JsonObject("VmmToVmm")] + public partial class VmmToVmmNetworkMappingSettings : NetworkMappingFabricSpecificSettings + { + /// + /// Initializes a new instance of the VmmToVmmNetworkMappingSettings + /// class. + /// + public VmmToVmmNetworkMappingSettings() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmUpdateNetworkMappingInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmUpdateNetworkMappingInput.cs new file mode 100644 index 000000000000..0f677b926c4a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VmmToVmmUpdateNetworkMappingInput.cs @@ -0,0 +1,41 @@ +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update network mappings input properties/behaviour specific to vmm to + /// vmm. + /// + [Newtonsoft.Json.JsonObject("VmmToVmm")] + public partial class VmmToVmmUpdateNetworkMappingInput : FabricSpecificUpdateNetworkMappingInput + { + /// + /// Initializes a new instance of the VmmToVmmUpdateNetworkMappingInput + /// class. + /// + public VmmToVmmUpdateNetworkMappingInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Operations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Operations.cs new file mode 100644 index 000000000000..1e9179ae34b2 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Operations.cs @@ -0,0 +1,417 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Operations operations. + /// + internal partial class Operations : IServiceOperations, IOperations + { + /// + /// Initializes a new instance of the Operations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal Operations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Returns the list of available operations. + /// + /// + /// Operation to return the list of available operations. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns the list of available operations. + /// + /// + /// Operation to return the list of available operations. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsExtensions.cs new file mode 100644 index 000000000000..d57e6f0f61a5 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsExtensions.cs @@ -0,0 +1,100 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for Operations. + /// + public static partial class OperationsExtensions + { + /// + /// Returns the list of available operations. + /// + /// + /// Operation to return the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Returns the list of available operations. + /// + /// + /// Operation to return the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns the list of available operations. + /// + /// + /// Operation to return the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns the list of available operations. + /// + /// + /// Operation to return the list of available operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperations.cs new file mode 100644 index 000000000000..10ae98dde8b2 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperations.cs @@ -0,0 +1,383 @@ +// 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.RecoveryServices.SiteRecovery +{ + using System; + using System.Linq; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Text; + using System.Text.RegularExpressions; + using System.Threading; + using System.Threading.Tasks; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using Microsoft.Rest.Azure; + using Models; + + /// + /// OperationsOperations operations. + /// + internal partial class OperationsOperations : IServiceOperations, IOperationsOperations + { + /// + /// Initializes a new instance of the OperationsOperations class. + /// + /// + /// Reference to the service client. + /// + internal OperationsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Returns the list of available operations. + /// + /// Operation to return the list of available operations. + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (this.Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (this.Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (this.Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations").ToString(); + _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(this.Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); + List _queryParameters = new List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + HttpRequestMessage _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", 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) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Returns the list of available operations. + /// + /// Operation to return the list of available operations. + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + HttpRequestMessage _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", 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) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperationsExtensions.cs new file mode 100644 index 000000000000..ffc1f437f4c1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperationsExtensions.cs @@ -0,0 +1,92 @@ +// 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.RecoveryServices.SiteRecovery +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for OperationsOperations. + /// + public static partial class OperationsOperationsExtensions + { + /// + /// Returns the list of available operations. + /// + /// Operation to return the list of available operations. + /// + /// The operations group for this extension method. + /// + public static IPage List(this IOperationsOperations operations) + { + return Task.Factory.StartNew(s => ((IOperationsOperations)s).ListAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Returns the list of available operations. + /// + /// Operation to return the list of available operations. + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IOperationsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns the list of available operations. + /// + /// Operation to return the list of available operations. + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IOperationsOperations operations, string nextPageLink) + { + return Task.Factory.StartNew(s => ((IOperationsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Returns the list of available operations. + /// + /// Operation to return the list of available operations. + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IOperationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/RecoveryPointsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/RecoveryPointsOperations.cs new file mode 100644 index 000000000000..e1e0f901a104 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/RecoveryPointsOperations.cs @@ -0,0 +1,676 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// RecoveryPointsOperations operations. + /// + internal partial class RecoveryPointsOperations : IServiceOperations, IRecoveryPointsOperations + { + /// + /// Initializes a new instance of the RecoveryPointsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal RecoveryPointsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Get a recovery point. + /// + /// + /// Get the details of specified recovery point. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item's name. + /// + /// + /// The recovery point name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (recoveryPointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("recoveryPointName", recoveryPointName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints/{recoveryPointName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + _url = _url.Replace("{recoveryPointName}", System.Uri.EscapeDataString(recoveryPointName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get recovery points for a replication protected item. + /// + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item's name. + /// + /// + /// 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 Task>> ListByReplicationProtectedItemsWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItems", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get recovery points for a replication protected item. + /// + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationProtectedItemsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectedItemsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/RecoveryPointsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/RecoveryPointsOperationsExtensions.cs new file mode 100644 index 000000000000..2cc15f79568e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/RecoveryPointsOperationsExtensions.cs @@ -0,0 +1,176 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for RecoveryPointsOperations. + /// + public static partial class RecoveryPointsOperationsExtensions + { + /// + /// Get a recovery point. + /// + /// + /// Get the details of specified recovery point. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item's name. + /// + /// + /// The recovery point name. + /// + public static RecoveryPoint Get(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName) + { + return operations.GetAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName).GetAwaiter().GetResult(); + } + + /// + /// Get a recovery point. + /// + /// + /// Get the details of specified recovery point. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item's name. + /// + /// + /// The recovery point name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, string recoveryPointName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get recovery points for a replication protected item. + /// + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item's name. + /// + public static IPage ListByReplicationProtectedItems(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return operations.ListByReplicationProtectedItemsAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Get recovery points for a replication protected item. + /// + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replication protected item's name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationProtectedItemsAsync(this IRecoveryPointsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectedItemsWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get recovery points for a replication protected item. + /// + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationProtectedItemsNext(this IRecoveryPointsOperations operations, string nextPageLink) + { + return operations.ListByReplicationProtectedItemsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get recovery points for a replication protected item. + /// + /// + /// Lists the available recovery points for a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationProtectedItemsNextAsync(this IRecoveryPointsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectedItemsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationAlertSettingsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationAlertSettingsOperations.cs new file mode 100644 index 000000000000..342d6a3be77e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationAlertSettingsOperations.cs @@ -0,0 +1,836 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationAlertSettingsOperations operations. + /// + internal partial class ReplicationAlertSettingsOperations : IServiceOperations, IReplicationAlertSettingsOperations + { + /// + /// Initializes a new instance of the ReplicationAlertSettingsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationAlertSettingsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets an email notification(alert) configuration. + /// + /// + /// Gets the details of the specified email notification(alert) configuration. + /// + /// + /// The name of the email notification configuration. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string alertSettingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (alertSettingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "alertSettingName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("alertSettingName", alertSettingName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{alertSettingName}", System.Uri.EscapeDataString(alertSettingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Configures email notifications for this vault. + /// + /// + /// Create or update an email notification(alert) configuration. + /// + /// + /// The name of the email notification(alert) configuration. + /// + /// + /// The input to configure the email notification(alert). + /// + /// + /// 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 Task> CreateWithHttpMessagesAsync(string alertSettingName, ConfigureAlertRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (alertSettingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "alertSettingName"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("alertSettingName", alertSettingName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{alertSettingName}", System.Uri.EscapeDataString(alertSettingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of configured email notification(alert) configurations. + /// + /// + /// Gets the list of email notification(alert) configurations for the vault. . + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of configured email notification(alert) configurations. + /// + /// + /// Gets the list of email notification(alert) configurations for the vault. . + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationAlertSettingsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationAlertSettingsOperationsExtensions.cs new file mode 100644 index 000000000000..d3a4481f5590 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationAlertSettingsOperationsExtensions.cs @@ -0,0 +1,186 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationAlertSettingsOperations. + /// + public static partial class ReplicationAlertSettingsOperationsExtensions + { + /// + /// Gets an email notification(alert) configuration. + /// + /// + /// Gets the details of the specified email notification(alert) configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the email notification configuration. + /// + public static Alert Get(this IReplicationAlertSettingsOperations operations, string alertSettingName) + { + return operations.GetAsync(alertSettingName).GetAwaiter().GetResult(); + } + + /// + /// Gets an email notification(alert) configuration. + /// + /// + /// Gets the details of the specified email notification(alert) configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the email notification configuration. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationAlertSettingsOperations operations, string alertSettingName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(alertSettingName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Configures email notifications for this vault. + /// + /// + /// Create or update an email notification(alert) configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the email notification(alert) configuration. + /// + /// + /// The input to configure the email notification(alert). + /// + public static Alert Create(this IReplicationAlertSettingsOperations operations, string alertSettingName, ConfigureAlertRequest request) + { + return operations.CreateAsync(alertSettingName, request).GetAwaiter().GetResult(); + } + + /// + /// Configures email notifications for this vault. + /// + /// + /// Create or update an email notification(alert) configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the email notification(alert) configuration. + /// + /// + /// The input to configure the email notification(alert). + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationAlertSettingsOperations operations, string alertSettingName, ConfigureAlertRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(alertSettingName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of configured email notification(alert) configurations. + /// + /// + /// Gets the list of email notification(alert) configurations for the vault. . + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationAlertSettingsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of configured email notification(alert) configurations. + /// + /// + /// Gets the list of email notification(alert) configurations for the vault. . + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationAlertSettingsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of configured email notification(alert) configurations. + /// + /// + /// Gets the list of email notification(alert) configurations for the vault. . + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationAlertSettingsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of configured email notification(alert) configurations. + /// + /// + /// Gets the list of email notification(alert) configurations for the vault. . + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationAlertSettingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationEventsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationEventsOperations.cs new file mode 100644 index 000000000000..d51810a54591 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationEventsOperations.cs @@ -0,0 +1,622 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationEventsOperations operations. + /// + internal partial class ReplicationEventsOperations : IServiceOperations, IReplicationEventsOperations + { + /// + /// Initializes a new instance of the ReplicationEventsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationEventsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Get the details of an Azure Site recovery event. + /// + /// + /// The operation to get the details of an Azure Site recovery event. + /// + /// + /// The name of the Azure Site Recovery event. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string eventName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (eventName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "eventName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("eventName", eventName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{eventName}", System.Uri.EscapeDataString(eventName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of Azure Site Recovery events. + /// + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of Azure Site Recovery events. + /// + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationEventsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationEventsOperationsExtensions.cs new file mode 100644 index 000000000000..c5d2050d2eb0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationEventsOperationsExtensions.cs @@ -0,0 +1,140 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationEventsOperations. + /// + public static partial class ReplicationEventsOperationsExtensions + { + /// + /// Get the details of an Azure Site recovery event. + /// + /// + /// The operation to get the details of an Azure Site recovery event. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the Azure Site Recovery event. + /// + public static EventModel Get(this IReplicationEventsOperations operations, string eventName) + { + return operations.GetAsync(eventName).GetAwaiter().GetResult(); + } + + /// + /// Get the details of an Azure Site recovery event. + /// + /// + /// The operation to get the details of an Azure Site recovery event. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the Azure Site Recovery event. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationEventsOperations operations, string eventName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(eventName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of Azure Site Recovery events. + /// + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationEventsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of Azure Site Recovery events. + /// + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationEventsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of Azure Site Recovery events. + /// + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationEventsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of Azure Site Recovery events. + /// + /// + /// Gets the list of Azure Site Recovery events for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationEventsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationFabricsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationFabricsOperations.cs new file mode 100644 index 000000000000..19ee0a74cea9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationFabricsOperations.cs @@ -0,0 +1,1969 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationFabricsOperations operations. + /// + internal partial class ReplicationFabricsOperations : IServiceOperations, IReplicationFabricsOperations + { + /// + /// Initializes a new instance of the ReplicationFabricsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationFabricsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Renews certificate for the fabric. + /// + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// Renew certificate input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> RenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInput renewCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRenewCertificateWithHttpMessagesAsync(fabricName, renewCertificate, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Perform failover of the process server. + /// + /// + /// The operation to move replications from a process server to another process + /// server. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The input to the failover process + /// server operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequest failoverProcessServerRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginReassociateGatewayWithHttpMessagesAsync(fabricName, failoverProcessServerRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks the consistency of the ASR fabric. + /// + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// Fabric name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CheckConsistencyWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginCheckConsistencyWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the site. + /// + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// ASR fabric to delete + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of an ASR fabric. + /// + /// + /// Gets the details of an Azure Site Recovery fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates an Azure Site Recoery fabric. + /// + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V + /// site) + /// + /// + /// Name of the ASR fabric. + /// + /// + /// Fabric creation input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string fabricName, FabricCreationInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Purges the site. + /// + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// ASR fabric to purge. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task PurgeWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of ASR fabrics + /// + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Renews certificate for the fabric. + /// + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// Renew certificate input. + /// + /// + /// 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 Task> BeginRenewCertificateWithHttpMessagesAsync(string fabricName, RenewCertificateInput renewCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (renewCertificate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "renewCertificate"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("renewCertificate", renewCertificate); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRenewCertificate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(renewCertificate != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(renewCertificate, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Perform failover of the process server. + /// + /// + /// The operation to move replications from a process server to another process + /// server. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The input to the failover process + /// server 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 Task> BeginReassociateGatewayWithHttpMessagesAsync(string fabricName, FailoverProcessServerRequest failoverProcessServerRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (failoverProcessServerRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "failoverProcessServerRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("failoverProcessServerRequest", failoverProcessServerRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginReassociateGateway", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(failoverProcessServerRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(failoverProcessServerRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Checks the consistency of the ASR fabric. + /// + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 Task> BeginCheckConsistencyWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCheckConsistency", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes the site. + /// + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// ASR fabric to delete + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates an Azure Site Recoery fabric. + /// + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V + /// site) + /// + /// + /// Name of the ASR fabric. + /// + /// + /// Fabric creation input. + /// + /// + /// 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 Task> BeginCreateWithHttpMessagesAsync(string fabricName, FabricCreationInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Purges the site. + /// + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// ASR fabric to purge. + /// + /// + /// 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 Task BeginPurgeWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of ASR fabrics + /// + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationFabricsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationFabricsOperationsExtensions.cs new file mode 100644 index 000000000000..ffe29d07bf75 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationFabricsOperationsExtensions.cs @@ -0,0 +1,656 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationFabricsOperations. + /// + public static partial class ReplicationFabricsOperationsExtensions + { + /// + /// Renews certificate for the fabric. + /// + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// Renew certificate input. + /// + public static Fabric RenewCertificate(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInput renewCertificate) + { + return operations.RenewCertificateAsync(fabricName, renewCertificate).GetAwaiter().GetResult(); + } + + /// + /// Renews certificate for the fabric. + /// + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// Renew certificate input. + /// + /// + /// The cancellation token. + /// + public static async Task RenewCertificateAsync(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInput renewCertificate, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RenewCertificateWithHttpMessagesAsync(fabricName, renewCertificate, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Perform failover of the process server. + /// + /// + /// The operation to move replications from a process server to another process + /// server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The input to the failover process + /// server operation. + /// + public static Fabric ReassociateGateway(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequest failoverProcessServerRequest) + { + return operations.ReassociateGatewayAsync(fabricName, failoverProcessServerRequest).GetAwaiter().GetResult(); + } + + /// + /// Perform failover of the process server. + /// + /// + /// The operation to move replications from a process server to another process + /// server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The input to the failover process + /// server operation. + /// + /// + /// The cancellation token. + /// + public static async Task ReassociateGatewayAsync(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequest failoverProcessServerRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReassociateGatewayWithHttpMessagesAsync(fabricName, failoverProcessServerRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Checks the consistency of the ASR fabric. + /// + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Fabric CheckConsistency(this IReplicationFabricsOperations operations, string fabricName) + { + return operations.CheckConsistencyAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Checks the consistency of the ASR fabric. + /// + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async Task CheckConsistencyAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckConsistencyWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the site. + /// + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to delete + /// + public static void Delete(this IReplicationFabricsOperations operations, string fabricName) + { + operations.DeleteAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the site. + /// + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to delete + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the details of an ASR fabric. + /// + /// + /// Gets the details of an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Fabric Get(this IReplicationFabricsOperations operations, string fabricName) + { + return operations.GetAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of an ASR fabric. + /// + /// + /// Gets the details of an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates an Azure Site Recoery fabric. + /// + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V + /// site) + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the ASR fabric. + /// + /// + /// Fabric creation input. + /// + public static Fabric Create(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInput input) + { + return operations.CreateAsync(fabricName, input).GetAwaiter().GetResult(); + } + + /// + /// Creates an Azure Site Recoery fabric. + /// + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V + /// site) + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the ASR fabric. + /// + /// + /// Fabric creation input. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Purges the site. + /// + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to purge. + /// + public static void Purge(this IReplicationFabricsOperations operations, string fabricName) + { + operations.PurgeAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Purges the site. + /// + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to purge. + /// + /// + /// The cancellation token. + /// + public static async Task PurgeAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.PurgeWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the list of ASR fabrics + /// + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationFabricsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of ASR fabrics + /// + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationFabricsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Renews certificate for the fabric. + /// + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// Renew certificate input. + /// + public static Fabric BeginRenewCertificate(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInput renewCertificate) + { + return operations.BeginRenewCertificateAsync(fabricName, renewCertificate).GetAwaiter().GetResult(); + } + + /// + /// Renews certificate for the fabric. + /// + /// + /// Renews the connection certificate for the ASR replication fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// fabric name to renew certs for. + /// + /// + /// Renew certificate input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRenewCertificateAsync(this IReplicationFabricsOperations operations, string fabricName, RenewCertificateInput renewCertificate, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginRenewCertificateWithHttpMessagesAsync(fabricName, renewCertificate, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Perform failover of the process server. + /// + /// + /// The operation to move replications from a process server to another process + /// server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The input to the failover process + /// server operation. + /// + public static Fabric BeginReassociateGateway(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequest failoverProcessServerRequest) + { + return operations.BeginReassociateGatewayAsync(fabricName, failoverProcessServerRequest).GetAwaiter().GetResult(); + } + + /// + /// Perform failover of the process server. + /// + /// + /// The operation to move replications from a process server to another process + /// server. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the process server. + /// + /// + /// The input to the failover process + /// server operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginReassociateGatewayAsync(this IReplicationFabricsOperations operations, string fabricName, FailoverProcessServerRequest failoverProcessServerRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginReassociateGatewayWithHttpMessagesAsync(fabricName, failoverProcessServerRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Checks the consistency of the ASR fabric. + /// + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static Fabric BeginCheckConsistency(this IReplicationFabricsOperations operations, string fabricName) + { + return operations.BeginCheckConsistencyAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Checks the consistency of the ASR fabric. + /// + /// + /// The operation to perform a consistency check on the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCheckConsistencyAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCheckConsistencyWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the site. + /// + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to delete + /// + public static void BeginDelete(this IReplicationFabricsOperations operations, string fabricName) + { + operations.BeginDeleteAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the site. + /// + /// + /// The operation to delete or remove an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to delete + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates an Azure Site Recoery fabric. + /// + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V + /// site) + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the ASR fabric. + /// + /// + /// Fabric creation input. + /// + public static Fabric BeginCreate(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInput input) + { + return operations.BeginCreateAsync(fabricName, input).GetAwaiter().GetResult(); + } + + /// + /// Creates an Azure Site Recoery fabric. + /// + /// + /// The operation to create an Azure Site Recovery fabric (for e.g. Hyper-V + /// site) + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the ASR fabric. + /// + /// + /// Fabric creation input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationFabricsOperations operations, string fabricName, FabricCreationInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Purges the site. + /// + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to purge. + /// + public static void BeginPurge(this IReplicationFabricsOperations operations, string fabricName) + { + operations.BeginPurgeAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Purges the site. + /// + /// + /// The operation to purge(force delete) an Azure Site Recovery fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// ASR fabric to purge. + /// + /// + /// The cancellation token. + /// + public static async Task BeginPurgeAsync(this IReplicationFabricsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the list of ASR fabrics + /// + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationFabricsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of ASR fabrics + /// + /// + /// Gets a list of the Azure Site Recovery fabrics in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationFabricsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationJobsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationJobsOperations.cs new file mode 100644 index 000000000000..8c1ceac56ed9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationJobsOperations.cs @@ -0,0 +1,1547 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationJobsOperations operations. + /// + internal partial class ReplicationJobsOperations : IServiceOperations, IReplicationJobsOperations + { + /// + /// Initializes a new instance of the ReplicationJobsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationJobsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Resumes the specified job. + /// + /// + /// The operation to resume an Azure Site Recovery job + /// + /// + /// Job identifier. + /// + /// + /// Resume rob comments. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ResumeWithHttpMessagesAsync(string jobName, ResumeJobParams resumeJobParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginResumeWithHttpMessagesAsync(jobName, resumeJobParams, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Restarts the specified job. + /// + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// Job identifier. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> RestartWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRestartWithHttpMessagesAsync(jobName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Cancels the specified job. + /// + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// Job indentifier. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CancelWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginCancelWithHttpMessagesAsync(jobName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the job details. + /// + /// + /// Get the details of an Azure Site Recovery job. + /// + /// + /// Job identifier + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Exports the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operation to export the details of the Azure Site Recovery jobs of the + /// vault. + /// + /// + /// job query filter. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginExportWithHttpMessagesAsync(jobQueryParameter, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of jobs. + /// + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// OData parameters to apply to 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 Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Resumes the specified job. + /// + /// + /// The operation to resume an Azure Site Recovery job + /// + /// + /// Job identifier. + /// + /// + /// Resume rob comments. + /// + /// + /// 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 Task> BeginResumeWithHttpMessagesAsync(string jobName, ResumeJobParams resumeJobParams, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (resumeJobParams == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resumeJobParams"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("resumeJobParams", resumeJobParams); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginResume", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(resumeJobParams != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resumeJobParams, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Restarts the specified job. + /// + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// Job identifier. + /// + /// + /// 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 Task> BeginRestartWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRestart", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Cancels the specified job. + /// + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// Job indentifier. + /// + /// + /// 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 Task> BeginCancelWithHttpMessagesAsync(string jobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCancel", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Exports the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operation to export the details of the Azure Site Recovery jobs of the + /// vault. + /// + /// + /// job query filter. + /// + /// + /// 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 Task> BeginExportWithHttpMessagesAsync(JobQueryParameter jobQueryParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (jobQueryParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobQueryParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("jobQueryParameter", jobQueryParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginExport", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(jobQueryParameter != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(jobQueryParameter, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of jobs. + /// + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationJobsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationJobsOperationsExtensions.cs new file mode 100644 index 000000000000..9f93691c9d63 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationJobsOperationsExtensions.cs @@ -0,0 +1,483 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationJobsOperations. + /// + public static partial class ReplicationJobsOperationsExtensions + { + /// + /// Resumes the specified job. + /// + /// + /// The operation to resume an Azure Site Recovery job + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// Resume rob comments. + /// + public static Job Resume(this IReplicationJobsOperations operations, string jobName, ResumeJobParams resumeJobParams) + { + return operations.ResumeAsync(jobName, resumeJobParams).GetAwaiter().GetResult(); + } + + /// + /// Resumes the specified job. + /// + /// + /// The operation to resume an Azure Site Recovery job + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// Resume rob comments. + /// + /// + /// The cancellation token. + /// + public static async Task ResumeAsync(this IReplicationJobsOperations operations, string jobName, ResumeJobParams resumeJobParams, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ResumeWithHttpMessagesAsync(jobName, resumeJobParams, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Restarts the specified job. + /// + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job Restart(this IReplicationJobsOperations operations, string jobName) + { + return operations.RestartAsync(jobName).GetAwaiter().GetResult(); + } + + /// + /// Restarts the specified job. + /// + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async Task RestartAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RestartWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Cancels the specified job. + /// + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job indentifier. + /// + public static Job Cancel(this IReplicationJobsOperations operations, string jobName) + { + return operations.CancelAsync(jobName).GetAwaiter().GetResult(); + } + + /// + /// Cancels the specified job. + /// + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job indentifier. + /// + /// + /// The cancellation token. + /// + public static async Task CancelAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CancelWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the job details. + /// + /// + /// Get the details of an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier + /// + public static Job Get(this IReplicationJobsOperations operations, string jobName) + { + return operations.GetAsync(jobName).GetAwaiter().GetResult(); + } + + /// + /// Gets the job details. + /// + /// + /// Get the details of an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Exports the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operation to export the details of the Azure Site Recovery jobs of the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// job query filter. + /// + public static Job Export(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter) + { + return operations.ExportAsync(jobQueryParameter).GetAwaiter().GetResult(); + } + + /// + /// Exports the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operation to export the details of the Azure Site Recovery jobs of the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// job query filter. + /// + /// + /// The cancellation token. + /// + public static async Task ExportAsync(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ExportWithHttpMessagesAsync(jobQueryParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of jobs. + /// + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + public static IPage List(this IReplicationJobsOperations operations, ODataQuery odataQuery = default(ODataQuery)) + { + return ((IReplicationJobsOperations)operations).ListAsync(odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of jobs. + /// + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationJobsOperations operations, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Resumes the specified job. + /// + /// + /// The operation to resume an Azure Site Recovery job + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// Resume rob comments. + /// + public static Job BeginResume(this IReplicationJobsOperations operations, string jobName, ResumeJobParams resumeJobParams) + { + return operations.BeginResumeAsync(jobName, resumeJobParams).GetAwaiter().GetResult(); + } + + /// + /// Resumes the specified job. + /// + /// + /// The operation to resume an Azure Site Recovery job + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// Resume rob comments. + /// + /// + /// The cancellation token. + /// + public static async Task BeginResumeAsync(this IReplicationJobsOperations operations, string jobName, ResumeJobParams resumeJobParams, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginResumeWithHttpMessagesAsync(jobName, resumeJobParams, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Restarts the specified job. + /// + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + public static Job BeginRestart(this IReplicationJobsOperations operations, string jobName) + { + return operations.BeginRestartAsync(jobName).GetAwaiter().GetResult(); + } + + /// + /// Restarts the specified job. + /// + /// + /// The operation to restart an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job identifier. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRestartAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginRestartWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Cancels the specified job. + /// + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job indentifier. + /// + public static Job BeginCancel(this IReplicationJobsOperations operations, string jobName) + { + return operations.BeginCancelAsync(jobName).GetAwaiter().GetResult(); + } + + /// + /// Cancels the specified job. + /// + /// + /// The operation to cancel an Azure Site Recovery job. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Job indentifier. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCancelAsync(this IReplicationJobsOperations operations, string jobName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCancelWithHttpMessagesAsync(jobName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Exports the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operation to export the details of the Azure Site Recovery jobs of the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// job query filter. + /// + public static Job BeginExport(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter) + { + return operations.BeginExportAsync(jobQueryParameter).GetAwaiter().GetResult(); + } + + /// + /// Exports the details of the Azure Site Recovery jobs of the vault. + /// + /// + /// The operation to export the details of the Azure Site Recovery jobs of the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// job query filter. + /// + /// + /// The cancellation token. + /// + public static async Task BeginExportAsync(this IReplicationJobsOperations operations, JobQueryParameter jobQueryParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginExportWithHttpMessagesAsync(jobQueryParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of jobs. + /// + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationJobsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of jobs. + /// + /// + /// Gets the list of Azure Site Recovery Jobs for the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationJobsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationLogicalNetworksOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationLogicalNetworksOperations.cs new file mode 100644 index 000000000000..cca1b52d44b9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationLogicalNetworksOperations.cs @@ -0,0 +1,640 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationLogicalNetworksOperations operations. + /// + internal partial class ReplicationLogicalNetworksOperations : IServiceOperations, IReplicationLogicalNetworksOperations + { + /// + /// Initializes a new instance of the ReplicationLogicalNetworksOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationLogicalNetworksOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets the list of logical networks under a fabric. + /// + /// + /// Lists all the logical networks of the Azure Site Recovery fabric + /// + /// + /// Server Id. + /// + /// + /// 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 Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a logical network with specified server id and logical network name. + /// + /// + /// Gets the details of a logical network. + /// + /// + /// Server Id. + /// + /// + /// Logical network name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string logicalNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (logicalNetworkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "logicalNetworkName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("logicalNetworkName", logicalNetworkName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks/{logicalNetworkName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{logicalNetworkName}", System.Uri.EscapeDataString(logicalNetworkName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of logical networks under a fabric. + /// + /// + /// Lists all the logical networks of the Azure Site Recovery fabric + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationLogicalNetworksOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationLogicalNetworksOperationsExtensions.cs new file mode 100644 index 000000000000..3bc206165044 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationLogicalNetworksOperationsExtensions.cs @@ -0,0 +1,152 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationLogicalNetworksOperations. + /// + public static partial class ReplicationLogicalNetworksOperationsExtensions + { + /// + /// Gets the list of logical networks under a fabric. + /// + /// + /// Lists all the logical networks of the Azure Site Recovery fabric + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + public static IPage ListByReplicationFabrics(this IReplicationLogicalNetworksOperations operations, string fabricName) + { + return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of logical networks under a fabric. + /// + /// + /// Lists all the logical networks of the Azure Site Recovery fabric + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsAsync(this IReplicationLogicalNetworksOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a logical network with specified server id and logical network name. + /// + /// + /// Gets the details of a logical network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// Logical network name. + /// + public static LogicalNetwork Get(this IReplicationLogicalNetworksOperations operations, string fabricName, string logicalNetworkName) + { + return operations.GetAsync(fabricName, logicalNetworkName).GetAwaiter().GetResult(); + } + + /// + /// Gets a logical network with specified server id and logical network name. + /// + /// + /// Gets the details of a logical network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// Logical network name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationLogicalNetworksOperations operations, string fabricName, string logicalNetworkName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, logicalNetworkName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of logical networks under a fabric. + /// + /// + /// Lists all the logical networks of the Azure Site Recovery fabric + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationFabricsNext(this IReplicationLogicalNetworksOperations operations, string nextPageLink) + { + return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of logical networks under a fabric. + /// + /// + /// Lists all the logical networks of the Azure Site Recovery fabric + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsNextAsync(this IReplicationLogicalNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworkMappingsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworkMappingsOperations.cs new file mode 100644 index 000000000000..1d58d2133497 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworkMappingsOperations.cs @@ -0,0 +1,1776 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationNetworkMappingsOperations operations. + /// + internal partial class ReplicationNetworkMappingsOperations : IServiceOperations, IReplicationNetworkMappingsOperations + { + /// + /// Initializes a new instance of the ReplicationNetworkMappingsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationNetworkMappingsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets all the network mappings under a vault. + /// + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworkMappings").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets all the network mappings under a network. + /// + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// 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 Task>> ListByReplicationNetworksWithHttpMessagesAsync(string fabricName, string networkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (networkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("networkName", networkName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationNetworks", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets network mapping by name. + /// + /// + /// Gets the details of an ASR network mapping + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (networkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + } + if (networkMappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkMappingName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("networkName", networkName); + tracingParameters.Add("networkMappingName", networkMappingName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); + _url = _url.Replace("{networkMappingName}", System.Uri.EscapeDataString(networkMappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates network mapping. + /// + /// + /// The operation to create an ASR network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Create network mapping input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete network mapping. + /// + /// + /// The operation to delete a network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates network mapping. + /// + /// + /// The operation to update an ASR network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Update network mapping input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates network mapping. + /// + /// + /// The operation to create an ASR network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Create network mapping input. + /// + /// + /// 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 Task> BeginCreateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (networkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + } + if (networkMappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkMappingName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("networkName", networkName); + tracingParameters.Add("networkMappingName", networkMappingName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); + _url = _url.Replace("{networkMappingName}", System.Uri.EscapeDataString(networkMappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete network mapping. + /// + /// + /// The operation to delete a network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (networkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + } + if (networkMappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkMappingName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("networkName", networkName); + tracingParameters.Add("networkMappingName", networkMappingName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); + _url = _url.Replace("{networkMappingName}", System.Uri.EscapeDataString(networkMappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates network mapping. + /// + /// + /// The operation to update an ASR network mapping. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Update network mapping input. + /// + /// + /// 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 Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (networkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + } + if (networkMappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkMappingName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("networkName", networkName); + tracingParameters.Add("networkMappingName", networkMappingName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); + _url = _url.Replace("{networkMappingName}", System.Uri.EscapeDataString(networkMappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets all the network mappings under a vault. + /// + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets all the network mappings under a network. + /// + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationNetworksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationNetworksNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworkMappingsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworkMappingsOperationsExtensions.cs new file mode 100644 index 000000000000..9f5faefb4bdb --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworkMappingsOperationsExtensions.cs @@ -0,0 +1,568 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationNetworkMappingsOperations. + /// + public static partial class ReplicationNetworkMappingsOperationsExtensions + { + /// + /// Gets all the network mappings under a vault. + /// + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationNetworkMappingsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets all the network mappings under a vault. + /// + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationNetworkMappingsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all the network mappings under a network. + /// + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + public static IPage ListByReplicationNetworks(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName) + { + return operations.ListByReplicationNetworksAsync(fabricName, networkName).GetAwaiter().GetResult(); + } + + /// + /// Gets all the network mappings under a network. + /// + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationNetworksAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationNetworksWithHttpMessagesAsync(fabricName, networkName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets network mapping by name. + /// + /// + /// Gets the details of an ASR network mapping + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + public static NetworkMapping Get(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) + { + return operations.GetAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); + } + + /// + /// Gets network mapping by name. + /// + /// + /// Gets the details of an ASR network mapping + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates network mapping. + /// + /// + /// The operation to create an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Create network mapping input. + /// + public static NetworkMapping Create(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInput input) + { + return operations.CreateAsync(fabricName, networkName, networkMappingName, input).GetAwaiter().GetResult(); + } + + /// + /// Creates network mapping. + /// + /// + /// The operation to create an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Create network mapping input. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete network mapping. + /// + /// + /// The operation to delete a network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + public static void Delete(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) + { + operations.DeleteAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); + } + + /// + /// Delete network mapping. + /// + /// + /// The operation to delete a network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates network mapping. + /// + /// + /// The operation to update an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Update network mapping input. + /// + public static NetworkMapping Update(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInput input) + { + return operations.UpdateAsync(fabricName, networkName, networkMappingName, input).GetAwaiter().GetResult(); + } + + /// + /// Updates network mapping. + /// + /// + /// The operation to update an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Update network mapping input. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates network mapping. + /// + /// + /// The operation to create an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Create network mapping input. + /// + public static NetworkMapping BeginCreate(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInput input) + { + return operations.BeginCreateAsync(fabricName, networkName, networkMappingName, input).GetAwaiter().GetResult(); + } + + /// + /// Creates network mapping. + /// + /// + /// The operation to create an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Create network mapping input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CreateNetworkMappingInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete network mapping. + /// + /// + /// The operation to delete a network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + public static void BeginDelete(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName) + { + operations.BeginDeleteAsync(fabricName, networkName, networkMappingName).GetAwaiter().GetResult(); + } + + /// + /// Delete network mapping. + /// + /// + /// The operation to delete a network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// ARM Resource Name for network mapping. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, networkName, networkMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates network mapping. + /// + /// + /// The operation to update an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Update network mapping input. + /// + public static NetworkMapping BeginUpdate(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInput input) + { + return operations.BeginUpdateAsync(fabricName, networkName, networkMappingName, input).GetAwaiter().GetResult(); + } + + /// + /// Updates network mapping. + /// + /// + /// The operation to update an ASR network mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Primary fabric name. + /// + /// + /// Primary network name. + /// + /// + /// Network mapping name. + /// + /// + /// Update network mapping input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IReplicationNetworkMappingsOperations operations, string fabricName, string networkName, string networkMappingName, UpdateNetworkMappingInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, networkName, networkMappingName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all the network mappings under a vault. + /// + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationNetworkMappingsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all the network mappings under a vault. + /// + /// + /// Lists all ASR network mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationNetworkMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all the network mappings under a network. + /// + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationNetworksNext(this IReplicationNetworkMappingsOperations operations, string nextPageLink) + { + return operations.ListByReplicationNetworksNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all the network mappings under a network. + /// + /// + /// Lists all ASR network mappings for the specified network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationNetworksNextAsync(this IReplicationNetworkMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationNetworksNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworksOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworksOperations.cs new file mode 100644 index 000000000000..39610dab555b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworksOperations.cs @@ -0,0 +1,1007 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationNetworksOperations operations. + /// + internal partial class ReplicationNetworksOperations : IServiceOperations, IReplicationNetworksOperations + { + /// + /// Initializes a new instance of the ReplicationNetworksOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationNetworksOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets the list of networks. View-only API. + /// + /// + /// Lists the networks available in a vault + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworks").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of networks under a fabric. + /// + /// + /// Lists the networks available for a fabric. + /// + /// + /// Fabric name + /// + /// + /// 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 Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a network with specified server id and network name. + /// + /// + /// Gets the details of a network. + /// + /// + /// Server Id. + /// + /// + /// Primary network name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string networkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (networkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("networkName", networkName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{networkName}", System.Uri.EscapeDataString(networkName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of networks. View-only API. + /// + /// + /// Lists the networks available in a vault + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of networks under a fabric. + /// + /// + /// Lists the networks available for a fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworksOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworksOperationsExtensions.cs new file mode 100644 index 000000000000..e78ba24a3a0d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationNetworksOperationsExtensions.cs @@ -0,0 +1,226 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationNetworksOperations. + /// + public static partial class ReplicationNetworksOperationsExtensions + { + /// + /// Gets the list of networks. View-only API. + /// + /// + /// Lists the networks available in a vault + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationNetworksOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of networks. View-only API. + /// + /// + /// Lists the networks available in a vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationNetworksOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of networks under a fabric. + /// + /// + /// Lists the networks available for a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name + /// + public static IPage ListByReplicationFabrics(this IReplicationNetworksOperations operations, string fabricName) + { + return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of networks under a fabric. + /// + /// + /// Lists the networks available for a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsAsync(this IReplicationNetworksOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a network with specified server id and network name. + /// + /// + /// Gets the details of a network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// Primary network name. + /// + public static Network Get(this IReplicationNetworksOperations operations, string fabricName, string networkName) + { + return operations.GetAsync(fabricName, networkName).GetAwaiter().GetResult(); + } + + /// + /// Gets a network with specified server id and network name. + /// + /// + /// Gets the details of a network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Server Id. + /// + /// + /// Primary network name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationNetworksOperations operations, string fabricName, string networkName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, networkName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of networks. View-only API. + /// + /// + /// Lists the networks available in a vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationNetworksOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of networks. View-only API. + /// + /// + /// Lists the networks available in a vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of networks under a fabric. + /// + /// + /// Lists the networks available for a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationFabricsNext(this IReplicationNetworksOperations operations, string nextPageLink) + { + return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of networks under a fabric. + /// + /// + /// Lists the networks available for a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsNextAsync(this IReplicationNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationPoliciesOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationPoliciesOperations.cs new file mode 100644 index 000000000000..efec7baff694 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationPoliciesOperations.cs @@ -0,0 +1,1301 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationPoliciesOperations operations. + /// + internal partial class ReplicationPoliciesOperations : IServiceOperations, IReplicationPoliciesOperations + { + /// + /// Initializes a new instance of the ReplicationPoliciesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationPoliciesOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets the requested policy. + /// + /// + /// Gets the details of a replication policy. + /// + /// + /// Replication policy name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (policyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("policyName", policyName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates the policy. + /// + /// + /// The operation to create a replication policy + /// + /// + /// Replication policy name + /// + /// + /// Create policy input + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string policyName, CreatePolicyInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(policyName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete the policy. + /// + /// + /// The operation to delete a replication policy. + /// + /// + /// Replication policy name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(policyName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates the protection profile. + /// + /// + /// The operation to update a replication policy. + /// + /// + /// Protection profile Id. + /// + /// + /// Update Protection Profile Input + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(policyName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of replication policies + /// + /// + /// Lists the replication policies for a vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates the policy. + /// + /// + /// The operation to create a replication policy + /// + /// + /// Replication policy name + /// + /// + /// Create policy input + /// + /// + /// 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 Task> BeginCreateWithHttpMessagesAsync(string policyName, CreatePolicyInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (policyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("policyName", policyName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete the policy. + /// + /// + /// The operation to delete a replication policy. + /// + /// + /// Replication policy name. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string policyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (policyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("policyName", policyName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates the protection profile. + /// + /// + /// The operation to update a replication policy. + /// + /// + /// Protection profile Id. + /// + /// + /// Update Protection Profile Input + /// + /// + /// 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 Task> BeginUpdateWithHttpMessagesAsync(string policyName, UpdatePolicyInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (policyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("policyName", policyName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{policyName}", System.Uri.EscapeDataString(policyName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of replication policies + /// + /// + /// Lists the replication policies for a vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationPoliciesOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationPoliciesOperationsExtensions.cs new file mode 100644 index 000000000000..10e2809b4eed --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationPoliciesOperationsExtensions.cs @@ -0,0 +1,398 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationPoliciesOperations. + /// + public static partial class ReplicationPoliciesOperationsExtensions + { + /// + /// Gets the requested policy. + /// + /// + /// Gets the details of a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + public static Policy Get(this IReplicationPoliciesOperations operations, string policyName) + { + return operations.GetAsync(policyName).GetAwaiter().GetResult(); + } + + /// + /// Gets the requested policy. + /// + /// + /// Gets the details of a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationPoliciesOperations operations, string policyName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates the policy. + /// + /// + /// The operation to create a replication policy + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name + /// + /// + /// Create policy input + /// + public static Policy Create(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInput input) + { + return operations.CreateAsync(policyName, input).GetAwaiter().GetResult(); + } + + /// + /// Creates the policy. + /// + /// + /// The operation to create a replication policy + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name + /// + /// + /// Create policy input + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(policyName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete the policy. + /// + /// + /// The operation to delete a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + public static void Delete(this IReplicationPoliciesOperations operations, string policyName) + { + operations.DeleteAsync(policyName).GetAwaiter().GetResult(); + } + + /// + /// Delete the policy. + /// + /// + /// The operation to delete a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationPoliciesOperations operations, string policyName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates the protection profile. + /// + /// + /// The operation to update a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Protection profile Id. + /// + /// + /// Update Protection Profile Input + /// + public static Policy Update(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInput input) + { + return operations.UpdateAsync(policyName, input).GetAwaiter().GetResult(); + } + + /// + /// Updates the protection profile. + /// + /// + /// The operation to update a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Protection profile Id. + /// + /// + /// Update Protection Profile Input + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(policyName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of replication policies + /// + /// + /// Lists the replication policies for a vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationPoliciesOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of replication policies + /// + /// + /// Lists the replication policies for a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationPoliciesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates the policy. + /// + /// + /// The operation to create a replication policy + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name + /// + /// + /// Create policy input + /// + public static Policy BeginCreate(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInput input) + { + return operations.BeginCreateAsync(policyName, input).GetAwaiter().GetResult(); + } + + /// + /// Creates the policy. + /// + /// + /// The operation to create a replication policy + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name + /// + /// + /// Create policy input + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationPoliciesOperations operations, string policyName, CreatePolicyInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(policyName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete the policy. + /// + /// + /// The operation to delete a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + public static void BeginDelete(this IReplicationPoliciesOperations operations, string policyName) + { + operations.BeginDeleteAsync(policyName).GetAwaiter().GetResult(); + } + + /// + /// Delete the policy. + /// + /// + /// The operation to delete a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Replication policy name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationPoliciesOperations operations, string policyName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(policyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates the protection profile. + /// + /// + /// The operation to update a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Protection profile Id. + /// + /// + /// Update Protection Profile Input + /// + public static Policy BeginUpdate(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInput input) + { + return operations.BeginUpdateAsync(policyName, input).GetAwaiter().GetResult(); + } + + /// + /// Updates the protection profile. + /// + /// + /// The operation to update a replication policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Protection profile Id. + /// + /// + /// Update Protection Profile Input + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IReplicationPoliciesOperations operations, string policyName, UpdatePolicyInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(policyName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of replication policies + /// + /// + /// Lists the replication policies for a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationPoliciesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of replication policies + /// + /// + /// Lists the replication policies for a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectableItemsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectableItemsOperations.cs new file mode 100644 index 000000000000..b732d33908b5 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectableItemsOperations.cs @@ -0,0 +1,658 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationProtectableItemsOperations operations. + /// + internal partial class ReplicationProtectableItemsOperations : IServiceOperations, IReplicationProtectableItemsOperations + { + /// + /// Initializes a new instance of the ReplicationProtectableItemsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationProtectableItemsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets the details of a protectable item. + /// + /// + /// The operation to get the details of a protectable item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protectable item name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string protectableItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (protectableItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectableItemName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("protectableItemName", protectableItemName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{protectableItemName}", System.Uri.EscapeDataString(protectableItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of protectable items. + /// + /// + /// Lists the protectable items in a protection container. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// 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 Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of protectable items. + /// + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectableItemsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectableItemsOperationsExtensions.cs new file mode 100644 index 000000000000..2fa541832efe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectableItemsOperationsExtensions.cs @@ -0,0 +1,164 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationProtectableItemsOperations. + /// + public static partial class ReplicationProtectableItemsOperationsExtensions + { + /// + /// Gets the details of a protectable item. + /// + /// + /// The operation to get the details of a protectable item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protectable item name. + /// + public static ProtectableItem Get(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, string protectableItemName) + { + return operations.GetAsync(fabricName, protectionContainerName, protectableItemName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of a protectable item. + /// + /// + /// The operation to get the details of a protectable item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protectable item name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, string protectableItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, protectableItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of protectable items. + /// + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + public static IPage ListByReplicationProtectionContainers(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName) + { + return operations.ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of protectable items. + /// + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectableItemsOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of protectable items. + /// + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationProtectionContainersNext(this IReplicationProtectableItemsOperations operations, string nextPageLink) + { + return operations.ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of protectable items. + /// + /// + /// Lists the protectable items in a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectableItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectedItemsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectedItemsOperations.cs new file mode 100644 index 000000000000..6959628da643 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectedItemsOperations.cs @@ -0,0 +1,4413 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationProtectedItemsOperations operations. + /// + internal partial class ReplicationProtectedItemsOperations : IServiceOperations, IReplicationProtectedItemsOperations + { + /// + /// Initializes a new instance of the ReplicationProtectedItemsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationProtectedItemsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets the list of Replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the protection + /// container. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// 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 Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The pagination token. + /// Possible values: "FabricId" or "FabricId_CloudId" or null + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("skipToken", skipToken); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectedItems").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (odataQuery != null) + { + var _odataFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_odataFilter)) + { + _queryParameters.Add(_odataFilter); + } + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (skipToken != null) + { + _queryParameters.Add(string.Format("skipToken={0}", System.Uri.EscapeDataString(skipToken))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Change or apply recovery point. + /// + /// + /// The operation to change the recovery point of a failed over replication + /// protected item. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item's name. + /// + /// + /// The ApplyRecoveryPointInput. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Resynchronize or repair replication. + /// + /// + /// The operation to start resynchronize/repair replication for a replication + /// protected item + /// requiring resynchronization. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> RepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update the mobility service on a protected item. + /// + /// + /// The operation to update(push update) the installed mobility service + /// software on a + /// replication protected item to the latest available version. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the + /// protected item. + /// + /// + /// The name of the protected item on which the + /// agent is to be updated. + /// + /// + /// Request to update the mobility + /// service on the protected item. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicationProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginUpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicationProtectedItemName, updateMobilityServiceRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute Reverse Replication\Reprotect + /// + /// + /// Operation to reprotect or reverse replicate a failed over replication + /// protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInput rrInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, rrInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute commit failover + /// + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> FailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginFailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute test failover cleanup. + /// + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> TestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginTestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute test failover + /// + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> TestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginTestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute unplanned failover + /// + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginUnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute planned failover + /// + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> PlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginPlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Disables protection. + /// + /// + /// The operation to disable replication on a replication protected item. This + /// will also + /// remove the item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of a Replication protected item. + /// + /// + /// Gets the details of an ASR replication protected item. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Enables protection. + /// + /// + /// The operation to create an ASR replication protected item (Enable + /// replication). + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// Enable Protection Input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Purges protection. + /// + /// + /// The operation to delete or purge a replication protected item. This + /// operation will + /// force delete the replication protected item. Use the remove operation on + /// replication protected item to perform a clean disable replication for the + /// item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates protection. + /// + /// + /// The operation to update the recovery settings of an ASR replication + /// protected item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Update protection input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Change or apply recovery point. + /// + /// + /// The operation to change the recovery point of a failed over replication + /// protected item. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item's name. + /// + /// + /// The ApplyRecoveryPointInput. + /// + /// + /// 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 Task> BeginApplyRecoveryPointWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (applyRecoveryPointInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "applyRecoveryPointInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("applyRecoveryPointInput", applyRecoveryPointInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginApplyRecoveryPoint", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(applyRecoveryPointInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(applyRecoveryPointInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Resynchronize or repair replication. + /// + /// + /// The operation to start resynchronize/repair replication for a replication + /// protected item + /// requiring resynchronization. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + /// + /// 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 Task> BeginRepairReplicationWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRepairReplication", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Update the mobility service on a protected item. + /// + /// + /// The operation to update(push update) the installed mobility service + /// software on a + /// replication protected item to the latest available version. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the + /// protected item. + /// + /// + /// The name of the protected item on which the + /// agent is to be updated. + /// + /// + /// Request to update the mobility + /// service on the protected item. + /// + /// + /// 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 Task> BeginUpdateMobilityServiceWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicationProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicationProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicationProtectedItemName"); + } + if (updateMobilityServiceRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "updateMobilityServiceRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicationProtectedItemName", replicationProtectedItemName); + tracingParameters.Add("updateMobilityServiceRequest", updateMobilityServiceRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateMobilityService", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicationProtectedItemName}/updateMobilityService").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicationProtectedItemName}", System.Uri.EscapeDataString(replicationProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(updateMobilityServiceRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateMobilityServiceRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute Reverse Replication\Reprotect + /// + /// + /// Operation to reprotect or reverse replicate a failed over replication + /// protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 Task> BeginReprotectWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInput rrInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (rrInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "rrInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("rrInput", rrInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginReprotect", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(rrInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(rrInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute commit failover + /// + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// 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 Task> BeginFailoverCommitWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCommit", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute test failover cleanup. + /// + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// 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 Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (cleanupInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "cleanupInput"); + } + if (cleanupInput != null) + { + cleanupInput.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("cleanupInput", cleanupInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailoverCleanup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(cleanupInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(cleanupInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute test failover + /// + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover input. + /// + /// + /// 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 Task> BeginTestFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (failoverInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "failoverInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("failoverInput", failoverInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailover", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(failoverInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(failoverInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute unplanned failover + /// + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 Task> BeginUnplannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (failoverInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "failoverInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("failoverInput", failoverInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUnplannedFailover", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(failoverInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(failoverInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute planned failover + /// + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 Task> BeginPlannedFailoverWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInput failoverInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (failoverInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "failoverInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("failoverInput", failoverInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginPlannedFailover", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(failoverInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(failoverInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Disables protection. + /// + /// + /// The operation to disable replication on a replication protected item. This + /// will also + /// remove the item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (disableProtectionInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "disableProtectionInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("disableProtectionInput", disableProtectionInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(disableProtectionInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(disableProtectionInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Enables protection. + /// + /// + /// The operation to create an ASR replication protected item (Enable + /// replication). + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// Enable Protection Input. + /// + /// + /// 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 Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Purges protection. + /// + /// + /// The operation to delete or purge a replication protected item. This + /// operation will + /// force delete the replication protected item. Use the remove operation on + /// replication protected item to perform a clean disable replication for the + /// item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// 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 Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates protection. + /// + /// + /// The operation to update the recovery settings of an ASR replication + /// protected item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Update protection input. + /// + /// + /// 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 Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (replicatedProtectedItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "replicatedProtectedItemName"); + } + if (updateProtectionInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "updateProtectionInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("replicatedProtectedItemName", replicatedProtectedItemName); + tracingParameters.Add("updateProtectionInput", updateProtectionInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{replicatedProtectedItemName}", System.Uri.EscapeDataString(replicatedProtectedItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(updateProtectionInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateProtectionInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of Replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the protection + /// container. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectedItemsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectedItemsOperationsExtensions.cs new file mode 100644 index 000000000000..7b09252dfe57 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectedItemsOperationsExtensions.cs @@ -0,0 +1,1785 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Azure.OData; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationProtectedItemsOperations. + /// + public static partial class ReplicationProtectedItemsOperationsExtensions + { + /// + /// Gets the list of Replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the protection + /// container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + public static IPage ListByReplicationProtectionContainers(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName) + { + return operations.ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of Replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the protection + /// container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The pagination token. + /// Possible values: "FabricId" or "FabricId_CloudId" or null + /// + public static IPage List(this IReplicationProtectedItemsOperations operations, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string)) + { + return ((IReplicationProtectedItemsOperations)operations).ListAsync(odataQuery, skipToken).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// OData parameters to apply to the operation. + /// + /// + /// The pagination token. + /// Possible values: "FabricId" or "FabricId_CloudId" or null + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationProtectedItemsOperations operations, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Change or apply recovery point. + /// + /// + /// The operation to change the recovery point of a failed over replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item's name. + /// + /// + /// The ApplyRecoveryPointInput. + /// + public static ReplicationProtectedItem ApplyRecoveryPoint(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput) + { + return operations.ApplyRecoveryPointAsync(fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput).GetAwaiter().GetResult(); + } + + /// + /// Change or apply recovery point. + /// + /// + /// The operation to change the recovery point of a failed over replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item's name. + /// + /// + /// The ApplyRecoveryPointInput. + /// + /// + /// The cancellation token. + /// + public static async Task ApplyRecoveryPointAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Resynchronize or repair replication. + /// + /// + /// The operation to start resynchronize/repair replication for a replication + /// protected item + /// requiring resynchronization. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + public static ReplicationProtectedItem RepairReplication(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return operations.RepairReplicationAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Resynchronize or repair replication. + /// + /// + /// The operation to start resynchronize/repair replication for a replication + /// protected item + /// requiring resynchronization. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + /// + /// The cancellation token. + /// + public static async Task RepairReplicationAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update the mobility service on a protected item. + /// + /// + /// The operation to update(push update) the installed mobility service + /// software on a + /// replication protected item to the latest available version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the + /// protected item. + /// + /// + /// The name of the protected item on which the + /// agent is to be updated. + /// + /// + /// Request to update the mobility + /// service on the protected item. + /// + public static ReplicationProtectedItem UpdateMobilityService(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicationProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest) + { + return operations.UpdateMobilityServiceAsync(fabricName, protectionContainerName, replicationProtectedItemName, updateMobilityServiceRequest).GetAwaiter().GetResult(); + } + + /// + /// Update the mobility service on a protected item. + /// + /// + /// The operation to update(push update) the installed mobility service + /// software on a + /// replication protected item to the latest available version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the + /// protected item. + /// + /// + /// The name of the protected item on which the + /// agent is to be updated. + /// + /// + /// Request to update the mobility + /// service on the protected item. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateMobilityServiceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicationProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicationProtectedItemName, updateMobilityServiceRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute Reverse Replication\Reprotect + /// + /// + /// Operation to reprotect or reverse replicate a failed over replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + public static ReplicationProtectedItem Reprotect(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInput rrInput) + { + return operations.ReprotectAsync(fabricName, protectionContainerName, replicatedProtectedItemName, rrInput).GetAwaiter().GetResult(); + } + + /// + /// Execute Reverse Replication\Reprotect + /// + /// + /// Operation to reprotect or reverse replicate a failed over replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The cancellation token. + /// + public static async Task ReprotectAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInput rrInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, rrInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute commit failover + /// + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem FailoverCommit(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return operations.FailoverCommitAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Execute commit failover + /// + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async Task FailoverCommitAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.FailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute test failover cleanup. + /// + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover cleanup input. + /// + public static ReplicationProtectedItem TestFailoverCleanup(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput) + { + return operations.TestFailoverCleanupAsync(fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput).GetAwaiter().GetResult(); + } + + /// + /// Execute test failover cleanup. + /// + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// The cancellation token. + /// + public static async Task TestFailoverCleanupAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.TestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute test failover + /// + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover input. + /// + public static ReplicationProtectedItem TestFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInput failoverInput) + { + return operations.TestFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput).GetAwaiter().GetResult(); + } + + /// + /// Execute test failover + /// + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover input. + /// + /// + /// The cancellation token. + /// + public static async Task TestFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInput failoverInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.TestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute unplanned failover + /// + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + public static ReplicationProtectedItem UnplannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInput failoverInput) + { + return operations.UnplannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput).GetAwaiter().GetResult(); + } + + /// + /// Execute unplanned failover + /// + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The cancellation token. + /// + public static async Task UnplannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInput failoverInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute planned failover + /// + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + public static ReplicationProtectedItem PlannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInput failoverInput) + { + return operations.PlannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput).GetAwaiter().GetResult(); + } + + /// + /// Execute planned failover + /// + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The cancellation token. + /// + public static async Task PlannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInput failoverInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Disables protection. + /// + /// + /// The operation to disable replication on a replication protected item. This + /// will also + /// remove the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + public static void Delete(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInput disableProtectionInput) + { + operations.DeleteAsync(fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput).GetAwaiter().GetResult(); + } + + /// + /// Disables protection. + /// + /// + /// The operation to disable replication on a replication protected item. This + /// will also + /// remove the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the details of a Replication protected item. + /// + /// + /// Gets the details of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem Get(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return operations.GetAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of a Replication protected item. + /// + /// + /// Gets the details of an ASR replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric unique name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Enables protection. + /// + /// + /// The operation to create an ASR replication protected item (Enable + /// replication). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// Enable Protection Input. + /// + public static ReplicationProtectedItem Create(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInput input) + { + return operations.CreateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, input).GetAwaiter().GetResult(); + } + + /// + /// Enables protection. + /// + /// + /// The operation to create an ASR replication protected item (Enable + /// replication). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// Enable Protection Input. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Purges protection. + /// + /// + /// The operation to delete or purge a replication protected item. This + /// operation will + /// force delete the replication protected item. Use the remove operation on + /// replication protected item to perform a clean disable replication for the + /// item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static void Purge(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + operations.PurgeAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Purges protection. + /// + /// + /// The operation to delete or purge a replication protected item. This + /// operation will + /// force delete the replication protected item. Use the remove operation on + /// replication protected item to perform a clean disable replication for the + /// item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async Task PurgeAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.PurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates protection. + /// + /// + /// The operation to update the recovery settings of an ASR replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Update protection input. + /// + public static ReplicationProtectedItem Update(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput) + { + return operations.UpdateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput).GetAwaiter().GetResult(); + } + + /// + /// Updates protection. + /// + /// + /// The operation to update the recovery settings of an ASR replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Update protection input. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Change or apply recovery point. + /// + /// + /// The operation to change the recovery point of a failed over replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item's name. + /// + /// + /// The ApplyRecoveryPointInput. + /// + public static ReplicationProtectedItem BeginApplyRecoveryPoint(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput) + { + return operations.BeginApplyRecoveryPointAsync(fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput).GetAwaiter().GetResult(); + } + + /// + /// Change or apply recovery point. + /// + /// + /// The operation to change the recovery point of a failed over replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The ARM fabric name. + /// + /// + /// The protection container name. + /// + /// + /// The replicated protected item's name. + /// + /// + /// The ApplyRecoveryPointInput. + /// + /// + /// The cancellation token. + /// + public static async Task BeginApplyRecoveryPointAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ApplyRecoveryPointInput applyRecoveryPointInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginApplyRecoveryPointWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Resynchronize or repair replication. + /// + /// + /// The operation to start resynchronize/repair replication for a replication + /// protected item + /// requiring resynchronization. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + public static ReplicationProtectedItem BeginRepairReplication(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return operations.BeginRepairReplicationAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Resynchronize or repair replication. + /// + /// + /// The operation to start resynchronize/repair replication for a replication + /// protected item + /// requiring resynchronization. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the container. + /// + /// + /// The name of the replication protected item. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRepairReplicationAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginRepairReplicationWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update the mobility service on a protected item. + /// + /// + /// The operation to update(push update) the installed mobility service + /// software on a + /// replication protected item to the latest available version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the + /// protected item. + /// + /// + /// The name of the protected item on which the + /// agent is to be updated. + /// + /// + /// Request to update the mobility + /// service on the protected item. + /// + public static ReplicationProtectedItem BeginUpdateMobilityService(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicationProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest) + { + return operations.BeginUpdateMobilityServiceAsync(fabricName, protectionContainerName, replicationProtectedItemName, updateMobilityServiceRequest).GetAwaiter().GetResult(); + } + + /// + /// Update the mobility service on a protected item. + /// + /// + /// The operation to update(push update) the installed mobility service + /// software on a + /// replication protected item to the latest available version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric containing the protected item. + /// + /// + /// The name of the container containing the + /// protected item. + /// + /// + /// The name of the protected item on which the + /// agent is to be updated. + /// + /// + /// Request to update the mobility + /// service on the protected item. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateMobilityServiceAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicationProtectedItemName, UpdateMobilityServiceRequest updateMobilityServiceRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateMobilityServiceWithHttpMessagesAsync(fabricName, protectionContainerName, replicationProtectedItemName, updateMobilityServiceRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute Reverse Replication\Reprotect + /// + /// + /// Operation to reprotect or reverse replicate a failed over replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + public static ReplicationProtectedItem BeginReprotect(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInput rrInput) + { + return operations.BeginReprotectAsync(fabricName, protectionContainerName, replicatedProtectedItemName, rrInput).GetAwaiter().GetResult(); + } + + /// + /// Execute Reverse Replication\Reprotect + /// + /// + /// Operation to reprotect or reverse replicate a failed over replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginReprotectAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, ReverseReplicationInput rrInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginReprotectWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, rrInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute commit failover + /// + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static ReplicationProtectedItem BeginFailoverCommit(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + return operations.BeginFailoverCommitAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Execute commit failover + /// + /// + /// Operation to commit the failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginFailoverCommitAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginFailoverCommitWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute test failover cleanup. + /// + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover cleanup input. + /// + public static ReplicationProtectedItem BeginTestFailoverCleanup(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput) + { + return operations.BeginTestFailoverCleanupAsync(fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput).GetAwaiter().GetResult(); + } + + /// + /// Execute test failover cleanup. + /// + /// + /// Operation to clean up the test failover of a replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginTestFailoverCleanupAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverCleanupInput cleanupInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginTestFailoverCleanupWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute test failover + /// + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover input. + /// + public static ReplicationProtectedItem BeginTestFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInput failoverInput) + { + return operations.BeginTestFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput).GetAwaiter().GetResult(); + } + + /// + /// Execute test failover + /// + /// + /// Operation to perform a test failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Test failover input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginTestFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, TestFailoverInput failoverInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginTestFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute unplanned failover + /// + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + public static ReplicationProtectedItem BeginUnplannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInput failoverInput) + { + return operations.BeginUnplannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput).GetAwaiter().GetResult(); + } + + /// + /// Execute unplanned failover + /// + /// + /// Operation to initiate a failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUnplannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UnplannedFailoverInput failoverInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUnplannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute planned failover + /// + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + public static ReplicationProtectedItem BeginPlannedFailover(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInput failoverInput) + { + return operations.BeginPlannedFailoverAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput).GetAwaiter().GetResult(); + } + + /// + /// Execute planned failover + /// + /// + /// Operation to initiate a planned failover of the replication protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginPlannedFailoverAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, PlannedFailoverInput failoverInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginPlannedFailoverWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Disables protection. + /// + /// + /// The operation to disable replication on a replication protected item. This + /// will also + /// remove the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + public static void BeginDelete(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInput disableProtectionInput) + { + operations.BeginDeleteAsync(fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput).GetAwaiter().GetResult(); + } + + /// + /// Disables protection. + /// + /// + /// The operation to disable replication on a replication protected item. This + /// will also + /// remove the item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Disable protection input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, DisableProtectionInput disableProtectionInput, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Enables protection. + /// + /// + /// The operation to create an ASR replication protected item (Enable + /// replication). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// Enable Protection Input. + /// + public static ReplicationProtectedItem BeginCreate(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInput input) + { + return operations.BeginCreateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, input).GetAwaiter().GetResult(); + } + + /// + /// Enables protection. + /// + /// + /// The operation to create an ASR replication protected item (Enable + /// replication). + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the fabric. + /// + /// + /// Protection container name. + /// + /// + /// A name for the replication protected item. + /// + /// + /// Enable Protection Input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, EnableProtectionInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Purges protection. + /// + /// + /// The operation to delete or purge a replication protected item. This + /// operation will + /// force delete the replication protected item. Use the remove operation on + /// replication protected item to perform a clean disable replication for the + /// item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + public static void BeginPurge(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName) + { + operations.BeginPurgeAsync(fabricName, protectionContainerName, replicatedProtectedItemName).GetAwaiter().GetResult(); + } + + /// + /// Purges protection. + /// + /// + /// The operation to delete or purge a replication protected item. This + /// operation will + /// force delete the replication protected item. Use the remove operation on + /// replication protected item to perform a clean disable replication for the + /// item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginPurgeAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates protection. + /// + /// + /// The operation to update the recovery settings of an ASR replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Update protection input. + /// + public static ReplicationProtectedItem BeginUpdate(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput) + { + return operations.BeginUpdateAsync(fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput).GetAwaiter().GetResult(); + } + + /// + /// Updates protection. + /// + /// + /// The operation to update the recovery settings of an ASR replication + /// protected item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Replication protected item name. + /// + /// + /// Update protection input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IReplicationProtectedItemsOperations operations, string fabricName, string protectionContainerName, string replicatedProtectedItemName, UpdateReplicationProtectedItemInput updateProtectionInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of Replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the protection + /// container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationProtectionContainersNext(this IReplicationProtectedItemsOperations operations, string nextPageLink) + { + return operations.ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of Replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the protection + /// container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectedItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationProtectedItemsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of replication protected items. + /// + /// + /// Gets the list of ASR replication protected items in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationProtectedItemsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainerMappingsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainerMappingsOperations.cs new file mode 100644 index 000000000000..f7e5a6031fb9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainerMappingsOperations.cs @@ -0,0 +1,1755 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationProtectionContainerMappingsOperations operations. + /// + internal partial class ReplicationProtectionContainerMappingsOperations : IServiceOperations, IReplicationProtectionContainerMappingsOperations + { + /// + /// Initializes a new instance of the ReplicationProtectionContainerMappingsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationProtectionContainerMappingsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Remove protection container mapping. + /// + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Removal input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput removalInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, removalInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a protection container mapping/ + /// + /// + /// Gets the details of a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection Container mapping name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (mappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("mappingName", mappingName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create protection container mapping. + /// + /// + /// The operation to create a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Mapping creation input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput creationInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, creationInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Purge protection container mapping. + /// + /// + /// The operation to purge(force delete) a protection container mapping + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task PurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of protection container mappings for a protection container. + /// + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// 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 Task>> ListByReplicationProtectionContainersWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainers", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of all protection container mappings in a vault. + /// + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Remove protection container mapping. + /// + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Removal input. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput removalInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (mappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + } + if (removalInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "removalInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("mappingName", mappingName); + tracingParameters.Add("removalInput", removalInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(removalInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(removalInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create protection container mapping. + /// + /// + /// The operation to create a protection container mapping. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Mapping creation input. + /// + /// + /// 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 Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput creationInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (mappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + } + if (creationInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "creationInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("mappingName", mappingName); + tracingParameters.Add("creationInput", creationInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(creationInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(creationInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Purge protection container mapping. + /// + /// + /// The operation to purge(force delete) a protection container mapping + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// 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 Task BeginPurgeWithHttpMessagesAsync(string fabricName, string protectionContainerName, string mappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (mappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "mappingName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("mappingName", mappingName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{mappingName}", System.Uri.EscapeDataString(mappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of protection container mappings for a protection container. + /// + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationProtectionContainersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationProtectionContainersNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of all protection container mappings in a vault. + /// + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainerMappingsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainerMappingsOperationsExtensions.cs new file mode 100644 index 000000000000..81e7944e6fdc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainerMappingsOperationsExtensions.cs @@ -0,0 +1,562 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationProtectionContainerMappingsOperations. + /// + public static partial class ReplicationProtectionContainerMappingsOperationsExtensions + { + /// + /// Remove protection container mapping. + /// + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Removal input. + /// + public static void Delete(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput removalInput) + { + operations.DeleteAsync(fabricName, protectionContainerName, mappingName, removalInput).GetAwaiter().GetResult(); + } + + /// + /// Remove protection container mapping. + /// + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Removal input. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput removalInput, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, removalInput, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a protection container mapping/ + /// + /// + /// Gets the details of a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection Container mapping name. + /// + public static ProtectionContainerMapping Get(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) + { + return operations.GetAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); + } + + /// + /// Gets a protection container mapping/ + /// + /// + /// Gets the details of a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection Container mapping name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create protection container mapping. + /// + /// + /// The operation to create a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Mapping creation input. + /// + public static ProtectionContainerMapping Create(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput creationInput) + { + return operations.CreateAsync(fabricName, protectionContainerName, mappingName, creationInput).GetAwaiter().GetResult(); + } + + /// + /// Create protection container mapping. + /// + /// + /// The operation to create a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Mapping creation input. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput creationInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, creationInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Purge protection container mapping. + /// + /// + /// The operation to purge(force delete) a protection container mapping + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static void Purge(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) + { + operations.PurgeAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); + } + + /// + /// Purge protection container mapping. + /// + /// + /// The operation to purge(force delete) a protection container mapping + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async Task PurgeAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.PurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the list of protection container mappings for a protection container. + /// + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + public static IPage ListByReplicationProtectionContainers(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName) + { + return operations.ListByReplicationProtectionContainersAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of protection container mappings for a protection container. + /// + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationProtectionContainersAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of all protection container mappings in a vault. + /// + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationProtectionContainerMappingsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of all protection container mappings in a vault. + /// + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationProtectionContainerMappingsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Remove protection container mapping. + /// + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Removal input. + /// + public static void BeginDelete(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput removalInput) + { + operations.BeginDeleteAsync(fabricName, protectionContainerName, mappingName, removalInput).GetAwaiter().GetResult(); + } + + /// + /// Remove protection container mapping. + /// + /// + /// The operation to delete or remove a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Removal input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput removalInput, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, removalInput, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Create protection container mapping. + /// + /// + /// The operation to create a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Mapping creation input. + /// + public static ProtectionContainerMapping BeginCreate(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput creationInput) + { + return operations.BeginCreateAsync(fabricName, protectionContainerName, mappingName, creationInput).GetAwaiter().GetResult(); + } + + /// + /// Create protection container mapping. + /// + /// + /// The operation to create a protection container mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// Mapping creation input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput creationInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, creationInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Purge protection container mapping. + /// + /// + /// The operation to purge(force delete) a protection container mapping + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + public static void BeginPurge(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName) + { + operations.BeginPurgeAsync(fabricName, protectionContainerName, mappingName).GetAwaiter().GetResult(); + } + + /// + /// Purge protection container mapping. + /// + /// + /// The operation to purge(force delete) a protection container mapping + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Protection container mapping name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginPurgeAsync(this IReplicationProtectionContainerMappingsOperations operations, string fabricName, string protectionContainerName, string mappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, protectionContainerName, mappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the list of protection container mappings for a protection container. + /// + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationProtectionContainersNext(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink) + { + return operations.ListByReplicationProtectionContainersNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of protection container mappings for a protection container. + /// + /// + /// Lists the protection container mappings for a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationProtectionContainersNextAsync(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationProtectionContainersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of all protection container mappings in a vault. + /// + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of all protection container mappings in a vault. + /// + /// + /// Lists the protection container mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationProtectionContainerMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainersOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainersOperations.cs new file mode 100644 index 000000000000..b3577b905d0f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainersOperations.cs @@ -0,0 +1,1985 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationProtectionContainersOperations operations. + /// + internal partial class ReplicationProtectionContainersOperations : IServiceOperations, IReplicationProtectionContainersOperations + { + /// + /// Initializes a new instance of the ReplicationProtectionContainersOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationProtectionContainersOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Switches protection from one container to another or one replication + /// provider to + /// another. + /// + /// + /// Operation to switch protection from one container to another or one + /// replication + /// provider to another. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Switch protection input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> SwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInput switchInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, switchInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Removes a protection container. + /// + /// + /// Operation to remove a protection container. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Adds a protectable item to the replication protection container. + /// + /// + /// The operation to a add a protectable item to a protection container(Add + /// physical server.) + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The request object to add a protectable + /// item. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> DiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, discoverProtectableItemRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the protection container details. + /// + /// + /// Gets the details of a protection container. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create a protection container. + /// + /// + /// Operation to create a protection container. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// Creation input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, creationInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of protection container for a fabric. + /// + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of all protection containers in a vault. + /// + /// + /// Lists the protection containers in a vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Switches protection from one container to another or one replication + /// provider to + /// another. + /// + /// + /// Operation to switch protection from one container to another or one + /// replication + /// provider to another. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Switch protection input. + /// + /// + /// 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 Task> BeginSwitchProtectionWithHttpMessagesAsync(string fabricName, string protectionContainerName, SwitchProtectionInput switchInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (switchInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "switchInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("switchInput", switchInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginSwitchProtection", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(switchInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(switchInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Removes a protection container. + /// + /// + /// Operation to remove a protection container. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string fabricName, string protectionContainerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Adds a protectable item to the replication protection container. + /// + /// + /// The operation to a add a protectable item to a protection container(Add + /// physical server.) + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The request object to add a protectable + /// item. + /// + /// + /// 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 Task> BeginDiscoverProtectableItemWithHttpMessagesAsync(string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (discoverProtectableItemRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "discoverProtectableItemRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("discoverProtectableItemRequest", discoverProtectableItemRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDiscoverProtectableItem", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(discoverProtectableItemRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(discoverProtectableItemRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create a protection container. + /// + /// + /// Operation to create a protection container. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// Creation input. + /// + /// + /// 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 Task> BeginCreateWithHttpMessagesAsync(string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (creationInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "creationInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("creationInput", creationInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(creationInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(creationInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of protection container for a fabric. + /// + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of all protection containers in a vault. + /// + /// + /// Lists the protection containers in a vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainersOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainersOperationsExtensions.cs new file mode 100644 index 000000000000..3bdb898554ba --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationProtectionContainersOperationsExtensions.cs @@ -0,0 +1,648 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationProtectionContainersOperations. + /// + public static partial class ReplicationProtectionContainersOperationsExtensions + { + /// + /// Switches protection from one container to another or one replication + /// provider to + /// another. + /// + /// + /// Operation to switch protection from one container to another or one + /// replication + /// provider to another. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Switch protection input. + /// + public static ProtectionContainer SwitchProtection(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInput switchInput) + { + return operations.SwitchProtectionAsync(fabricName, protectionContainerName, switchInput).GetAwaiter().GetResult(); + } + + /// + /// Switches protection from one container to another or one replication + /// provider to + /// another. + /// + /// + /// Operation to switch protection from one container to another or one + /// replication + /// provider to another. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Switch protection input. + /// + /// + /// The cancellation token. + /// + public static async Task SwitchProtectionAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInput switchInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.SwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, switchInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Removes a protection container. + /// + /// + /// Operation to remove a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + public static void Delete(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) + { + operations.DeleteAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } + + /// + /// Removes a protection container. + /// + /// + /// Operation to remove a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Adds a protectable item to the replication protection container. + /// + /// + /// The operation to a add a protectable item to a protection container(Add + /// physical server.) + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The request object to add a protectable + /// item. + /// + public static ProtectionContainer DiscoverProtectableItem(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest) + { + return operations.DiscoverProtectableItemAsync(fabricName, protectionContainerName, discoverProtectableItemRequest).GetAwaiter().GetResult(); + } + + /// + /// Adds a protectable item to the replication protection container. + /// + /// + /// The operation to a add a protectable item to a protection container(Add + /// physical server.) + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The request object to add a protectable + /// item. + /// + /// + /// The cancellation token. + /// + public static async Task DiscoverProtectableItemAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, discoverProtectableItemRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the protection container details. + /// + /// + /// Gets the details of a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + public static ProtectionContainer Get(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) + { + return operations.GetAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } + + /// + /// Gets the protection container details. + /// + /// + /// Gets the details of a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create a protection container. + /// + /// + /// Operation to create a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// Creation input. + /// + public static ProtectionContainer Create(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput) + { + return operations.CreateAsync(fabricName, protectionContainerName, creationInput).GetAwaiter().GetResult(); + } + + /// + /// Create a protection container. + /// + /// + /// Operation to create a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// Creation input. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, protectionContainerName, creationInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of protection container for a fabric. + /// + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static IPage ListByReplicationFabrics(this IReplicationProtectionContainersOperations operations, string fabricName) + { + return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of protection container for a fabric. + /// + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsAsync(this IReplicationProtectionContainersOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of all protection containers in a vault. + /// + /// + /// Lists the protection containers in a vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationProtectionContainersOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of all protection containers in a vault. + /// + /// + /// Lists the protection containers in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationProtectionContainersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Switches protection from one container to another or one replication + /// provider to + /// another. + /// + /// + /// Operation to switch protection from one container to another or one + /// replication + /// provider to another. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Switch protection input. + /// + public static ProtectionContainer BeginSwitchProtection(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInput switchInput) + { + return operations.BeginSwitchProtectionAsync(fabricName, protectionContainerName, switchInput).GetAwaiter().GetResult(); + } + + /// + /// Switches protection from one container to another or one replication + /// provider to + /// another. + /// + /// + /// Operation to switch protection from one container to another or one + /// replication + /// provider to another. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Switch protection input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginSwitchProtectionAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, SwitchProtectionInput switchInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginSwitchProtectionWithHttpMessagesAsync(fabricName, protectionContainerName, switchInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Removes a protection container. + /// + /// + /// Operation to remove a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + public static void BeginDelete(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName) + { + operations.BeginDeleteAsync(fabricName, protectionContainerName).GetAwaiter().GetResult(); + } + + /// + /// Removes a protection container. + /// + /// + /// Operation to remove a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, protectionContainerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Adds a protectable item to the replication protection container. + /// + /// + /// The operation to a add a protectable item to a protection container(Add + /// physical server.) + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The request object to add a protectable + /// item. + /// + public static ProtectionContainer BeginDiscoverProtectableItem(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest) + { + return operations.BeginDiscoverProtectableItemAsync(fabricName, protectionContainerName, discoverProtectableItemRequest).GetAwaiter().GetResult(); + } + + /// + /// Adds a protectable item to the replication protection container. + /// + /// + /// The operation to a add a protectable item to a protection container(Add + /// physical server.) + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the fabric. + /// + /// + /// The name of the protection container. + /// + /// + /// The request object to add a protectable + /// item. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDiscoverProtectableItemAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, DiscoverProtectableItemRequest discoverProtectableItemRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginDiscoverProtectableItemWithHttpMessagesAsync(fabricName, protectionContainerName, discoverProtectableItemRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create a protection container. + /// + /// + /// Operation to create a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// Creation input. + /// + public static ProtectionContainer BeginCreate(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput) + { + return operations.BeginCreateAsync(fabricName, protectionContainerName, creationInput).GetAwaiter().GetResult(); + } + + /// + /// Create a protection container. + /// + /// + /// Operation to create a protection container. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Unique fabric ARM name. + /// + /// + /// Unique protection container ARM name. + /// + /// + /// Creation input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationProtectionContainersOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInput creationInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, protectionContainerName, creationInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of protection container for a fabric. + /// + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationFabricsNext(this IReplicationProtectionContainersOperations operations, string nextPageLink) + { + return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of protection container for a fabric. + /// + /// + /// Lists the protection containers in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsNextAsync(this IReplicationProtectionContainersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of all protection containers in a vault. + /// + /// + /// Lists the protection containers in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationProtectionContainersOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of all protection containers in a vault. + /// + /// + /// Lists the protection containers in a vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationProtectionContainersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryPlansOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryPlansOperations.cs new file mode 100644 index 000000000000..877d4acc7cb7 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryPlansOperations.cs @@ -0,0 +1,2721 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationRecoveryPlansOperations operations. + /// + internal partial class ReplicationRecoveryPlansOperations : IServiceOperations, IReplicationRecoveryPlansOperations + { + /// + /// Initializes a new instance of the ReplicationRecoveryPlansOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationRecoveryPlansOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Execute reprotect of the recovery plan. + /// + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ReprotectWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginReprotectWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute commit failover of the recovery plan. + /// + /// + /// The operation to commit the fail over of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> FailoverCommitWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginFailoverCommitWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute test failover cleanup of the recovery plan. + /// + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> TestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginTestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute test failover of the recovery plan. + /// + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> TestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginTestFailoverWithHttpMessagesAsync(recoveryPlanName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute unplanned failover of the recovery plan. + /// + /// + /// The operation to start the failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginUnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Execute planned failover of the recovery plan. + /// + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> PlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginPlannedFailoverWithHttpMessagesAsync(recoveryPlanName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the requested recovery plan. + /// + /// + /// Gets the details of the recovery plan. + /// + /// + /// Name of the recovery plan. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a recovery plan with the given details. + /// + /// + /// The operation to create a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Recovery Plan creation input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(recoveryPlanName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the specified recovery plan. + /// + /// + /// Delete a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(recoveryPlanName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates the given recovery plan. + /// + /// + /// The operation to update a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Update recovery plan input + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(recoveryPlanName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of recovery plans. + /// + /// + /// Lists the recovery plans in the vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute reprotect of the recovery plan. + /// + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// 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 Task> BeginReprotectWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginReprotect", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute commit failover of the recovery plan. + /// + /// + /// The operation to commit the fail over of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// 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 Task> BeginFailoverCommitWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginFailoverCommit", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute test failover cleanup of the recovery plan. + /// + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// 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 Task> BeginTestFailoverCleanupWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + if (input != null) + { + input.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailoverCleanup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute test failover of the recovery plan. + /// + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 Task> BeginTestFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanTestFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + if (input != null) + { + input.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginTestFailover", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute unplanned failover of the recovery plan. + /// + /// + /// The operation to start the failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 Task> BeginUnplannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + if (input != null) + { + input.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUnplannedFailover", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute planned failover of the recovery plan. + /// + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// 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 Task> BeginPlannedFailoverWithHttpMessagesAsync(string recoveryPlanName, RecoveryPlanPlannedFailoverInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + if (input != null) + { + input.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginPlannedFailover", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a recovery plan with the given details. + /// + /// + /// The operation to create a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Recovery Plan creation input. + /// + /// + /// 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 Task> BeginCreateWithHttpMessagesAsync(string recoveryPlanName, CreateRecoveryPlanInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + if (input != null) + { + input.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes the specified recovery plan. + /// + /// + /// Delete a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string recoveryPlanName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates the given recovery plan. + /// + /// + /// The operation to update a recovery plan. + /// + /// + /// Recovery plan name. + /// + /// + /// Update recovery plan input + /// + /// + /// 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 Task> BeginUpdateWithHttpMessagesAsync(string recoveryPlanName, UpdateRecoveryPlanInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (recoveryPlanName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPlanName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("recoveryPlanName", recoveryPlanName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{recoveryPlanName}", System.Uri.EscapeDataString(recoveryPlanName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of recovery plans. + /// + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryPlansOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryPlansOperationsExtensions.cs new file mode 100644 index 000000000000..7b4a398db216 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryPlansOperationsExtensions.cs @@ -0,0 +1,926 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationRecoveryPlansOperations. + /// + public static partial class ReplicationRecoveryPlansOperationsExtensions + { + /// + /// Execute reprotect of the recovery plan. + /// + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan Reprotect(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return operations.ReprotectAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Execute reprotect of the recovery plan. + /// + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async Task ReprotectAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReprotectWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute commit failover of the recovery plan. + /// + /// + /// The operation to commit the fail over of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan FailoverCommit(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return operations.FailoverCommitAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Execute commit failover of the recovery plan. + /// + /// + /// The operation to commit the fail over of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async Task FailoverCommitAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.FailoverCommitWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute test failover cleanup of the recovery plan. + /// + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Test failover cleanup input. + /// + public static RecoveryPlan TestFailoverCleanup(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input) + { + return operations.TestFailoverCleanupAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Execute test failover cleanup of the recovery plan. + /// + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// The cancellation token. + /// + public static async Task TestFailoverCleanupAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.TestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute test failover of the recovery plan. + /// + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + public static RecoveryPlan TestFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInput input) + { + return operations.TestFailoverAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Execute test failover of the recovery plan. + /// + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The cancellation token. + /// + public static async Task TestFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.TestFailoverWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute unplanned failover of the recovery plan. + /// + /// + /// The operation to start the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + public static RecoveryPlan UnplannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInput input) + { + return operations.UnplannedFailoverAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Execute unplanned failover of the recovery plan. + /// + /// + /// The operation to start the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The cancellation token. + /// + public static async Task UnplannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute planned failover of the recovery plan. + /// + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + public static RecoveryPlan PlannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInput input) + { + return operations.PlannedFailoverAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Execute planned failover of the recovery plan. + /// + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The cancellation token. + /// + public static async Task PlannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PlannedFailoverWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the requested recovery plan. + /// + /// + /// Gets the details of the recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the recovery plan. + /// + public static RecoveryPlan Get(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return operations.GetAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Gets the requested recovery plan. + /// + /// + /// Gets the details of the recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the recovery plan. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a recovery plan with the given details. + /// + /// + /// The operation to create a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Recovery Plan creation input. + /// + public static RecoveryPlan Create(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInput input) + { + return operations.CreateAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Creates a recovery plan with the given details. + /// + /// + /// The operation to create a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Recovery Plan creation input. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the specified recovery plan. + /// + /// + /// Delete a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static void Delete(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + operations.DeleteAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified recovery plan. + /// + /// + /// Delete a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates the given recovery plan. + /// + /// + /// The operation to update a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Update recovery plan input + /// + public static RecoveryPlan Update(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInput input) + { + return operations.UpdateAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Updates the given recovery plan. + /// + /// + /// The operation to update a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Update recovery plan input + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of recovery plans. + /// + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationRecoveryPlansOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of recovery plans. + /// + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationRecoveryPlansOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute reprotect of the recovery plan. + /// + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginReprotect(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return operations.BeginReprotectAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Execute reprotect of the recovery plan. + /// + /// + /// The operation to reprotect(reverse replicate) a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginReprotectAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginReprotectWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute commit failover of the recovery plan. + /// + /// + /// The operation to commit the fail over of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static RecoveryPlan BeginFailoverCommit(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + return operations.BeginFailoverCommitAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Execute commit failover of the recovery plan. + /// + /// + /// The operation to commit the fail over of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginFailoverCommitAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginFailoverCommitWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute test failover cleanup of the recovery plan. + /// + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Test failover cleanup input. + /// + public static RecoveryPlan BeginTestFailoverCleanup(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input) + { + return operations.BeginTestFailoverCleanupAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Execute test failover cleanup of the recovery plan. + /// + /// + /// The operation to cleanup test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Test failover cleanup input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginTestFailoverCleanupAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverCleanupInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginTestFailoverCleanupWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute test failover of the recovery plan. + /// + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + public static RecoveryPlan BeginTestFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInput input) + { + return operations.BeginTestFailoverAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Execute test failover of the recovery plan. + /// + /// + /// The operation to start the test failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginTestFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanTestFailoverInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginTestFailoverWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute unplanned failover of the recovery plan. + /// + /// + /// The operation to start the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + public static RecoveryPlan BeginUnplannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInput input) + { + return operations.BeginUnplannedFailoverAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Execute unplanned failover of the recovery plan. + /// + /// + /// The operation to start the failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUnplannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanUnplannedFailoverInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUnplannedFailoverWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute planned failover of the recovery plan. + /// + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + public static RecoveryPlan BeginPlannedFailover(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInput input) + { + return operations.BeginPlannedFailoverAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Execute planned failover of the recovery plan. + /// + /// + /// The operation to start the planned failover of a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Failover input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginPlannedFailoverAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, RecoveryPlanPlannedFailoverInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginPlannedFailoverWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a recovery plan with the given details. + /// + /// + /// The operation to create a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Recovery Plan creation input. + /// + public static RecoveryPlan BeginCreate(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInput input) + { + return operations.BeginCreateAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Creates a recovery plan with the given details. + /// + /// + /// The operation to create a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Recovery Plan creation input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CreateRecoveryPlanInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the specified recovery plan. + /// + /// + /// Delete a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + public static void BeginDelete(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName) + { + operations.BeginDeleteAsync(recoveryPlanName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified recovery plan. + /// + /// + /// Delete a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(recoveryPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates the given recovery plan. + /// + /// + /// The operation to update a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Update recovery plan input + /// + public static RecoveryPlan BeginUpdate(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInput input) + { + return operations.BeginUpdateAsync(recoveryPlanName, input).GetAwaiter().GetResult(); + } + + /// + /// Updates the given recovery plan. + /// + /// + /// The operation to update a recovery plan. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Recovery plan name. + /// + /// + /// Update recovery plan input + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IReplicationRecoveryPlansOperations operations, string recoveryPlanName, UpdateRecoveryPlanInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(recoveryPlanName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of recovery plans. + /// + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationRecoveryPlansOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of recovery plans. + /// + /// + /// Lists the recovery plans in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationRecoveryPlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryServicesProvidersOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryServicesProvidersOperations.cs new file mode 100644 index 000000000000..faab6017fd9e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryServicesProvidersOperations.cs @@ -0,0 +1,1689 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationRecoveryServicesProvidersOperations operations. + /// + internal partial class ReplicationRecoveryServicesProvidersOperations : IServiceOperations, IReplicationRecoveryServicesProvidersOperations + { + /// + /// Initializes a new instance of the ReplicationRecoveryServicesProvidersOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationRecoveryServicesProvidersOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Refresh details from the recovery services provider. + /// + /// + /// The operation to refresh the information from the recovery services + /// provider. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> RefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRefreshProviderWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes provider from fabric. + /// Note: Deleting provider for any fabric other than SingleHost is + /// unsupported. To + /// maintain backward compatibility for released clients the object + /// "deleteRspInput" is + /// used (if the object is empty we assume that it is old client and continue + /// the old + /// behavior). + /// + /// + /// The operation to removes/delete(unregister) a recovery services provider + /// from the vault + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of a recovery services provider. + /// + /// + /// Gets the details of registered recovery services provider. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (providerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("providerName", providerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Purges recovery service provider from fabric + /// + /// + /// The operation to purge(force delete) a recovery services provider from the + /// vault. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task PurgeWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginPurgeWithHttpMessagesAsync(fabricName, providerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of registered recovery services providers for the fabric. + /// + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// Fabric name + /// + /// + /// 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 Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of registered recovery services providers in the vault. + /// This is a view only api. + /// + /// + /// Lists the registered recovery services providers in the vault + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Refresh details from the recovery services provider. + /// + /// + /// The operation to refresh the information from the recovery services + /// provider. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// 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 Task> BeginRefreshProviderWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (providerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("providerName", providerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRefreshProvider", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes provider from fabric. + /// Note: Deleting provider for any fabric other than SingleHost is + /// unsupported. To + /// maintain backward compatibility for released clients the object + /// "deleteRspInput" is + /// used (if the object is empty we assume that it is old client and continue + /// the old + /// behavior). + /// + /// + /// The operation to removes/delete(unregister) a recovery services provider + /// from the vault + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (providerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("providerName", providerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Purges recovery service provider from fabric + /// + /// + /// The operation to purge(force delete) a recovery services provider from the + /// vault. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// 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 Task BeginPurgeWithHttpMessagesAsync(string fabricName, string providerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (providerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "providerName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("providerName", providerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginPurge", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{providerName}", System.Uri.EscapeDataString(providerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of registered recovery services providers for the fabric. + /// + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of registered recovery services providers in the vault. + /// This is a view only api. + /// + /// + /// Lists the registered recovery services providers in the vault + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryServicesProvidersOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryServicesProvidersOperationsExtensions.cs new file mode 100644 index 000000000000..c66a1f27049c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationRecoveryServicesProvidersOperationsExtensions.cs @@ -0,0 +1,534 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationRecoveryServicesProvidersOperations. + /// + public static partial class ReplicationRecoveryServicesProvidersOperationsExtensions + { + /// + /// Refresh details from the recovery services provider. + /// + /// + /// The operation to refresh the information from the recovery services + /// provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static RecoveryServicesProvider RefreshProvider(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + return operations.RefreshProviderAsync(fabricName, providerName).GetAwaiter().GetResult(); + } + + /// + /// Refresh details from the recovery services provider. + /// + /// + /// The operation to refresh the information from the recovery services + /// provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async Task RefreshProviderAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RefreshProviderWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes provider from fabric. + /// Note: Deleting provider for any fabric other than SingleHost is + /// unsupported. To + /// maintain backward compatibility for released clients the object + /// "deleteRspInput" is + /// used (if the object is empty we assume that it is old client and continue + /// the old + /// behavior). + /// + /// + /// The operation to removes/delete(unregister) a recovery services provider + /// from the vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static void Delete(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + operations.DeleteAsync(fabricName, providerName).GetAwaiter().GetResult(); + } + + /// + /// Deletes provider from fabric. + /// Note: Deleting provider for any fabric other than SingleHost is + /// unsupported. To + /// maintain backward compatibility for released clients the object + /// "deleteRspInput" is + /// used (if the object is empty we assume that it is old client and continue + /// the old + /// behavior). + /// + /// + /// The operation to removes/delete(unregister) a recovery services provider + /// from the vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the details of a recovery services provider. + /// + /// + /// Gets the details of registered recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name + /// + public static RecoveryServicesProvider Get(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + return operations.GetAsync(fabricName, providerName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of a recovery services provider. + /// + /// + /// Gets the details of registered recovery services provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Purges recovery service provider from fabric + /// + /// + /// The operation to purge(force delete) a recovery services provider from the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static void Purge(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + operations.PurgeAsync(fabricName, providerName).GetAwaiter().GetResult(); + } + + /// + /// Purges recovery service provider from fabric + /// + /// + /// The operation to purge(force delete) a recovery services provider from the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async Task PurgeAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.PurgeWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the list of registered recovery services providers for the fabric. + /// + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name + /// + public static IPage ListByReplicationFabrics(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName) + { + return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of registered recovery services providers for the fabric. + /// + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of registered recovery services providers in the vault. + /// This is a view only api. + /// + /// + /// Lists the registered recovery services providers in the vault + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationRecoveryServicesProvidersOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of registered recovery services providers in the vault. + /// This is a view only api. + /// + /// + /// Lists the registered recovery services providers in the vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationRecoveryServicesProvidersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Refresh details from the recovery services provider. + /// + /// + /// The operation to refresh the information from the recovery services + /// provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static RecoveryServicesProvider BeginRefreshProvider(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + return operations.BeginRefreshProviderAsync(fabricName, providerName).GetAwaiter().GetResult(); + } + + /// + /// Refresh details from the recovery services provider. + /// + /// + /// The operation to refresh the information from the recovery services + /// provider. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRefreshProviderAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginRefreshProviderWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes provider from fabric. + /// Note: Deleting provider for any fabric other than SingleHost is + /// unsupported. To + /// maintain backward compatibility for released clients the object + /// "deleteRspInput" is + /// used (if the object is empty we assume that it is old client and continue + /// the old + /// behavior). + /// + /// + /// The operation to removes/delete(unregister) a recovery services provider + /// from the vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static void BeginDelete(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + operations.BeginDeleteAsync(fabricName, providerName).GetAwaiter().GetResult(); + } + + /// + /// Deletes provider from fabric. + /// Note: Deleting provider for any fabric other than SingleHost is + /// unsupported. To + /// maintain backward compatibility for released clients the object + /// "deleteRspInput" is + /// used (if the object is empty we assume that it is old client and continue + /// the old + /// behavior). + /// + /// + /// The operation to removes/delete(unregister) a recovery services provider + /// from the vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Purges recovery service provider from fabric + /// + /// + /// The operation to purge(force delete) a recovery services provider from the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + public static void BeginPurge(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName) + { + operations.BeginPurgeAsync(fabricName, providerName).GetAwaiter().GetResult(); + } + + /// + /// Purges recovery service provider from fabric + /// + /// + /// The operation to purge(force delete) a recovery services provider from the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Recovery services provider name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginPurgeAsync(this IReplicationRecoveryServicesProvidersOperations operations, string fabricName, string providerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginPurgeWithHttpMessagesAsync(fabricName, providerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the list of registered recovery services providers for the fabric. + /// + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationFabricsNext(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink) + { + return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of registered recovery services providers for the fabric. + /// + /// + /// Lists the registered recovery services providers for the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsNextAsync(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of registered recovery services providers in the vault. + /// This is a view only api. + /// + /// + /// Lists the registered recovery services providers in the vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of registered recovery services providers in the vault. + /// This is a view only api. + /// + /// + /// Lists the registered recovery services providers in the vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationRecoveryServicesProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationMappingsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationMappingsOperations.cs new file mode 100644 index 000000000000..d1b50ad1d213 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationMappingsOperations.cs @@ -0,0 +1,1513 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationStorageClassificationMappingsOperations operations. + /// + internal partial class ReplicationStorageClassificationMappingsOperations : IServiceOperations, IReplicationStorageClassificationMappingsOperations + { + /// + /// Initializes a new instance of the ReplicationStorageClassificationMappingsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationStorageClassificationMappingsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets the details of a storage classification mapping. + /// + /// + /// Gets the details of the specified storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (storageClassificationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + } + if (storageClassificationMappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationMappingName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("storageClassificationName", storageClassificationName); + tracingParameters.Add("storageClassificationMappingName", storageClassificationMappingName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); + _url = _url.Replace("{storageClassificationMappingName}", System.Uri.EscapeDataString(storageClassificationMappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create storage classification mapping. + /// + /// + /// The operation to create a storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// Pairing input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput pairingInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, pairingInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a storage classification mapping. + /// + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of storage classification mappings objects under a storage. + /// + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// Fabric name. + /// + /// + /// Storage classfication name. + /// + /// + /// 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 Task>> ListByReplicationStorageClassificationsWithHttpMessagesAsync(string fabricName, string storageClassificationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (storageClassificationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("storageClassificationName", storageClassificationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationStorageClassifications", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of storage classification mappings objects under a vault. + /// + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create storage classification mapping. + /// + /// + /// The operation to create a storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// Pairing input. + /// + /// + /// 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 Task> BeginCreateWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput pairingInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (storageClassificationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + } + if (storageClassificationMappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationMappingName"); + } + if (pairingInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "pairingInput"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("storageClassificationName", storageClassificationName); + tracingParameters.Add("storageClassificationMappingName", storageClassificationMappingName); + tracingParameters.Add("pairingInput", pairingInput); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); + _url = _url.Replace("{storageClassificationMappingName}", System.Uri.EscapeDataString(storageClassificationMappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(pairingInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pairingInput, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete a storage classification mapping. + /// + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string fabricName, string storageClassificationName, string storageClassificationMappingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (storageClassificationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + } + if (storageClassificationMappingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationMappingName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("storageClassificationName", storageClassificationName); + tracingParameters.Add("storageClassificationMappingName", storageClassificationMappingName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); + _url = _url.Replace("{storageClassificationMappingName}", System.Uri.EscapeDataString(storageClassificationMappingName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of storage classification mappings objects under a storage. + /// + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationStorageClassificationsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of storage classification mappings objects under a vault. + /// + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationMappingsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationMappingsOperationsExtensions.cs new file mode 100644 index 000000000000..c4d03b94f06d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationMappingsOperationsExtensions.cs @@ -0,0 +1,452 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationStorageClassificationMappingsOperations. + /// + public static partial class ReplicationStorageClassificationMappingsOperationsExtensions + { + /// + /// Gets the details of a storage classification mapping. + /// + /// + /// Gets the details of the specified storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + public static StorageClassificationMapping Get(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) + { + return operations.GetAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of a storage classification mapping. + /// + /// + /// Gets the details of the specified storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create storage classification mapping. + /// + /// + /// The operation to create a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// Pairing input. + /// + public static StorageClassificationMapping Create(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput pairingInput) + { + return operations.CreateAsync(fabricName, storageClassificationName, storageClassificationMappingName, pairingInput).GetAwaiter().GetResult(); + } + + /// + /// Create storage classification mapping. + /// + /// + /// The operation to create a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// Pairing input. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput pairingInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, pairingInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a storage classification mapping. + /// + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + public static void Delete(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) + { + operations.DeleteAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); + } + + /// + /// Delete a storage classification mapping. + /// + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the list of storage classification mappings objects under a storage. + /// + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classfication name. + /// + public static IPage ListByReplicationStorageClassifications(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName) + { + return operations.ListByReplicationStorageClassificationsAsync(fabricName, storageClassificationName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of storage classification mappings objects under a storage. + /// + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classfication name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationStorageClassificationsAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationStorageClassificationsWithHttpMessagesAsync(fabricName, storageClassificationName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of storage classification mappings objects under a vault. + /// + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationStorageClassificationMappingsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of storage classification mappings objects under a vault. + /// + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationStorageClassificationMappingsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create storage classification mapping. + /// + /// + /// The operation to create a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// Pairing input. + /// + public static StorageClassificationMapping BeginCreate(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput pairingInput) + { + return operations.BeginCreateAsync(fabricName, storageClassificationName, storageClassificationMappingName, pairingInput).GetAwaiter().GetResult(); + } + + /// + /// Create storage classification mapping. + /// + /// + /// The operation to create a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// Pairing input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput pairingInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, pairingInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a storage classification mapping. + /// + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + public static void BeginDelete(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName) + { + operations.BeginDeleteAsync(fabricName, storageClassificationName, storageClassificationMappingName).GetAwaiter().GetResult(); + } + + /// + /// Delete a storage classification mapping. + /// + /// + /// The operation to delete a storage classification mapping. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// Storage classification mapping name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationStorageClassificationMappingsOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, storageClassificationName, storageClassificationMappingName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the list of storage classification mappings objects under a storage. + /// + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationStorageClassificationsNext(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink) + { + return operations.ListByReplicationStorageClassificationsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of storage classification mappings objects under a storage. + /// + /// + /// Lists the storage classification mappings for the fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationStorageClassificationsNextAsync(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationStorageClassificationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of storage classification mappings objects under a vault. + /// + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of storage classification mappings objects under a vault. + /// + /// + /// Lists the storage classification mappings in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationStorageClassificationMappingsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationsOperations.cs new file mode 100644 index 000000000000..e3cb70b00c10 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationsOperations.cs @@ -0,0 +1,1007 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationStorageClassificationsOperations operations. + /// + internal partial class ReplicationStorageClassificationsOperations : IServiceOperations, IReplicationStorageClassificationsOperations + { + /// + /// Initializes a new instance of the ReplicationStorageClassificationsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationStorageClassificationsOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets the details of a storage classification. + /// + /// + /// Gets the details of the specified storage classification. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string storageClassificationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (storageClassificationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "storageClassificationName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("storageClassificationName", storageClassificationName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{storageClassificationName}", System.Uri.EscapeDataString(storageClassificationName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of storage classification objects under a fabric. + /// + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// Site name of interest. + /// + /// + /// 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 Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of storage classification objects under a vault. + /// + /// + /// Lists the storage classifications in the vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of storage classification objects under a fabric. + /// + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of storage classification objects under a vault. + /// + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationsOperationsExtensions.cs new file mode 100644 index 000000000000..cc2cdd0d11fa --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationStorageClassificationsOperationsExtensions.cs @@ -0,0 +1,226 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationStorageClassificationsOperations. + /// + public static partial class ReplicationStorageClassificationsOperationsExtensions + { + /// + /// Gets the details of a storage classification. + /// + /// + /// Gets the details of the specified storage classification. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + public static StorageClassification Get(this IReplicationStorageClassificationsOperations operations, string fabricName, string storageClassificationName) + { + return operations.GetAsync(fabricName, storageClassificationName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of a storage classification. + /// + /// + /// Gets the details of the specified storage classification. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Storage classification name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationStorageClassificationsOperations operations, string fabricName, string storageClassificationName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, storageClassificationName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of storage classification objects under a fabric. + /// + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Site name of interest. + /// + public static IPage ListByReplicationFabrics(this IReplicationStorageClassificationsOperations operations, string fabricName) + { + return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of storage classification objects under a fabric. + /// + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Site name of interest. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsAsync(this IReplicationStorageClassificationsOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of storage classification objects under a vault. + /// + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationStorageClassificationsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of storage classification objects under a vault. + /// + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationStorageClassificationsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of storage classification objects under a fabric. + /// + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationFabricsNext(this IReplicationStorageClassificationsOperations operations, string nextPageLink) + { + return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of storage classification objects under a fabric. + /// + /// + /// Lists the storage classifications available in the specified fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsNextAsync(this IReplicationStorageClassificationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of storage classification objects under a vault. + /// + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationStorageClassificationsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of storage classification objects under a vault. + /// + /// + /// Lists the storage classifications in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationStorageClassificationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationvCentersOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationvCentersOperations.cs new file mode 100644 index 000000000000..b16f8761409d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationvCentersOperations.cs @@ -0,0 +1,1724 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ReplicationvCentersOperations operations. + /// + internal partial class ReplicationvCentersOperations : IServiceOperations, IReplicationvCentersOperations + { + /// + /// Initializes a new instance of the ReplicationvCentersOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ReplicationvCentersOperations(SiteRecoveryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SiteRecoveryManagementClient + /// + public SiteRecoveryManagementClient Client { get; private set; } + + /// + /// Gets the details of a vCenter. + /// + /// + /// Gets the details of a registered vCenter server(Add vCenter server.) + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// 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 Task> GetWithHttpMessagesAsync(string fabricName, string vCenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (vCenterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vCenterName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("vCenterName", vCenterName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{vCenterName}", System.Uri.EscapeDataString(vCenterName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Add vCenter. + /// + /// + /// The operation to create a vCenter object.. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The input to the add vCenter operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string fabricName, string vCenterName, AddVCenterRequest addVCenterRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(fabricName, vCenterName, addVCenterRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Remove vCenter operation. + /// + /// + /// The operation to remove(unregister) a registered vCenter server from the + /// vault. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string fabricName, string vCenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(fabricName, vCenterName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update vCenter operation. + /// + /// + /// The operation to update a registered vCenter. + /// + /// + /// Fabric name. + /// + /// + /// vCeneter name + /// + /// + /// The input to the update vCenter operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string fabricName, string vCenterName, UpdateVCenterRequest updateVCenterRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(fabricName, vCenterName, updateVCenterRequest, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the list of vCenter registered under a fabric. + /// + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// Fabric name. + /// + /// + /// 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 Task>> ListByReplicationFabricsWithHttpMessagesAsync(string fabricName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabrics", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of vCenter registered under the vault. + /// + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// 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 Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationvCenters").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Add vCenter. + /// + /// + /// The operation to create a vCenter object.. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The input to the add vCenter 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 Task> BeginCreateWithHttpMessagesAsync(string fabricName, string vCenterName, AddVCenterRequest addVCenterRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (vCenterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vCenterName"); + } + if (addVCenterRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "addVCenterRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("vCenterName", vCenterName); + tracingParameters.Add("addVCenterRequest", addVCenterRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{vCenterName}", System.Uri.EscapeDataString(vCenterName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(addVCenterRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(addVCenterRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Remove vCenter operation. + /// + /// + /// The operation to remove(unregister) a registered vCenter server from the + /// vault. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// 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 Task BeginDeleteWithHttpMessagesAsync(string fabricName, string vCenterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (vCenterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vCenterName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("vCenterName", vCenterName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{vCenterName}", System.Uri.EscapeDataString(vCenterName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Update vCenter operation. + /// + /// + /// The operation to update a registered vCenter. + /// + /// + /// Fabric name. + /// + /// + /// vCeneter name + /// + /// + /// The input to the update vCenter 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 Task> BeginUpdateWithHttpMessagesAsync(string fabricName, string vCenterName, UpdateVCenterRequest updateVCenterRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (vCenterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vCenterName"); + } + if (updateVCenterRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "updateVCenterRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("vCenterName", vCenterName); + tracingParameters.Add("updateVCenterRequest", updateVCenterRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{vCenterName}", System.Uri.EscapeDataString(vCenterName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(updateVCenterRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateVCenterRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of vCenter registered under a fabric. + /// + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListByReplicationFabricsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByReplicationFabricsNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of vCenter registered under the vault. + /// + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The NextLink from the previous successful call to List 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 Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationvCentersOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationvCentersOperationsExtensions.cs new file mode 100644 index 000000000000..ac7c9e6487a4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ReplicationvCentersOperationsExtensions.cs @@ -0,0 +1,524 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ReplicationvCentersOperations. + /// + public static partial class ReplicationvCentersOperationsExtensions + { + /// + /// Gets the details of a vCenter. + /// + /// + /// Gets the details of a registered vCenter server(Add vCenter server.) + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + public static VCenter Get(this IReplicationvCentersOperations operations, string fabricName, string vCenterName) + { + return operations.GetAsync(fabricName, vCenterName).GetAwaiter().GetResult(); + } + + /// + /// Gets the details of a vCenter. + /// + /// + /// Gets the details of a registered vCenter server(Add vCenter server.) + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(fabricName, vCenterName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Add vCenter. + /// + /// + /// The operation to create a vCenter object.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The input to the add vCenter operation. + /// + public static VCenter Create(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, AddVCenterRequest addVCenterRequest) + { + return operations.CreateAsync(fabricName, vCenterName, addVCenterRequest).GetAwaiter().GetResult(); + } + + /// + /// Add vCenter. + /// + /// + /// The operation to create a vCenter object.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The input to the add vCenter operation. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, AddVCenterRequest addVCenterRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(fabricName, vCenterName, addVCenterRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Remove vCenter operation. + /// + /// + /// The operation to remove(unregister) a registered vCenter server from the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + public static void Delete(this IReplicationvCentersOperations operations, string fabricName, string vCenterName) + { + operations.DeleteAsync(fabricName, vCenterName).GetAwaiter().GetResult(); + } + + /// + /// Remove vCenter operation. + /// + /// + /// The operation to remove(unregister) a registered vCenter server from the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(fabricName, vCenterName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Update vCenter operation. + /// + /// + /// The operation to update a registered vCenter. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCeneter name + /// + /// + /// The input to the update vCenter operation. + /// + public static VCenter Update(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, UpdateVCenterRequest updateVCenterRequest) + { + return operations.UpdateAsync(fabricName, vCenterName, updateVCenterRequest).GetAwaiter().GetResult(); + } + + /// + /// Update vCenter operation. + /// + /// + /// The operation to update a registered vCenter. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCeneter name + /// + /// + /// The input to the update vCenter operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, UpdateVCenterRequest updateVCenterRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(fabricName, vCenterName, updateVCenterRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of vCenter registered under a fabric. + /// + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + public static IPage ListByReplicationFabrics(this IReplicationvCentersOperations operations, string fabricName) + { + return operations.ListByReplicationFabricsAsync(fabricName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of vCenter registered under a fabric. + /// + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsAsync(this IReplicationvCentersOperations operations, string fabricName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsWithHttpMessagesAsync(fabricName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of vCenter registered under the vault. + /// + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IReplicationvCentersOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets the list of vCenter registered under the vault. + /// + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IReplicationvCentersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Add vCenter. + /// + /// + /// The operation to create a vCenter object.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The input to the add vCenter operation. + /// + public static VCenter BeginCreate(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, AddVCenterRequest addVCenterRequest) + { + return operations.BeginCreateAsync(fabricName, vCenterName, addVCenterRequest).GetAwaiter().GetResult(); + } + + /// + /// Add vCenter. + /// + /// + /// The operation to create a vCenter object.. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The input to the add vCenter operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, AddVCenterRequest addVCenterRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(fabricName, vCenterName, addVCenterRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Remove vCenter operation. + /// + /// + /// The operation to remove(unregister) a registered vCenter server from the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + public static void BeginDelete(this IReplicationvCentersOperations operations, string fabricName, string vCenterName) + { + operations.BeginDeleteAsync(fabricName, vCenterName).GetAwaiter().GetResult(); + } + + /// + /// Remove vCenter operation. + /// + /// + /// The operation to remove(unregister) a registered vCenter server from the + /// vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCenter name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(fabricName, vCenterName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Update vCenter operation. + /// + /// + /// The operation to update a registered vCenter. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCeneter name + /// + /// + /// The input to the update vCenter operation. + /// + public static VCenter BeginUpdate(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, UpdateVCenterRequest updateVCenterRequest) + { + return operations.BeginUpdateAsync(fabricName, vCenterName, updateVCenterRequest).GetAwaiter().GetResult(); + } + + /// + /// Update vCenter operation. + /// + /// + /// The operation to update a registered vCenter. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// vCeneter name + /// + /// + /// The input to the update vCenter operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IReplicationvCentersOperations operations, string fabricName, string vCenterName, UpdateVCenterRequest updateVCenterRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(fabricName, vCenterName, updateVCenterRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of vCenter registered under a fabric. + /// + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByReplicationFabricsNext(this IReplicationvCentersOperations operations, string nextPageLink) + { + return operations.ListByReplicationFabricsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of vCenter registered under a fabric. + /// + /// + /// Lists the vCenter servers registered in a fabric. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByReplicationFabricsNextAsync(this IReplicationvCentersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByReplicationFabricsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of vCenter registered under the vault. + /// + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IReplicationvCentersOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of vCenter registered under the vault. + /// + /// + /// Lists the vCenter servers registered in the vault. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IReplicationvCentersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SiteRecoveryManagementClient.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SiteRecoveryManagementClient.cs new file mode 100644 index 000000000000..8fd8376a0664 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SiteRecoveryManagementClient.cs @@ -0,0 +1,482 @@ +// 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.RecoveryServices.SiteRecovery +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.RecoveryServices; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + + public partial class SiteRecoveryManagementClient : ServiceClient, ISiteRecoveryManagementClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// The subscription Id. + /// + public string SubscriptionId { get; set; } + + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + public string ResourceGroupName { get; set; } + + /// + /// The name of the recovery services vault. + /// + public string ResourceName { get; set; } + + /// + /// Client Api Version. + /// + public string ApiVersion { get; private set; } + + /// + /// Gets or sets the preferred language for the response. + /// + public string AcceptLanguage { get; set; } + + /// + /// Gets or sets the retry timeout in seconds for Long Running Operations. + /// Default value is 30. + /// + public int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// When set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. + /// + public bool? GenerateClientRequestId { get; set; } + + /// + /// Gets the IReplicationProtectedItemsOperations. + /// + public virtual IReplicationProtectedItemsOperations ReplicationProtectedItems { get; private set; } + + /// + /// Gets the IReplicationNetworkMappingsOperations. + /// + public virtual IReplicationNetworkMappingsOperations ReplicationNetworkMappings { get; private set; } + + /// + /// Gets the IReplicationFabricsOperations. + /// + public virtual IReplicationFabricsOperations ReplicationFabrics { get; private set; } + + /// + /// Gets the IReplicationvCentersOperations. + /// + public virtual IReplicationvCentersOperations ReplicationvCenters { get; private set; } + + /// + /// Gets the IReplicationStorageClassificationMappingsOperations. + /// + public virtual IReplicationStorageClassificationMappingsOperations ReplicationStorageClassificationMappings { get; private set; } + + /// + /// Gets the IReplicationStorageClassificationsOperations. + /// + public virtual IReplicationStorageClassificationsOperations ReplicationStorageClassifications { get; private set; } + + /// + /// Gets the IReplicationRecoveryServicesProvidersOperations. + /// + public virtual IReplicationRecoveryServicesProvidersOperations ReplicationRecoveryServicesProviders { get; private set; } + + /// + /// Gets the IRecoveryPointsOperations. + /// + public virtual IRecoveryPointsOperations RecoveryPoints { get; private set; } + + /// + /// Gets the IReplicationRecoveryPlansOperations. + /// + public virtual IReplicationRecoveryPlansOperations ReplicationRecoveryPlans { get; private set; } + + /// + /// Gets the IReplicationProtectionContainersOperations. + /// + public virtual IReplicationProtectionContainersOperations ReplicationProtectionContainers { get; private set; } + + /// + /// Gets the IReplicationProtectionContainerMappingsOperations. + /// + public virtual IReplicationProtectionContainerMappingsOperations ReplicationProtectionContainerMappings { get; private set; } + + /// + /// Gets the IReplicationProtectableItemsOperations. + /// + public virtual IReplicationProtectableItemsOperations ReplicationProtectableItems { get; private set; } + + /// + /// Gets the IReplicationPoliciesOperations. + /// + public virtual IReplicationPoliciesOperations ReplicationPolicies { get; private set; } + + /// + /// Gets the IOperations. + /// + public virtual IOperations Operations { get; private set; } + + /// + /// Gets the IReplicationNetworksOperations. + /// + public virtual IReplicationNetworksOperations ReplicationNetworks { get; private set; } + + /// + /// Gets the IReplicationLogicalNetworksOperations. + /// + public virtual IReplicationLogicalNetworksOperations ReplicationLogicalNetworks { get; private set; } + + /// + /// Gets the IReplicationJobsOperations. + /// + public virtual IReplicationJobsOperations ReplicationJobs { get; private set; } + + /// + /// Gets the IReplicationEventsOperations. + /// + public virtual IReplicationEventsOperations ReplicationEvents { get; private set; } + + /// + /// Gets the IReplicationAlertSettingsOperations. + /// + public virtual IReplicationAlertSettingsOperations ReplicationAlertSettings { get; private set; } + + /// + /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected SiteRecoveryManagementClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected SiteRecoveryManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected SiteRecoveryManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected SiteRecoveryManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public SiteRecoveryManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public SiteRecoveryManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public SiteRecoveryManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the SiteRecoveryManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public SiteRecoveryManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + ReplicationProtectedItems = new ReplicationProtectedItemsOperations(this); + ReplicationNetworkMappings = new ReplicationNetworkMappingsOperations(this); + ReplicationFabrics = new ReplicationFabricsOperations(this); + ReplicationvCenters = new ReplicationvCentersOperations(this); + ReplicationStorageClassificationMappings = new ReplicationStorageClassificationMappingsOperations(this); + ReplicationStorageClassifications = new ReplicationStorageClassificationsOperations(this); + ReplicationRecoveryServicesProviders = new ReplicationRecoveryServicesProvidersOperations(this); + RecoveryPoints = new RecoveryPointsOperations(this); + ReplicationRecoveryPlans = new ReplicationRecoveryPlansOperations(this); + ReplicationProtectionContainers = new ReplicationProtectionContainersOperations(this); + ReplicationProtectionContainerMappings = new ReplicationProtectionContainerMappingsOperations(this); + ReplicationProtectableItems = new ReplicationProtectableItemsOperations(this); + ReplicationPolicies = new ReplicationPoliciesOperations(this); + Operations = new Operations(this); + ReplicationNetworks = new ReplicationNetworksOperations(this); + ReplicationLogicalNetworks = new ReplicationLogicalNetworksOperations(this); + ReplicationJobs = new ReplicationJobsOperations(this); + ReplicationEvents = new ReplicationEventsOperations(this); + ReplicationAlertSettings = new ReplicationAlertSettingsOperations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2016-08-10"; + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + CustomInitialize(); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj new file mode 100644 index 000000000000..e82ade9be8fe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj @@ -0,0 +1,18 @@ + + + + Microsoft.Azure.Management.RecoveryServices.SiteRecovery + Provides developers with libraries for the updated recovery services site recovery feature under Azure Resource manager. + 1.0.0-preview + Microsoft.Azure.Management.RecoveryServices.SiteRecovery + Microsoft Azure resource management + + + net452;netstandard1.4 + + + + + + + diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Properties/AssemblyInfo.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..6ae870a4f0ca --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Reflection; +using System.Resources; + +[assembly: AssemblyTitle("Microsoft Azure Recovery Services SiteRecovery Library")] +[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Recovery Services SiteRecovery Resources.")] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/generate.cmd b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/generate.cmd new file mode 100644 index 000000000000..0ea1512ebbcd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/generate.cmd @@ -0,0 +1,17 @@ +:: +:: Microsoft Azure SDK for Net - Generate library code +:: Copyright (C) Microsoft Corporation. All Rights Reserved. +:: + +@echo off +set autoRestVersion=1.0.1-20170419-2300-nightly +if "%1" == "" ( + set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-recoveryservicessiterecovery/2016-08-10/swagger/service.json" +) else ( + set specFile="%1" +) +set repoRoot=%~dp0..\..\..\.. +set generateFolder=%~dp0Generated + +if exist %generateFolder% rd /S /Q %generateFolder% +call "%repoRoot%\tools\autorest.gen.cmd" %specFile% Microsoft.Azure.Management.RecoveryServices.SiteRecovery %autoRestVersion% %generateFolder% "-FT 1" diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/ClientManagementUtilities.cs b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/ClientManagementUtilities.cs new file mode 100644 index 000000000000..d436fb5642d8 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/ClientManagementUtilities.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + +namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests +{ + public static class ClientManagementUtilities + { + public static SiteRecoveryManagementClient GetSiteRecoveryClient(this TestHelper testHelper, MockContext context) + { + return context.GetServiceClient(); + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/RecordedDelegatingHandler.cs b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/RecordedDelegatingHandler.cs new file mode 100644 index 000000000000..514e0c74253a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/RecordedDelegatingHandler.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading.Tasks; + +namespace SiteRecovery.Tests +{ + public class RecordedDelegatingHandler : DelegatingHandler + { + private HttpResponseMessage _response; + + public RecordedDelegatingHandler() + { + StatusCodeToReturn = HttpStatusCode.Created; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + } + + public RecordedDelegatingHandler(HttpResponseMessage response) + { + StatusCodeToReturn = HttpStatusCode.Created; + SubsequentStatusCodeToReturn = StatusCodeToReturn; + _response = response; + } + + public HttpStatusCode StatusCodeToReturn { get; set; } + + public HttpStatusCode SubsequentStatusCodeToReturn { get; set; } + + public string Request { get; private set; } + + public HttpRequestHeaders RequestHeaders { get; private set; } + + public HttpContentHeaders ContentHeaders { get; private set; } + + public HttpMethod Method { get; private set; } + + public Uri Uri { get; private set; } + + public bool IsPassThrough { get; set; } + + private int counter; + + protected override async Task SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) + { + counter++; + // Save request + if (request.Content == null) + { + Request = string.Empty; + } + else + { + Request = await request.Content.ReadAsStringAsync(); + } + RequestHeaders = request.Headers; + if (request.Content != null) + { + ContentHeaders = request.Content.Headers; + } + Method = request.Method; + Uri = request.RequestUri; + + // Prepare response + if (IsPassThrough) + { + return await base.SendAsync(request, cancellationToken); + } + else + { + if (_response != null && counter == 1) + { + return _response; + } + else + { + var statusCode = StatusCodeToReturn; + if (counter > 1) + statusCode = SubsequentStatusCodeToReturn; + HttpResponseMessage response = new HttpResponseMessage(statusCode); + response.Content = new StringContent(""); + return response; + } + } + } + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/SiteRecoveryTestsBase.cs b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/SiteRecoveryTestsBase.cs new file mode 100644 index 000000000000..b6908e3243fd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/SiteRecoveryTestsBase.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Net; +using System.Security.Cryptography; +using System.Text; +using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; +using Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models; +using Newtonsoft.Json; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + +namespace SiteRecovery.Tests +{ + public class SiteRecoveryTestsBase : TestBase + { + public static string VaultKey = "CIK"; + + protected readonly RecordedDelegatingHandler CustomHttpHandler + = new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }; + + public string GenerateAgentAuthenticationHeader(string clientRequestId) + { + CikTokenDetails cikTokenDetails = new CikTokenDetails(); + + DateTime currentDateTime = DateTime.Now; + currentDateTime = currentDateTime.AddHours(-1); + cikTokenDetails.NotBeforeTimestamp = TimeZoneInfo.ConvertTime(currentDateTime, TimeZoneInfo.Utc); + cikTokenDetails.NotAfterTimestamp = cikTokenDetails.NotBeforeTimestamp.AddHours(6); + cikTokenDetails.ClientRequestId = clientRequestId; + cikTokenDetails.Version = new Version(1, 2); + cikTokenDetails.PropertyBag = new Dictionary(); + + string shaInput = JsonConvert.SerializeObject(cikTokenDetails); + + HMACSHA256 sha = new HMACSHA256(Encoding.UTF8.GetBytes(VaultKey)); + cikTokenDetails.Hmac = + Convert.ToBase64String(sha.ComputeHash(Encoding.UTF8.GetBytes(shaInput))); + cikTokenDetails.HashFunction = CikSupportedHashFunctions.HMACSHA256.ToString(); + + return JsonConvert.SerializeObject(cikTokenDetails); + } + + public Dictionary> GetRequestHeaders(bool shouldSignRequest = true) + { + Dictionary> customHeaders = new Dictionary>(); + + string clientRequestId = Guid.NewGuid().ToString() + "-" + DateTime.Now.ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ssZ") + "-P"; + + customHeaders.Add("x-ms-client-request-id", new List { clientRequestId }); + + if (shouldSignRequest) + { + customHeaders.Add("Agent-Authentication", new List { this.GenerateAgentAuthenticationHeader(clientRequestId) }); + } + else + { + customHeaders.Add("Agent-Authentication", new List { "" }); + } + + return customHeaders; + } + + #region CIK + + public class CikTokenDetails + { + public DateTime NotBeforeTimestamp { get; set; } + public DateTime NotAfterTimestamp { get; set; } + public string ClientRequestId { get; set; } + public string HashFunction { get; set; } + public string Hmac { get; set; } + public System.Version Version { get; set; } + public Dictionary PropertyBag { get; set; } + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("NotBeforeTimestamp: " + NotBeforeTimestamp); + sb.AppendLine("NotAfterTimestamp: " + NotAfterTimestamp); + sb.AppendLine("ClientRequestId: " + ClientRequestId); + sb.AppendLine("Hmac: " + Hmac); + return sb.ToString(); + } + } + + public enum CikSupportedHashFunctions + { + HMACSHA256, + + HMACSHA384, + + HMACSHA512 + } + + #endregion + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/TestHelper.cs b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/TestHelper.cs new file mode 100644 index 000000000000..a50668211e82 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Helpers/TestHelper.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; +using Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models; +using Microsoft.Rest.Azure; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Xunit; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests +{ + public class TestHelper: IDisposable + { + private const string resourceNamespace = "Microsoft.RecoveryServices"; + private const string resourceGroupName = "siterecoveryprod1"; + private const string vaultName = "SDKVault"; + private const string location = "westus"; + + public SiteRecoveryManagementClient SiteRecoveryClient { get; private set; } + + public void Initialize(MockContext context) + { + this.SiteRecoveryClient = this.GetSiteRecoveryClient(context); + this.SiteRecoveryClient.ResourceGroupName = resourceGroupName; + this.SiteRecoveryClient.ResourceName = vaultName; + } + + public void Dispose() + { + SiteRecoveryClient.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Properties/AssemblyInfo.cs b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..333705594415 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Xunit; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("RecoveryServices.SiteRecovery.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("RecoveryServices.SiteRecovery.Tests")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1050e361-5461-40c6-a866-6b90e01aac9c")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/RecoveryServices.SiteRecovery.Tests.csproj b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/RecoveryServices.SiteRecovery.Tests.csproj new file mode 100644 index 000000000000..6b84e08914af --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/RecoveryServices.SiteRecovery.Tests.csproj @@ -0,0 +1,25 @@ + + + + RecoveryServices.SiteRecovery.Tests + RecoveryServices.SiteRecovery.Tests Class Library + RecoveryServices.SiteRecovery.Tests + 1.0.0-preview + + + netcoreapp1.1 + + + + + + + PreserveNewest + + + + + + + + diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/ScenarioTests/ASRTests.cs b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/ScenarioTests/ASRTests.cs new file mode 100644 index 000000000000..a8b332fee3f9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/ScenarioTests/ASRTests.cs @@ -0,0 +1,1531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; +using Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Xunit; +using System.Linq; +using SiteRecovery.Tests; + +namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests +{ + public class ASRTests : SiteRecoveryTestsBase + { + private const string targetResourceGroup = "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1"; + private const string storageAccountId = "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai"; + private const string azureNetworkId = "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai"; + private const string siteName = "SiteRecoveryTestSite1"; + private const string vmmFabric = "d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087"; + private const string location = "westus"; + private const string providerName = "ba2a2d25-377f-4f4b-94a4-2981c79b0998"; + private const string policyName = "protectionprofile1"; + private const string recoveryCloud = "Microsoft Azure"; + private const string protectionContainerMappingName = "PCMapping"; + private const string networkMappingName = "NWMapping"; + private const string vmName = "vm1"; + private const string vmId = "f8491e4f-817a-40dd-a90c-af773978c75b"; + private const string vmName2 = "vm2"; + private const string rpName = "rpTest1"; + private const string emailAddress = "ronehr@microsoft.com"; + private const string alertSettingName = "defaultAlertSetting"; + private const string vmNetworkName = "c41eda86-96d5-4541-a6f8-c47d4b75a24a"; + + TestHelper testHelper { get; set; } + + public ASRTests() + { + testHelper = new TestHelper(); + } + + [Fact] + public void CreateSite() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + + FabricCreationInput siteInput = new FabricCreationInput(); + siteInput.Properties = new FabricCreationInputProperties(); + + var client = testHelper.SiteRecoveryClient; + + var site = client.ReplicationFabrics.Create(siteName, siteInput); + var response = client.ReplicationFabrics.Get(siteName); + Assert.True(response.Name == siteName, "Site Name can not be different"); + } + } + + [Fact] + public void GetSite() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + Assert.NotNull(fabric.Id); + } + } + + [Fact] + public void ListSite() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabricList = client.ReplicationFabrics.List(); + Assert.True(fabricList.Count() > 0, "Atleast one fabric should be present"); + } + } + + [Fact] + public void DeleteSite() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + client.ReplicationFabrics.Delete(siteName); + } + } + + [Fact] + public void PurgeSite() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + client.ReplicationFabrics.Purge(siteName); + } + } + + [Fact] + public void CheckConsistency() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + client.ReplicationFabrics.CheckConsistency(siteName); + var fabric = client.ReplicationFabrics.Get(siteName); + } + } + + [Fact] + public void RenewCertificate() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + RenewCertificateInputProperties inputProperties = new RenewCertificateInputProperties() + { + RenewCertificateType = "Cloud" + }; + + RenewCertificateInput input = new RenewCertificateInput() + { + Properties = inputProperties + }; + + client.ReplicationFabrics.RenewCertificate(siteName, input); + var fabric = client.ReplicationFabrics.Get(siteName); + } + } + + [Fact] + public void GetRSP() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var recoveryServivesProviderResponse = + client.ReplicationRecoveryServicesProviders.Get(fabric.Name, providerName); + + Assert.NotNull(recoveryServivesProviderResponse.Properties.FriendlyName); + Assert.NotNull(recoveryServivesProviderResponse.Name); + Assert.NotNull(recoveryServivesProviderResponse.Id); + } + } + + [Fact] + public void ListRspByFabric() + { + using (var context = MockContext.Start(GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var rspList = client.ReplicationRecoveryServicesProviders.ListByReplicationFabrics(fabric.Name); + + Assert.True(rspList.Count() > 0, "Atleast one replication recovery services provider should be present"); + } + } + + [Fact] + public void ListRsp() + { + using (var context = MockContext.Start(GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var rspList = client.ReplicationRecoveryServicesProviders.List(); + + Assert.True(rspList.Count() > 0, "Atleast one replication recovery services provider should be present"); + } + } + + [Fact] + public void DeleteRsp() + { + using (var context = MockContext.Start(GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + client.ReplicationRecoveryServicesProviders.Delete(fabric.Name, providerName); + } + } + + [Fact] + public void PurgeRsp() + { + using (var context = MockContext.Start(GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + string rspName = "74ef040f-fa15-4f71-9652-c27d5d19d575"; + var fabric = client.ReplicationFabrics.Get(siteName); + client.ReplicationRecoveryServicesProviders.Purge(fabric.Name, rspName); + } + } + + [Fact] + public void RefreshRsp() + { + using (var context = MockContext.Start(GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + client.ReplicationRecoveryServicesProviders.RefreshProvider(fabric.Name, providerName); + var rsp = client.ReplicationRecoveryServicesProviders.Get(fabric.Name, providerName); + Assert.NotNull(rsp.Id); + } + } + + [Fact] + public void GetContainer() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabricResponse = client.ReplicationFabrics.Get(siteName); + + var protectionContainerList = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabricResponse.Name).ToList(); + var protectionContainer = client.ReplicationProtectionContainers.Get(fabricResponse.Name, + protectionContainerList.FirstOrDefault().Name); + + Assert.NotNull(protectionContainer.Properties.FriendlyName); + Assert.NotNull(protectionContainer.Name); + Assert.NotNull(protectionContainer.Id); + } + } + + [Fact] + public void EnumerateContainer() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabricResponse = client.ReplicationFabrics.Get(siteName); + + var protectionContainerList = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabricResponse.Name).ToList(); + + Assert.True(protectionContainerList.Count > 0, "Atleast one container should be present."); + } + } + + [Fact] + public void ListAllContainers() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabricResponse = client.ReplicationFabrics.Get(siteName); + + var protectionContainerList = + client.ReplicationProtectionContainers.List().ToList(); + + Assert.True(protectionContainerList.Count > 0, "Atleast one container should be present."); + } + } + + [Fact] + public void CreatePolicy() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + HyperVReplicaAzurePolicyInput h2ASpecificInput = new HyperVReplicaAzurePolicyInput() + { + RecoveryPointHistoryDuration = 4, + ApplicationConsistentSnapshotFrequencyInHours = 2, + ReplicationInterval = 300, + OnlineReplicationStartTime = null, + Encryption = "Disable", + StorageAccounts = new List() { storageAccountId } + }; + + CreatePolicyInputProperties inputProperties = new CreatePolicyInputProperties() + { + ProviderSpecificInput = h2ASpecificInput + }; + + CreatePolicyInput input = new CreatePolicyInput() + { + Properties = inputProperties + }; + + var response = client.ReplicationPolicies.Create(policyName, input); + + var policy = client.ReplicationPolicies.Get(policyName); + } + } + + [Fact] + public void GetPolicy() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var policy = client.ReplicationPolicies.Get(policyName); + Assert.NotNull(policy.Id); + Assert.NotNull(policy.Name); + } + } + + [Fact] + public void ListPolicy() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var policyList = client.ReplicationPolicies.List(); + } + } + + [Fact] + public void UpdatePolicy() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + HyperVReplicaAzurePolicyInput h2ASpecificInput = new HyperVReplicaAzurePolicyInput() + { + RecoveryPointHistoryDuration = 3, + ApplicationConsistentSnapshotFrequencyInHours = 2, + ReplicationInterval = 300, + OnlineReplicationStartTime = null, + Encryption = "Disable", + StorageAccounts = new List() { "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai" } + }; + + UpdatePolicyInputProperties inputProperties = new UpdatePolicyInputProperties() + { + + ReplicationProviderSettings = h2ASpecificInput + }; + + UpdatePolicyInput input = new UpdatePolicyInput() + { + Properties = inputProperties + }; + + var policy = client.ReplicationPolicies.Update(policyName, input); + var response = client.ReplicationPolicies.Get(policyName); + Assert.NotNull(response.Id); + Assert.NotNull(response.Name); + } + } + + [Fact] + public void DeletePolicy() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + client.ReplicationPolicies.Delete(policyName); + } + } + + [Fact] + public void CreatePCMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainerList = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabric.Name).ToList(); + var protectionContainer = client.ReplicationProtectionContainers.Get(fabric.Name, + protectionContainerList.FirstOrDefault().Name); + + var policy = client.ReplicationPolicies.Get(policyName); + + CreateProtectionContainerMappingInputProperties containerMappingInputProperties = + new CreateProtectionContainerMappingInputProperties() + { + PolicyId = policy.Id, + ProviderSpecificInput = new ReplicationProviderSpecificContainerMappingInput(), + TargetProtectionContainerId = recoveryCloud + }; + + CreateProtectionContainerMappingInput containerMappingInput = new CreateProtectionContainerMappingInput() + { + Properties = containerMappingInputProperties + }; + + var response = client.ReplicationProtectionContainerMappings.Create( + fabric.Name, protectionContainer.Name, protectionContainerMappingName, containerMappingInput); + + var protectionContainerMapping = client.ReplicationProtectionContainerMappings.Get( + fabric.Name, protectionContainer.Name, protectionContainerMappingName); + + Assert.NotNull(protectionContainerMapping.Id); + } + } + + [Fact] + public void GetPCMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainerList = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabric.Name).ToList(); + var protectionContainer = client.ReplicationProtectionContainers.Get(fabric.Name, + protectionContainerList.FirstOrDefault().Name); + + var protectionContainerMapping = client.ReplicationProtectionContainerMappings.Get( + fabric.Name, protectionContainer.Name, protectionContainerMappingName); + + Assert.NotNull(protectionContainerMapping.Id); + } + } + + [Fact] + public void EnumeratePCMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabric.Name).FirstOrDefault(); + + var protectionContainerMapping = client.ReplicationProtectionContainerMappings.ListByReplicationProtectionContainers(fabric.Name, protectionContainer.Name); + } + } + + [Fact] + public void ListAllPCMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainerMapping = client.ReplicationProtectionContainerMappings.List(); + } + } + + [Fact] + public void DeletePCMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainerList = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabric.Name).ToList(); + var protectionContainer = client.ReplicationProtectionContainers.Get(fabric.Name, + protectionContainerList.FirstOrDefault().Name); + + client.ReplicationProtectionContainerMappings.Delete( + fabric.Name, protectionContainer.Name, protectionContainerMappingName, new RemoveProtectionContainerMappingInput()); + } + } + + [Fact] + public void PurgePCMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabric.Name).FirstOrDefault(); + + client.ReplicationProtectionContainerMappings.Purge(fabric.Name, protectionContainer.Name, protectionContainerMappingName); + } + } + + [Fact] + public void GetProtectableItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainerList = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabric.Name).ToList(); + var protectionContainer = client.ReplicationProtectionContainers.Get(fabric.Name, + protectionContainerList.FirstOrDefault().Name); + + var protectableItemList = client.ReplicationProtectableItems.ListByReplicationProtectionContainers( + fabric.Name, protectionContainer.Name); + + var protectableItem = protectableItemList.First(item => + item.Properties.FriendlyName.Equals(vmName, StringComparison.OrdinalIgnoreCase)); + + Assert.NotNull(protectableItem.Id); + } + } + + [Fact] + public void EnumerateProtectableItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainerList = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabric.Name).ToList(); + var protectionContainer = client.ReplicationProtectionContainers.Get(fabric.Name, + protectionContainerList.FirstOrDefault().Name); + + var protectableItemList = client.ReplicationProtectableItems.ListByReplicationProtectionContainers( + fabric.Name, protectionContainer.Name).ToList(); + + Assert.True(protectableItemList.Count > 0, "Atleast one protectable item should be present."); + } + } + + [Fact] + public void CreateProtectedItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var policy = client.ReplicationPolicies.Get(policyName); + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(fabric.Name).FirstOrDefault(); + + var protectableItemList = client.ReplicationProtectableItems.ListByReplicationProtectionContainers( + fabric.Name, protectionContainer.Name).ToList(); + var protectableItem = protectableItemList.First(item => + item.Properties.FriendlyName.Equals(vmName2, StringComparison.OrdinalIgnoreCase)); + + var vhdId = (protectableItem.Properties.CustomDetails as HyperVVirtualMachineDetails).DiskDetails[0].VhdId; + DiskDetails osDisk = (protectableItem.Properties.CustomDetails as HyperVVirtualMachineDetails).DiskDetails + .FirstOrDefault(item => item.VhdType == "OperatingSystem"); + if (osDisk != null) + { + vhdId = osDisk.VhdId; + } + + HyperVReplicaAzureEnableProtectionInput h2AEnableDRInput = + new HyperVReplicaAzureEnableProtectionInput() + { + HvHostVmId = (protectableItem.Properties.CustomDetails as HyperVVirtualMachineDetails).SourceItemId, + OsType = "Windows", + VhdId = vhdId, + VmName = protectableItem.Properties.FriendlyName, + TargetStorageAccountId = (policy.Properties.ProviderSpecificDetails as HyperVReplicaAzurePolicyDetails) + .ActiveStorageAccountId, + TargetAzureV2ResourceGroupId = targetResourceGroup, + TargetAzureVmName = protectableItem.Properties.FriendlyName + }; + + EnableProtectionInputProperties enableDRInputProperties = new EnableProtectionInputProperties() + { + PolicyId = policy.Id, + ProtectableItemId = protectableItem.Id, + ProviderSpecificDetails = h2AEnableDRInput + }; + + EnableProtectionInput enableDRInput = new EnableProtectionInput() + { + Properties = enableDRInputProperties + }; + + client.ReplicationProtectedItems.Create(fabric.Name, protectionContainer.Name, protectableItem.Properties.FriendlyName, enableDRInput); + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + } + } + + [Fact] + public void GetProtectedItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainerList = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).ToList(); + var protectionContainer = client.ReplicationProtectionContainers.Get(siteName, + protectionContainerList.FirstOrDefault().Name); + + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName); + Assert.NotNull(protectedItem.Id); + } + } + + [Fact] + public void EnumerateProtectedItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + var protectedItemsList = client.ReplicationProtectedItems.ListByReplicationProtectionContainers(siteName, protectionContainer.Name); + Assert.NotNull(protectedItemsList); + } + } + + [Fact] + public void ListAllProtectedItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectedItemsList = client.ReplicationProtectedItems.List(); + Assert.NotNull(protectedItemsList); + } + } + + [Fact] + public void UpdateProtectedItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + + VMNicInputDetails nicInput = new VMNicInputDetails() + { + NicId = (protectedItem.Properties.ProviderSpecificDetails as HyperVReplicaAzureReplicationDetails).VmNics[0].NicId, + RecoveryVMSubnetName = "Subnet1", + SelectionType = "SelectedByUser" + }; + + UpdateReplicationProtectedItemInputProperties updateInputProperties = new UpdateReplicationProtectedItemInputProperties() + { + RecoveryAzureVMName = protectedItem.Properties.FriendlyName, + RecoveryAzureVMSize = "Basic_A0", + SelectedRecoveryAzureNetworkId = azureNetworkId, + VmNics = new List() { nicInput }, + LicenseType = LicenseType.WindowsServer, + ProviderSpecificDetails = new HyperVReplicaAzureUpdateReplicationProtectedItemInput() + { + RecoveryAzureV2ResourceGroupId = targetResourceGroup + } + }; + + UpdateReplicationProtectedItemInput updateInput = new UpdateReplicationProtectedItemInput() + { + Properties = updateInputProperties + }; + + var response = client.ReplicationProtectedItems.Update(siteName, protectionContainer.Name, vmName2, updateInput); + + var updatedProtecteditem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + } + } + + [Fact] + public void DeleteProtectedItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + DisableProtectionInputProperties inputProperties = new DisableProtectionInputProperties() + { + DisableProtectionReason = DisableProtectionReason.NotSpecified, + ReplicationProviderInput = new DisableProtectionProviderSpecificInput() + }; + + DisableProtectionInput input = new DisableProtectionInput() + { + Properties = inputProperties + }; + + client.ReplicationProtectedItems.Delete(siteName, protectionContainer.Name, vmName2, input); + } + } + + [Fact] + public void PurgeProtectedItem() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + client.ReplicationProtectedItems.Purge(siteName, protectionContainer.Name, vmName); + } + } + + [Fact] + public void RepairReplication() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + client.ReplicationProtectedItems.RepairReplication(siteName, protectionContainer.Name, vmName2); + + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + Assert.NotNull(protectedItem.Id); + } + } + + [Fact] + public void TestFailover() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName); + + string networkId = (protectedItem.Properties.ProviderSpecificDetails as HyperVReplicaAzureReplicationDetails) + .SelectedRecoveryAzureNetworkId; + HyperVReplicaAzureFailoverProviderInput h2AFOInput = new HyperVReplicaAzureFailoverProviderInput() + { + VaultLocation = "West US", + }; + + TestFailoverInputProperties tfoInputProperties = new TestFailoverInputProperties() + { + NetworkId = networkId, + NetworkType = string.IsNullOrEmpty(networkId) ? null : "VmNetworkAsInput", + SkipTestFailoverCleanup = true.ToString(), + ProviderSpecificDetails = h2AFOInput + }; + + TestFailoverInput tfoInput = new TestFailoverInput() + { + Properties = tfoInputProperties + }; + + var response = client.ReplicationProtectedItems.TestFailover(siteName, protectionContainer.Name, vmName, tfoInput); + } + } + + [Fact] + public void TestFailoverCleanup() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName); + + TestFailoverCleanupInputProperties inputProperties = new TestFailoverCleanupInputProperties() + { + Comments = "Cleaning up" + }; + + TestFailoverCleanupInput input = new TestFailoverCleanupInput() + { + Properties = inputProperties + }; + + client.ReplicationProtectedItems.TestFailoverCleanup( + siteName, protectionContainer.Name, vmName, input); + } + } + + [Fact] + public void PlannedFailover() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + + PlannedFailoverInputProperties inputProperties = new PlannedFailoverInputProperties(); + if (protectedItem.Properties.ActiveLocation == "Recovery") + { + HyperVReplicaAzureFailbackProviderInput h2AFailbackInput = new HyperVReplicaAzureFailbackProviderInput() + { + RecoveryVmCreationOption = "NoAction", + DataSyncOption = "ForSynchronization" + }; + + inputProperties.ProviderSpecificDetails = h2AFailbackInput; + } + else + { + HyperVReplicaAzureFailoverProviderInput h2AFailoverInput = new HyperVReplicaAzureFailoverProviderInput() + { + VaultLocation = "West US" + }; + + inputProperties.ProviderSpecificDetails = h2AFailoverInput; + } + + PlannedFailoverInput input = new PlannedFailoverInput() + { + Properties = inputProperties + }; + + client.ReplicationProtectedItems.PlannedFailover(siteName, protectionContainer.Name, vmName2, input); + } + } + + [Fact] + public void UnplannedFailover() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + + HyperVReplicaAzureFailoverProviderInput h2AFailoverInput = new HyperVReplicaAzureFailoverProviderInput() + { + VaultLocation = "West US" + }; + + UnplannedFailoverInputProperties inputProperties = new UnplannedFailoverInputProperties() + { + FailoverDirection = "PrimaryToRecovery", + SourceSiteOperations = "NotRequired", + ProviderSpecificDetails = h2AFailoverInput + }; + + UnplannedFailoverInput input = new UnplannedFailoverInput() + { + Properties = inputProperties + }; + + var response = client.ReplicationProtectedItems.UnplannedFailover(siteName, protectionContainer.Name, vmName2, input); + + var updatedProtectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + } + } + + [Fact] + public void CommitFailover() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + client.ReplicationProtectedItems.FailoverCommit(siteName, protectionContainer.Name, vmName2); + } + } + + [Fact] + public void Reprotect() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + var protectableItem = client.ReplicationProtectableItems.ListByReplicationProtectionContainers( + siteName, protectionContainer.Name).FirstOrDefault(item => + item.Properties.FriendlyName.Equals(vmName2, StringComparison.OrdinalIgnoreCase)); + var protectedItem = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + + var vhdId = (protectableItem.Properties.CustomDetails as HyperVVirtualMachineDetails).DiskDetails[0].VhdId; + DiskDetails osDisk = (protectableItem.Properties.CustomDetails as HyperVVirtualMachineDetails).DiskDetails + .FirstOrDefault(item => item.VhdType == "OperatingSystem"); + if (osDisk != null) + { + vhdId = osDisk.VhdId; + } + + HyperVReplicaAzureReprotectInput h2AInput = new HyperVReplicaAzureReprotectInput() + { + HvHostVmId = (protectableItem.Properties.CustomDetails as HyperVVirtualMachineDetails).SourceItemId, + OsType = "Windows", + VHDId = vhdId, + VmName = protectableItem.Properties.FriendlyName, + StorageAccountId = (protectedItem.Properties.ProviderSpecificDetails as HyperVReplicaAzureReplicationDetails).RecoveryAzureStorageAccount + }; + + ReverseReplicationInputProperties inputProperties = new ReverseReplicationInputProperties() + { + FailoverDirection = "PrimaryToRecovery", + ProviderSpecificDetails = h2AInput + }; + + ReverseReplicationInput input = new ReverseReplicationInput() + { + Properties = inputProperties + }; + + client.ReplicationProtectedItems.Reprotect(siteName, protectionContainer.Name, vmName2, input); + } + } + + [Fact] + public void GetRecoveryPoints() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + var rps = client.RecoveryPoints.ListByReplicationProtectedItems(siteName, protectionContainer.Name, vmName2).ToList(); + var recoveryPoint = client.RecoveryPoints.Get(siteName, protectionContainer.Name, vmName2, rps[rps.Count() / 2].Name); + } + } + + [Fact] + public void ListRecoveryPoints() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + var rps = client.RecoveryPoints.ListByReplicationProtectedItems(siteName, protectionContainer.Name, vmName); + } + } + + [Fact] + public void ApplyRecoveryPoint() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var protectionContainer = + client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + + var rps = client.RecoveryPoints.ListByReplicationProtectedItems(siteName, protectionContainer.Name, vmName2).ToList(); + HyperVReplicaAzureApplyRecoveryPointInput h2APitInput = new HyperVReplicaAzureApplyRecoveryPointInput() + { + VaultLocation = "West US" + }; + + ApplyRecoveryPointInputProperties inputProperties = new ApplyRecoveryPointInputProperties() + { + RecoveryPointId = rps[rps.Count()/2].Id, + ProviderSpecificDetails = h2APitInput + }; + + ApplyRecoveryPointInput input = new ApplyRecoveryPointInput() + { + Properties = inputProperties + }; + + client.ReplicationProtectedItems.ApplyRecoveryPoint(siteName, protectionContainer.Name, vmName2, input); + } + } + + [Fact] + public void CreateRecoveryPlan() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainer = client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + var protectedItem1 = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName); + + RecoveryPlanProtectedItem rpVm1 = new RecoveryPlanProtectedItem() + { + Id = protectedItem1.Id, + VirtualMachineId = protectedItem1.Name + }; + + RecoveryPlanGroup rpGroup = new RecoveryPlanGroup() + { + GroupType = RecoveryPlanGroupType.Boot, + ReplicationProtectedItems = new List() { rpVm1}, + StartGroupActions = new List(), + EndGroupActions = new List() + }; + + CreateRecoveryPlanInputProperties inputProperties = new CreateRecoveryPlanInputProperties() + { + PrimaryFabricId = fabric.Id, + RecoveryFabricId = recoveryCloud, + FailoverDeploymentModel = FailoverDeploymentModel.ResourceManager, + Groups = new List() { rpGroup } + }; + + CreateRecoveryPlanInput input = new CreateRecoveryPlanInput() + { + Properties = inputProperties + }; + + client.ReplicationRecoveryPlans.Create(rpName, input); + + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void GetRecoveryPlan() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void UpdateRecoveryPlan() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var fabric = client.ReplicationFabrics.Get(siteName); + var protectionContainer = client.ReplicationProtectionContainers.ListByReplicationFabrics(siteName).FirstOrDefault(); + var protectedItem2 = client.ReplicationProtectedItems.Get(siteName, protectionContainer.Name, vmName2); + + RecoveryPlanProtectedItem rpVm2 = new RecoveryPlanProtectedItem() + { + Id = protectedItem2.Id, + VirtualMachineId = protectedItem2.Name + }; + + RecoveryPlanGroup rpGroup = new RecoveryPlanGroup() + { + GroupType = RecoveryPlanGroupType.Boot, + ReplicationProtectedItems = new List() { rpVm2 }, + StartGroupActions = new List(), + EndGroupActions = new List() + }; + + UpdateRecoveryPlanInputProperties inputProperties = new UpdateRecoveryPlanInputProperties() + { + Groups = new List() { rpGroup } + }; + + UpdateRecoveryPlanInput input = new UpdateRecoveryPlanInput() + { + Properties = inputProperties + }; + + client.ReplicationRecoveryPlans.Update(rpName, input); + + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void DeleteRecoveryPlan() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + client.ReplicationRecoveryPlans.Delete(rpName); + } + } + + [Fact] + public void RPTestFailover() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + RecoveryPlanHyperVReplicaAzureFailoverInput h2AInput = new RecoveryPlanHyperVReplicaAzureFailoverInput() + { + VaultLocation = "West US" + }; + + RecoveryPlanTestFailoverInputProperties inputProperties = new RecoveryPlanTestFailoverInputProperties() + { + NetworkId = azureNetworkId, + NetworkType = string.IsNullOrEmpty(azureNetworkId) ? null : "VmNetworkAsInput", + SkipTestFailoverCleanup = true.ToString(), + ProviderSpecificDetails = new List() { h2AInput } + }; + + RecoveryPlanTestFailoverInput input = new RecoveryPlanTestFailoverInput() + { + Properties = inputProperties + }; + + client.ReplicationRecoveryPlans.TestFailover(rpName, input); + + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void RPTestFailoverCleanup() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + RecoveryPlanTestFailoverCleanupInputProperties inputProperties = new RecoveryPlanTestFailoverCleanupInputProperties() + { + Comments = "Cleaning up" + }; + + RecoveryPlanTestFailoverCleanupInput input = new RecoveryPlanTestFailoverCleanupInput() + { + Properties = inputProperties + }; + + client.ReplicationRecoveryPlans.TestFailoverCleanup(rpName, input); + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void RPPlannedFailover() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + RecoveryPlanHyperVReplicaAzureFailoverInput h2AInput = new RecoveryPlanHyperVReplicaAzureFailoverInput() + { + VaultLocation = "West US" + }; + + RecoveryPlanPlannedFailoverInputProperties inputProperties = new RecoveryPlanPlannedFailoverInputProperties() + { + FailoverDirection = PossibleOperationsDirections.PrimaryToRecovery, + ProviderSpecificDetails = new List() { h2AInput } + }; + + RecoveryPlanPlannedFailoverInput input = new RecoveryPlanPlannedFailoverInput() + { + Properties = inputProperties + }; + + client.ReplicationRecoveryPlans.PlannedFailover(rpName, input); + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void RPUnplannedFailover() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + RecoveryPlanHyperVReplicaAzureFailoverInput h2AInput = new RecoveryPlanHyperVReplicaAzureFailoverInput() + { + VaultLocation = "West US" + }; + + RecoveryPlanUnplannedFailoverInputProperties inputProperties = new RecoveryPlanUnplannedFailoverInputProperties() + { + FailoverDirection = PossibleOperationsDirections.PrimaryToRecovery, + SourceSiteOperations = SourceSiteOperations.NotRequired, + ProviderSpecificDetails = new List() { h2AInput } + }; + + RecoveryPlanUnplannedFailoverInput input = new RecoveryPlanUnplannedFailoverInput() + { + Properties = inputProperties + }; + + client.ReplicationRecoveryPlans.UnplannedFailover(rpName, input); + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void RPFailoverCommit() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + client.ReplicationRecoveryPlans.FailoverCommit(rpName); + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void RPFailback() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + RecoveryPlanHyperVReplicaAzureFailbackInput h2AInput = new RecoveryPlanHyperVReplicaAzureFailbackInput() + { + DataSyncOption = DataSyncStatus.ForSynchronization, + RecoveryVmCreationOption = AlternateLocationRecoveryOption.NoAction + }; + + RecoveryPlanPlannedFailoverInputProperties inputProperties = new RecoveryPlanPlannedFailoverInputProperties() + { + FailoverDirection = PossibleOperationsDirections.RecoveryToPrimary, + ProviderSpecificDetails = new List() { h2AInput } + }; + + RecoveryPlanPlannedFailoverInput input = new RecoveryPlanPlannedFailoverInput() + { + Properties = inputProperties + }; + + client.ReplicationRecoveryPlans.PlannedFailover(rpName, input); + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void RPReprotect() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + client.ReplicationRecoveryPlans.Reprotect(rpName); + + var rp = client.ReplicationRecoveryPlans.Get(rpName); + } + } + + [Fact] + public void CreateAlertSettings() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + ConfigureAlertRequestProperties properties = new ConfigureAlertRequestProperties() + { + SendToOwners = false.ToString(), + CustomEmailAddresses = new List() { emailAddress }, + Locale = "en-US" + }; + + ConfigureAlertRequest request = new ConfigureAlertRequest() + { + Properties = properties + }; + + client.ReplicationAlertSettings.Create(alertSettingName, request); + var alertSetting = client.ReplicationAlertSettings.Get(alertSettingName); + } + } + + [Fact] + public void GetAlertSettings() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var alertSetting = client.ReplicationAlertSettings.Get(alertSettingName); + } + } + + [Fact] + public void ListAlertSettings() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var alertSetting = client.ReplicationAlertSettings.List(); + } + } + + [Fact] + public void GetReplicationEvent() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var events = client.ReplicationEvents.List().ToList(); + var replicationEvent = client.ReplicationEvents.Get(events[0].Name); + } + } + + [Fact] + public void ListReplicationEvent() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var events = client.ReplicationEvents.List(); + } + } + + [Fact] + public void GetNetworks() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var network = client.ReplicationNetworks.Get(vmmFabric, vmNetworkName); + } + } + + [Fact] + public void ListNetworks() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var networkList = client.ReplicationNetworks.List(); + } + } + + [Fact] + public void EnumerateNetworks() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var networkList = client.ReplicationNetworks.ListByReplicationFabrics(vmmFabric); + } + } + + [Fact] + public void CreateNetworkMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var network = client.ReplicationNetworks.Get(vmmFabric, vmNetworkName); + + CreateNetworkMappingInputProperties inputProperties = new CreateNetworkMappingInputProperties() + { + RecoveryFabricName = recoveryCloud, + RecoveryNetworkId = azureNetworkId, + FabricSpecificDetails = new VmmToAzureCreateNetworkMappingInput() + }; + + CreateNetworkMappingInput input = new CreateNetworkMappingInput() + { + Properties = inputProperties + }; + + client.ReplicationNetworkMappings.Create(vmmFabric, vmNetworkName, networkMappingName, input); + var networkMapping = client.ReplicationNetworkMappings.Get(vmmFabric, vmNetworkName, networkMappingName); + } + } + + [Fact] + public void GetNetworkMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var networkMapping = client.ReplicationNetworkMappings.Get(vmmFabric, vmNetworkName, networkMappingName); + } + } + + [Fact] + public void ListNetworkMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var networkMappingList = client.ReplicationNetworkMappings.List(); + } + } + + [Fact] + public void EnumerateNetworkMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + var networkMappingList = client.ReplicationNetworkMappings.ListByReplicationNetworks(vmmFabric, vmNetworkName); + } + } + + [Fact] + public void UpdateNetworkMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + UpdateNetworkMappingInputProperties inputProperties = new UpdateNetworkMappingInputProperties() + { + RecoveryFabricName = recoveryCloud, + RecoveryNetworkId = azureNetworkId, + FabricSpecificDetails = new VmmToAzureUpdateNetworkMappingInput() + }; + + UpdateNetworkMappingInput input = new UpdateNetworkMappingInput() + { + Properties = inputProperties + }; + + client.ReplicationNetworkMappings.Update(vmmFabric, vmNetworkName, networkMappingName, input); + var networkMapping = client.ReplicationNetworkMappings.Get(vmmFabric, vmNetworkName, networkMappingName); + } + } + + [Fact] + public void DeleteNetworkMapping() + { + using (var context = MockContext.Start(this.GetType().FullName)) + { + testHelper.Initialize(context); + var client = testHelper.SiteRecoveryClient; + + client.ReplicationNetworkMappings.Delete(vmmFabric, vmNetworkName, networkMappingName); + } + } + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ApplyRecoveryPoint.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ApplyRecoveryPoint.json new file mode 100644 index 000000000000..8d427cd71ca4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ApplyRecoveryPoint.json @@ -0,0 +1,1199 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bdd772d4-1d8b-49fe-9575-f9119e15929a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:53:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bdd772d4-1d8b-49fe-9575-f9119e15929a 5/15/2017 1:53:24 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "bdd772d4-1d8b-49fe-9575-f9119e15929a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14100" + ], + "x-ms-correlation-request-id": [ + "90a60ee4-d2b3-4ff6-85c8-1eab2ddc8d08" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135324Z:90a60ee4-d2b3-4ff6-85c8-1eab2ddc8d08" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9yZWNvdmVyeVBvaW50cz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3346201e-5c37-485b-a706-7b776aaa3ec4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"471fbbc7-6e8c-475f-bc97-5d89d856732c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/471fbbc7-6e8c-475f-bc97-5d89d856732c\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-15T13:34:35.4120244Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"bdc783bf-c86d-4fb3-ba44-bd0cd83416b4\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/bdc783bf-c86d-4fb3-ba44-bd0cd83416b4\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-15T13:39:35.4139776Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"92eb6e67-ac18-4043-af5e-6cd5d5891810\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/92eb6e67-ac18-4043-af5e-6cd5d5891810\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-15T13:44:35.4159275Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"fea6a87e-f27e-4e73-b297-39e81cf857c5\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/fea6a87e-f27e-4e73-b297-39e81cf857c5\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-15T13:47:31.1669721Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:53:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3346201e-5c37-485b-a706-7b776aaa3ec4 5/15/2017 1:53:26 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3346201e-5c37-485b-a706-7b776aaa3ec4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14099" + ], + "x-ms-correlation-request-id": [ + "693fb17b-5433-45ec-b86a-24d077da4d70" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135325Z:693fb17b-5433-45ec-b86a-24d077da4d70" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/applyRecoveryPoint?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9hcHBseVJlY292ZXJ5UG9pbnQ/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"recoveryPointId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/92eb6e67-ac18-4043-af5e-6cd5d5891810\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"vaultLocation\": \"West US\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "511" + ], + "x-ms-client-request-id": [ + "22d846de-2cfa-40a3-a05f-372f47cfa879" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:53:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56", + "22d846de-2cfa-40a3-a05f-372f47cfa879 5/15/2017 1:53:27 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "22d846de-2cfa-40a3-a05f-372f47cfa879" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "a846ac9a-3d35-4751-b97c-e1dbb8e6872d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135326Z:a846ac9a-3d35-4751-b97c-e1dbb8e6872d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:53:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b80f52db-8e6d-44f7-b4ef-978af8a38066" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14087" + ], + "x-ms-correlation-request-id": [ + "2ad626b5-93a9-4899-b636-65df4d57447f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135357Z:2ad626b5-93a9-4899-b636-65df4d57447f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:54:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "98d874d4-e5cd-43e7-93a9-a63e8ba5fb85" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14079" + ], + "x-ms-correlation-request-id": [ + "d1ed0e7d-6971-40fd-a64e-57d9ee4d1cc2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135427Z:d1ed0e7d-6971-40fd-a64e-57d9ee4d1cc2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:54:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "31a09d29-afa6-40d6-92a0-b9482dba1db4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14071" + ], + "x-ms-correlation-request-id": [ + "96557267-4d52-4b11-b86d-1c28a01ddcd5" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135458Z:96557267-4d52-4b11-b86d-1c28a01ddcd5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:55:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2c94a970-3151-4e7c-bf2a-d4fb1eb85f14" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14138" + ], + "x-ms-correlation-request-id": [ + "3f92a770-b47a-48c5-bdcf-94ecd94b1422" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135528Z:3f92a770-b47a-48c5-bdcf-94ecd94b1422" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:55:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "67c9dc8a-0ba0-414e-9eeb-ed3c841211e6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14133" + ], + "x-ms-correlation-request-id": [ + "6673c474-c6c3-47c3-92c4-b64baa623a5c" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135558Z:6673c474-c6c3-47c3-92c4-b64baa623a5c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:56:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "fb45c997-a256-44f0-962e-ca9a854f7056" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14120" + ], + "x-ms-correlation-request-id": [ + "c99cefc5-3705-4762-a399-82f860d87505" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135629Z:c99cefc5-3705-4762-a399-82f860d87505" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:56:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "14178325-d509-4223-972b-bd85d2de3b0b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14112" + ], + "x-ms-correlation-request-id": [ + "9e1a8812-60a9-4143-8904-1e050e54aab3" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135659Z:9e1a8812-60a9-4143-8904-1e050e54aab3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:57:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8f925db3-1a96-432e-adaf-7fb08d3a25d8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14101" + ], + "x-ms-correlation-request-id": [ + "be22854b-a890-4e88-aa95-712385a230f0" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135730Z:be22854b-a890-4e88-aa95-712385a230f0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"2017-05-15T13:57:48.0840547Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:57:48.146563Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:58:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "43aba1e3-1f5e-45ea-b311-323bfb5f4faa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14093" + ], + "x-ms-correlation-request-id": [ + "8f87e45a-dc94-4b84-ac74-9a7b347fd296" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135800Z:8f87e45a-dc94-4b84-ac74-9a7b347fd296" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"2017-05-15T13:57:48.0840547Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:57:48.146563Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:58:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3cef98a0-d65d-472e-8a7e-d6b24ec78c67" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14085" + ], + "x-ms-correlation-request-id": [ + "1a5e9420-bde9-418f-b04c-968024dc4025" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135830Z:1a5e9420-bde9-418f-b04c-968024dc4025" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"2017-05-15T13:57:48.0840547Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:57:48.146563Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:59:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c9ab67b8-f879-4d56-a603-3f7d9306a860" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14079" + ], + "x-ms-correlation-request-id": [ + "d389f1f6-05bf-4105-9730-bd896da7b842" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135901Z:d389f1f6-05bf-4105-9730-bd896da7b842" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"2017-05-15T13:57:48.0840547Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:57:48.146563Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:59:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "75aea459-0334-4634-a8c1-318ff70675bc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14073" + ], + "x-ms-correlation-request-id": [ + "d6f0bb7a-0395-4910-83d8-b4ff7531a6c4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135931Z:d6f0bb7a-0395-4910-83d8-b4ff7531a6c4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"2017-05-15T13:57:48.0840547Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:57:48.146563Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:00:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5963ad2d-dbb2-4e3c-a330-a34b1bf5becd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14148" + ], + "x-ms-correlation-request-id": [ + "6c6862d1-4e61-4cca-a5d4-0d09a8662557" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T140001Z:6c6862d1-4e61-4cca-a5d4-0d09a8662557" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"2017-05-15T13:57:48.0840547Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:57:48.146563Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:00:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5d1492c8-60ec-4a9c-8590-3a9b4a350358" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14141" + ], + "x-ms-correlation-request-id": [ + "56c8dc60-af76-4378-a596-b74261174c49" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T140032Z:56c8dc60-af76-4378-a596-b74261174c49" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2YTAzNTRlLTVmNDUtNDI4Ni05N2UwLTM1MTc5MGViOGY1Nj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"name\": \"66a0354e-5f45-4286-97e0-351790eb8f56\",\r\n \"properties\": {\r\n \"activityId\": \"22d846de-2cfa-40a3-a05f-372f47cfa879 ActivityId: a846ac9a-3d35-4751-b97c-e1dbb8e6872d\",\r\n \"scenarioName\": \"ChangePit\",\r\n \"friendlyName\": \"Change the recovery point\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"51e9c29c-a180-4ac0-959d-a15b625f28a0\",\r\n \"name\": \"ChangePitPreflightCheck\",\r\n \"startTime\": \"2017-05-15T13:53:27.5056266Z\",\r\n \"endTime\": \"2017-05-15T13:53:30.6156192Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Change the prerequisites check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"5559af91-1aff-480e-ac42-23420dbd5a15\",\r\n \"name\": \"ShutdownVmRecovery\",\r\n \"startTime\": \"2017-05-15T13:53:30.678121Z\",\r\n \"endTime\": \"2017-05-15T13:56:42.631443Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown the virtual machine on recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ea6e7936-1231-4045-aba3-ca648bb9a4ce\",\r\n \"name\": \"CancelFailoverRecovery\",\r\n \"startTime\": \"2017-05-15T13:56:42.6937737Z\",\r\n \"endTime\": \"2017-05-15T13:57:48.0840547Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cancel failover recovery\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d1f33c41-4e13-48a3-99b2-b7edbee72508\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:57:48.146563Z\",\r\n \"endTime\": \"2017-05-15T14:01:02.2384797Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d59b1784-a246-4042-89fd-fe04196b0b01\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"2017-05-15T14:01:02.3166168Z\",\r\n \"endTime\": \"2017-05-15T14:01:02.3166168Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": \"2017-05-15T14:01:02Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:53:27.0887478Z\",\r\n \"endTime\": \"2017-05-15T14:01:02Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:01:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/66a0354e-5f45-4286-97e0-351790eb8f56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "15a3cb7c-8204-43b5-a673-373353e56f37" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14135" + ], + "x-ms-correlation-request-id": [ + "db7796ae-02e9-40c5-8af8-6d1b03b266c2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T140102Z:db7796ae-02e9-40c5-8af8-6d1b03b266c2" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CheckConsistency.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CheckConsistency.json new file mode 100644 index 000000000000..6073b89d7792 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CheckConsistency.json @@ -0,0 +1,276 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/checkConsistency?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9jaGVja0NvbnNpc3RlbmN5P2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9ba38549-4ae9-4b2d-b8c1-0de30e7f8e9c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:17:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/operationresults/9bc5a375-116b-4482-ad35-3cc3557544e4?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9bc5a375-116b-4482-ad35-3cc3557544e4?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "9ba38549-4ae9-4b2d-b8c1-0de30e7f8e9c 5/13/2017 7:17:53 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "9ba38549-4ae9-4b2d-b8c1-0de30e7f8e9c" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "51ad8501-dd41-4f35-b36e-18c532727268" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T191753Z:51ad8501-dd41-4f35-b36e-18c532727268" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9bc5a375-116b-4482-ad35-3cc3557544e4?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzliYzVhMzc1LTExNmItNDQ4Mi1hZDM1LTNjYzM1NTc1NDRlND9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9bc5a375-116b-4482-ad35-3cc3557544e4\",\r\n \"name\": \"9bc5a375-116b-4482-ad35-3cc3557544e4\",\r\n \"properties\": {\r\n \"activityId\": \"9ba38549-4ae9-4b2d-b8c1-0de30e7f8e9c ActivityId: 51ad8501-dd41-4f35-b36e-18c532727268\",\r\n \"scenarioName\": \"CheckVmmConsistency\",\r\n \"friendlyName\": \"Consistency check\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"3092fa28-08f4-4a81-ae2a-c74d5264d218\",\r\n \"name\": \"VmmResyncTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Establish a connection with the server or site\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ce92b39c-acea-4e42-b09c-b98e5617595b\",\r\n \"name\": \"CheckPEConsistencyTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Complete the consistency check\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"ConsistencyCheckTaskDetails\",\r\n \"customDetails\": {\r\n \"vmDetails\": [],\r\n \"instanceType\": \"ConsistencyCheckTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:17:53.6745174Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"targetObjectName\": \"SiteRecoveryTestSite1\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:17:53.6745174Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:18:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9bc5a375-116b-4482-ad35-3cc3557544e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d6bad5ab-4acb-4b09-b5f3-057f55cbdcb4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13806" + ], + "x-ms-correlation-request-id": [ + "22ac5048-ce62-40a0-85dc-6b71e3806ee2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T191824Z:22ac5048-ce62-40a0-85dc-6b71e3806ee2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9bc5a375-116b-4482-ad35-3cc3557544e4?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzliYzVhMzc1LTExNmItNDQ4Mi1hZDM1LTNjYzM1NTc1NDRlND9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9bc5a375-116b-4482-ad35-3cc3557544e4\",\r\n \"name\": \"9bc5a375-116b-4482-ad35-3cc3557544e4\",\r\n \"properties\": {\r\n \"activityId\": \"9ba38549-4ae9-4b2d-b8c1-0de30e7f8e9c ActivityId: 51ad8501-dd41-4f35-b36e-18c532727268\",\r\n \"scenarioName\": \"CheckVmmConsistency\",\r\n \"friendlyName\": \"Consistency check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"3092fa28-08f4-4a81-ae2a-c74d5264d218\",\r\n \"name\": \"VmmResyncTask\",\r\n \"startTime\": \"2017-05-13T19:18:24.8364946Z\",\r\n \"endTime\": \"2017-05-13T19:18:24.8677597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Establish a connection with the server or site\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ce92b39c-acea-4e42-b09c-b98e5617595b\",\r\n \"name\": \"CheckPEConsistencyTask\",\r\n \"startTime\": \"2017-05-13T19:18:24.9458708Z\",\r\n \"endTime\": \"2017-05-13T19:18:25.0552574Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Complete the consistency check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"ConsistencyCheckTaskDetails\",\r\n \"customDetails\": {\r\n \"vmDetails\": [],\r\n \"instanceType\": \"ConsistencyCheckTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:17:53.6745174Z\",\r\n \"endTime\": \"2017-05-13T19:18:24Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"targetObjectName\": \"SiteRecoveryTestSite1\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:17:53.6745174Z\",\r\n \"endTime\": \"2017-05-13T19:18:24Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:18:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9bc5a375-116b-4482-ad35-3cc3557544e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "23455ba1-75b8-49cd-80a6-ea4bae531792" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13794" + ], + "x-ms-correlation-request-id": [ + "572ad9d7-f49a-4381-97e9-f26e7c2ed4e0" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T191854Z:572ad9d7-f49a-4381-97e9-f26e7c2ed4e0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7ed4a453-1951-49a9-93b2-05221d8fb635" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:18:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7ed4a453-1951-49a9-93b2-05221d8fb635 5/13/2017 7:18:58 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "7ed4a453-1951-49a9-93b2-05221d8fb635" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13792" + ], + "x-ms-correlation-request-id": [ + "b181e9ad-7bcd-4aa0-af32-0f20ea1648b1" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T191857Z:b181e9ad-7bcd-4aa0-af32-0f20ea1648b1" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CommitFailover.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CommitFailover.json new file mode 100644 index 000000000000..f2e38f5d29c6 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CommitFailover.json @@ -0,0 +1,212 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "22b1f7b6-7d87-422f-8f7e-9f433017cfd6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:02:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "22b1f7b6-7d87-422f-8f7e-9f433017cfd6 5/15/2017 2:02:02 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "22b1f7b6-7d87-422f-8f7e-9f433017cfd6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14185" + ], + "x-ms-correlation-request-id": [ + "806cb169-3fb7-4ef5-b5cd-7c0073ff83cd" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T140201Z:806cb169-3fb7-4ef5-b5cd-7c0073ff83cd" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/failoverCommit?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9mYWlsb3ZlckNvbW1pdD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b2ca9fb9-3ba5-460e-9ecb-d38fdd20e646" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:02:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/55ec8d2f-d512-435e-b301-0474a1879860?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/55ec8d2f-d512-435e-b301-0474a1879860", + "b2ca9fb9-3ba5-460e-9ecb-d38fdd20e646 5/15/2017 2:02:02 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/55ec8d2f-d512-435e-b301-0474a1879860?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "b2ca9fb9-3ba5-460e-9ecb-d38fdd20e646" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "11d66391-c538-41c0-9fdd-f7e6e19efdd0" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T140202Z:11d66391-c538-41c0-9fdd-f7e6e19efdd0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/55ec8d2f-d512-435e-b301-0474a1879860?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzU1ZWM4ZDJmLWQ1MTItNDM1ZS1iMzAxLTA0NzRhMTg3OTg2MD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/55ec8d2f-d512-435e-b301-0474a1879860\",\r\n \"name\": \"55ec8d2f-d512-435e-b301-0474a1879860\",\r\n \"properties\": {\r\n \"activityId\": \"b2ca9fb9-3ba5-460e-9ecb-d38fdd20e646 ActivityId: 11d66391-c538-41c0-9fdd-f7e6e19efdd0\",\r\n \"scenarioName\": \"CommitFailover\",\r\n \"friendlyName\": \"Commit\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"06502bda-e0cc-4db7-a152-5ee557b10e70\",\r\n \"name\": \"VmCommitPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T14:02:02.9193685Z\",\r\n \"endTime\": \"2017-05-15T14:02:03.1068761Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisite check\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"4082dd51-7098-422d-bfaa-ba50e6b21cfb\",\r\n \"name\": \"VmCommit\",\r\n \"startTime\": \"2017-05-15T14:02:03.2006382Z\",\r\n \"endTime\": \"2017-05-15T14:02:03.5916176Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Commit\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:02:02.8265617Z\",\r\n \"endTime\": \"2017-05-15T14:02:04Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:02:02.8265617Z\",\r\n \"endTime\": \"2017-05-15T14:02:04Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:02:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/55ec8d2f-d512-435e-b301-0474a1879860" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "bc520d91-a7a7-422f-81fa-1a9d4a1c7a88" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14180" + ], + "x-ms-correlation-request-id": [ + "482106cc-f378-46e6-aa5e-1fe1a3700cf0" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T140232Z:482106cc-f378-46e6-aa5e-1fe1a3700cf0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateAlertSettings.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateAlertSettings.json new file mode 100644 index 000000000000..bf336756faba --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateAlertSettings.json @@ -0,0 +1,156 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationAlertSettings/defaultAlertSetting?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25BbGVydFNldHRpbmdzL2RlZmF1bHRBbGVydFNldHRpbmc/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"sendToOwners\": \"False\",\r\n \"customEmailAddresses\": [\r\n \"ronehr@microsoft.com\"\r\n ],\r\n \"locale\": \"en-US\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "150" + ], + "x-ms-client-request-id": [ + "ab057fbe-85ae-4d12-b10c-2672a15ea5e6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"defaultAlertSetting\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationAlertSettings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationAlertSettings/defaultAlertSetting\",\r\n \"properties\": {\r\n \"sendToOwners\": \"DoNotSend\",\r\n \"customEmailAddresses\": [\r\n \"ronehr@microsoft.com\"\r\n ],\r\n \"locale\": \"en-US\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:43:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ab057fbe-85ae-4d12-b10c-2672a15ea5e6 5/13/2017 6:43:31 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "ab057fbe-85ae-4d12-b10c-2672a15ea5e6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "37172a03-7dc0-4434-973a-158cf7cf2784" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T184331Z:37172a03-7dc0-4434-973a-158cf7cf2784" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationAlertSettings/defaultAlertSetting?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25BbGVydFNldHRpbmdzL2RlZmF1bHRBbGVydFNldHRpbmc/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5f1b9eba-5823-4b9e-89db-6afbe67a2ac1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"defaultAlertSetting\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationAlertSettings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationAlertSettings/defaultAlertSetting\",\r\n \"properties\": {\r\n \"sendToOwners\": \"DoNotSend\",\r\n \"customEmailAddresses\": [\r\n \"ronehr@microsoft.com\"\r\n ],\r\n \"locale\": \"en-US\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:43:33 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5f1b9eba-5823-4b9e-89db-6afbe67a2ac1 5/13/2017 6:43:34 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5f1b9eba-5823-4b9e-89db-6afbe67a2ac1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13940" + ], + "x-ms-correlation-request-id": [ + "223e3133-4087-46f5-8eef-01b1fa976c85" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T184334Z:223e3133-4087-46f5-8eef-01b1fa976c85" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateNetworkMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateNetworkMapping.json new file mode 100644 index 000000000000..8ef90f5e0d19 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateNetworkMapping.json @@ -0,0 +1,353 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "be00175f-111b-47b8-a5b2-3c9ce06cd6b7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"name\": \"c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"corp\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 07:27:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "be00175f-111b-47b8-a5b2-3c9ce06cd6b7 5/15/2017 7:27:05 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "be00175f-111b-47b8-a5b2-3c9ce06cd6b7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14256" + ], + "x-ms-correlation-request-id": [ + "42619f40-731d-4734-8bd5-d790fcb1707d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T072705Z:42619f40-731d-4734-8bd5-d790fcb1707d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3MvTldNYXBwaW5nP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"recoveryFabricName\": \"Microsoft Azure\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"fabricSpecificDetails\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "317" + ], + "x-ms-client-request-id": [ + "44324cf9-49e7-40a4-a911-2bb09b17b2b0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 07:27:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping/operationresults/d6a1f712-0b74-4911-8930-47c13715de4d?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d6a1f712-0b74-4911-8930-47c13715de4d?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "44324cf9-49e7-40a4-a911-2bb09b17b2b0 5/15/2017 7:27:06 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "44324cf9-49e7-40a4-a911-2bb09b17b2b0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "5719ce93-91ab-4a50-a9ce-5f3b95c6ee52" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T072706Z:5719ce93-91ab-4a50-a9ce-5f3b95c6ee52" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d6a1f712-0b74-4911-8930-47c13715de4d?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q2YTFmNzEyLTBiNzQtNDkxMS04OTMwLTQ3YzEzNzE1ZGU0ZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d6a1f712-0b74-4911-8930-47c13715de4d\",\r\n \"name\": \"d6a1f712-0b74-4911-8930-47c13715de4d\",\r\n \"properties\": {\r\n \"activityId\": \"44324cf9-49e7-40a4-a911-2bb09b17b2b0 ActivityId: 5719ce93-91ab-4a50-a9ce-5f3b95c6ee52\",\r\n \"scenarioName\": \"NetworkPairing\",\r\n \"friendlyName\": \"Map Networks\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"388d8081-330a-4267-9869-878dafda0804\",\r\n \"name\": \"ModifyVMNetworksPairingStatusTask\",\r\n \"startTime\": \"2017-05-15T07:27:06.9531629Z\",\r\n \"endTime\": \"2017-05-15T07:27:09.5566178Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Map network\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"7d7cae3e-ef84-48b6-a06c-a6686989549b\",\r\n \"name\": \"VMNetworksUpdateVMNicsTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Attach network (0)\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"GroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"instanceType\": \"GroupTaskDetails\",\r\n \"childTasks\": []\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T07:27:06.6350197Z\",\r\n \"endTime\": \"2017-05-15T07:27:09Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"corp\",\r\n \"targetObjectName\": \"corp\",\r\n \"targetInstanceType\": \"Network\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryNetworkId\": \"c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"PrimaryNetworkName\": \"corp\",\r\n \"RecoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"RecoveryNetworkName\": \"vnetavrai\",\r\n \"PrimaryVmmId\": \"2a34ba3d-e783-4c78-9e67-ab9d4c46b639\",\r\n \"PrimaryVmmName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"VMM\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T07:27:06.6350197Z\",\r\n \"endTime\": \"2017-05-15T07:27:09Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 07:27:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d6a1f712-0b74-4911-8930-47c13715de4d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "ac21c663-4e7a-4c24-8687-b3780b7daf2c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14243" + ], + "x-ms-correlation-request-id": [ + "b551ae2f-2e9e-4d2a-bd7f-3a9f1d38e54e" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T072737Z:b551ae2f-2e9e-4d2a-bd7f-3a9f1d38e54e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3MvTldNYXBwaW5nP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping\",\r\n \"name\": \"NWMapping\",\r\n \"properties\": {\r\n \"state\": \"Paired\",\r\n \"primaryNetworkFriendlyName\": \"corp\",\r\n \"primaryNetworkId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"primaryFabricFriendlyName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"recoveryNetworkFriendlyName\": \"vnetavrai\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryFabricArmId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"fabricSpecificSettings\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 07:27:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "73ca2cb5-8c86-434a-906e-c391640925de 5/15/2017 7:27:37 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "73ca2cb5-8c86-434a-906e-c391640925de" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14240" + ], + "x-ms-correlation-request-id": [ + "573f940b-d138-42f5-bdcb-fbc8009e229f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T072737Z:573f940b-d138-42f5-bdcb-fbc8009e229f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3MvTldNYXBwaW5nP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9ccbeee1-0db0-4789-aea0-476400bcc5d6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping\",\r\n \"name\": \"NWMapping\",\r\n \"properties\": {\r\n \"state\": \"Paired\",\r\n \"primaryNetworkFriendlyName\": \"corp\",\r\n \"primaryNetworkId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"primaryFabricFriendlyName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"recoveryNetworkFriendlyName\": \"vnetavrai\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryFabricArmId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"fabricSpecificSettings\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 07:27:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9ccbeee1-0db0-4789-aea0-476400bcc5d6 5/15/2017 7:27:39 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9ccbeee1-0db0-4789-aea0-476400bcc5d6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14239" + ], + "x-ms-correlation-request-id": [ + "9cbd3209-a63b-4a70-a353-7f21f34196ca" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T072738Z:9cbd3209-a63b-4a70-a353-7f21f34196ca" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreatePCMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreatePCMapping.json new file mode 100644 index 000000000000..239cb36c4685 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreatePCMapping.json @@ -0,0 +1,892 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3948cc4b-54ab-4bce-b089-d646abce9adf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:29:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3948cc4b-54ab-4bce-b089-d646abce9adf 5/15/2017 1:29:39 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3948cc4b-54ab-4bce-b089-d646abce9adf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13541" + ], + "x-ms-correlation-request-id": [ + "e4335f78-b3ca-416b-b00b-2adec5bacd81" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T132939Z:e4335f78-b3ca-416b-b00b-2adec5bacd81" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "844e4b54-5496-4d2a-bb0c-f1a7bd62d9da" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:29:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "844e4b54-5496-4d2a-bb0c-f1a7bd62d9da 5/15/2017 1:29:40 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "844e4b54-5496-4d2a-bb0c-f1a7bd62d9da" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13538" + ], + "x-ms-correlation-request-id": [ + "f485c680-e515-436a-956c-34cdd7fb55f6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T132939Z:f485c680-e515-436a-956c-34cdd7fb55f6" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "75ef5406-7265-4a1c-b870-234914bd52c4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:29:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "75ef5406-7265-4a1c-b870-234914bd52c4 5/15/2017 1:29:40 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "75ef5406-7265-4a1c-b870-234914bd52c4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13537" + ], + "x-ms-correlation-request-id": [ + "be1ecf39-4d1c-4cac-9be0-ef6358ed8ab8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T132940Z:be1ecf39-4d1c-4cac-9be0-ef6358ed8ab8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c466709b-ba93-44e9-bae0-ea832d529088" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"name\": \"protectionprofile1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"protectionprofile1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 3,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:29:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c466709b-ba93-44e9-bae0-ea832d529088 5/15/2017 1:29:41 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c466709b-ba93-44e9-bae0-ea832d529088" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13536" + ], + "x-ms-correlation-request-id": [ + "48ae8996-1990-4513-9e15-1ec860b373d4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T132940Z:48ae8996-1990-4513-9e15-1ec860b373d4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJNYXBwaW5ncy9QQ01hcHBpbmc/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"targetProtectionContainerId\": \"Microsoft Azure\",\r\n \"PolicyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"providerSpecificInput\": {}\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "313" + ], + "x-ms-client-request-id": [ + "082b305d-12e9-4e02-abcd-cd4353299bfe" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:29:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping/operationresults/980ad363-68af-484e-90a4-c06b6a0a4ec1?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1", + "082b305d-12e9-4e02-abcd-cd4353299bfe 5/15/2017 1:29:41 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "082b305d-12e9-4e02-abcd-cd4353299bfe" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "61739002-0c47-4c92-810f-fb26d78272b6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T132941Z:61739002-0c47-4c92-810f-fb26d78272b6" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk4MGFkMzYzLTY4YWYtNDg0ZS05MGE0LWMwNmI2YTBhNGVjMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"name\": \"980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"properties\": {\r\n \"activityId\": \"082b305d-12e9-4e02-abcd-cd4353299bfe ActivityId: 61739002-0c47-4c92-810f-fb26d78272b6\",\r\n \"scenarioName\": \"AssociateProtectionProfile\",\r\n \"friendlyName\": \"Associate replication policy\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CloudPairingWfPreflightChecksTask\",\r\n \"name\": \"CloudPairingPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:29:42.6826273Z\",\r\n \"endTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Check protection prerequisites\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareSiteTask\",\r\n \"name\": \"CloudPairingPrepareSite\",\r\n \"startTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"endTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareCloudForPairingTask\",\r\n \"name\": \"CloudPairingPrepareCloud\",\r\n \"startTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare for configuring protection\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPairCloudsTask\",\r\n \"name\": \"CloudPairingPairClouds\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Configure the protection settings\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:30:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3385ec4d-07c7-4712-aebd-a9845ede99e5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13689" + ], + "x-ms-correlation-request-id": [ + "06ec3802-1b7d-49c7-a9dd-8782e8e9bcde" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133012Z:06ec3802-1b7d-49c7-a9dd-8782e8e9bcde" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk4MGFkMzYzLTY4YWYtNDg0ZS05MGE0LWMwNmI2YTBhNGVjMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"name\": \"980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"properties\": {\r\n \"activityId\": \"082b305d-12e9-4e02-abcd-cd4353299bfe ActivityId: 61739002-0c47-4c92-810f-fb26d78272b6\",\r\n \"scenarioName\": \"AssociateProtectionProfile\",\r\n \"friendlyName\": \"Associate replication policy\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CloudPairingWfPreflightChecksTask\",\r\n \"name\": \"CloudPairingPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:29:42.6826273Z\",\r\n \"endTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Check protection prerequisites\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareSiteTask\",\r\n \"name\": \"CloudPairingPrepareSite\",\r\n \"startTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"endTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareCloudForPairingTask\",\r\n \"name\": \"CloudPairingPrepareCloud\",\r\n \"startTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare for configuring protection\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPairCloudsTask\",\r\n \"name\": \"CloudPairingPairClouds\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Configure the protection settings\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:30:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f536e22f-9322-4961-b05e-7ec0d528362d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13679" + ], + "x-ms-correlation-request-id": [ + "e515ddd5-b7f7-4f61-892b-38c52fe70075" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133043Z:e515ddd5-b7f7-4f61-892b-38c52fe70075" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk4MGFkMzYzLTY4YWYtNDg0ZS05MGE0LWMwNmI2YTBhNGVjMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"name\": \"980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"properties\": {\r\n \"activityId\": \"082b305d-12e9-4e02-abcd-cd4353299bfe ActivityId: 61739002-0c47-4c92-810f-fb26d78272b6\",\r\n \"scenarioName\": \"AssociateProtectionProfile\",\r\n \"friendlyName\": \"Associate replication policy\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CloudPairingWfPreflightChecksTask\",\r\n \"name\": \"CloudPairingPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:29:42.6826273Z\",\r\n \"endTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Check protection prerequisites\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareSiteTask\",\r\n \"name\": \"CloudPairingPrepareSite\",\r\n \"startTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"endTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareCloudForPairingTask\",\r\n \"name\": \"CloudPairingPrepareCloud\",\r\n \"startTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"endTime\": \"2017-05-15T13:31:08.8982838Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare for configuring protection\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPairCloudsTask\",\r\n \"name\": \"CloudPairingPairClouds\",\r\n \"startTime\": \"2017-05-15T13:31:08.8982838Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Configure the protection settings\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:31:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d2817f97-0f6e-4203-9b52-6f796267529c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13671" + ], + "x-ms-correlation-request-id": [ + "7fd7e896-d569-4a87-93d4-d08913c2d248" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133113Z:7fd7e896-d569-4a87-93d4-d08913c2d248" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk4MGFkMzYzLTY4YWYtNDg0ZS05MGE0LWMwNmI2YTBhNGVjMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"name\": \"980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"properties\": {\r\n \"activityId\": \"082b305d-12e9-4e02-abcd-cd4353299bfe ActivityId: 61739002-0c47-4c92-810f-fb26d78272b6\",\r\n \"scenarioName\": \"AssociateProtectionProfile\",\r\n \"friendlyName\": \"Associate replication policy\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CloudPairingWfPreflightChecksTask\",\r\n \"name\": \"CloudPairingPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:29:42.6826273Z\",\r\n \"endTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Check protection prerequisites\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareSiteTask\",\r\n \"name\": \"CloudPairingPrepareSite\",\r\n \"startTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"endTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareCloudForPairingTask\",\r\n \"name\": \"CloudPairingPrepareCloud\",\r\n \"startTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"endTime\": \"2017-05-15T13:31:08.8982838Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare for configuring protection\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPairCloudsTask\",\r\n \"name\": \"CloudPairingPairClouds\",\r\n \"startTime\": \"2017-05-15T13:31:08.8982838Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Configure the protection settings\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:31:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "332715ae-5e60-41ce-b175-cbc233a338b1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13664" + ], + "x-ms-correlation-request-id": [ + "c4507796-dfc2-4c74-b00d-9f572dcf147f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133144Z:c4507796-dfc2-4c74-b00d-9f572dcf147f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk4MGFkMzYzLTY4YWYtNDg0ZS05MGE0LWMwNmI2YTBhNGVjMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"name\": \"980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"properties\": {\r\n \"activityId\": \"082b305d-12e9-4e02-abcd-cd4353299bfe ActivityId: 61739002-0c47-4c92-810f-fb26d78272b6\",\r\n \"scenarioName\": \"AssociateProtectionProfile\",\r\n \"friendlyName\": \"Associate replication policy\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CloudPairingWfPreflightChecksTask\",\r\n \"name\": \"CloudPairingPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:29:42.6826273Z\",\r\n \"endTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Check protection prerequisites\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareSiteTask\",\r\n \"name\": \"CloudPairingPrepareSite\",\r\n \"startTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"endTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareCloudForPairingTask\",\r\n \"name\": \"CloudPairingPrepareCloud\",\r\n \"startTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"endTime\": \"2017-05-15T13:32:10.9873176Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare for configuring protection\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPairCloudsTask\",\r\n \"name\": \"CloudPairingPairClouds\",\r\n \"startTime\": \"2017-05-15T13:32:10.9873176Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Configure the protection settings\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:32:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "38a615cd-07d8-4065-90c2-569d0a596671" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13658" + ], + "x-ms-correlation-request-id": [ + "72aee175-330d-43da-ba00-bd8816079494" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133215Z:72aee175-330d-43da-ba00-bd8816079494" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk4MGFkMzYzLTY4YWYtNDg0ZS05MGE0LWMwNmI2YTBhNGVjMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"name\": \"980ad363-68af-484e-90a4-c06b6a0a4ec1\",\r\n \"properties\": {\r\n \"activityId\": \"082b305d-12e9-4e02-abcd-cd4353299bfe ActivityId: 61739002-0c47-4c92-810f-fb26d78272b6\",\r\n \"scenarioName\": \"AssociateProtectionProfile\",\r\n \"friendlyName\": \"Associate replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CloudPairingWfPreflightChecksTask\",\r\n \"name\": \"CloudPairingPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:29:42.6826273Z\",\r\n \"endTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Check protection prerequisites\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareSiteTask\",\r\n \"name\": \"CloudPairingPrepareSite\",\r\n \"startTime\": \"2017-05-15T13:29:42.9182113Z\",\r\n \"endTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPrepareCloudForPairingTask\",\r\n \"name\": \"CloudPairingPrepareCloud\",\r\n \"startTime\": \"2017-05-15T13:29:43.2150777Z\",\r\n \"endTime\": \"2017-05-15T13:32:10.9873176Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prepare for configuring protection\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudPairingWfPairCloudsTask\",\r\n \"name\": \"CloudPairingPairClouds\",\r\n \"startTime\": \"2017-05-15T13:32:10.9873176Z\",\r\n \"endTime\": \"2017-05-15T13:32:15.6386878Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Configure the protection settings\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"endTime\": \"2017-05-15T13:32:15Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:29:41.8287081Z\",\r\n \"endTime\": \"2017-05-15T13:32:15Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:32:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/980ad363-68af-484e-90a4-c06b6a0a4ec1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "397c0c3f-36a5-48f3-9ab3-b5a97750cb57" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13648" + ], + "x-ms-correlation-request-id": [ + "5cc317da-6044-4f01-9fbe-580ee0fef064" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133245Z:5cc317da-6044-4f01-9fbe-580ee0fef064" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJNYXBwaW5ncy9QQ01hcHBpbmc/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping\",\r\n \"name\": \"PCMapping\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings\",\r\n \"properties\": {\r\n \"targetProtectionContainerId\": \"Microsoft Azure\",\r\n \"targetProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"providerSpecificDetails\": null,\r\n \"health\": \"Normal\",\r\n \"healthErrorDetails\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"state\": \"Paired\",\r\n \"sourceProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"sourceFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"targetFabricFriendlyName\": \"Microsoft Azure\",\r\n \"policyFriendlyName\": \"protectionprofile1\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:32:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5ca483d5-cca2-4e73-b8a8-7507ded10473 5/15/2017 1:32:46 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5ca483d5-cca2-4e73-b8a8-7507ded10473" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13647" + ], + "x-ms-correlation-request-id": [ + "d698e59a-8c8e-495b-8e3a-284789908391" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133246Z:d698e59a-8c8e-495b-8e3a-284789908391" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJNYXBwaW5ncy9QQ01hcHBpbmc/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2bcb49f4-f400-448d-873a-d8025afb1bd1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping\",\r\n \"name\": \"PCMapping\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings\",\r\n \"properties\": {\r\n \"targetProtectionContainerId\": \"Microsoft Azure\",\r\n \"targetProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"providerSpecificDetails\": null,\r\n \"health\": \"Normal\",\r\n \"healthErrorDetails\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"state\": \"Paired\",\r\n \"sourceProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"sourceFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"targetFabricFriendlyName\": \"Microsoft Azure\",\r\n \"policyFriendlyName\": \"protectionprofile1\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:32:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2bcb49f4-f400-448d-873a-d8025afb1bd1 5/15/2017 1:32:46 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2bcb49f4-f400-448d-873a-d8025afb1bd1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13646" + ], + "x-ms-correlation-request-id": [ + "56e193ef-bcd6-4cef-af90-8aea0aba0629" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133247Z:56e193ef-bcd6-4cef-af90-8aea0aba0629" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreatePolicy.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreatePolicy.json new file mode 100644 index 000000000000..e6eb7bbfadfc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreatePolicy.json @@ -0,0 +1,282 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"providerSpecificInput\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDuration\": 4,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disable\",\r\n \"storageAccounts\": [\r\n \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n ]\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "467" + ], + "x-ms-client-request-id": [ + "0dd359ef-ad7b-4f3a-9a47-41ef9f5160d8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:24:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1/operationresults/f23d4274-3885-4375-99b5-1ad26be6ccc5?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f23d4274-3885-4375-99b5-1ad26be6ccc5?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "0dd359ef-ad7b-4f3a-9a47-41ef9f5160d8 5/15/2017 2:24:05 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "0dd359ef-ad7b-4f3a-9a47-41ef9f5160d8" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "53dbabfb-53ce-44a2-a333-be37f4d14d8f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142405Z:53dbabfb-53ce-44a2-a333-be37f4d14d8f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f23d4274-3885-4375-99b5-1ad26be6ccc5?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2YyM2Q0Mjc0LTM4ODUtNDM3NS05OWI1LTFhZDI2YmU2Y2NjNT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f23d4274-3885-4375-99b5-1ad26be6ccc5\",\r\n \"name\": \"f23d4274-3885-4375-99b5-1ad26be6ccc5\",\r\n \"properties\": {\r\n \"activityId\": \"0dd359ef-ad7b-4f3a-9a47-41ef9f5160d8 ActivityId: 53dbabfb-53ce-44a2-a333-be37f4d14d8f\",\r\n \"scenarioName\": \"AddProtectionProfile\",\r\n \"friendlyName\": \"Create replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"AddProtectionProfilePreflightsCheckTask\",\r\n \"name\": \"AddProtectionProfilePreflightsCheckTask\",\r\n \"startTime\": \"2017-05-15T14:24:12.5407351Z\",\r\n \"endTime\": \"2017-05-15T14:24:12.8220084Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for creating the replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"AddProtectionProfileTask\",\r\n \"name\": \"AddProtectionProfileTask\",\r\n \"startTime\": \"2017-05-15T14:24:12.8220084Z\",\r\n \"endTime\": \"2017-05-15T14:24:12.8220084Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Creating the replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:24:05.5723513Z\",\r\n \"endTime\": \"2017-05-15T14:24:12Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {}\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:24:05.5723513Z\",\r\n \"endTime\": \"2017-05-15T14:24:12Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:24:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f23d4274-3885-4375-99b5-1ad26be6ccc5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a96eb400-e57e-4b3d-82cc-efdeeb451e5c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13915" + ], + "x-ms-correlation-request-id": [ + "5570985d-012d-4c07-bb20-be25223f59d3" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142435Z:5570985d-012d-4c07-bb20-be25223f59d3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"name\": \"protectionprofile1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"protectionprofile1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 4,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:24:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a80e896b-d1b1-445b-a0c4-80c5618e8e2a 5/15/2017 2:24:36 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a80e896b-d1b1-445b-a0c4-80c5618e8e2a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13914" + ], + "x-ms-correlation-request-id": [ + "73f7d00c-752d-49c8-8aba-3e08586bf729" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142436Z:73f7d00c-752d-49c8-8aba-3e08586bf729" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "db4bb5fe-059c-4e38-a95c-9f29cf28c28f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"name\": \"protectionprofile1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"protectionprofile1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 4,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:24:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "db4bb5fe-059c-4e38-a95c-9f29cf28c28f 5/15/2017 2:24:36 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "db4bb5fe-059c-4e38-a95c-9f29cf28c28f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13913" + ], + "x-ms-correlation-request-id": [ + "f651edc1-7501-4a8a-900c-ddd094f56cd8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142436Z:f651edc1-7501-4a8a-900c-ddd094f56cd8" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateProtectedItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateProtectedItem.json new file mode 100644 index 000000000000..0b034c374d51 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateProtectedItem.json @@ -0,0 +1,632 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "19e4183e-1e0a-490c-ae9e-a8854fbf2e19" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:34:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "19e4183e-1e0a-490c-ae9e-a8854fbf2e19 5/15/2017 1:34:07 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "19e4183e-1e0a-490c-ae9e-a8854fbf2e19" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14093" + ], + "x-ms-correlation-request-id": [ + "415b2c84-339c-46e8-b9e6-a82e7cfd21fb" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133406Z:415b2c84-339c-46e8-b9e6-a82e7cfd21fb" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e8a48c86-9f33-43d2-86e1-3e4043df7eee" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"name\": \"protectionprofile1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"protectionprofile1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 3,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:34:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e8a48c86-9f33-43d2-86e1-3e4043df7eee 5/15/2017 1:34:07 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "e8a48c86-9f33-43d2-86e1-3e4043df7eee" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14092" + ], + "x-ms-correlation-request-id": [ + "e4da9488-43a2-49e7-afec-207ef5642fe8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133407Z:e4da9488-43a2-49e7-afec-207ef5642fe8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f0ed3676-36dc-4602-8b3c-9e741ba628ed" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:34:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f0ed3676-36dc-4602-8b3c-9e741ba628ed 5/15/2017 1:34:08 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f0ed3676-36dc-4602-8b3c-9e741ba628ed" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14091" + ], + "x-ms-correlation-request-id": [ + "c3173aa1-8cd0-429f-a90d-f778e3dee76f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133407Z:c3173aa1-8cd0-429f-a90d-f778e3dee76f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RhYmxlSXRlbXM/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1ff5b4a1-bcb1-4284-a8f1-e86bdb559075" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/02c2292c-04ac-4da4-8598-f333e04888c9\",\r\n \"name\": \"02c2292c-04ac-4da4-8598-f333e04888c9\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"02c2292c-04ac-4da4-8598-f333e04888c9\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"name\": \"687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm11\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"5bb00ca8-d850-49fb-afdc-052413458ea2\",\r\n \"vhdName\": \"vm11\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"name\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"name\": \"fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"Nakul\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"generation\": \"2\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 25600,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"bb2ce67e-8f5b-49ee-ac6a-a0b14e8622c1\",\r\n \"vhdName\": \"FRTest\"\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems?api-version=2016-08-10&%24skipToken=ReplicationGroup%3aBegin\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:34:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1ff5b4a1-bcb1-4284-a8f1-e86bdb559075 5/15/2017 1:34:08 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "1ff5b4a1-bcb1-4284-a8f1-e86bdb559075" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14090" + ], + "x-ms-correlation-request-id": [ + "bf7a4d6f-4829-4614-9aef-ed9619e74d02" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133408Z:bf7a4d6f-4829-4614-9aef-ed9619e74d02" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"hvHostVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmName\": \"vm2\",\r\n \"osType\": \"Windows\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"targetStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"targetAzureVmName\": \"vm2\",\r\n \"targetAzureV2ResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1164" + ], + "x-ms-client-request-id": [ + "319b819a-10e3-4260-8d15-8ab246048339" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:34:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/8c24032b-a1f9-483b-a94c-44776aeb2cae?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8c24032b-a1f9-483b-a94c-44776aeb2cae", + "319b819a-10e3-4260-8d15-8ab246048339 5/15/2017 1:34:09 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8c24032b-a1f9-483b-a94c-44776aeb2cae?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "319b819a-10e3-4260-8d15-8ab246048339" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "5f5b85e7-f96c-4504-8775-3d1fa821b012" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133409Z:5f5b85e7-f96c-4504-8775-3d1fa821b012" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8c24032b-a1f9-483b-a94c-44776aeb2cae?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhjMjQwMzJiLWExZjktNDgzYi1hOTRjLTQ0Nzc2YWViMmNhZT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8c24032b-a1f9-483b-a94c-44776aeb2cae\",\r\n \"name\": \"8c24032b-a1f9-483b-a94c-44776aeb2cae\",\r\n \"properties\": {\r\n \"activityId\": \"319b819a-10e3-4260-8d15-8ab246048339 ActivityId: 5f5b85e7-f96c-4504-8775-3d1fa821b012\",\r\n \"scenarioName\": \"EnableDr\",\r\n \"friendlyName\": \"Enable replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"EnableProtectionPreflightChecksTask\",\r\n \"name\": \"EnableProtectionPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:34:10.2610435Z\",\r\n \"endTime\": \"2017-05-15T13:34:13.4095963Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for enabling protection\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CreateProtectionTargetTask\",\r\n \"name\": \"CreateProtectionTarget\",\r\n \"startTime\": \"2017-05-15T13:34:13.4095963Z\",\r\n \"endTime\": \"2017-05-15T13:34:20.4407727Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Identifying the replication target\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EnableProtectionTask\",\r\n \"name\": \"EnableProtection\",\r\n \"startTime\": \"2017-05-15T13:34:20.4407727Z\",\r\n \"endTime\": \"2017-05-15T13:34:32.2306323Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Enable replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartInitialReplicationTask\",\r\n \"name\": \"VmStartInitialReplication\",\r\n \"startTime\": \"2017-05-15T13:34:32.2306323Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting initial replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"UpdateDraStateTask\",\r\n \"name\": \"UpdateDraState\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Updating the provider states\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:34:09.7352132Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:34:09.7352132Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:34:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8c24032b-a1f9-483b-a94c-44776aeb2cae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "cabbe1d0-caf6-4c45-81ba-57885f948788" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14080" + ], + "x-ms-correlation-request-id": [ + "e863378f-459e-4c92-a182-325c3428a468" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133439Z:e863378f-459e-4c92-a182-325c3428a468" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8c24032b-a1f9-483b-a94c-44776aeb2cae?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhjMjQwMzJiLWExZjktNDgzYi1hOTRjLTQ0Nzc2YWViMmNhZT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8c24032b-a1f9-483b-a94c-44776aeb2cae\",\r\n \"name\": \"8c24032b-a1f9-483b-a94c-44776aeb2cae\",\r\n \"properties\": {\r\n \"activityId\": \"319b819a-10e3-4260-8d15-8ab246048339 ActivityId: 5f5b85e7-f96c-4504-8775-3d1fa821b012\",\r\n \"scenarioName\": \"EnableDr\",\r\n \"friendlyName\": \"Enable replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"EnableProtectionPreflightChecksTask\",\r\n \"name\": \"EnableProtectionPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:34:10.2610435Z\",\r\n \"endTime\": \"2017-05-15T13:34:13.4095963Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for enabling protection\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CreateProtectionTargetTask\",\r\n \"name\": \"CreateProtectionTarget\",\r\n \"startTime\": \"2017-05-15T13:34:13.4095963Z\",\r\n \"endTime\": \"2017-05-15T13:34:20.4407727Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Identifying the replication target\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EnableProtectionTask\",\r\n \"name\": \"EnableProtection\",\r\n \"startTime\": \"2017-05-15T13:34:20.4407727Z\",\r\n \"endTime\": \"2017-05-15T13:34:32.2306323Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Enable replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartInitialReplicationTask\",\r\n \"name\": \"VmStartInitialReplication\",\r\n \"startTime\": \"2017-05-15T13:34:32.2306323Z\",\r\n \"endTime\": \"2017-05-15T13:35:06.7154892Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting initial replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"UpdateDraStateTask\",\r\n \"name\": \"UpdateDraState\",\r\n \"startTime\": \"2017-05-15T13:35:06.7154892Z\",\r\n \"endTime\": \"2017-05-15T13:35:06.8561121Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Updating the provider states\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:34:09.7352132Z\",\r\n \"endTime\": \"2017-05-15T13:35:06Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:34:09.7352132Z\",\r\n \"endTime\": \"2017-05-15T13:35:06Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:35:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8c24032b-a1f9-483b-a94c-44776aeb2cae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "962a8caf-a3f5-4964-88b8-41c0a006b92b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14144" + ], + "x-ms-correlation-request-id": [ + "f5b3bdd1-ffed-41e1-949f-37fa74394cde" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133512Z:f5b3bdd1-ffed-41e1-949f-37fa74394cde" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"InitialReplicationInProgress\",\r\n \"protectionStateDescription\": \"Initial replication is in progress\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"DisableProtection\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"UnprotectedStatesBegin\",\r\n \"vmProtectionStateDescription\": \"Enabling protection\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [],\r\n \"selectedRecoveryAzureNetworkId\": null,\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": null,\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"NoLicenseType\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:35:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "70fe5f69-a1b5-486c-add8-5e8648726ecd 5/15/2017 1:35:13 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "70fe5f69-a1b5-486c-add8-5e8648726ecd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14143" + ], + "x-ms-correlation-request-id": [ + "534fd482-0b53-40ea-85e2-a467c13d9eb7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133513Z:534fd482-0b53-40ea-85e2-a467c13d9eb7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bae9a49f-8cf4-4075-a0e2-c9f3778ab9e2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"InitialReplicationInProgress\",\r\n \"protectionStateDescription\": \"Initial replication is in progress\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"DisableProtection\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"UnprotectedStatesBegin\",\r\n \"vmProtectionStateDescription\": \"Enabling protection\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [],\r\n \"selectedRecoveryAzureNetworkId\": null,\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": null,\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"NoLicenseType\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:35:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bae9a49f-8cf4-4075-a0e2-c9f3778ab9e2 5/15/2017 1:35:13 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "bae9a49f-8cf4-4075-a0e2-c9f3778ab9e2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14141" + ], + "x-ms-correlation-request-id": [ + "e191f641-dfef-478d-a6c5-5b858f12215b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T133513Z:e191f641-dfef-478d-a6c5-5b858f12215b" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateRecoveryPlan.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateRecoveryPlan.json new file mode 100644 index 000000000000..27a9b474dd9c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateRecoveryPlan.json @@ -0,0 +1,496 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "077732fd-b6c7-4938-98c5-3543b62e411f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:10:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "077732fd-b6c7-4938-98c5-3543b62e411f 5/13/2017 2:10:58 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "077732fd-b6c7-4938-98c5-3543b62e411f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13967" + ], + "x-ms-correlation-request-id": [ + "da8fc1df-7ceb-4302-827f-91b4f97fc1fb" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T141058Z:da8fc1df-7ceb-4302-827f-91b4f97fc1fb" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eb90ec12-e171-4121-9d70-68062caf5277" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:10:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "eb90ec12-e171-4121-9d70-68062caf5277 5/13/2017 2:10:59 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "eb90ec12-e171-4121-9d70-68062caf5277" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13966" + ], + "x-ms-correlation-request-id": [ + "42dd3d3b-6e05-4182-9526-c444d7fc4cd9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T141058Z:42dd3d3b-6e05-4182-9526-c444d7fc4cd9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "81d6019c-e323-4048-a5fd-5899a997debf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"name\": \"vm1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"MarkedForDeletion\",\r\n \"testFailoverStateDescription\": \"Cleaning up test environment\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"lastSuccessfulTestFailoverTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/32975a4a-61ed-45df-a4a5-dd8051e61d2d\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm1\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkY4NDkxRTRGLTgxN0EtNDBERC1BOTBDLUFGNzczOTc4Qzc1Qlw3NjAwMzMxRS03NDk4LTQ0QTQtQjdDNy0xQjY1NkJDREQ1MkQ=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": \"Never\",\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:10:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "81d6019c-e323-4048-a5fd-5899a997debf 5/13/2017 2:10:59 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "81d6019c-e323-4048-a5fd-5899a997debf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13965" + ], + "x-ms-correlation-request-id": [ + "ffc1cc10-3e23-4c19-8c43-68656c941b33" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T141059Z:ffc1cc10-3e23-4c19-8c43-68656c941b33" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"vm1\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "889" + ], + "x-ms-client-request-id": [ + "c2775565-649b-4d87-a1f0-4feb82cf76af" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:11:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/6b0330be-f188-4b49-83e2-b218b853e3f6?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/6b0330be-f188-4b49-83e2-b218b853e3f6", + "c2775565-649b-4d87-a1f0-4feb82cf76af 5/13/2017 2:11:00 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/6b0330be-f188-4b49-83e2-b218b853e3f6?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "c2775565-649b-4d87-a1f0-4feb82cf76af" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "4292f344-5508-4ab6-bfff-ed38f5dfabda" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T141100Z:4292f344-5508-4ab6-bfff-ed38f5dfabda" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/6b0330be-f188-4b49-83e2-b218b853e3f6?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzZiMDMzMGJlLWYxODgtNGI0OS04M2UyLWIyMThiODUzZTNmNj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/6b0330be-f188-4b49-83e2-b218b853e3f6\",\r\n \"name\": \"6b0330be-f188-4b49-83e2-b218b853e3f6\",\r\n \"properties\": {\r\n \"activityId\": \"c2775565-649b-4d87-a1f0-4feb82cf76af ActivityId: 4292f344-5508-4ab6-bfff-ed38f5dfabda\",\r\n \"scenarioName\": \"SaveRecoveryPlan\",\r\n \"friendlyName\": \"Save a recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"a9d9d8ef-0c50-4abb-852b-6ca0af7d7f6a\",\r\n \"name\": \"SaveRecoveryPlanTask\",\r\n \"startTime\": \"2017-05-13T14:11:02.1368208Z\",\r\n \"endTime\": \"2017-05-13T14:11:02.8867851Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Save a recovery plan task\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:11:00.6948431Z\",\r\n \"endTime\": \"2017-05-13T14:11:00Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:11:00.6948431Z\",\r\n \"endTime\": \"2017-05-13T14:11:00Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:11:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/6b0330be-f188-4b49-83e2-b218b853e3f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "25771ad6-dd95-4f56-9102-e7e12838e882" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13954" + ], + "x-ms-correlation-request-id": [ + "0d793d24-a5ff-47c9-ab42-93a4a60292c4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T141130Z:0d793d24-a5ff-47c9-ab42-93a4a60292c4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\"\r\n ],\r\n \"currentScenario\": null,\r\n \"currentScenarioStatus\": null,\r\n \"currentScenarioStatusDescription\": null,\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:11:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "249c08fc-def9-409c-9815-36c0710c0c11 5/13/2017 2:11:32 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "249c08fc-def9-409c-9815-36c0710c0c11" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13953" + ], + "x-ms-correlation-request-id": [ + "5862e64b-8e91-433f-a744-442ef5d4c31a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T141132Z:5862e64b-8e91-433f-a744-442ef5d4c31a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7be621ff-4ba5-4d92-b549-0b9a70eaba11" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\"\r\n ],\r\n \"currentScenario\": null,\r\n \"currentScenarioStatus\": null,\r\n \"currentScenarioStatusDescription\": null,\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:11:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7be621ff-4ba5-4d92-b549-0b9a70eaba11 5/13/2017 2:11:33 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "7be621ff-4ba5-4d92-b549-0b9a70eaba11" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13951" + ], + "x-ms-correlation-request-id": [ + "c87d2fb5-974b-4118-a03d-4c80ed69efeb" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T141132Z:c87d2fb5-974b-4118-a03d-4c80ed69efeb" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateSite.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateSite.json new file mode 100644 index 000000000000..eec099998f5f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/CreateSite.json @@ -0,0 +1,283 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "24" + ], + "x-ms-client-request-id": [ + "22dab996-5218-4341-ae55-c8944038763f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:02:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/operationresults/e4f1cb81-3ee0-47c8-ab5b-e2dec4b46baf?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e4f1cb81-3ee0-47c8-ab5b-e2dec4b46baf", + "22dab996-5218-4341-ae55-c8944038763f 5/15/2017 1:02:30 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e4f1cb81-3ee0-47c8-ab5b-e2dec4b46baf?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "22dab996-5218-4341-ae55-c8944038763f" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "2fbe6fe2-d14b-4f2c-80d2-624d943f2c76" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T130230Z:2fbe6fe2-d14b-4f2c-80d2-624d943f2c76" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e4f1cb81-3ee0-47c8-ab5b-e2dec4b46baf?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2U0ZjFjYjgxLTNlZTAtNDdjOC1hYjViLWUyZGVjNGI0NmJhZj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e4f1cb81-3ee0-47c8-ab5b-e2dec4b46baf\",\r\n \"name\": \"e4f1cb81-3ee0-47c8-ab5b-e2dec4b46baf\",\r\n \"properties\": {\r\n \"activityId\": \"22dab996-5218-4341-ae55-c8944038763f ActivityId: 2fbe6fe2-d14b-4f2c-80d2-624d943f2c76\",\r\n \"scenarioName\": \"CreateSite\",\r\n \"friendlyName\": \"Create a site\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"RegisterVMMTask\",\r\n \"name\": \"RegisterVmmTask\",\r\n \"startTime\": \"2017-05-15T13:02:30.7993907Z\",\r\n \"endTime\": \"2017-05-15T13:02:31.0304874Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Registering the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:02:30.245215Z\",\r\n \"endTime\": \"2017-05-15T13:02:31Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"targetObjectName\": \"SiteRecoveryTestSite1\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:02:30.245215Z\",\r\n \"endTime\": \"2017-05-15T13:02:31Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:03:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e4f1cb81-3ee0-47c8-ab5b-e2dec4b46baf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3a2e5a25-82fe-4f60-90b9-8ec86db11bad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14081" + ], + "x-ms-correlation-request-id": [ + "97b270e6-ae9f-40cf-89be-8bc64d62bc85" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T130302Z:97b270e6-ae9f-40cf-89be-8bc64d62bc85" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:03:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c2dd54af-c38a-4540-83d8-3287a8552c30 5/15/2017 1:03:02 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c2dd54af-c38a-4540-83d8-3287a8552c30" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14080" + ], + "x-ms-correlation-request-id": [ + "482bb99c-e2af-455e-af62-c3cc6d469d18" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T130302Z:482bb99c-e2af-455e-af62-c3cc6d469d18" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2d998c06-2dd1-402a-921a-79f5afc5c63a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:03:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2d998c06-2dd1-402a-921a-79f5afc5c63a 5/15/2017 1:03:03 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2d998c06-2dd1-402a-921a-79f5afc5c63a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14079" + ], + "x-ms-correlation-request-id": [ + "ac8284a6-eb9e-4be3-aaa8-c71d268753e7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T130302Z:ac8284a6-eb9e-4be3-aaa8-c71d268753e7" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteNetworkMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteNetworkMapping.json new file mode 100644 index 000000000000..cdb3eaeaee29 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteNetworkMapping.json @@ -0,0 +1,140 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3MvTldNYXBwaW5nP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f3c4c250-c7a9-45bb-8ebd-1aaeeaba507b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 07:18:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping/operationresults/ce5a5825-bfc1-4e73-a1fd-777566368d47?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ce5a5825-bfc1-4e73-a1fd-777566368d47?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "f3c4c250-c7a9-45bb-8ebd-1aaeeaba507b 5/15/2017 7:18:06 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "f3c4c250-c7a9-45bb-8ebd-1aaeeaba507b" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "5da89bc1-d368-41f7-b988-88885a8cd32b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T071806Z:5da89bc1-d368-41f7-b988-88885a8cd32b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ce5a5825-bfc1-4e73-a1fd-777566368d47?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2NlNWE1ODI1LWJmYzEtNGU3My1hMWZkLTc3NzU2NjM2OGQ0Nz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ce5a5825-bfc1-4e73-a1fd-777566368d47\",\r\n \"name\": \"ce5a5825-bfc1-4e73-a1fd-777566368d47\",\r\n \"properties\": {\r\n \"activityId\": \"f3c4c250-c7a9-45bb-8ebd-1aaeeaba507b ActivityId: 5da89bc1-d368-41f7-b988-88885a8cd32b\",\r\n \"scenarioName\": \"NetworkUnPairing\",\r\n \"friendlyName\": \"Remove map\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"d4937756-4b1f-496e-9357-f4d936bc48b9\",\r\n \"name\": \"ModifyVMNetworksUnPairingStatusTask\",\r\n \"startTime\": \"2017-05-15T07:18:07.2876676Z\",\r\n \"endTime\": \"2017-05-15T07:18:08.3346602Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Unmap network\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"9721f47a-dc63-42d1-bc94-65362fb2e094\",\r\n \"name\": \"VMNetworksUpdateVMNicsTaskDetach\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Detach network (0)\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"GroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"instanceType\": \"GroupTaskDetails\",\r\n \"childTasks\": []\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T07:18:06.2550827Z\",\r\n \"endTime\": \"2017-05-15T07:18:08Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"corp\",\r\n \"targetObjectName\": \"corp\",\r\n \"targetInstanceType\": \"Network\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryNetworkId\": \"c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"PrimaryNetworkName\": \"corp\",\r\n \"RecoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"RecoveryNetworkName\": \"vnetavrai\",\r\n \"PrimaryVmmId\": \"2a34ba3d-e783-4c78-9e67-ab9d4c46b639\",\r\n \"PrimaryVmmName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"VMM\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T07:18:06.2550827Z\",\r\n \"endTime\": \"2017-05-15T07:18:08Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 07:18:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ce5a5825-bfc1-4e73-a1fd-777566368d47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "26c7b773-4754-4c3b-8065-edb4f1b0cff9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14194" + ], + "x-ms-correlation-request-id": [ + "f410467e-c2f2-42d5-8edf-fafd7f5cfec2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T071836Z:f410467e-c2f2-42d5-8edf-fafd7f5cfec2" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeletePCMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeletePCMapping.json new file mode 100644 index 000000000000..c3d058045d84 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeletePCMapping.json @@ -0,0 +1,360 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2b3da975-5a5c-4bc5-b117-6e585a7b5cae" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:21:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2b3da975-5a5c-4bc5-b117-6e585a7b5cae 5/15/2017 2:21:59 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2b3da975-5a5c-4bc5-b117-6e585a7b5cae" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14008" + ], + "x-ms-correlation-request-id": [ + "ab8de66d-1cbc-43b3-8556-078da30229df" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142159Z:ab8de66d-1cbc-43b3-8556-078da30229df" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7e188156-f598-456a-b603-bd3d0c563da1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:21:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7e188156-f598-456a-b603-bd3d0c563da1 5/15/2017 2:22:00 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "7e188156-f598-456a-b603-bd3d0c563da1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14007" + ], + "x-ms-correlation-request-id": [ + "7292b121-243e-4045-8e98-9eee12934952" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142159Z:7292b121-243e-4045-8e98-9eee12934952" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f91cdcbf-5dd5-4524-a4ff-34aa81419bb8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:21:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f91cdcbf-5dd5-4524-a4ff-34aa81419bb8 5/15/2017 2:22:00 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f91cdcbf-5dd5-4524-a4ff-34aa81419bb8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14006" + ], + "x-ms-correlation-request-id": [ + "bc69b8a5-343b-4400-bfcd-f5535bf5a77b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142200Z:bc69b8a5-343b-4400-bfcd-f5535bf5a77b" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping/remove?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJNYXBwaW5ncy9QQ01hcHBpbmcvcmVtb3ZlP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "POST", + "RequestBody": "{}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ], + "x-ms-client-request-id": [ + "04a49398-26f2-4615-9331-245cdb1085d6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:22:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping/operationresults/9fe5574b-edc6-456b-88a0-896ab46fe731?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9fe5574b-edc6-456b-88a0-896ab46fe731", + "04a49398-26f2-4615-9331-245cdb1085d6 5/15/2017 2:22:01 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9fe5574b-edc6-456b-88a0-896ab46fe731?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "04a49398-26f2-4615-9331-245cdb1085d6" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "7f992b68-1f8d-4c72-853f-e1a8a170f0c9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142200Z:7f992b68-1f8d-4c72-853f-e1a8a170f0c9" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9fe5574b-edc6-456b-88a0-896ab46fe731?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzlmZTU1NzRiLWVkYzYtNDU2Yi04OGEwLTg5NmFiNDZmZTczMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9fe5574b-edc6-456b-88a0-896ab46fe731\",\r\n \"name\": \"9fe5574b-edc6-456b-88a0-896ab46fe731\",\r\n \"properties\": {\r\n \"activityId\": \"04a49398-26f2-4615-9331-245cdb1085d6 ActivityId: 7f992b68-1f8d-4c72-853f-e1a8a170f0c9\",\r\n \"scenarioName\": \"DissociateProtectionProfile\",\r\n \"friendlyName\": \"Dissociate replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CloudUnpairingWfPreflightChecksTask\",\r\n \"name\": \"CloudUnpairingPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T14:22:01.7177899Z\",\r\n \"endTime\": \"2017-05-15T14:22:02.0146701Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for dissociating the replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudUnpairingWfUnpairCloudsTask\",\r\n \"name\": \"CloudUnpairingUnpairClouds\",\r\n \"startTime\": \"2017-05-15T14:22:02.0146701Z\",\r\n \"endTime\": \"2017-05-15T14:22:08.0596739Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Remove the protection configuration\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudUnpairingWfCleanupCloudsTask\",\r\n \"name\": \"CloudUnpairingCleanupClouds\",\r\n \"startTime\": \"2017-05-15T14:22:08.0596739Z\",\r\n \"endTime\": \"2017-05-15T14:22:17.9034373Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the protection configuration\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CloudUnpairingWfCleanupSiteTask\",\r\n \"name\": \"CloudUnpairingCleanupSite\",\r\n \"startTime\": \"2017-05-15T14:22:17.9034373Z\",\r\n \"endTime\": \"2017-05-15T14:22:17.9034373Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the configuration\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:22:01.0668687Z\",\r\n \"endTime\": \"2017-05-15T14:22:17Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:22:01.0668687Z\",\r\n \"endTime\": \"2017-05-15T14:22:17Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:22:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9fe5574b-edc6-456b-88a0-896ab46fe731" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "63b3f20b-b214-48df-b85a-0d7062ac9280" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13998" + ], + "x-ms-correlation-request-id": [ + "0c9a7c31-8c2a-4e5c-b0ef-5b673d0087cb" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142231Z:0c9a7c31-8c2a-4e5c-b0ef-5b673d0087cb" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeletePolicy.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeletePolicy.json new file mode 100644 index 000000000000..313cac2c2b11 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeletePolicy.json @@ -0,0 +1,140 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "84e78079-c547-4476-bb91-95af172acdbd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:23:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1/operationresults/b74ee293-bdcb-49e1-b3fe-084081586db9?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b74ee293-bdcb-49e1-b3fe-084081586db9?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "84e78079-c547-4476-bb91-95af172acdbd 5/15/2017 2:23:03 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "84e78079-c547-4476-bb91-95af172acdbd" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "1a9fe35a-df6a-478c-ae80-2da4e5f06fca" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142303Z:1a9fe35a-df6a-478c-ae80-2da4e5f06fca" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b74ee293-bdcb-49e1-b3fe-084081586db9?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2I3NGVlMjkzLWJkY2ItNDllMS1iM2ZlLTA4NDA4MTU4NmRiOT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b74ee293-bdcb-49e1-b3fe-084081586db9\",\r\n \"name\": \"b74ee293-bdcb-49e1-b3fe-084081586db9\",\r\n \"properties\": {\r\n \"activityId\": \"84e78079-c547-4476-bb91-95af172acdbd ActivityId: 1a9fe35a-df6a-478c-ae80-2da4e5f06fca\",\r\n \"scenarioName\": \"RemoveProtectionProfile\",\r\n \"friendlyName\": \"Remove the replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"RemoveProtectionProfilePreflightsCheckTask\",\r\n \"name\": \"RemoveProtectionProfilePreflightsCheckTask\",\r\n \"startTime\": \"2017-05-15T14:23:20.4672487Z\",\r\n \"endTime\": \"2017-05-15T14:23:20.5922459Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Checking prerequisites for replication policy removal\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"RemoveProtectionProfileTask\",\r\n \"name\": \"RemoveProtectionProfileTask\",\r\n \"startTime\": \"2017-05-15T14:23:20.5922459Z\",\r\n \"endTime\": \"2017-05-15T14:23:20.5922459Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Removing the replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:23:03.4647517Z\",\r\n \"endTime\": \"2017-05-15T14:23:20Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {}\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:23:03.4647517Z\",\r\n \"endTime\": \"2017-05-15T14:23:20Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:23:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b74ee293-bdcb-49e1-b3fe-084081586db9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "468b7df4-888c-4a7f-b191-86ef839cd0b2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14228" + ], + "x-ms-correlation-request-id": [ + "10f2c1fc-0546-48a7-96eb-27f7de73628a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142333Z:10f2c1fc-0546-48a7-96eb-27f7de73628a" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteProtectedItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteProtectedItem.json new file mode 100644 index 000000000000..a525b06084d0 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteProtectedItem.json @@ -0,0 +1,217 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3b2c60e9-a741-486e-b531-1f4d6d51c6d7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:56:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3b2c60e9-a741-486e-b531-1f4d6d51c6d7 5/13/2017 7:56:28 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3b2c60e9-a741-486e-b531-1f4d6d51c6d7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14002" + ], + "x-ms-correlation-request-id": [ + "d3853cf2-d8ee-4bd5-b4c6-b47db6abcfed" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195627Z:d3853cf2-d8ee-4bd5-b4c6-b47db6abcfed" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/remove?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9yZW1vdmU/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"disableProtectionReason\": \"NotSpecified\",\r\n \"replicationProviderInput\": {\r\n \"instanceType\": \"DisableProtectionProviderSpecificInput\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "182" + ], + "x-ms-client-request-id": [ + "81835893-dfff-495b-b308-5fcf6ae8eba8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:56:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/23a2ad24-a3ac-4c87-b7f1-b97c467fc314?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/23a2ad24-a3ac-4c87-b7f1-b97c467fc314?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "81835893-dfff-495b-b308-5fcf6ae8eba8 5/13/2017 7:56:29 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "81835893-dfff-495b-b308-5fcf6ae8eba8" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "a5e20e46-983e-4a78-a7a2-ae212816d489" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195629Z:a5e20e46-983e-4a78-a7a2-ae212816d489" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/23a2ad24-a3ac-4c87-b7f1-b97c467fc314?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzIzYTJhZDI0LWEzYWMtNGM4Ny1iN2YxLWI5N2M0NjdmYzMxND9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/23a2ad24-a3ac-4c87-b7f1-b97c467fc314\",\r\n \"name\": \"23a2ad24-a3ac-4c87-b7f1-b97c467fc314\",\r\n \"properties\": {\r\n \"activityId\": \"81835893-dfff-495b-b308-5fcf6ae8eba8 ActivityId: a5e20e46-983e-4a78-a7a2-ae212816d489\",\r\n \"scenarioName\": \"DisableDr\",\r\n \"friendlyName\": \"Disable replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"DisableProtectionOnPrimaryTask\",\r\n \"name\": \"DisableProtectionOnPrimary\",\r\n \"startTime\": \"2017-05-13T19:56:30.2001972Z\",\r\n \"endTime\": \"2017-05-13T19:56:36.0212089Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Disable replication on the source location\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DisableProtectionOnSecondaryTask\",\r\n \"name\": \"DisableProtectionOnSecondary\",\r\n \"startTime\": \"2017-05-13T19:56:36.0212089Z\",\r\n \"endTime\": \"2017-05-13T19:56:36.1618368Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Disable replication on the target location\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"UpdateDraStateTask\",\r\n \"name\": \"UpdateDraState\",\r\n \"startTime\": \"2017-05-13T19:56:36.1618368Z\",\r\n \"endTime\": \"2017-05-13T19:56:36.9587077Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Updating the provider states\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:56:29.3021785Z\",\r\n \"endTime\": \"2017-05-13T19:56:36Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:56:29.3021785Z\",\r\n \"endTime\": \"2017-05-13T19:56:36Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:56:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/23a2ad24-a3ac-4c87-b7f1-b97c467fc314" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "0a02365a-58e9-47e4-927f-71af563cd795" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13984" + ], + "x-ms-correlation-request-id": [ + "9cca69cd-dc36-4290-837c-e225d7f5dad6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195659Z:9cca69cd-dc36-4290-837c-e225d7f5dad6" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteRecoveryPlan.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteRecoveryPlan.json new file mode 100644 index 000000000000..e3d4510165dc --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteRecoveryPlan.json @@ -0,0 +1,141 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1d0e1d1d-6e5a-4a16-a36f-7927931c5189" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:09:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/59852d4b-5caa-4417-a635-9cabda8f263d?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/59852d4b-5caa-4417-a635-9cabda8f263d", + "1d0e1d1d-6e5a-4a16-a36f-7927931c5189 5/13/2017 2:09:27 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/59852d4b-5caa-4417-a635-9cabda8f263d?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "1d0e1d1d-6e5a-4a16-a36f-7927931c5189" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "439b1f56-4bfe-4cef-b331-6a9b612269e1" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140927Z:439b1f56-4bfe-4cef-b331-6a9b612269e1" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/59852d4b-5caa-4417-a635-9cabda8f263d?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzU5ODUyZDRiLTVjYWEtNDQxNy1hNjM1LTljYWJkYThmMjYzZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/59852d4b-5caa-4417-a635-9cabda8f263d\",\r\n \"name\": \"59852d4b-5caa-4417-a635-9cabda8f263d\",\r\n \"properties\": {\r\n \"activityId\": \"1d0e1d1d-6e5a-4a16-a36f-7927931c5189 ActivityId: 439b1f56-4bfe-4cef-b331-6a9b612269e1\",\r\n \"scenarioName\": \"DeleteRecoveryPlan\",\r\n \"friendlyName\": \"Delete a recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"479cb674-1bbf-4161-9299-379a7d6ac6bb\",\r\n \"name\": \"DeleteRecoveryPlanTask\",\r\n \"startTime\": \"2017-05-13T14:09:28.8747272Z\",\r\n \"endTime\": \"2017-05-13T14:09:28.8903514Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Delete a recovery plan task\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:09:27.8452383Z\",\r\n \"endTime\": \"2017-05-13T14:09:28Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"ab73c1fe-3edc-4a6f-b891-a0f161ffc3ff\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:09:27.8452383Z\",\r\n \"endTime\": \"2017-05-13T14:09:28Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:09:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/59852d4b-5caa-4417-a635-9cabda8f263d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "27c87034-ff08-4dd2-b666-319f5635bcf8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13959" + ], + "x-ms-correlation-request-id": [ + "9111ab06-a49c-4d40-bec7-220972a3f36b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140959Z:9111ab06-a49c-4d40-bec7-220972a3f36b" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteRsp.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteRsp.json new file mode 100644 index 000000000000..439accf1bbe1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteRsp.json @@ -0,0 +1,212 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b6099057-f13b-4e10-9c20-1f07d10de74c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:14:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b6099057-f13b-4e10-9c20-1f07d10de74c 5/13/2017 8:14:15 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b6099057-f13b-4e10-9c20-1f07d10de74c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14601" + ], + "x-ms-correlation-request-id": [ + "17769c44-4942-450c-9859-f81ddae30b3d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T201415Z:17769c44-4942-450c-9859-f81ddae30b3d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998/remove?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblJlY292ZXJ5U2VydmljZXNQcm92aWRlcnMvYmEyYTJkMjUtMzc3Zi00ZjRiLTk0YTQtMjk4MWM3OWIwOTk4L3JlbW92ZT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1b047822-0767-4480-9ed4-819fac738f3b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:14:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998/operationresults/ddb7e489-6738-4ec8-b5e4-5dc29c4966be?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ddb7e489-6738-4ec8-b5e4-5dc29c4966be", + "1b047822-0767-4480-9ed4-819fac738f3b 5/13/2017 8:14:16 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ddb7e489-6738-4ec8-b5e4-5dc29c4966be?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "1b047822-0767-4480-9ed4-819fac738f3b" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "e6e95c08-00cc-459c-ab7c-5d75c55627f0" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T201416Z:e6e95c08-00cc-459c-ab7c-5d75c55627f0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ddb7e489-6738-4ec8-b5e4-5dc29c4966be?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2RkYjdlNDg5LTY3MzgtNGVjOC1iNWU0LTVkYzI5YzQ5NjZiZT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ddb7e489-6738-4ec8-b5e4-5dc29c4966be\",\r\n \"name\": \"ddb7e489-6738-4ec8-b5e4-5dc29c4966be\",\r\n \"properties\": {\r\n \"activityId\": \"1b047822-0767-4480-9ed4-819fac738f3b ActivityId: e6e95c08-00cc-459c-ab7c-5d75c55627f0\",\r\n \"scenarioName\": \"UnregisterDra\",\r\n \"friendlyName\": \"Unregister Server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"UnregisterDraPreflightCheckTask\",\r\n \"name\": \"UnregisterDraPreflightCheckTask\",\r\n \"startTime\": \"2017-05-13T20:14:16.9945391Z\",\r\n \"endTime\": \"2017-05-13T20:14:17.1664171Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisite check for Unregistering Recovery Services Provider\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CleanupDraTask\",\r\n \"name\": \"CleanupDraTask\",\r\n \"startTime\": \"2017-05-13T20:14:17.1664171Z\",\r\n \"endTime\": \"2017-05-13T20:14:38.9896233Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cleaning up host information\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"UnregisterDraTask\",\r\n \"name\": \"UnregisterDraTask\",\r\n \"startTime\": \"2017-05-13T20:14:38.9896233Z\",\r\n \"endTime\": \"2017-05-13T20:14:38.9896233Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Removing associated Azure data\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T20:14:16.5879108Z\",\r\n \"endTime\": \"2017-05-13T20:14:34Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"targetObjectName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T20:14:16.5879108Z\",\r\n \"endTime\": \"2017-05-13T20:14:34Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:14:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ddb7e489-6738-4ec8-b5e4-5dc29c4966be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2bfc113c-80c4-408c-9fed-be9e4c8f7718" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14586" + ], + "x-ms-correlation-request-id": [ + "b0395214-7cc2-4d78-bcd8-4497a9b51d27" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T201448Z:b0395214-7cc2-4d78-bcd8-4497a9b51d27" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteSite.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteSite.json new file mode 100644 index 000000000000..d81decae50a4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/DeleteSite.json @@ -0,0 +1,141 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/remove?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZW1vdmU/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "afeb5d38-d9d3-45a4-a32e-0f5f528e09a2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:38:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/operationresults/a866a38d-6b79-4d95-a02c-47201cd04bc9?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a866a38d-6b79-4d95-a02c-47201cd04bc9", + "afeb5d38-d9d3-45a4-a32e-0f5f528e09a2 5/13/2017 8:38:44 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a866a38d-6b79-4d95-a02c-47201cd04bc9?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "afeb5d38-d9d3-45a4-a32e-0f5f528e09a2" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "37b2056b-8a82-41c6-9277-a6142ad5d441" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T203843Z:37b2056b-8a82-41c6-9277-a6142ad5d441" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a866a38d-6b79-4d95-a02c-47201cd04bc9?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NjZhMzhkLTZiNzktNGQ5NS1hMDJjLTQ3MjAxY2QwNGJjOT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a866a38d-6b79-4d95-a02c-47201cd04bc9\",\r\n \"name\": \"a866a38d-6b79-4d95-a02c-47201cd04bc9\",\r\n \"properties\": {\r\n \"activityId\": \"afeb5d38-d9d3-45a4-a32e-0f5f528e09a2 ActivityId: 37b2056b-8a82-41c6-9277-a6142ad5d441\",\r\n \"scenarioName\": \"UnregisterFabric\",\r\n \"friendlyName\": \"Delete server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"UnregisterFabricPreflightChecksTask\",\r\n \"name\": \"UnregisterFabricPreflightCheckTask\",\r\n \"startTime\": \"2017-05-13T20:38:44.3930885Z\",\r\n \"endTime\": \"2017-05-13T20:38:44.5645209Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for deleting the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CleanupFabricTask\",\r\n \"name\": \"CleanupFabricTask\",\r\n \"startTime\": \"2017-05-13T20:38:44.5645209Z\",\r\n \"endTime\": \"2017-05-13T20:38:49.5278433Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Cleaning up the provider settings\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"UnregisterFabricTask\",\r\n \"name\": \"UnregisterFabricTask\",\r\n \"startTime\": \"2017-05-13T20:38:49.5278433Z\",\r\n \"endTime\": \"2017-05-13T20:38:49.6840815Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Deleting the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T20:38:43.951982Z\",\r\n \"endTime\": \"2017-05-13T20:38:49Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"targetObjectName\": \"SiteRecoveryTestSite1\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T20:38:43.951982Z\",\r\n \"endTime\": \"2017-05-13T20:38:49Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:39:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a866a38d-6b79-4d95-a02c-47201cd04bc9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5720504e-80e2-4c7a-b250-d94e03c3bcd9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14154" + ], + "x-ms-correlation-request-id": [ + "7dccdc2e-77cd-49a5-b7d6-70980b5b860a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T203914Z:7dccdc2e-77cd-49a5-b7d6-70980b5b860a" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateContainer.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateContainer.json new file mode 100644 index 000000000000..7d5e88f20dbd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateContainer.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "26ab366f-822a-4cae-ba7e-5412d7febe8c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:49:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "26ab366f-822a-4cae-ba7e-5412d7febe8c 5/11/2017 5:49:49 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "26ab366f-822a-4cae-ba7e-5412d7febe8c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13974" + ], + "x-ms-correlation-request-id": [ + "87f88bf8-88ee-415c-be92-27c3cc08e192" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174949Z:87f88bf8-88ee-415c-be92-27c3cc08e192" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "912093a7-b767-44d8-9d9e-4c11b847b14e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"NotPaired\",\r\n \"role\": \"\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:49:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "912093a7-b767-44d8-9d9e-4c11b847b14e 5/11/2017 5:49:49 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "912093a7-b767-44d8-9d9e-4c11b847b14e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13973" + ], + "x-ms-correlation-request-id": [ + "195a9515-ac6b-4696-a0ad-4a76f739e881" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174949Z:195a9515-ac6b-4696-a0ad-4a76f739e881" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateNetworkMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateNetworkMapping.json new file mode 100644 index 000000000000..e6f669ec9bd8 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateNetworkMapping.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3M/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0ae12e0a-6090-4125-ab55-974e52cc3cea" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping\",\r\n \"name\": \"NWMapping\",\r\n \"properties\": {\r\n \"state\": \"Paired\",\r\n \"primaryNetworkFriendlyName\": \"corp\",\r\n \"primaryNetworkId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"primaryFabricFriendlyName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"recoveryNetworkFriendlyName\": \"vnetavrai\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryFabricArmId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"fabricSpecificSettings\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 06:32:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0ae12e0a-6090-4125-ab55-974e52cc3cea 5/15/2017 6:32:51 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "0ae12e0a-6090-4125-ab55-974e52cc3cea" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14418" + ], + "x-ms-correlation-request-id": [ + "059eb117-b485-41e9-ba54-99de1f326ec2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T063250Z:059eb117-b485-41e9-ba54-99de1f326ec2" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateNetworks.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateNetworks.json new file mode 100644 index 000000000000..33c76f4ca7fa --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateNetworks.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "99894d87-701e-4916-a41a-b8296c6231d0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/775b9f7a-e5a7-4681-abde-567cb70de658\",\r\n \"name\": \"775b9f7a-e5a7-4681-abde-567cb70de658\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"VSwitch_VLan\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n },\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/9f186446-40a8-4025-a970-64c1c1d6ddf9\",\r\n \"name\": \"9f186446-40a8-4025-a970-64c1c1d6ddf9\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"VSwitch_Wnv\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n },\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/ad2d0cec-165e-4aac-8a0f-62a17096abcf\",\r\n \"name\": \"ad2d0cec-165e-4aac-8a0f-62a17096abcf\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"VSwitch_NoIso\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n },\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"name\": \"c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"corp\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 05:01:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "99894d87-701e-4916-a41a-b8296c6231d0 5/15/2017 5:01:06 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "99894d87-701e-4916-a41a-b8296c6231d0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "fb4f7d36-4603-45d7-bbc8-655d597f65c8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T050106Z:fb4f7d36-4603-45d7-bbc8-655d597f65c8" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumeratePCMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumeratePCMapping.json new file mode 100644 index 000000000000..880e89c2d003 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumeratePCMapping.json @@ -0,0 +1,221 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a4e0dae5-e40c-486d-9212-abb2d8d4d1b9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:00:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a4e0dae5-e40c-486d-9212-abb2d8d4d1b9 5/13/2017 8:00:18 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a4e0dae5-e40c-486d-9212-abb2d8d4d1b9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14823" + ], + "x-ms-correlation-request-id": [ + "ad9ee68b-2bd1-438e-9c93-e4148bcd98a8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T200018Z:ad9ee68b-2bd1-438e-9c93-e4148bcd98a8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "84f7d854-d739-4a1c-a5d9-e3f71d1ff295" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:00:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "84f7d854-d739-4a1c-a5d9-e3f71d1ff295 5/13/2017 8:00:19 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "84f7d854-d739-4a1c-a5d9-e3f71d1ff295" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14822" + ], + "x-ms-correlation-request-id": [ + "82a54cdd-7f6e-4007-8bb0-ccc340d71272" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T200019Z:82a54cdd-7f6e-4007-8bb0-ccc340d71272" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJNYXBwaW5ncz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "323098d6-ebf9-45e5-b817-5f0c960cbb26" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping\",\r\n \"name\": \"PCMapping\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings\",\r\n \"properties\": {\r\n \"targetProtectionContainerId\": \"Microsoft Azure\",\r\n \"targetProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"providerSpecificDetails\": null,\r\n \"health\": \"Normal\",\r\n \"healthErrorDetails\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"state\": \"Paired\",\r\n \"sourceProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"sourceFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"targetFabricFriendlyName\": \"Microsoft Azure\",\r\n \"policyFriendlyName\": \"protectionprofile1\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:00:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "323098d6-ebf9-45e5-b817-5f0c960cbb26 5/13/2017 8:00:22 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "323098d6-ebf9-45e5-b817-5f0c960cbb26" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14820" + ], + "x-ms-correlation-request-id": [ + "8e32eaba-b12e-4061-bb71-378ecafb7120" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T200022Z:8e32eaba-b12e-4061-bb71-378ecafb7120" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateProtectableItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateProtectableItem.json new file mode 100644 index 000000000000..5a4451b1fe65 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateProtectableItem.json @@ -0,0 +1,292 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c5281dfa-5ddd-48f6-ad2c-0667d16d9022" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 12 May 2017 14:42:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c5281dfa-5ddd-48f6-ad2c-0667d16d9022 5/12/2017 2:42:56 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c5281dfa-5ddd-48f6-ad2c-0667d16d9022" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13355" + ], + "x-ms-correlation-request-id": [ + "e32e274a-78d5-4f4d-a226-ecce371769bb" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170512T144255Z:e32e274a-78d5-4f4d-a226-ecce371769bb" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9cdcc166-7cf2-4d2c-aa49-b6d2e0ada24e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 12 May 2017 14:42:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9cdcc166-7cf2-4d2c-aa49-b6d2e0ada24e 5/12/2017 2:42:57 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9cdcc166-7cf2-4d2c-aa49-b6d2e0ada24e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13354" + ], + "x-ms-correlation-request-id": [ + "3b01b67d-1d13-4b29-b03e-85a5a6acf97d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170512T144256Z:3b01b67d-1d13-4b29-b03e-85a5a6acf97d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5cc3033d-a76d-41b3-ae4a-709848cd92d0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 12 May 2017 14:42:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5cc3033d-a76d-41b3-ae4a-709848cd92d0 5/12/2017 2:42:58 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5cc3033d-a76d-41b3-ae4a-709848cd92d0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13352" + ], + "x-ms-correlation-request-id": [ + "700c4442-8306-4e1a-ad33-8f8c07fd0bc5" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170512T144258Z:700c4442-8306-4e1a-ad33-8f8c07fd0bc5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RhYmxlSXRlbXM/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ed6a2f5d-d62d-4fed-9d17-ca1cd331bc15" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"name\": \"687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm11\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"5bb00ca8-d850-49fb-afdc-052413458ea2\",\r\n \"vhdName\": \"vm11\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"name\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectionStatus\": \"Protected\",\r\n \"replicationProtectedItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"name\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectionStatus\": \"Protected\",\r\n \"replicationProtectedItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"name\": \"fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"Nakul\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"generation\": \"2\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 25600,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"bb2ce67e-8f5b-49ee-ac6a-a0b14e8622c1\",\r\n \"vhdName\": \"FRTest\"\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems?api-version=2016-08-10&%24skipToken=ReplicationGroup%3aBegin\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 12 May 2017 14:42:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ed6a2f5d-d62d-4fed-9d17-ca1cd331bc15 5/12/2017 2:42:59 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "ed6a2f5d-d62d-4fed-9d17-ca1cd331bc15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13350" + ], + "x-ms-correlation-request-id": [ + "97258507-5a34-4cbc-b6d3-493ce12cba63" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170512T144259Z:97258507-5a34-4cbc-b6d3-493ce12cba63" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateProtectedItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateProtectedItem.json new file mode 100644 index 000000000000..89db58754280 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/EnumerateProtectedItem.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "754c6e37-e20c-4e00-a238-adbac7097480" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 13:15:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "754c6e37-e20c-4e00-a238-adbac7097480 5/13/2017 1:15:57 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "754c6e37-e20c-4e00-a238-adbac7097480" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13807" + ], + "x-ms-correlation-request-id": [ + "4fb8cef7-c737-42ee-83aa-1ec4982c424c" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T131557Z:4fb8cef7-c737-42ee-83aa-1ec4982c424c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8385501c-cd97-4ff5-a5e0-f0cb4bdccadf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": \"Never\",\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"name\": \"vm1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"MarkedForDeletion\",\r\n \"testFailoverStateDescription\": \"Cleaning up test environment\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"lastSuccessfulTestFailoverTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/32975a4a-61ed-45df-a4a5-dd8051e61d2d\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm1\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkY4NDkxRTRGLTgxN0EtNDBERC1BOTBDLUFGNzczOTc4Qzc1Qlw3NjAwMzMxRS03NDk4LTQ0QTQtQjdDNy0xQjY1NkJDREQ1MkQ=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": \"Never\",\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 13:16:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8385501c-cd97-4ff5-a5e0-f0cb4bdccadf 5/13/2017 1:17:00 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8385501c-cd97-4ff5-a5e0-f0cb4bdccadf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13849" + ], + "x-ms-correlation-request-id": [ + "5567c149-7e7f-4162-b85c-9bf00a126fe9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T131659Z:5567c149-7e7f-4162-b85c-9bf00a126fe9" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetAlertSettings.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetAlertSettings.json new file mode 100644 index 000000000000..d4330a06ec4d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetAlertSettings.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationAlertSettings/defaultAlertSetting?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25BbGVydFNldHRpbmdzL2RlZmF1bHRBbGVydFNldHRpbmc/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d85a4227-8f12-4491-8e0f-772a9a21fcd2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"defaultAlertSetting\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationAlertSettings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationAlertSettings/defaultAlertSetting\",\r\n \"properties\": {\r\n \"sendToOwners\": \"DoNotSend\",\r\n \"customEmailAddresses\": [\r\n \"ronehr@microsoft.com\"\r\n ],\r\n \"locale\": \"en-US\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:44:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d85a4227-8f12-4491-8e0f-772a9a21fcd2 5/13/2017 6:44:41 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d85a4227-8f12-4491-8e0f-772a9a21fcd2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13949" + ], + "x-ms-correlation-request-id": [ + "63fc7346-5182-4e2f-a2d8-96b0bb697ace" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T184441Z:63fc7346-5182-4e2f-a2d8-96b0bb697ace" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetContainer.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetContainer.json new file mode 100644 index 000000000000..2f583a0320b8 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetContainer.json @@ -0,0 +1,221 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5cb2be28-11e6-47e9-9fbf-e659a6970ddf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:49:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5cb2be28-11e6-47e9-9fbf-e659a6970ddf 5/11/2017 5:49:22 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5cb2be28-11e6-47e9-9fbf-e659a6970ddf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13983" + ], + "x-ms-correlation-request-id": [ + "b1957b73-c831-4c82-a13f-a95521012e57" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174922Z:b1957b73-c831-4c82-a13f-a95521012e57" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7525bdc6-2765-4450-8fb4-3d0a3e2e7208" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"NotPaired\",\r\n \"role\": \"\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:49:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7525bdc6-2765-4450-8fb4-3d0a3e2e7208 5/11/2017 5:49:22 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "7525bdc6-2765-4450-8fb4-3d0a3e2e7208" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13981" + ], + "x-ms-correlation-request-id": [ + "6b64c750-41a5-4fa1-9389-3d39d37f16f3" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174922Z:6b64c750-41a5-4fa1-9389-3d39d37f16f3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a08bc151-a89f-4d11-bb8b-1f3211ffef32" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"NotPaired\",\r\n \"role\": \"\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:49:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a08bc151-a89f-4d11-bb8b-1f3211ffef32 5/11/2017 5:49:23 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a08bc151-a89f-4d11-bb8b-1f3211ffef32" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13980" + ], + "x-ms-correlation-request-id": [ + "70e4280d-6682-4872-b848-198496cf5dfe" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174923Z:70e4280d-6682-4872-b848-198496cf5dfe" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetNetworkMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetNetworkMapping.json new file mode 100644 index 000000000000..cc1ef92ab634 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetNetworkMapping.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3MvTldNYXBwaW5nP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5df7430c-1e43-42d8-8737-b495fc201588" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping\",\r\n \"name\": \"NWMapping\",\r\n \"properties\": {\r\n \"state\": \"Paired\",\r\n \"primaryNetworkFriendlyName\": \"corp\",\r\n \"primaryNetworkId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"primaryFabricFriendlyName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"recoveryNetworkFriendlyName\": \"vnetavrai\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryFabricArmId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"fabricSpecificSettings\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 10:07:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5df7430c-1e43-42d8-8737-b495fc201588 5/15/2017 10:07:02 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5df7430c-1e43-42d8-8737-b495fc201588" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14193" + ], + "x-ms-correlation-request-id": [ + "08bd0307-96f8-4551-92cc-aad5916d06d8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T100701Z:08bd0307-96f8-4551-92cc-aad5916d06d8" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetNetworks.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetNetworks.json new file mode 100644 index 000000000000..c480ca16afab --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetNetworks.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2074aeae-d351-4b6c-9ad3-1d3970421103" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"name\": \"c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"corp\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 06:14:49 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2074aeae-d351-4b6c-9ad3-1d3970421103 5/15/2017 6:14:50 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2074aeae-d351-4b6c-9ad3-1d3970421103" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14447" + ], + "x-ms-correlation-request-id": [ + "e005ab87-0f2d-4750-956a-fee8a20c6b6d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T061450Z:e005ab87-0f2d-4750-956a-fee8a20c6b6d" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetPCMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetPCMapping.json new file mode 100644 index 000000000000..cf4c8d88f773 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetPCMapping.json @@ -0,0 +1,292 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f95a64f5-5693-4f29-ba5e-33b50acc4424" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:59:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f95a64f5-5693-4f29-ba5e-33b50acc4424 5/11/2017 5:59:37 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f95a64f5-5693-4f29-ba5e-33b50acc4424" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13859" + ], + "x-ms-correlation-request-id": [ + "4073f734-b37c-4fad-89d6-484a62b366c4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175936Z:4073f734-b37c-4fad-89d6-484a62b366c4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4a8bcc88-af04-444e-baaf-ba7146f6f531" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:59:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4a8bcc88-af04-444e-baaf-ba7146f6f531 5/11/2017 5:59:37 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "4a8bcc88-af04-444e-baaf-ba7146f6f531" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13857" + ], + "x-ms-correlation-request-id": [ + "df8bf2db-e51e-4eb0-abab-a64a274f4c5d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175937Z:df8bf2db-e51e-4eb0-abab-a64a274f4c5d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e269a0d2-80a5-4127-878e-ebd3cc9c30e1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:59:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e269a0d2-80a5-4127-878e-ebd3cc9c30e1 5/11/2017 5:59:38 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "e269a0d2-80a5-4127-878e-ebd3cc9c30e1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13856" + ], + "x-ms-correlation-request-id": [ + "b09f12a4-c9b2-42c2-8ec6-d596a85ae0b0" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175937Z:b09f12a4-c9b2-42c2-8ec6-d596a85ae0b0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJNYXBwaW5ncy9QQ01hcHBpbmc/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "84fff8c0-d485-4968-a629-b5f5e742f14f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping\",\r\n \"name\": \"PCMapping\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings\",\r\n \"properties\": {\r\n \"targetProtectionContainerId\": \"Microsoft Azure\",\r\n \"targetProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"providerSpecificDetails\": null,\r\n \"health\": \"Normal\",\r\n \"healthErrorDetails\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"state\": \"Paired\",\r\n \"sourceProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"sourceFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"targetFabricFriendlyName\": \"Microsoft Azure\",\r\n \"policyFriendlyName\": \"protectionprofile1\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:59:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "84fff8c0-d485-4968-a629-b5f5e742f14f 5/11/2017 5:59:38 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "84fff8c0-d485-4968-a629-b5f5e742f14f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13855" + ], + "x-ms-correlation-request-id": [ + "b2e1585a-8988-4e2d-9e9d-72e2984038d1" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175938Z:b2e1585a-8988-4e2d-9e9d-72e2984038d1" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetPolicy.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetPolicy.json new file mode 100644 index 000000000000..cf9ce7b6ee5f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetPolicy.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "06f99816-5d4b-4ccd-82a4-a5d5b0e86006" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"name\": \"protectionprofile1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"protectionprofile1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 4,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:51:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "06f99816-5d4b-4ccd-82a4-a5d5b0e86006 5/11/2017 5:51:22 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "06f99816-5d4b-4ccd-82a4-a5d5b0e86006" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13745" + ], + "x-ms-correlation-request-id": [ + "66c283e7-a615-481c-a262-5e37a93db59b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175121Z:66c283e7-a615-481c-a262-5e37a93db59b" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetProtectableItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetProtectableItem.json new file mode 100644 index 000000000000..4965a894eccd --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetProtectableItem.json @@ -0,0 +1,292 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "24750c13-296c-4d8d-8d82-3645027e21f5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 18:00:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "24750c13-296c-4d8d-8d82-3645027e21f5 5/11/2017 6:00:56 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "24750c13-296c-4d8d-8d82-3645027e21f5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13955" + ], + "x-ms-correlation-request-id": [ + "7666b7c0-dacd-409d-bc69-32cb8f67ccac" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T180056Z:7666b7c0-dacd-409d-bc69-32cb8f67ccac" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e3a4dbed-5370-4d87-ade3-c0180e93768d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 18:00:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e3a4dbed-5370-4d87-ade3-c0180e93768d 5/11/2017 6:00:57 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "e3a4dbed-5370-4d87-ade3-c0180e93768d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13953" + ], + "x-ms-correlation-request-id": [ + "d314a3b7-e272-48b3-a2dd-00bd1e22f190" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T180056Z:d314a3b7-e272-48b3-a2dd-00bd1e22f190" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3024af46-0ddc-4a47-815e-f9b684d024dc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 18:00:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3024af46-0ddc-4a47-815e-f9b684d024dc 5/11/2017 6:00:57 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3024af46-0ddc-4a47-815e-f9b684d024dc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13952" + ], + "x-ms-correlation-request-id": [ + "6d08f855-f8da-40fb-8e97-0cc2fbd08e5c" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T180057Z:6d08f855-f8da-40fb-8e97-0cc2fbd08e5c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RhYmxlSXRlbXM/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "68e57116-9929-44cc-9717-03577314f5f9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"name\": \"687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm11\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"5bb00ca8-d850-49fb-afdc-052413458ea2\",\r\n \"vhdName\": \"vm11\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"name\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"name\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"name\": \"fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"Nakul\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"generation\": \"2\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 25600,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"bb2ce67e-8f5b-49ee-ac6a-a0b14e8622c1\",\r\n \"vhdName\": \"FRTest\"\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems?api-version=2016-08-10&%24skipToken=ReplicationGroup%3aBegin\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 18:00:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "68e57116-9929-44cc-9717-03577314f5f9 5/11/2017 6:00:58 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "68e57116-9929-44cc-9717-03577314f5f9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13951" + ], + "x-ms-correlation-request-id": [ + "cbee5835-955e-4913-a895-37e5b13e80b1" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T180058Z:cbee5835-955e-4913-a895-37e5b13e80b1" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetProtectedItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetProtectedItem.json new file mode 100644 index 000000000000..1a43d3a71d08 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetProtectedItem.json @@ -0,0 +1,221 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fd972654-de00-4832-af5d-22fe96f9cc4b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 13:38:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fd972654-de00-4832-af5d-22fe96f9cc4b 5/13/2017 1:38:01 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "fd972654-de00-4832-af5d-22fe96f9cc4b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13804" + ], + "x-ms-correlation-request-id": [ + "fd58c1b9-0221-4c91-9a04-9c03a361bd73" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T133801Z:fd58c1b9-0221-4c91-9a04-9c03a361bd73" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "51342bee-b837-43f7-ab32-13addae9285c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 13:38:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "51342bee-b837-43f7-ab32-13addae9285c 5/13/2017 1:38:02 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "51342bee-b837-43f7-ab32-13addae9285c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13801" + ], + "x-ms-correlation-request-id": [ + "876757ce-f9f0-4fea-824d-3fbdcd3a5544" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T133802Z:876757ce-f9f0-4fea-824d-3fbdcd3a5544" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "509d4e0a-052a-48aa-ae32-8e310ce88355" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"name\": \"vm1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"MarkedForDeletion\",\r\n \"testFailoverStateDescription\": \"Cleaning up test environment\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"lastSuccessfulTestFailoverTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/32975a4a-61ed-45df-a4a5-dd8051e61d2d\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm1\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkY4NDkxRTRGLTgxN0EtNDBERC1BOTBDLUFGNzczOTc4Qzc1Qlw3NjAwMzMxRS03NDk4LTQ0QTQtQjdDNy0xQjY1NkJDREQ1MkQ=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": \"Never\",\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 13:38:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "509d4e0a-052a-48aa-ae32-8e310ce88355 5/13/2017 1:38:04 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "509d4e0a-052a-48aa-ae32-8e310ce88355" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13800" + ], + "x-ms-correlation-request-id": [ + "db838412-96a6-4b47-a4df-bc3262e04087" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T133804Z:db838412-96a6-4b47-a4df-bc3262e04087" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRSP.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRSP.json new file mode 100644 index 000000000000..2f914c649abe --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRSP.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7f8c397e-5008-44b2-854b-3b64e3fdf67c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:44:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7f8c397e-5008-44b2-854b-3b64e3fdf67c 5/11/2017 5:44:22 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "7f8c397e-5008-44b2-854b-3b64e3fdf67c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13894" + ], + "x-ms-correlation-request-id": [ + "c013a71a-9b2d-4259-9245-fbfc67f44c50" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174421Z:c013a71a-9b2d-4259-9245-fbfc67f44c50" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblJlY292ZXJ5U2VydmljZXNQcm92aWRlcnMvYmEyYTJkMjUtMzc3Zi00ZjRiLTk0YTQtMjk4MWM3OWIwOTk4P2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2fbfc118-8a74-4aa7-b432-5fa59d593ac6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders\",\r\n \"name\": \"ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"properties\": {\r\n \"fabricType\": \"HyperVSite\",\r\n \"friendlyName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"providerVersion\": \"5.1.2250.0\",\r\n \"serverVersion\": \"3.2.7510.0\",\r\n \"providerVersionState\": \"Latest\",\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"lastHeartBeat\": \"2017-05-11T17:43:59.199152Z\",\r\n \"connectionStatus\": \"Connected\",\r\n \"protectedItemCount\": 0,\r\n \"allowedScenarios\": [\r\n \"Refresh\",\r\n \"Purge\"\r\n ],\r\n \"healthErrorDetails\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:44:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2fbfc118-8a74-4aa7-b432-5fa59d593ac6 5/11/2017 5:44:23 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2fbfc118-8a74-4aa7-b432-5fa59d593ac6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13893" + ], + "x-ms-correlation-request-id": [ + "3c12f046-4cf1-47c1-af5a-65eca927302b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174423Z:3c12f046-4cf1-47c1-af5a-65eca927302b" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRecoveryPlan.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRecoveryPlan.json new file mode 100644 index 000000000000..d2f787fa57f9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRecoveryPlan.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "345d42e0-9ba3-49af-8a4a-923c235897f5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\"\r\n ],\r\n \"currentScenario\": null,\r\n \"currentScenarioStatus\": null,\r\n \"currentScenarioStatusDescription\": null,\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 13:55:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "345d42e0-9ba3-49af-8a4a-923c235897f5 5/13/2017 1:55:54 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "345d42e0-9ba3-49af-8a4a-923c235897f5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14016" + ], + "x-ms-correlation-request-id": [ + "84e09eeb-8051-4f2a-94b5-ea5721578dc6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T135553Z:84e09eeb-8051-4f2a-94b5-ea5721578dc6" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRecoveryPoints.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRecoveryPoints.json new file mode 100644 index 000000000000..fba33186e5b3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetRecoveryPoints.json @@ -0,0 +1,221 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fcea4f85-8d8b-4d9b-95d0-a2f930eb6f7f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:19:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fcea4f85-8d8b-4d9b-95d0-a2f930eb6f7f 5/13/2017 6:19:56 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "fcea4f85-8d8b-4d9b-95d0-a2f930eb6f7f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14042" + ], + "x-ms-correlation-request-id": [ + "02193fb5-ddef-4ee4-822c-19771d299661" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T181955Z:02193fb5-ddef-4ee4-822c-19771d299661" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9yZWNvdmVyeVBvaW50cz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d61cd1ef-502e-43da-a7cf-0a7155d9dc53" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"c6b20f67-252a-4344-8909-fb62feabf6a3\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/c6b20f67-252a-4344-8909-fb62feabf6a3\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T12:51:15.065764Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"d3fe2d8c-654c-41f1-b8e9-9fe5336dc0fb\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/d3fe2d8c-654c-41f1-b8e9-9fe5336dc0fb\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T13:51:15.1048236Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"e6e8e9fe-f93f-41ca-9381-78165fc94bf9\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/e6e8e9fe-f93f-41ca-9381-78165fc94bf9\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T14:51:15.3186945Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"52759a34-70ab-4dc7-8cfb-8a86bba6efb3\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/52759a34-70ab-4dc7-8cfb-8a86bba6efb3\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T15:51:15.3421259Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"588fc4d7-ee30-425c-9347-ddc9189bc301\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/588fc4d7-ee30-425c-9347-ddc9189bc301\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T15:56:15.3440813Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"93523a81-3bd9-4712-af7d-90fa4b20ba79\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/93523a81-3bd9-4712-af7d-90fa4b20ba79\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:01:15.3460341Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"09168f23-632b-4a60-a486-727753522270\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/09168f23-632b-4a60-a486-727753522270\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:06:15.3479869Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"a7f13677-1ec8-43ba-84dc-6860dce4755f\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/a7f13677-1ec8-43ba-84dc-6860dce4755f\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:11:15.3499401Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"61f71790-93d5-4bbd-9ce0-ac727ae9c83c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/61f71790-93d5-4bbd-9ce0-ac727ae9c83c\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:16:15.3518929Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"8b4fba2f-3d07-4f94-abad-f6d7f0340a0a\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/8b4fba2f-3d07-4f94-abad-f6d7f0340a0a\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:21:15.3538252Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"4e33eaa7-74a2-438d-905c-5026703c341e\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/4e33eaa7-74a2-438d-905c-5026703c341e\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:26:15.355796Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"0fa0ca1d-b125-436f-bd99-7a72522abb5c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/0fa0ca1d-b125-436f-bd99-7a72522abb5c\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:31:15.3577511Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"52cc1bbb-a5d9-4a6b-8412-cfd460c28d42\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/52cc1bbb-a5d9-4a6b-8412-cfd460c28d42\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:36:15.3597043Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"f546eb29-0460-4570-8e11-b31fd915d3ee\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/f546eb29-0460-4570-8e11-b31fd915d3ee\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:41:15.3929075Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"9c1be1fa-2cae-4084-9642-4fe0c57dbaac\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/9c1be1fa-2cae-4084-9642-4fe0c57dbaac\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:46:15.4999062Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"bd9a18bb-c902-4f5a-bc77-d5fe4e60d0f9\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/bd9a18bb-c902-4f5a-bc77-d5fe4e60d0f9\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:51:15.5576526Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"18cc22c7-4b20-4b09-a63d-6a9c612ea5f2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/18cc22c7-4b20-4b09-a63d-6a9c612ea5f2\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:56:15.5802494Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"f9a5eae0-dcb8-4977-824f-cdfb6461fe21\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/f9a5eae0-dcb8-4977-824f-cdfb6461fe21\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:01:15.5899553Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"b8303d26-1ac7-4869-a6af-8d73f6773282\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/b8303d26-1ac7-4869-a6af-8d73f6773282\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:06:15.5945876Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"4dcb4e5c-b1cb-4c1b-9d09-f55ae7c3f23e\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/4dcb4e5c-b1cb-4c1b-9d09-f55ae7c3f23e\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:11:15.596931Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"557304ea-b038-4a04-b652-d063eb309ffb\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/557304ea-b038-4a04-b652-d063eb309ffb\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:16:15.5988842Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"6b1b5684-4704-4f36-9e2b-87247d5ceafa\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/6b1b5684-4704-4f36-9e2b-87247d5ceafa\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:21:15.6008396Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"81ce90d4-bd96-4f35-9d02-9a20d2e5d2f8\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/81ce90d4-bd96-4f35-9d02-9a20d2e5d2f8\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:26:15.6027917Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"be39d6df-ef60-41d0-8e7d-792b7b8edc6d\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/be39d6df-ef60-41d0-8e7d-792b7b8edc6d\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:31:15.6047445Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"f2fb3016-17e6-43f8-9e35-ccdba3e87c03\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/f2fb3016-17e6-43f8-9e35-ccdba3e87c03\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:36:15.6066981Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"7018b40c-e008-404d-8be4-37a38b740901\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/7018b40c-e008-404d-8be4-37a38b740901\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:41:15.6085483Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"11cdee92-62be-4c7c-bebd-51fcc57de238\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/11cdee92-62be-4c7c-bebd-51fcc57de238\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:46:15.6106005Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"39dfec2b-70c9-4f1a-a676-0f351d716fab\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/39dfec2b-70c9-4f1a-a676-0f351d716fab\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:51:15.612543Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"b8069b1f-54aa-4534-a664-14014797e8cd\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/b8069b1f-54aa-4534-a664-14014797e8cd\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:56:15.6145098Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"72330262-584e-481e-bf24-ef2849ae4661\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/72330262-584e-481e-bf24-ef2849ae4661\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T18:01:15.6164615Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"b700e6cf-c335-4569-987d-be0b51457a30\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/b700e6cf-c335-4569-987d-be0b51457a30\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T18:06:15.6184147Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"83577b80-e9ab-42e9-9a37-f76f03a078b6\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/83577b80-e9ab-42e9-9a37-f76f03a078b6\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T18:11:15.6203683Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"8b087057-ea66-4019-9ea0-739a610865ce\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/8b087057-ea66-4019-9ea0-739a610865ce\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T18:16:15.6223204Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:20:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d61cd1ef-502e-43da-a7cf-0a7155d9dc53 5/13/2017 6:20:13 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d61cd1ef-502e-43da-a7cf-0a7155d9dc53" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14082" + ], + "x-ms-correlation-request-id": [ + "6bd963b4-de19-49ce-b513-0a6c6a6470c7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T182013Z:6bd963b4-de19-49ce-b513-0a6c6a6470c7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/18cc22c7-4b20-4b09-a63d-6a9c612ea5f2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9yZWNvdmVyeVBvaW50cy8xOGNjMjJjNy00YjIwLTRiMDktYTYzZC02YTljNjEyZWE1ZjI/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8eb44fc4-e812-4e9e-b3df-8f3f9fb2b79e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"18cc22c7-4b20-4b09-a63d-6a9c612ea5f2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/18cc22c7-4b20-4b09-a63d-6a9c612ea5f2\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:56:15.5802494Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:20:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "8eb44fc4-e812-4e9e-b3df-8f3f9fb2b79e 5/13/2017 6:20:27 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8eb44fc4-e812-4e9e-b3df-8f3f9fb2b79e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14075" + ], + "x-ms-correlation-request-id": [ + "9a9fe307-0c38-41f0-8c1b-63f790ac884d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T182026Z:9a9fe307-0c38-41f0-8c1b-63f790ac884d" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetReplicationEvent.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetReplicationEvent.json new file mode 100644 index 000000000000..af83521b8f6d --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetReplicationEvent.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25FdmVudHM/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "97ba1a3f-7dfd-4734-9ae9-28ce75652b9b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091980325128257682_5c92731f-dcaf-423c-81f8-1d49d46f3ee3\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091980325128257682_5c92731f-dcaf-423c-81f8-1d49d46f3ee3\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"PlannedFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"rpTest1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-13T17:46:12.6518125Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/6be5cd7d-3cee-40fe-a7db-2e768a918bc0\",\r\n \"jobFriendlyName\": \"PlannedFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"RecoveryPlan\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"25014\",\r\n \"errorMessage\": \"Some of the virtual machines in the recovery plan aren't ready for planned failover.\",\r\n \"possibleCauses\": \"Virtual machines 'vm1' aren't replicating or couldn't be shut down.\",\r\n \"recommendedAction\": \"Make sure virtual machines are committed and reverse replicated. If they're not replicating, resynchronize them in the Hyper-V Console to resume replication and fix the state. Then retry the operation.\",\r\n \"creationTimeUtc\": \"2017-05-13T17:46:12.6518125Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091980328214788252_4052a4c3-11e9-4e6b-941b-1f2d89a6f410\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091980328214788252_4052a4c3-11e9-4e6b-941b-1f2d89a6f410\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"PlannedFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"rpTest1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-13T17:41:03.9987555Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d04d9e72-9e2e-4f59-b14c-0b0112146276\",\r\n \"jobFriendlyName\": \"PlannedFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"RecoveryPlan\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"25014\",\r\n \"errorMessage\": \"Some of the virtual machines in the recovery plan aren't ready for planned failover.\",\r\n \"possibleCauses\": \"Virtual machines 'vm1' aren't replicating or couldn't be shut down.\",\r\n \"recommendedAction\": \"Make sure virtual machines are committed and reverse replicated. If they're not replicating, resynchronize them in the Hyper-V Console to resume replication and fix the state. Then retry the operation.\",\r\n \"creationTimeUtc\": \"2017-05-13T17:41:03.9987555Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091980510408176701_2a742bdf-74c5-43e4-aa39-20b4139249c8\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091980510408176701_2a742bdf-74c5-43e4-aa39-20b4139249c8\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"TestFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-13T12:37:24.6599106Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/705165c5-f0be-429b-beec-b49413e8efc6\",\r\n \"jobFriendlyName\": \"TestFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"28020\",\r\n \"errorMessage\": \"The requested operation failed.\",\r\n \"possibleCauses\": \"No subnet with name 'subnet1' exists in azure virtual network '/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai'.\",\r\n \"recommendedAction\": \"The subnet might not exist in the given Azure virtual network. Specify a valid subnet in the network and retry the operation.\",\r\n \"creationTimeUtc\": \"2017-05-13T12:37:24.6599106Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091981274593020821_82a7df92-4b38-4ed7-a6b9-fa1bfe3da27b\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091981274593020821_82a7df92-4b38-4ed7-a6b9-fa1bfe3da27b\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"TestFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm2\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-12T15:23:46.1754986Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/355c68e9-9bac-4bd9-81e7-c2be63d709b7\",\r\n \"jobFriendlyName\": \"TestFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"25080\",\r\n \"errorMessage\": \"Failover for the Virtual Machine/Recovery Plan 'vm2' failed.\",\r\n \"possibleCauses\": \"Network type selected for test failover is not correct.\",\r\n \"recommendedAction\": \"Provide an Azure virtual network as input while doing the Test Failover.\",\r\n \"creationTimeUtc\": \"2017-05-12T15:23:46.1754986Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"VmMonitoringEvent;9091981302029328417_614f594c-73f9-49ab-8ed2-907572bf2815\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/VmMonitoringEvent;9091981302029328417_614f594c-73f9-49ab-8ed2-907572bf2815\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSVMHealthChanged\",\r\n \"description\": \"Virtual machine health is OK\",\r\n \"eventType\": \"VmHealth\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"OK\",\r\n \"timeOfOccurrence\": \"2017-05-12T14:38:02.544739Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"containerName\": \"SiteRecoveryTestSite1\",\r\n \"fabricName\": \"SiteRecoveryTestSite1\",\r\n \"remoteContainerName\": \"Microsoft Azure\"\r\n },\r\n \"eventSpecificDetails\": null,\r\n \"healthErrors\": []\r\n }\r\n },\r\n {\r\n \"name\": \"VmMonitoringEvent;9091981357913688670_e787a6ed-af82-4cc3-9dba-fe1d5233d260\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/VmMonitoringEvent;9091981357913688670_e787a6ed-af82-4cc3-9dba-fe1d5233d260\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSVMHealthChanged\",\r\n \"description\": \"Virtual machine health is OK\",\r\n \"eventType\": \"VmHealth\",\r\n \"affectedObjectFriendlyName\": \"vm2\",\r\n \"severity\": \"OK\",\r\n \"timeOfOccurrence\": \"2017-05-12T13:04:54.1087137Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"containerName\": \"SiteRecoveryTestSite1\",\r\n \"fabricName\": \"SiteRecoveryTestSite1\",\r\n \"remoteContainerName\": \"Microsoft Azure\"\r\n },\r\n \"eventSpecificDetails\": null,\r\n \"healthErrors\": []\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091981452393299408_587ff084-16e9-43bf-8e16-36977db7e693\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091981452393299408_587ff084-16e9-43bf-8e16-36977db7e693\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"UnplannedFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-12T10:27:26.1476399Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/65ec2f6d-8444-4ec2-8075-c0207a360c32\",\r\n \"jobFriendlyName\": \"UnplannedFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"506\",\r\n \"errorMessage\": \"An invalid parameter ReplicationProviderInput was passed.\",\r\n \"possibleCauses\": \"Parameter value is not correct for this action.\",\r\n \"recommendedAction\": \"Correct the parameter value and retry the last action. If the issue persists, contact Support.\",\r\n \"creationTimeUtc\": \"2017-05-12T10:27:26.1476399Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091981539531935924_47deed6c-60f7-42c1-86a5-0b5901febbfc\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091981539531935924_47deed6c-60f7-42c1-86a5-0b5901febbfc\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"TestFailover - WaitingForStopTestFailover\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"Warning\",\r\n \"timeOfOccurrence\": \"2017-05-12T08:02:12.2839883Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e26a0715-175e-4eb0-a3a3-cdee93e7213e\",\r\n \"jobFriendlyName\": \"TestFailover\",\r\n \"jobStatus\": \"Suspended\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": []\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091981548829197636_c92acdc0-35a9-4be8-9223-e60e70d98306\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091981548829197636_c92acdc0-35a9-4be8-9223-e60e70d98306\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"TestFailover - WaitingForStopTestFailover\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"Warning\",\r\n \"timeOfOccurrence\": \"2017-05-12T07:46:42.5578171Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/85ef17bb-fafc-43db-9a79-9fc002271e8c\",\r\n \"jobFriendlyName\": \"TestFailover\",\r\n \"jobStatus\": \"Suspended\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": []\r\n }\r\n },\r\n {\r\n \"name\": \"VmMonitoringEvent;9091982037934823063_60a607a1-8ed3-423d-b05b-70c2220a12b4\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/VmMonitoringEvent;9091982037934823063_60a607a1-8ed3-423d-b05b-70c2220a12b4\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSVMHealthChanged\",\r\n \"description\": \"Virtual machine health is OK\",\r\n \"eventType\": \"VmHealth\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"OK\",\r\n \"timeOfOccurrence\": \"2017-05-11T18:11:31.9952744Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"containerName\": \"SiteRecoveryTestSite1\",\r\n \"fabricName\": \"SiteRecoveryTestSite1\",\r\n \"remoteContainerName\": \"Microsoft Azure\"\r\n },\r\n \"eventSpecificDetails\": null,\r\n \"healthErrors\": []\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:55:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "97ba1a3f-7dfd-4734-9ae9-28ce75652b9b 5/13/2017 6:55:49 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "97ba1a3f-7dfd-4734-9ae9-28ce75652b9b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14044" + ], + "x-ms-correlation-request-id": [ + "df4be486-699a-43c1-adae-2f238a981145" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T185549Z:df4be486-699a-43c1-adae-2f238a981145" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent%3B9091980325128257682_5c92731f-dcaf-423c-81f8-1d49d46f3ee3?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25FdmVudHMvSm9iU3RhdHVzTW9uaXRvcmluZ0V2ZW50JTNCOTA5MTk4MDMyNTEyODI1NzY4Ml81YzkyNzMxZi1kY2FmLTQyM2MtODFmOC0xZDQ5ZDQ2ZjNlZTM/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5bad03a2-940b-447c-b42b-754721f058db" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"JobStatusMonitoringEvent;9091980325128257682_5c92731f-dcaf-423c-81f8-1d49d46f3ee3\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091980325128257682_5c92731f-dcaf-423c-81f8-1d49d46f3ee3\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"{0} - {1}\",\r\n \"eventType\": \"AgentHealth\",\r\n \"affectedObjectFriendlyName\": \"rpTest1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-13T17:46:12.6518125Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": null,\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"25014\",\r\n \"errorMessage\": \"Some of the virtual machines in the recovery plan aren't ready for planned failover.\",\r\n \"possibleCauses\": \"Virtual machines 'vm1' aren't replicating or couldn't be shut down.\",\r\n \"recommendedAction\": \"Make sure virtual machines are committed and reverse replicated. If they're not replicating, resynchronize them in the Hyper-V Console to resume replication and fix the state. Then retry the operation.\",\r\n \"creationTimeUtc\": \"2017-05-13T17:46:12.6518125Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:55:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5bad03a2-940b-447c-b42b-754721f058db 5/13/2017 6:55:49 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5bad03a2-940b-447c-b42b-754721f058db" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14040" + ], + "x-ms-correlation-request-id": [ + "52be3aa2-5698-4424-8deb-c7d6b63adcff" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T185549Z:52be3aa2-5698-4424-8deb-c7d6b63adcff" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetSite.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetSite.json new file mode 100644 index 000000000000..9e2473453679 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/GetSite.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9ed49119-e98f-46a6-bb57-d7a2492a9548" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:34:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9ed49119-e98f-46a6-bb57-d7a2492a9548 5/11/2017 5:34:25 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9ed49119-e98f-46a6-bb57-d7a2492a9548" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13974" + ], + "x-ms-correlation-request-id": [ + "b5ea3291-f24f-48c7-9f09-85add36f19b2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T173425Z:b5ea3291-f24f-48c7-9f09-85add36f19b2" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAlertSettings.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAlertSettings.json new file mode 100644 index 000000000000..950cc299e48b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAlertSettings.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationAlertSettings?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25BbGVydFNldHRpbmdzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fb924e6f-6e87-40fa-beeb-abb7d0b9695e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"defaultAlertSetting\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationAlertSettings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationAlertSettings/defaultAlertSetting\",\r\n \"properties\": {\r\n \"sendToOwners\": \"DoNotSend\",\r\n \"customEmailAddresses\": [\r\n \"ronehr@microsoft.com\"\r\n ],\r\n \"locale\": \"en-US\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:45:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fb924e6f-6e87-40fa-beeb-abb7d0b9695e 5/13/2017 6:45:46 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "fb924e6f-6e87-40fa-beeb-abb7d0b9695e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13909" + ], + "x-ms-correlation-request-id": [ + "109e11b9-4457-42a4-82df-2d01ed7b192e" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T184545Z:109e11b9-4457-42a4-82df-2d01ed7b192e" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllContainers.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllContainers.json new file mode 100644 index 000000000000..21345195606c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllContainers.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d4712127-5cbd-45ca-a91f-69af5d1e05eb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:10:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d4712127-5cbd-45ca-a91f-69af5d1e05eb 5/13/2017 8:10:09 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d4712127-5cbd-45ca-a91f-69af5d1e05eb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14848" + ], + "x-ms-correlation-request-id": [ + "14f952f0-f987-4417-9645-e70216944808" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T201009Z:14f952f0-f987-4417-9645-e70216944808" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qcm90ZWN0aW9uQ29udGFpbmVycz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "88cab03a-d3cf-4844-9b79-0fef9fd5d7ef" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"NotPaired\",\r\n \"role\": \"\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:10:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "88cab03a-d3cf-4844-9b79-0fef9fd5d7ef 5/13/2017 8:10:11 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "88cab03a-d3cf-4844-9b79-0fef9fd5d7ef" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14847" + ], + "x-ms-correlation-request-id": [ + "579b1d4e-cbdb-4ba4-8847-8740eba08664" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T201011Z:579b1d4e-cbdb-4ba4-8847-8740eba08664" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllPCMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllPCMapping.json new file mode 100644 index 000000000000..519d974d804a --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllPCMapping.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationProtectionContainerMappings?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qcm90ZWN0aW9uQ29udGFpbmVyTWFwcGluZ3M/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "11acd398-1e22-427a-a974-8234ce6ec40e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping\",\r\n \"name\": \"PCMapping\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings\",\r\n \"properties\": {\r\n \"targetProtectionContainerId\": \"Microsoft Azure\",\r\n \"targetProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"providerSpecificDetails\": null,\r\n \"health\": \"Normal\",\r\n \"healthErrorDetails\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"state\": \"Paired\",\r\n \"sourceProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"sourceFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"targetFabricFriendlyName\": \"Microsoft Azure\",\r\n \"policyFriendlyName\": \"protectionprofile1\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:02:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "11acd398-1e22-427a-a974-8234ce6ec40e 5/13/2017 8:02:32 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "11acd398-1e22-427a-a974-8234ce6ec40e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14872" + ], + "x-ms-correlation-request-id": [ + "c7421101-c7c9-4b24-9597-90b3ef4bc99c" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T200232Z:c7421101-c7c9-4b24-9597-90b3ef4bc99c" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllProtectedItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllProtectedItem.json new file mode 100644 index 000000000000..0491b954592b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListAllProtectedItem.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationProtectedItems?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qcm90ZWN0ZWRJdGVtcz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9057d702-e112-4334-8055-8fd45031e9fc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": null,\r\n \"recoveryVMSubnetName\": \"\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByDefault\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": null,\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": null,\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"NoLicenseType\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:48:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9057d702-e112-4334-8055-8fd45031e9fc 5/13/2017 7:48:17 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9057d702-e112-4334-8055-8fd45031e9fc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14029" + ], + "x-ms-correlation-request-id": [ + "8d364bb0-13ae-4a79-b7e5-e44b19d43c13" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T194817Z:8d364bb0-13ae-4a79-b7e5-e44b19d43c13" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListNetworkMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListNetworkMapping.json new file mode 100644 index 000000000000..cbfda83478d3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListNetworkMapping.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationNetworkMappings?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3M/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dada8db4-641e-42bc-88a7-123fc2c93cd6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping\",\r\n \"name\": \"NWMapping\",\r\n \"properties\": {\r\n \"state\": \"Paired\",\r\n \"primaryNetworkFriendlyName\": \"corp\",\r\n \"primaryNetworkId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"primaryFabricFriendlyName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"recoveryNetworkFriendlyName\": \"vnetavrai\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryFabricArmId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"fabricSpecificSettings\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 06:32:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "dada8db4-641e-42bc-88a7-123fc2c93cd6 5/15/2017 6:32:14 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "dada8db4-641e-42bc-88a7-123fc2c93cd6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14421" + ], + "x-ms-correlation-request-id": [ + "5079989f-0fe1-45b4-a206-37ab42ec97af" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T063214Z:5079989f-0fe1-45b4-a206-37ab42ec97af" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListNetworks.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListNetworks.json new file mode 100644 index 000000000000..aa42e752a66c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListNetworks.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationNetworks?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25OZXR3b3Jrcz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a30ac730-3381-4c4f-ae60-64e528a12a2e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/775b9f7a-e5a7-4681-abde-567cb70de658\",\r\n \"name\": \"775b9f7a-e5a7-4681-abde-567cb70de658\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"VSwitch_VLan\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n },\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/9f186446-40a8-4025-a970-64c1c1d6ddf9\",\r\n \"name\": \"9f186446-40a8-4025-a970-64c1c1d6ddf9\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"VSwitch_Wnv\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n },\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/ad2d0cec-165e-4aac-8a0f-62a17096abcf\",\r\n \"name\": \"ad2d0cec-165e-4aac-8a0f-62a17096abcf\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"VSwitch_NoIso\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n },\r\n {\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"name\": \"c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"properties\": {\r\n \"fabricType\": \"VMM\",\r\n \"subnets\": [],\r\n \"friendlyName\": \"corp\",\r\n \"networkType\": \"NoIsolation\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 04:54:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a30ac730-3381-4c4f-ae60-64e528a12a2e 5/15/2017 4:54:40 AM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a30ac730-3381-4c4f-ae60-64e528a12a2e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14970" + ], + "x-ms-correlation-request-id": [ + "c8d88618-123d-4ce6-a715-bebdf74228fa" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T045440Z:c8d88618-123d-4ce6-a715-bebdf74228fa" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListPolicy.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListPolicy.json new file mode 100644 index 000000000000..54914c2d5a55 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListPolicy.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "38b80443-e1e4-46a7-8614-b521cfdffb5d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"name\": \"protectionprofile1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"protectionprofile1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 3,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/testing\",\r\n \"name\": \"testing\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"testing\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 4,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/abcd\",\r\n \"name\": \"abcd\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"abcd\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 4,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:32:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "38b80443-e1e4-46a7-8614-b521cfdffb5d 5/13/2017 7:32:42 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "38b80443-e1e4-46a7-8614-b521cfdffb5d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13807" + ], + "x-ms-correlation-request-id": [ + "7a89b0f3-b4f7-4617-80d4-eac1513186d4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T193241Z:7a89b0f3-b4f7-4617-80d4-eac1513186d4" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRecoveryPoints.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRecoveryPoints.json new file mode 100644 index 000000000000..f398ac9b6b75 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRecoveryPoints.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3748fb45-900e-4ae7-9bc0-d0a2959446f5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:28:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3748fb45-900e-4ae7-9bc0-d0a2959446f5 5/13/2017 6:28:41 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3748fb45-900e-4ae7-9bc0-d0a2959446f5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13958" + ], + "x-ms-correlation-request-id": [ + "7e3be74f-e19a-4724-863c-bcc64a398505" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T182840Z:7e3be74f-e19a-4724-863c-bcc64a398505" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMS9yZWNvdmVyeVBvaW50cz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4e279891-efbd-4845-b7fc-984bf7e434f8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"45d61bcf-18e7-4adb-974f-f14285a8d300\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/45d61bcf-18e7-4adb-974f-f14285a8d300\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T12:50:04.987183Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"99f5233c-d877-4720-9ec6-3f12f0e5e16f\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/99f5233c-d877-4720-9ec6-3f12f0e5e16f\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T13:50:05.0418678Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"2d49ba23-127d-43ca-b6c9-12df6fa54837\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/2d49ba23-127d-43ca-b6c9-12df6fa54837\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T14:50:05.255575Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"b4b62a79-aaa4-4208-ba5a-4dbfe0ceecf8\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/b4b62a79-aaa4-4208-ba5a-4dbfe0ceecf8\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T15:50:05.2791722Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"c76dc9a4-13fe-48f7-a53a-00eec3b672bd\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/c76dc9a4-13fe-48f7-a53a-00eec3b672bd\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T15:55:05.2811251Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"d0ee17b6-0c2a-4029-b99a-305ab852d7cf\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/d0ee17b6-0c2a-4029-b99a-305ab852d7cf\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:00:05.283079Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"8bae52c8-6260-4130-9eb6-9591676a8c27\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/8bae52c8-6260-4130-9eb6-9591676a8c27\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:05:05.2850315Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"f8df595a-263c-4981-b415-60e044ab958c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/f8df595a-263c-4981-b415-60e044ab958c\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:10:05.2869814Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"d93d58db-29bc-4ae1-a7ba-c29b8f0799c0\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/d93d58db-29bc-4ae1-a7ba-c29b8f0799c0\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:15:05.2889342Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"085b194e-1680-495d-9523-59985d8a694b\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/085b194e-1680-495d-9523-59985d8a694b\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:20:05.2908896Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"eb6a26e9-f37b-4144-ace8-3a010a374d18\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/eb6a26e9-f37b-4144-ace8-3a010a374d18\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:25:05.2928424Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"1dab4943-7497-4991-a3b1-cc8a275ec820\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/1dab4943-7497-4991-a3b1-cc8a275ec820\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:30:05.2947927Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"924d6711-9e5a-40d6-99a0-2835ba8bef8e\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/924d6711-9e5a-40d6-99a0-2835ba8bef8e\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:35:05.2967488Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"acd26cfb-f125-42da-aa28-b7644d3d7352\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/acd26cfb-f125-42da-aa28-b7644d3d7352\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:40:05.298702Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"4aeab712-a3f1-4b7d-88f5-8dc82e10989f\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/4aeab712-a3f1-4b7d-88f5-8dc82e10989f\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:45:05.3636716Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"6ad072db-4e57-41bc-961f-83352308a14c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/6ad072db-4e57-41bc-961f-83352308a14c\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:50:05.4383856Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"63198ae3-06a6-46b4-84b4-12e4c7332b9f\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/63198ae3-06a6-46b4-84b4-12e4c7332b9f\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T16:55:05.4668195Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"aab390c8-dd00-40ce-82cb-fdc18a39c366\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/aab390c8-dd00-40ce-82cb-fdc18a39c366\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:00:05.4787873Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"5ac104dd-a8a4-4a98-84de-75779eda9c14\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/5ac104dd-a8a4-4a98-84de-75779eda9c14\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:05:05.4843189Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"ba623205-3994-4363-9a1f-aff7f06f2ef6\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/ba623205-3994-4363-9a1f-aff7f06f2ef6\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:10:05.4871018Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"76040789-fcd2-48c5-a679-36dd7f2f165d\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/76040789-fcd2-48c5-a679-36dd7f2f165d\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:15:05.4890546Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"639de9ca-8fba-428b-af67-0aaf311b2693\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/639de9ca-8fba-428b-af67-0aaf311b2693\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:20:05.4910052Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"273debf9-a287-4699-8bc3-2cfe64f96d18\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/273debf9-a287-4699-8bc3-2cfe64f96d18\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:25:05.4929485Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"5bab96c9-2332-4a55-b37c-9285b1e827b8\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/5bab96c9-2332-4a55-b37c-9285b1e827b8\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:30:05.4949131Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"915edc86-e89b-4665-96c4-62ec6ee8a43a\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/915edc86-e89b-4665-96c4-62ec6ee8a43a\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:30:48.1201421Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"c80382d0-8253-48d2-bcb1-9f032072843b\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/c80382d0-8253-48d2-bcb1-9f032072843b\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:51:55.5189638Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"6be79761-0e19-40a9-bcb8-a1812e3ec5ad\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/6be79761-0e19-40a9-bcb8-a1812e3ec5ad\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T17:59:31.0064031Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n },\r\n {\r\n \"name\": \"4339f484-57b1-4ad4-b1eb-105de90a2a27\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/recoveryPoints\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/4339f484-57b1-4ad4-b1eb-105de90a2a27\",\r\n \"properties\": {\r\n \"recoveryPointTime\": \"2017-05-13T18:04:31.0239805Z\",\r\n \"recoveryPointType\": \"CrashConsistent\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:28:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "4e279891-efbd-4845-b7fc-984bf7e434f8 5/13/2017 6:28:43 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "4e279891-efbd-4845-b7fc-984bf7e434f8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13957" + ], + "x-ms-correlation-request-id": [ + "cdf807da-c87c-42bf-96ac-c360be0054f6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T182842Z:cdf807da-c87c-42bf-96ac-c360be0054f6" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListReplicationEvent.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListReplicationEvent.json new file mode 100644 index 000000000000..394913559122 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListReplicationEvent.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25FdmVudHM/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c34f9217-563e-4d46-a41a-c03fcb27934c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091980325128257682_5c92731f-dcaf-423c-81f8-1d49d46f3ee3\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091980325128257682_5c92731f-dcaf-423c-81f8-1d49d46f3ee3\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"PlannedFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"rpTest1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-13T17:46:12.6518125Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/6be5cd7d-3cee-40fe-a7db-2e768a918bc0\",\r\n \"jobFriendlyName\": \"PlannedFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"RecoveryPlan\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"25014\",\r\n \"errorMessage\": \"Some of the virtual machines in the recovery plan aren't ready for planned failover.\",\r\n \"possibleCauses\": \"Virtual machines 'vm1' aren't replicating or couldn't be shut down.\",\r\n \"recommendedAction\": \"Make sure virtual machines are committed and reverse replicated. If they're not replicating, resynchronize them in the Hyper-V Console to resume replication and fix the state. Then retry the operation.\",\r\n \"creationTimeUtc\": \"2017-05-13T17:46:12.6518125Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091980328214788252_4052a4c3-11e9-4e6b-941b-1f2d89a6f410\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091980328214788252_4052a4c3-11e9-4e6b-941b-1f2d89a6f410\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"PlannedFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"rpTest1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-13T17:41:03.9987555Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d04d9e72-9e2e-4f59-b14c-0b0112146276\",\r\n \"jobFriendlyName\": \"PlannedFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"RecoveryPlan\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"25014\",\r\n \"errorMessage\": \"Some of the virtual machines in the recovery plan aren't ready for planned failover.\",\r\n \"possibleCauses\": \"Virtual machines 'vm1' aren't replicating or couldn't be shut down.\",\r\n \"recommendedAction\": \"Make sure virtual machines are committed and reverse replicated. If they're not replicating, resynchronize them in the Hyper-V Console to resume replication and fix the state. Then retry the operation.\",\r\n \"creationTimeUtc\": \"2017-05-13T17:41:03.9987555Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091980510408176701_2a742bdf-74c5-43e4-aa39-20b4139249c8\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091980510408176701_2a742bdf-74c5-43e4-aa39-20b4139249c8\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"TestFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-13T12:37:24.6599106Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/705165c5-f0be-429b-beec-b49413e8efc6\",\r\n \"jobFriendlyName\": \"TestFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"28020\",\r\n \"errorMessage\": \"The requested operation failed.\",\r\n \"possibleCauses\": \"No subnet with name 'subnet1' exists in azure virtual network '/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai'.\",\r\n \"recommendedAction\": \"The subnet might not exist in the given Azure virtual network. Specify a valid subnet in the network and retry the operation.\",\r\n \"creationTimeUtc\": \"2017-05-13T12:37:24.6599106Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091981274593020821_82a7df92-4b38-4ed7-a6b9-fa1bfe3da27b\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091981274593020821_82a7df92-4b38-4ed7-a6b9-fa1bfe3da27b\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"TestFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm2\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-12T15:23:46.1754986Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/355c68e9-9bac-4bd9-81e7-c2be63d709b7\",\r\n \"jobFriendlyName\": \"TestFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"25080\",\r\n \"errorMessage\": \"Failover for the Virtual Machine/Recovery Plan 'vm2' failed.\",\r\n \"possibleCauses\": \"Network type selected for test failover is not correct.\",\r\n \"recommendedAction\": \"Provide an Azure virtual network as input while doing the Test Failover.\",\r\n \"creationTimeUtc\": \"2017-05-12T15:23:46.1754986Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"VmMonitoringEvent;9091981302029328417_614f594c-73f9-49ab-8ed2-907572bf2815\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/VmMonitoringEvent;9091981302029328417_614f594c-73f9-49ab-8ed2-907572bf2815\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSVMHealthChanged\",\r\n \"description\": \"Virtual machine health is OK\",\r\n \"eventType\": \"VmHealth\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"OK\",\r\n \"timeOfOccurrence\": \"2017-05-12T14:38:02.544739Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"containerName\": \"SiteRecoveryTestSite1\",\r\n \"fabricName\": \"SiteRecoveryTestSite1\",\r\n \"remoteContainerName\": \"Microsoft Azure\"\r\n },\r\n \"eventSpecificDetails\": null,\r\n \"healthErrors\": []\r\n }\r\n },\r\n {\r\n \"name\": \"VmMonitoringEvent;9091981357913688670_e787a6ed-af82-4cc3-9dba-fe1d5233d260\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/VmMonitoringEvent;9091981357913688670_e787a6ed-af82-4cc3-9dba-fe1d5233d260\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSVMHealthChanged\",\r\n \"description\": \"Virtual machine health is OK\",\r\n \"eventType\": \"VmHealth\",\r\n \"affectedObjectFriendlyName\": \"vm2\",\r\n \"severity\": \"OK\",\r\n \"timeOfOccurrence\": \"2017-05-12T13:04:54.1087137Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"containerName\": \"SiteRecoveryTestSite1\",\r\n \"fabricName\": \"SiteRecoveryTestSite1\",\r\n \"remoteContainerName\": \"Microsoft Azure\"\r\n },\r\n \"eventSpecificDetails\": null,\r\n \"healthErrors\": []\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091981452393299408_587ff084-16e9-43bf-8e16-36977db7e693\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091981452393299408_587ff084-16e9-43bf-8e16-36977db7e693\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"UnplannedFailover - Failed\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"Critical\",\r\n \"timeOfOccurrence\": \"2017-05-12T10:27:26.1476399Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/65ec2f6d-8444-4ec2-8075-c0207a360c32\",\r\n \"jobFriendlyName\": \"UnplannedFailover\",\r\n \"jobStatus\": \"Failed\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": [\r\n {\r\n \"errorLevel\": null,\r\n \"errorCode\": \"506\",\r\n \"errorMessage\": \"An invalid parameter ReplicationProviderInput was passed.\",\r\n \"possibleCauses\": \"Parameter value is not correct for this action.\",\r\n \"recommendedAction\": \"Correct the parameter value and retry the last action. If the issue persists, contact Support.\",\r\n \"creationTimeUtc\": \"2017-05-12T10:27:26.1476399Z\",\r\n \"recoveryProviderErrorMessage\": null,\r\n \"entityId\": null\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091981539531935924_47deed6c-60f7-42c1-86a5-0b5901febbfc\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091981539531935924_47deed6c-60f7-42c1-86a5-0b5901febbfc\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"TestFailover - WaitingForStopTestFailover\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"Warning\",\r\n \"timeOfOccurrence\": \"2017-05-12T08:02:12.2839883Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e26a0715-175e-4eb0-a3a3-cdee93e7213e\",\r\n \"jobFriendlyName\": \"TestFailover\",\r\n \"jobStatus\": \"Suspended\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": []\r\n }\r\n },\r\n {\r\n \"name\": \"JobStatusMonitoringEvent;9091981548829197636_c92acdc0-35a9-4be8-9223-e60e70d98306\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/JobStatusMonitoringEvent;9091981548829197636_c92acdc0-35a9-4be8-9223-e60e70d98306\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSJobStatus\",\r\n \"description\": \"TestFailover - WaitingForStopTestFailover\",\r\n \"eventType\": \"JobStatus\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"Warning\",\r\n \"timeOfOccurrence\": \"2017-05-12T07:46:42.5578171Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": null,\r\n \"eventSpecificDetails\": {\r\n \"instanceType\": \"JobStatus\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/85ef17bb-fafc-43db-9a79-9fc002271e8c\",\r\n \"jobFriendlyName\": \"TestFailover\",\r\n \"jobStatus\": \"Suspended\",\r\n \"affectedObjectType\": \"Vm\"\r\n },\r\n \"healthErrors\": []\r\n }\r\n },\r\n {\r\n \"name\": \"VmMonitoringEvent;9091982037934823063_60a607a1-8ed3-423d-b05b-70c2220a12b4\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationEvents\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationEvents/VmMonitoringEvent;9091982037934823063_60a607a1-8ed3-423d-b05b-70c2220a12b4\",\r\n \"properties\": {\r\n \"eventCode\": \"SRSVMHealthChanged\",\r\n \"description\": \"Virtual machine health is OK\",\r\n \"eventType\": \"VmHealth\",\r\n \"affectedObjectFriendlyName\": \"vm1\",\r\n \"severity\": \"OK\",\r\n \"timeOfOccurrence\": \"2017-05-11T18:11:31.9952744Z\",\r\n \"fabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"containerName\": \"SiteRecoveryTestSite1\",\r\n \"fabricName\": \"SiteRecoveryTestSite1\",\r\n \"remoteContainerName\": \"Microsoft Azure\"\r\n },\r\n \"eventSpecificDetails\": null,\r\n \"healthErrors\": []\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:57:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c34f9217-563e-4d46-a41a-c03fcb27934c 5/13/2017 6:57:18 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c34f9217-563e-4d46-a41a-c03fcb27934c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13910" + ], + "x-ms-correlation-request-id": [ + "b862ff5a-4eaf-46d7-a34b-f3ad009b26a4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T185718Z:b862ff5a-4eaf-46d7-a34b-f3ad009b26a4" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRsp.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRsp.json new file mode 100644 index 000000000000..51a71ddbc0e9 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRsp.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryServicesProviders?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVNlcnZpY2VzUHJvdmlkZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5d3c8972-f740-4c5e-836a-ec68907f2b1d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders\",\r\n \"name\": \"ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"properties\": {\r\n \"fabricType\": \"HyperVSite\",\r\n \"friendlyName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"providerVersion\": \"5.1.2250.0\",\r\n \"serverVersion\": \"3.2.7510.0\",\r\n \"providerVersionState\": \"Latest\",\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"lastHeartBeat\": \"2017-05-11T17:43:59.199152Z\",\r\n \"connectionStatus\": \"Connected\",\r\n \"protectedItemCount\": 0,\r\n \"allowedScenarios\": [\r\n \"Refresh\",\r\n \"Purge\"\r\n ],\r\n \"healthErrorDetails\": []\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:44:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5d3c8972-f740-4c5e-836a-ec68907f2b1d 5/11/2017 5:44:47 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5d3c8972-f740-4c5e-836a-ec68907f2b1d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13987" + ], + "x-ms-correlation-request-id": [ + "717aaad6-985e-45b4-840d-ea0ed34cf95f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174447Z:717aaad6-985e-45b4-840d-ea0ed34cf95f" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRspByFabric.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRspByFabric.json new file mode 100644 index 000000000000..011282da9e28 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListRspByFabric.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9685ef4b-c56c-44a9-8bf4-d7fc0b1c216e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:26:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9685ef4b-c56c-44a9-8bf4-d7fc0b1c216e 5/13/2017 8:26:46 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9685ef4b-c56c-44a9-8bf4-d7fc0b1c216e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14330" + ], + "x-ms-correlation-request-id": [ + "06ddbdca-3bd3-436c-9481-87f22ce9f908" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T202646Z:06ddbdca-3bd3-436c-9481-87f22ce9f908" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblJlY292ZXJ5U2VydmljZXNQcm92aWRlcnM/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c51f50e3-c708-4ee6-ae97-f75294ff2145" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/74ef040f-fa15-4f71-9652-c27d5d19d575\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders\",\r\n \"name\": \"74ef040f-fa15-4f71-9652-c27d5d19d575\",\r\n \"properties\": {\r\n \"fabricType\": \"HyperVSite\",\r\n \"friendlyName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"providerVersion\": \"5.1.2250.0\",\r\n \"serverVersion\": \"3.2.7510.0\",\r\n \"providerVersionState\": \"Supported\",\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"lastHeartBeat\": \"2017-05-13T20:25:52.1925844Z\",\r\n \"connectionStatus\": \"Connected\",\r\n \"protectedItemCount\": 0,\r\n \"allowedScenarios\": [\r\n \"Refresh\",\r\n \"Purge\"\r\n ],\r\n \"healthErrorDetails\": []\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:26:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c51f50e3-c708-4ee6-ae97-f75294ff2145 5/13/2017 8:26:47 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c51f50e3-c708-4ee6-ae97-f75294ff2145" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14328" + ], + "x-ms-correlation-request-id": [ + "4267b631-f13d-4e70-9013-c1696370d704" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T202647Z:4267b631-f13d-4e70-9013-c1696370d704" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListSite.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListSite.json new file mode 100644 index 000000000000..07f430b0ab70 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/ListSite.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "40cbf93d-3570-4230-9fb5-89713ace3c84" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:34:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "40cbf93d-3570-4230-9fb5-89713ace3c84 5/11/2017 5:34:40 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "40cbf93d-3570-4230-9fb5-89713ace3c84" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13972" + ], + "x-ms-correlation-request-id": [ + "418a19cc-6815-46f5-81c7-8a7141eac9c4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T173440Z:418a19cc-6815-46f5-81c7-8a7141eac9c4" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PlannedFailover.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PlannedFailover.json new file mode 100644 index 000000000000..685adf15cbb3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PlannedFailover.json @@ -0,0 +1,874 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dd272c7e-d5db-41a7-ac9c-9e37b63a557c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:45:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "dd272c7e-d5db-41a7-ac9c-9e37b63a557c 5/15/2017 1:45:58 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "dd272c7e-d5db-41a7-ac9c-9e37b63a557c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14099" + ], + "x-ms-correlation-request-id": [ + "8a0bbb7d-b3dc-4cc3-8366-1d71f856c3f5" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134558Z:8a0bbb7d-b3dc-4cc3-8366-1d71f856c3f5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a9e708f8-9fdb-4ad4-9544-6acfc057a5c4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": \"2017-05-15T06:39:35Z\",\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:45:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a9e708f8-9fdb-4ad4-9544-6acfc057a5c4 5/15/2017 1:45:59 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a9e708f8-9fdb-4ad4-9544-6acfc057a5c4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14096" + ], + "x-ms-correlation-request-id": [ + "46354b68-88b7-4337-a864-7ef0b9eafa50" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134558Z:46354b68-88b7-4337-a864-7ef0b9eafa50" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/plannedFailover?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9wbGFubmVkRmFpbG92ZXI/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"vaultLocation\": \"West US\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "148" + ], + "x-ms-client-request-id": [ + "8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:45:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7", + "8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f 5/15/2017 1:46:00 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "92a9d840-94ee-4e5e-968d-fdc94f2b2c6a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134559Z:92a9d840-94ee-4e5e-968d-fdc94f2b2c6a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:46:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "09560fec-cbca-40f8-a8d6-ca0367fc13ff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14083" + ], + "x-ms-correlation-request-id": [ + "1d210bfa-ad3b-42c4-862c-f1e5af7ad695" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134630Z:1d210bfa-ad3b-42c4-862c-f1e5af7ad695" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:47:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "81e12f76-f975-4319-b60d-2eb50848589f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14077" + ], + "x-ms-correlation-request-id": [ + "9f795120-e4fb-445c-8ffd-11516b93eaaa" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134700Z:9f795120-e4fb-445c-8ffd-11516b93eaaa" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"2017-05-15T13:47:23.0216597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T13:47:23.2247448Z\",\r\n \"endTime\": \"2017-05-15T13:47:27.9157457Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"2017-05-15T13:47:28.1838342Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:47:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "70b194bb-a0d1-4cc1-b267-43261abaafb0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14061" + ], + "x-ms-correlation-request-id": [ + "a480f899-15e5-476d-ac09-8ae7410d3679" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134732Z:a480f899-15e5-476d-ac09-8ae7410d3679" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"2017-05-15T13:47:23.0216597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T13:47:23.2247448Z\",\r\n \"endTime\": \"2017-05-15T13:47:27.9157457Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"2017-05-15T13:47:28.1838342Z\",\r\n \"endTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:48:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a876cec3-0268-4108-b532-55eba165ec0e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14044" + ], + "x-ms-correlation-request-id": [ + "aac7063b-f2d6-4ecd-a4fe-7c53011b472d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134802Z:aac7063b-f2d6-4ecd-a4fe-7c53011b472d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"2017-05-15T13:47:23.0216597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T13:47:23.2247448Z\",\r\n \"endTime\": \"2017-05-15T13:47:27.9157457Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"2017-05-15T13:47:28.1838342Z\",\r\n \"endTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:48:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "39f527d6-fad5-4421-9255-0ad816f10358" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14032" + ], + "x-ms-correlation-request-id": [ + "067559b4-01a6-488d-a208-77d3c34f3071" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134833Z:067559b4-01a6-488d-a208-77d3c34f3071" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"2017-05-15T13:47:23.0216597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T13:47:23.2247448Z\",\r\n \"endTime\": \"2017-05-15T13:47:27.9157457Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"2017-05-15T13:47:28.1838342Z\",\r\n \"endTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:49:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a3cc25a8-a6aa-49d1-8ea5-3277a6a09afc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14019" + ], + "x-ms-correlation-request-id": [ + "3aeb64bd-7409-4f0b-8953-f0392015ef15" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134903Z:3aeb64bd-7409-4f0b-8953-f0392015ef15" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"2017-05-15T13:47:23.0216597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T13:47:23.2247448Z\",\r\n \"endTime\": \"2017-05-15T13:47:27.9157457Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"2017-05-15T13:47:28.1838342Z\",\r\n \"endTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:49:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "25bb23f7-830c-4225-9424-a07dc1951ced" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13999" + ], + "x-ms-correlation-request-id": [ + "5111c6e7-b14f-4823-a046-5b77304945af" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134935Z:5111c6e7-b14f-4823-a046-5b77304945af" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"2017-05-15T13:47:23.0216597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T13:47:23.2247448Z\",\r\n \"endTime\": \"2017-05-15T13:47:27.9157457Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"2017-05-15T13:47:28.1838342Z\",\r\n \"endTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:50:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "1653454e-1a97-4300-9423-523a94bb722b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14081" + ], + "x-ms-correlation-request-id": [ + "11901e76-7201-4884-94a8-999892c65871" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135005Z:11901e76-7201-4884-94a8-999892c65871" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"2017-05-15T13:47:23.0216597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T13:47:23.2247448Z\",\r\n \"endTime\": \"2017-05-15T13:47:27.9157457Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"2017-05-15T13:47:28.1838342Z\",\r\n \"endTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:50:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "81f18550-422a-4707-bc55-065b1f15b8e7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14071" + ], + "x-ms-correlation-request-id": [ + "eb97e87c-33b8-447f-8473-a6a3a69bb2e9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135037Z:eb97e87c-33b8-447f-8473-a6a3a69bb2e9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2IwNTA2ZTNiLTUyNmItNGFmOC05ZTVkLWI3ZDJkZTk1ZjljNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"name\": \"b0506e3b-526b-4af8-9e5d-b7d2de95f9c7\",\r\n \"properties\": {\r\n \"activityId\": \"8eb0d85f-d255-44d3-aed8-a4eb94fd4b9f ActivityId: 92a9d840-94ee-4e5e-968d-fdc94f2b2c6a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PlannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmPfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T13:46:00.9733965Z\",\r\n \"endTime\": \"2017-05-15T13:47:23.0216597Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimary\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T13:47:23.2247448Z\",\r\n \"endTime\": \"2017-05-15T13:47:27.9157457Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForFailoverTask\",\r\n \"name\": \"VmPrepareForFailover\",\r\n \"startTime\": \"2017-05-15T13:47:28.1838342Z\",\r\n \"endTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T13:48:02.649827Z\",\r\n \"endTime\": \"2017-05-15T13:51:03.1569746Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"2017-05-15T13:51:03.1569746Z\",\r\n \"endTime\": \"2017-05-15T13:51:03.3600281Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": \"2017-05-15T13:51:03Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"endTime\": \"2017-05-15T13:51:03Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:51:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/b0506e3b-526b-4af8-9e5d-b7d2de95f9c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "87b3e8cf-1bc4-4838-8c50-e8d2722fdb6e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14063" + ], + "x-ms-correlation-request-id": [ + "3a5ff779-ec35-47ca-8c66-8c55c66e289a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T135107Z:3a5ff779-ec35-47ca-8c66-8c55c66e289a" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgePCMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgePCMapping.json new file mode 100644 index 000000000000..e6d31975223e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgePCMapping.json @@ -0,0 +1,283 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5f5a27c3-79c3-47af-a49a-5aeac539fda1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:05:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5f5a27c3-79c3-47af-a49a-5aeac539fda1 5/13/2017 8:05:31 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5f5a27c3-79c3-47af-a49a-5aeac539fda1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "81a19f8e-fd8b-4747-b529-7dbe4262fb1f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T200531Z:81a19f8e-fd8b-4747-b529-7dbe4262fb1f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2b307df1-3ec4-4192-80dc-cebb4700fafb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 0,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:05:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2b307df1-3ec4-4192-80dc-cebb4700fafb 5/13/2017 8:05:32 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2b307df1-3ec4-4192-80dc-cebb4700fafb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "4dcd451e-3713-4543-a7f7-1b6c5dc9bc34" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T200531Z:4dcd451e-3713-4543-a7f7-1b6c5dc9bc34" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJNYXBwaW5ncy9QQ01hcHBpbmc/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b89b7235-6581-40f8-ad9d-7aee74e50a4a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:05:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectionContainerMappings/PCMapping/operationresults/bf12c4aa-249b-478f-abca-9b3dafb4a96e?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/bf12c4aa-249b-478f-abca-9b3dafb4a96e", + "b89b7235-6581-40f8-ad9d-7aee74e50a4a 5/13/2017 8:05:35 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/bf12c4aa-249b-478f-abca-9b3dafb4a96e?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "b89b7235-6581-40f8-ad9d-7aee74e50a4a" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "64245c3f-5e75-430d-9a6d-ff3fd422a54f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T200535Z:64245c3f-5e75-430d-9a6d-ff3fd422a54f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/bf12c4aa-249b-478f-abca-9b3dafb4a96e?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2JmMTJjNGFhLTI0OWItNDc4Zi1hYmNhLTliM2RhZmI0YTk2ZT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/bf12c4aa-249b-478f-abca-9b3dafb4a96e\",\r\n \"name\": \"bf12c4aa-249b-478f-abca-9b3dafb4a96e\",\r\n \"properties\": {\r\n \"activityId\": \"b89b7235-6581-40f8-ad9d-7aee74e50a4a ActivityId: 64245c3f-5e75-430d-9a6d-ff3fd422a54f\",\r\n \"scenarioName\": \"PurgeProtectionProfileAssociation\",\r\n \"friendlyName\": \"Purge association between the replication policy and containers\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PurgeCloudPairPreflightChecksTask\",\r\n \"name\": \"PurgeCloudPairPreflightChecksTask\",\r\n \"startTime\": \"2017-05-13T20:05:36.3416422Z\",\r\n \"endTime\": \"2017-05-13T20:05:40.6130925Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Performing initial checks\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PurgeCloudPairTask\",\r\n \"name\": \"PurgeCloudPairTask\",\r\n \"startTime\": \"2017-05-13T20:05:40.6130925Z\",\r\n \"endTime\": \"2017-05-13T20:05:40.6130925Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Removing the protection configuration\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T20:05:35.2183202Z\",\r\n \"endTime\": \"2017-05-13T20:05:36Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T20:05:35.2183202Z\",\r\n \"endTime\": \"2017-05-13T20:05:36Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:06:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/bf12c4aa-249b-478f-abca-9b3dafb4a96e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "35199963-0650-4341-b7c9-84a5902c9356" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14978" + ], + "x-ms-correlation-request-id": [ + "3d30ba58-2fad-4953-aee5-038b653816b6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T200605Z:3d30ba58-2fad-4953-aee5-038b653816b6" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeProtectedItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeProtectedItem.json new file mode 100644 index 000000000000..40e72e388d22 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeProtectedItem.json @@ -0,0 +1,212 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f78f39b0-6013-485c-b378-17615b1001e1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:27:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f78f39b0-6013-485c-b378-17615b1001e1 5/13/2017 7:27:02 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f78f39b0-6013-485c-b378-17615b1001e1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13991" + ], + "x-ms-correlation-request-id": [ + "d70ad563-8a00-48bb-8572-ac49bee16173" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T192702Z:d70ad563-8a00-48bb-8572-ac49bee16173" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6845a3af-9833-49d1-a880-28c34199d729" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:27:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/operationresults/3737bc7c-abe9-417d-9188-20c284330bdd?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3737bc7c-abe9-417d-9188-20c284330bdd", + "6845a3af-9833-49d1-a880-28c34199d729 5/13/2017 7:27:05 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3737bc7c-abe9-417d-9188-20c284330bdd?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "6845a3af-9833-49d1-a880-28c34199d729" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "0af8f36d-db2f-4460-9a9a-c0c2e6879995" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T192705Z:0af8f36d-db2f-4460-9a9a-c0c2e6879995" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3737bc7c-abe9-417d-9188-20c284330bdd?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzM3MzdiYzdjLWFiZTktNDE3ZC05MTg4LTIwYzI4NDMzMGJkZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3737bc7c-abe9-417d-9188-20c284330bdd\",\r\n \"name\": \"3737bc7c-abe9-417d-9188-20c284330bdd\",\r\n \"properties\": {\r\n \"activityId\": \"6845a3af-9833-49d1-a880-28c34199d729 ActivityId: 0af8f36d-db2f-4460-9a9a-c0c2e6879995\",\r\n \"scenarioName\": \"PurgeVm\",\r\n \"friendlyName\": \"Remove the virtual machine from the vault\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PurgeVmTask\",\r\n \"name\": \"PurgeVmTask\",\r\n \"startTime\": \"2017-05-13T19:27:06.7002931Z\",\r\n \"endTime\": \"2017-05-13T19:27:06.7471686Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Removing protection data for the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:27:05.468638Z\",\r\n \"endTime\": \"2017-05-13T19:27:06Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:27:05.468638Z\",\r\n \"endTime\": \"2017-05-13T19:27:06Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:27:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3737bc7c-abe9-417d-9188-20c284330bdd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "726172a9-0ad4-4e0e-baf5-3e380860f16c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13977" + ], + "x-ms-correlation-request-id": [ + "d9cf4864-dce8-47ba-bdf4-75bd61bc67ef" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T192735Z:d9cf4864-dce8-47ba-bdf4-75bd61bc67ef" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeRsp.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeRsp.json new file mode 100644 index 000000000000..42cd4813d6e6 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeRsp.json @@ -0,0 +1,212 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "85bebb0d-abe3-4aa8-a483-ae23fbc471e9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:29:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "85bebb0d-abe3-4aa8-a483-ae23fbc471e9 5/13/2017 8:29:16 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "85bebb0d-abe3-4aa8-a483-ae23fbc471e9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14335" + ], + "x-ms-correlation-request-id": [ + "955b5322-4909-4801-8e4d-046c132e4410" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T202915Z:955b5322-4909-4801-8e4d-046c132e4410" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/74ef040f-fa15-4f71-9652-c27d5d19d575?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblJlY292ZXJ5U2VydmljZXNQcm92aWRlcnMvNzRlZjA0MGYtZmExNS00ZjcxLTk2NTItYzI3ZDVkMTlkNTc1P2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2524139b-5050-4e8f-96ad-80eb4771b9c4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:29:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/74ef040f-fa15-4f71-9652-c27d5d19d575/operationresults/e2d8539e-ac82-488e-a4e7-23f84558811f?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e2d8539e-ac82-488e-a4e7-23f84558811f", + "2524139b-5050-4e8f-96ad-80eb4771b9c4 5/13/2017 8:29:20 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e2d8539e-ac82-488e-a4e7-23f84558811f?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "2524139b-5050-4e8f-96ad-80eb4771b9c4" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "5ed8a5cf-a4d5-4cba-8076-eb8fe4ad53cd" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T202919Z:5ed8a5cf-a4d5-4cba-8076-eb8fe4ad53cd" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e2d8539e-ac82-488e-a4e7-23f84558811f?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2UyZDg1MzllLWFjODItNDg4ZS1hNGU3LTIzZjg0NTU4ODExZj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e2d8539e-ac82-488e-a4e7-23f84558811f\",\r\n \"name\": \"e2d8539e-ac82-488e-a4e7-23f84558811f\",\r\n \"properties\": {\r\n \"activityId\": \"2524139b-5050-4e8f-96ad-80eb4771b9c4 ActivityId: 5ed8a5cf-a4d5-4cba-8076-eb8fe4ad53cd\",\r\n \"scenarioName\": \"PurgeDra\",\r\n \"friendlyName\": \"Remove server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PurgeDraTask\",\r\n \"name\": \"PurgeDraTask\",\r\n \"startTime\": \"2017-05-13T20:29:24.4333653Z\",\r\n \"endTime\": \"2017-05-13T20:29:24.4958812Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Removing the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T20:29:20.1041251Z\",\r\n \"endTime\": \"2017-05-13T20:29:24Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"74ef040f-fa15-4f71-9652-c27d5d19d575\",\r\n \"targetObjectName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T20:29:20.1041251Z\",\r\n \"endTime\": \"2017-05-13T20:29:24Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:29:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e2d8539e-ac82-488e-a4e7-23f84558811f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "1c036ab0-5d53-41a0-a696-0781cc0179a2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14321" + ], + "x-ms-correlation-request-id": [ + "85d07112-6373-423f-80d4-b91340f28952" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T202950Z:85d07112-6373-423f-80d4-b91340f28952" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeSite.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeSite.json new file mode 100644 index 000000000000..991590e16834 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/PurgeSite.json @@ -0,0 +1,141 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d627598d-f9ec-4573-8916-fd58c6d32d20" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:40:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/operationresults/583abb1c-6a0f-4ac7-9c2b-ebda2d194cfc?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/583abb1c-6a0f-4ac7-9c2b-ebda2d194cfc", + "d627598d-f9ec-4573-8916-fd58c6d32d20 5/13/2017 8:40:40 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/583abb1c-6a0f-4ac7-9c2b-ebda2d194cfc?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "d627598d-f9ec-4573-8916-fd58c6d32d20" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "8bc48d39-544d-42b0-9999-bcc681f1f131" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T204040Z:8bc48d39-544d-42b0-9999-bcc681f1f131" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/583abb1c-6a0f-4ac7-9c2b-ebda2d194cfc?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzU4M2FiYjFjLTZhMGYtNGFjNy05YzJiLWViZGEyZDE5NGNmYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/583abb1c-6a0f-4ac7-9c2b-ebda2d194cfc\",\r\n \"name\": \"583abb1c-6a0f-4ac7-9c2b-ebda2d194cfc\",\r\n \"properties\": {\r\n \"activityId\": \"d627598d-f9ec-4573-8916-fd58c6d32d20 ActivityId: 8bc48d39-544d-42b0-9999-bcc681f1f131\",\r\n \"scenarioName\": \"PurgeVMM\",\r\n \"friendlyName\": \"Delete the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"PurgeFabricPreflightChecksTask\",\r\n \"name\": \"PurgeFabricPreflightChecksTask\",\r\n \"startTime\": \"2017-05-13T20:40:40.9316141Z\",\r\n \"endTime\": \"2017-05-13T20:40:42.1259592Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for deleting the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PurgeFabricTask\",\r\n \"name\": \"PurgeFabricTask\",\r\n \"startTime\": \"2017-05-13T20:40:42.1259592Z\",\r\n \"endTime\": \"2017-05-13T20:40:42.250972Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Deleting the server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T20:40:40.6078476Z\",\r\n \"endTime\": \"2017-05-13T20:40:41Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"targetObjectName\": \"SiteRecoveryTestSite1\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T20:40:40.6078476Z\",\r\n \"endTime\": \"2017-05-13T20:40:41Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 20:41:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/583abb1c-6a0f-4ac7-9c2b-ebda2d194cfc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8069a265-6ed9-4229-b392-4be9ee3edb68" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13876" + ], + "x-ms-correlation-request-id": [ + "dae0d58f-f552-470a-909d-f9247328aee0" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T204111Z:dae0d58f-f552-470a-909d-f9247328aee0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPFailback.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPFailback.json new file mode 100644 index 000000000000..d485068a9048 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPFailback.json @@ -0,0 +1,868 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/plannedFailover?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDEvcGxhbm5lZEZhaWxvdmVyP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"failoverDirection\": \"RecoveryToPrimary\",\r\n \"providerSpecificDetails\": [\r\n {\r\n \"instanceType\": \"HyperVReplicaAzureFailback\",\r\n \"dataSyncOption\": \"ForSynchronization\",\r\n \"recoveryVmCreationOption\": \"NoAction\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "286" + ], + "x-ms-client-request-id": [ + "0b6515fa-d75e-44dd-a166-8da40f13743d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:49:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0", + "0b6515fa-d75e-44dd-a166-8da40f13743d 5/13/2017 5:49:22 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "0b6515fa-d75e-44dd-a166-8da40f13743d" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "7546c7e6-b9c2-4c50-a14c-76ed31559076" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T174922Z:7546c7e6-b9c2-4c50-a14c-76ed31559076" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:49:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "68184c76-dd89-41ab-877f-851bdc3142e7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14111" + ], + "x-ms-correlation-request-id": [ + "1b80d734-30a0-4b60-b86a-93823daabdc2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T174952Z:1b80d734-30a0-4b60-b86a-93823daabdc2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:50:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a1e87601-f871-45fe-8c5b-5ca8d6b78728" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14211" + ], + "x-ms-correlation-request-id": [ + "3a0fd774-7d2e-4542-8b09-5f6430a2a03e" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175023Z:3a0fd774-7d2e-4542-8b09-5f6430a2a03e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:50:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "240d0e8e-45e7-4a37-aea9-38dce554f37f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14204" + ], + "x-ms-correlation-request-id": [ + "0d34af9f-344c-41cc-8312-dc963054007c" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175053Z:0d34af9f-344c-41cc-8312-dc963054007c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:51:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c5f4ae0a-0b3f-4fdc-9a84-d677bc97ca92" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14194" + ], + "x-ms-correlation-request-id": [ + "48d4778b-8882-4095-adf7-a9feb7d82929" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175124Z:48d4778b-8882-4095-adf7-a9feb7d82929" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6123874Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9e5d0bf1-a07c-44e6-a6b8-f68a73e95125\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:51:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9b89068e-2409-4e95-a54d-f6b4634c13e0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14181" + ], + "x-ms-correlation-request-id": [ + "f71e5ed0-9648-409e-80c0-eff386d588ba" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175155Z:f71e5ed0-9648-409e-80c0-eff386d588ba" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6123874Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9e5d0bf1-a07c-44e6-a6b8-f68a73e95125\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:52:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "6a653a87-1dca-4533-84e2-0a3393f0bc67" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14162" + ], + "x-ms-correlation-request-id": [ + "ad0f5bb3-b516-4d14-a9a7-b8a6682238b4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175225Z:ad0f5bb3-b516-4d14-a9a7-b8a6682238b4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6123874Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9e5d0bf1-a07c-44e6-a6b8-f68a73e95125\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:52:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f6cbda03-efcf-4117-b05f-48c3db567e2c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14148" + ], + "x-ms-correlation-request-id": [ + "3ead1d10-4351-47e4-809f-2c37f7db0699" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175257Z:3ead1d10-4351-47e4-809f-2c37f7db0699" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6123874Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9e5d0bf1-a07c-44e6-a6b8-f68a73e95125\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:53:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b0ab300c-7dd5-4962-8864-6ca4380c054e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14132" + ], + "x-ms-correlation-request-id": [ + "bfbb6083-80c7-4e29-aaab-0602ecf50918" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175327Z:bfbb6083-80c7-4e29-aaab-0602ecf50918" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6123874Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9e5d0bf1-a07c-44e6-a6b8-f68a73e95125\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:53:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d2ebc5a9-cd6b-4a16-9b6d-8192267e622d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14108" + ], + "x-ms-correlation-request-id": [ + "47568494-bb80-4af4-95b6-8b1c0d25bb6b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175358Z:47568494-bb80-4af4-95b6-8b1c0d25bb6b" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6123874Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9e5d0bf1-a07c-44e6-a6b8-f68a73e95125\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:54:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "ae70dab2-6df3-468a-ac25-f9484ca0c7d8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14094" + ], + "x-ms-correlation-request-id": [ + "d429ae95-a1f0-4fe4-b916-b7826a02ad37" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175428Z:d429ae95-a1f0-4fe4-b916-b7826a02ad37" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a8447af3-a914-48fa-9e95-90480b5a16f0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NDQ3YWYzLWE5MTQtNDhmYS05ZTk1LTkwNDgwYjVhMTZmMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"name\": \"3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"properties\": {\r\n \"activityId\": \"0b6515fa-d75e-44dd-a166-8da40f13743d ActivityId: 7546c7e6-b9c2-4c50-a14c-76ed31559076\",\r\n \"scenarioName\": \"Failback\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bd182445-c982-4648-8e92-0381d28b3627\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:49:24.1937566Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.3500018Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ffe5e740-0828-4258-9da8-8563236bd1ff\",\r\n \"name\": \"PrepareVmOnPremForFailback\",\r\n \"startTime\": \"2017-05-13T17:49:24.463904Z\",\r\n \"endTime\": \"2017-05-13T17:49:24.5843599Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Preparing the on-premises virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"DataSyncAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Data synchronization\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"DataSyncAllActionGroup\",\r\n \"groupId\": \"DataSyncAllActionGroup\",\r\n \"rpGroupType\": \"RpFailbackDataSyncTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"d5a8a5f8-6d10-43d7-b97c-4d40b7886b4e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"d0370c3b-68de-4694-8fba-b8f5b23c5027\",\r\n \"name\": \"WaitForUserInputForFailback\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Waiting for user input\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6436563Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"29cbfd63-2381-4fd3-a950-56e9d0636188\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:49:24.8064002Z\",\r\n \"endTime\": \"2017-05-13T17:51:47.6123874Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/be42307b-0749-4439-ba4b-4724e120fafc\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"2017-05-13T17:54:34.504634Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"0745de1e-5817-4a73-9357-7d000a3b046e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:51:48.0517055Z\",\r\n \"endTime\": \"2017-05-13T17:54:34.4713135Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/9e5d0bf1-a07c-44e6-a6b8-f68a73e95125\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:54:34.8933152Z\",\r\n \"endTime\": \"2017-05-13T17:54:46.4630852Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"53541bc8-306b-45b5-a95e-9b5a39b8062f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:54:34.8933152Z\",\r\n \"endTime\": \"2017-05-13T17:54:46.4162099Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/da099b46-36df-4691-955c-c592e6e6018a\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Failback\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"c0398f59-72df-4a9b-ba46-db3bfe73a441\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"2017-05-13T17:54:46.6884379Z\",\r\n \"endTime\": \"2017-05-13T17:54:46.8602924Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": \"2017-05-13T17:54:46Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:49:23.9088125Z\",\r\n \"endTime\": \"2017-05-13T17:54:46Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:54:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "ff134381-0fa4-44e7-ad1b-03606c2da9ad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14086" + ], + "x-ms-correlation-request-id": [ + "56641f4b-6ff4-416d-a013-674ab072dd7a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175459Z:56641f4b-6ff4-416d-a013-674ab072dd7a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f04789ae-60c4-466d-bb29-17a15e4c6463" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\",\r\n \"Commit\"\r\n ],\r\n \"lastPlannedFailoverTime\": \"2017-05-13T17:49:23.8812431Z\",\r\n \"lastTestFailoverTime\": \"2017-05-13T14:36:28.4407195Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3940e893-35c1-434a-a40b-c921d058eb07\",\r\n \"startTime\": \"2017-05-13T17:49:24.3500018Z\"\r\n },\r\n \"currentScenarioStatus\": \"Succeeded\",\r\n \"currentScenarioStatusDescription\": \"Completed\",\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:54:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f04789ae-60c4-466d-bb29-17a15e4c6463 5/13/2017 5:54:59 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f04789ae-60c4-466d-bb29-17a15e4c6463" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14085" + ], + "x-ms-correlation-request-id": [ + "c21321f1-cf01-4662-be97-545a71171bda" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175459Z:c21321f1-cf01-4662-be97-545a71171bda" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPFailoverCommit.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPFailoverCommit.json new file mode 100644 index 000000000000..2c8e13dc68ff --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPFailoverCommit.json @@ -0,0 +1,212 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/failoverCommit?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDEvZmFpbG92ZXJDb21taXQ/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9cea4caf-6b79-4af4-a43f-36181bb55ac3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:09:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/4ebba536-f02c-4317-9a3c-1a048f0daebb?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/4ebba536-f02c-4317-9a3c-1a048f0daebb", + "9cea4caf-6b79-4af4-a43f-36181bb55ac3 5/13/2017 6:09:52 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/4ebba536-f02c-4317-9a3c-1a048f0daebb?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "9cea4caf-6b79-4af4-a43f-36181bb55ac3" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "8847ee14-2bfe-4cbf-9571-37f654f96d1b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180952Z:8847ee14-2bfe-4cbf-9571-37f654f96d1b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/4ebba536-f02c-4317-9a3c-1a048f0daebb?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzRlYmJhNTM2LWYwMmMtNDMxNy05YTNjLTFhMDQ4ZjBkYWViYj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c3b0cd39-2f94-4630-9726-7e5eba8d1dfc\",\r\n \"name\": \"c3b0cd39-2f94-4630-9726-7e5eba8d1dfc\",\r\n \"properties\": {\r\n \"activityId\": \"9cea4caf-6b79-4af4-a43f-36181bb55ac3 ActivityId: 8847ee14-2bfe-4cbf-9571-37f654f96d1b\",\r\n \"scenarioName\": \"CommitFailover\",\r\n \"friendlyName\": \"Commit\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"6eadfa52-62b2-42f3-b616-798091c03c95\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:09:53.881558Z\",\r\n \"endTime\": \"2017-05-13T18:09:56.4053053Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Commit (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"CommitGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"05bf85f2-d6d2-4f18-a23a-980520bcc78d\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:09:53.7409128Z\",\r\n \"endTime\": \"2017-05-13T18:09:56.4053053Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d9ee5f62-46b6-48f3-9365-327fc58e9885\",\r\n \"jobFriendlyName\": \"Commit\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"CommitFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T18:09:53.4051525Z\",\r\n \"endTime\": \"2017-05-13T18:09:55Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T18:09:53.4051525Z\",\r\n \"endTime\": \"2017-05-13T18:09:55Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:10:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c3b0cd39-2f94-4630-9726-7e5eba8d1dfc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "009547ca-8921-4789-bd59-b42e865b17e9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13944" + ], + "x-ms-correlation-request-id": [ + "747c5fe4-5cc6-4d7c-89e8-58cd7ab6aa46" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T181023Z:747c5fe4-5cc6-4d7c-89e8-58cd7ab6aa46" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6e92d056-87d0-45a8-97a0-bc92d48aa3e7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\"\r\n ],\r\n \"lastPlannedFailoverTime\": \"2017-05-13T17:49:23.8812431Z\",\r\n \"lastTestFailoverTime\": \"2017-05-13T14:36:28.4407195Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"CommitFailover\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c3b0cd39-2f94-4630-9726-7e5eba8d1dfc\",\r\n \"startTime\": \"2017-05-13T18:09:53.8659314Z\"\r\n },\r\n \"currentScenarioStatus\": \"Succeeded\",\r\n \"currentScenarioStatusDescription\": \"Completed\",\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:10:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6e92d056-87d0-45a8-97a0-bc92d48aa3e7 5/13/2017 6:10:24 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "6e92d056-87d0-45a8-97a0-bc92d48aa3e7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13943" + ], + "x-ms-correlation-request-id": [ + "3280b25a-8dc2-4430-bcfb-dc9e2653f724" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T181023Z:3280b25a-8dc2-4430-bcfb-dc9e2653f724" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPPlannedFailover.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPPlannedFailover.json new file mode 100644 index 000000000000..ab71f54c5816 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPPlannedFailover.json @@ -0,0 +1,803 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/plannedFailover?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDEvcGxhbm5lZEZhaWxvdmVyP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"failoverDirection\": \"PrimaryToRecovery\",\r\n \"providerSpecificDetails\": [\r\n {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"vaultLocation\": \"West US\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "217" + ], + "x-ms-client-request-id": [ + "e297f4df-2610-4dcf-aa5b-b6ebb451e15d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:29:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba", + "e297f4df-2610-4dcf-aa5b-b6ebb451e15d 5/13/2017 5:29:25 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "e297f4df-2610-4dcf-aa5b-b6ebb451e15d" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "254463a8-bde3-4c07-9329-ee1c0d75315a" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T172925Z:254463a8-bde3-4c07-9329-ee1c0d75315a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:29:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "980bcba3-0e12-44e4-87ae-d128256dd3e2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "e8bc3fda-0b14-442b-a472-9085dd19be43" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T172955Z:e8bc3fda-0b14-442b-a472-9085dd19be43" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:30:25 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8a6b0a23-bdb5-4e8f-bd4a-4727dab36ae2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "ddd7ade0-4d5e-4baa-a62e-3d9310a66902" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173026Z:ddd7ade0-4d5e-4baa-a62e-3d9310a66902" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"2017-05-13T17:30:36.1540844Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T17:30:36.2923187Z\",\r\n \"endTime\": \"2017-05-13T17:30:37.6991643Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9997818Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/dea94fc5-afae-4572-9963-1c450ea4c016\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/28727db4-addb-43ee-9fa2-fb33f3904ce3\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:30:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d5fa0dce-29c5-4f9b-bc22-10ddfb6b263a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "77ae3e93-e4b0-4d9e-bd5d-a99a0d400370" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173057Z:77ae3e93-e4b0-4d9e-bd5d-a99a0d400370" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"2017-05-13T17:30:36.1540844Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T17:30:36.2923187Z\",\r\n \"endTime\": \"2017-05-13T17:30:37.6991643Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9997818Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/dea94fc5-afae-4572-9963-1c450ea4c016\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/28727db4-addb-43ee-9fa2-fb33f3904ce3\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:31:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "4d255e14-44a4-4204-9195-ee7d9b21301e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "df49c19a-04dd-4a4e-904d-d0bfcb0c19af" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173127Z:df49c19a-04dd-4a4e-904d-d0bfcb0c19af" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"2017-05-13T17:30:36.1540844Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T17:30:36.2923187Z\",\r\n \"endTime\": \"2017-05-13T17:30:37.6991643Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9997818Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/dea94fc5-afae-4572-9963-1c450ea4c016\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/28727db4-addb-43ee-9fa2-fb33f3904ce3\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:31:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f1a7c461-116c-4d0c-9819-2182f77d862c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "5f54b512-dac0-4e6b-b16a-06bd0111aa3e" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173158Z:5f54b512-dac0-4e6b-b16a-06bd0111aa3e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"2017-05-13T17:30:36.1540844Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T17:30:36.2923187Z\",\r\n \"endTime\": \"2017-05-13T17:30:37.6991643Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9997818Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/dea94fc5-afae-4572-9963-1c450ea4c016\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/28727db4-addb-43ee-9fa2-fb33f3904ce3\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:32:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "33e253b7-b572-43cc-929f-93e3de2e3316" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "ce5fe4dc-596e-4b71-a565-65f7f018de26" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173229Z:ce5fe4dc-596e-4b71-a565-65f7f018de26" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"2017-05-13T17:30:36.1540844Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T17:30:36.2923187Z\",\r\n \"endTime\": \"2017-05-13T17:30:37.6991643Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9997818Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/dea94fc5-afae-4572-9963-1c450ea4c016\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"2017-05-13T17:32:35.6941188Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"2017-05-13T17:32:35.6628685Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/28727db4-addb-43ee-9fa2-fb33f3904ce3\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:32:36.151188Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:32:36.1394063Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f9c581a5-7598-4cfa-b178-e21a2fe2307a\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:32:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "37415e78-db0a-4a3e-8726-bb96db910b0f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "580820fc-4929-4a1b-b447-1f5b7d43db4a" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173259Z:580820fc-4929-4a1b-b447-1f5b7d43db4a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"2017-05-13T17:30:36.1540844Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T17:30:36.2923187Z\",\r\n \"endTime\": \"2017-05-13T17:30:37.6991643Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9997818Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/dea94fc5-afae-4572-9963-1c450ea4c016\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"2017-05-13T17:32:35.6941188Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"2017-05-13T17:32:35.6628685Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/28727db4-addb-43ee-9fa2-fb33f3904ce3\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:32:36.151188Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:32:36.1394063Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f9c581a5-7598-4cfa-b178-e21a2fe2307a\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:33:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "14ceb54b-ca93-4b80-a10d-35311ed7c7fa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14985" + ], + "x-ms-correlation-request-id": [ + "1fbc4401-1d2f-4940-9126-f35d3bd6877e" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173330Z:1fbc4401-1d2f-4940-9126-f35d3bd6877e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"2017-05-13T17:30:36.1540844Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T17:30:36.2923187Z\",\r\n \"endTime\": \"2017-05-13T17:30:37.6991643Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9997818Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/dea94fc5-afae-4572-9963-1c450ea4c016\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"2017-05-13T17:32:35.6941188Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"2017-05-13T17:32:35.6628685Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/28727db4-addb-43ee-9fa2-fb33f3904ce3\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:32:36.151188Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:32:36.1394063Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f9c581a5-7598-4cfa-b178-e21a2fe2307a\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:33:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3315e629-644a-446e-8004-87f541bd588b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-correlation-request-id": [ + "537b22f5-1079-48e8-8610-1f33826eb517" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173400Z:537b22f5-1079-48e8-8610-1f33826eb517" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d5ce6472-6bb3-40e1-96b4-551c67f138ba?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2Q1Y2U2NDcyLTZiYjMtNDBlMS05NmI0LTU1MWM2N2YxMzhiYT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"name\": \"1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"properties\": {\r\n \"activityId\": \"e297f4df-2610-4dcf-aa5b-b6ebb451e15d ActivityId: 254463a8-bde3-4c07-9329-ee1c0d75315a\",\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"friendlyName\": \"Planned failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"27491bae-6ec5-4684-a3c8-d41194e92f42\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T17:29:28.0983068Z\",\r\n \"endTime\": \"2017-05-13T17:30:36.1540844Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"cf36e5b7-80d8-416c-8ce8-9cf5692104e6\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T17:30:36.2923187Z\",\r\n \"endTime\": \"2017-05-13T17:30:37.6991643Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"All groups shutdown (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"ShutdownAllActionGroup\",\r\n \"groupId\": \"ShutdownAllActionGroup\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanShutdownGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9804013Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shutdown: Group 1 (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"Shutdown\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"8e07ef87-6e7f-45d0-83b6-0ebdc2ff0423\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:37.9997818Z\",\r\n \"endTime\": \"2017-05-13T17:30:45.434245Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/dea94fc5-afae-4572-9963-1c450ea4c016\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"2017-05-13T17:32:35.6941188Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df25ba3a-1a25-4b54-81c1-a9fdf18ca48c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:30:45.6999036Z\",\r\n \"endTime\": \"2017-05-13T17:32:35.6628685Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/28727db4-addb-43ee-9fa2-fb33f3904ce3\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:32:36.151188Z\",\r\n \"endTime\": \"2017-05-13T17:34:17.6668128Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"2054a1c6-8efe-4d39-bca4-f46b6ce9e97c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:32:36.1394063Z\",\r\n \"endTime\": \"2017-05-13T17:34:17.5105638Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f9c581a5-7598-4cfa-b178-e21a2fe2307a\",\r\n \"jobFriendlyName\": \"Planned failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"PlannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"31becdfb-e602-4153-8e23-2efcfe8c0920\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"2017-05-13T17:34:18.0886729Z\",\r\n \"endTime\": \"2017-05-13T17:34:18.5294117Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": \"2017-05-13T17:34:18Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:29:26.2830745Z\",\r\n \"endTime\": \"2017-05-13T17:34:18Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:34:30 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c980a4be-6c3e-4a6c-b959-b4969c04d5be" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "14d9014e-e08d-43a8-8552-42ceffc990d8" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173430Z:14d9014e-e08d-43a8-8552-42ceffc990d8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "93c3fd69-3be3-42c6-83bd-1902a63e144e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\",\r\n \"Commit\"\r\n ],\r\n \"lastPlannedFailoverTime\": \"2017-05-13T17:29:27.7857898Z\",\r\n \"lastTestFailoverTime\": \"2017-05-13T14:36:28.4407195Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"PlannedFailover\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1c2bfd47-f5ba-4820-9378-d86db76c355c\",\r\n \"startTime\": \"2017-05-13T17:29:31.8040402Z\"\r\n },\r\n \"currentScenarioStatus\": \"Succeeded\",\r\n \"currentScenarioStatusDescription\": \"Completed\",\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:34:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "93c3fd69-3be3-42c6-83bd-1902a63e144e 5/13/2017 5:34:38 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "93c3fd69-3be3-42c6-83bd-1902a63e144e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "2b596503-6705-4a69-9f60-51fbf2c8981c" + ], + "x-ms-routing-request-id": [ + "SOUTHINDIA:20170513T173438Z:2b596503-6705-4a69-9f60-51fbf2c8981c" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPReprotect.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPReprotect.json new file mode 100644 index 000000000000..2756b5efa546 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPReprotect.json @@ -0,0 +1,537 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/reProtect?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDEvcmVQcm90ZWN0P2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "966b5729-bdf6-4933-b4f9-6a7f10694d62" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 17:59:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/99a280aa-53ed-4151-a6ed-c47b84f4a8b9?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/99a280aa-53ed-4151-a6ed-c47b84f4a8b9", + "966b5729-bdf6-4933-b4f9-6a7f10694d62 5/13/2017 5:59:35 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/99a280aa-53ed-4151-a6ed-c47b84f4a8b9?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "966b5729-bdf6-4933-b4f9-6a7f10694d62" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "8170a7d7-4bd2-4748-b499-bdbc10c2f2d4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T175935Z:8170a7d7-4bd2-4748-b499-bdbc10c2f2d4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/99a280aa-53ed-4151-a6ed-c47b84f4a8b9?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk5YTI4MGFhLTUzZWQtNDE1MS1hNmVkLWM0N2I4NGY0YThiOT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"name\": \"89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"properties\": {\r\n \"activityId\": \"966b5729-bdf6-4933-b4f9-6a7f10694d62 ActivityId: 8170a7d7-4bd2-4748-b499-bdbc10c2f2d4\",\r\n \"scenarioName\": \"ReverseReplication\",\r\n \"friendlyName\": \"Reverse replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"330d52c6-1572-4c4a-9824-315f6aa6be19\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.6953595Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Reverse replicate (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"ReverseReplicateGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"7c6bd1f6-8d5f-4498-a692-04e7d8b45bb4\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.2099169Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/efff6e08-cb62-4c9f-b08a-c29c5ccf0d76\",\r\n \"jobFriendlyName\": \"Reverse replication\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"ReverseReplication\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:00:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9db6a88c-0162-4339-bff5-5b3e01f89d2c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14152" + ], + "x-ms-correlation-request-id": [ + "f13e5156-c1ca-422e-89fd-45320a6f7fc7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180005Z:f13e5156-c1ca-422e-89fd-45320a6f7fc7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/99a280aa-53ed-4151-a6ed-c47b84f4a8b9?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk5YTI4MGFhLTUzZWQtNDE1MS1hNmVkLWM0N2I4NGY0YThiOT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"name\": \"89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"properties\": {\r\n \"activityId\": \"966b5729-bdf6-4933-b4f9-6a7f10694d62 ActivityId: 8170a7d7-4bd2-4748-b499-bdbc10c2f2d4\",\r\n \"scenarioName\": \"ReverseReplication\",\r\n \"friendlyName\": \"Reverse replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"330d52c6-1572-4c4a-9824-315f6aa6be19\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.6953595Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Reverse replicate (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"ReverseReplicateGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"7c6bd1f6-8d5f-4498-a692-04e7d8b45bb4\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.2099169Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/efff6e08-cb62-4c9f-b08a-c29c5ccf0d76\",\r\n \"jobFriendlyName\": \"Reverse replication\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"ReverseReplication\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:00:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f0825cca-be0c-47b1-8c48-b379c1b41a48" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14140" + ], + "x-ms-correlation-request-id": [ + "8273f3ed-ff2b-4663-8c81-a00031bbe4e3" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180036Z:8273f3ed-ff2b-4663-8c81-a00031bbe4e3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/99a280aa-53ed-4151-a6ed-c47b84f4a8b9?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk5YTI4MGFhLTUzZWQtNDE1MS1hNmVkLWM0N2I4NGY0YThiOT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"name\": \"89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"properties\": {\r\n \"activityId\": \"966b5729-bdf6-4933-b4f9-6a7f10694d62 ActivityId: 8170a7d7-4bd2-4748-b499-bdbc10c2f2d4\",\r\n \"scenarioName\": \"ReverseReplication\",\r\n \"friendlyName\": \"Reverse replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"330d52c6-1572-4c4a-9824-315f6aa6be19\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.6953595Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Reverse replicate (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"ReverseReplicateGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"7c6bd1f6-8d5f-4498-a692-04e7d8b45bb4\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.2099169Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/efff6e08-cb62-4c9f-b08a-c29c5ccf0d76\",\r\n \"jobFriendlyName\": \"Reverse replication\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"ReverseReplication\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:01:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3ba25774-aa3b-42d9-a744-6f90e19b3a77" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14132" + ], + "x-ms-correlation-request-id": [ + "cf1b000c-3ed0-4767-b7cf-82aa4f5642e7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180106Z:cf1b000c-3ed0-4767-b7cf-82aa4f5642e7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/99a280aa-53ed-4151-a6ed-c47b84f4a8b9?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk5YTI4MGFhLTUzZWQtNDE1MS1hNmVkLWM0N2I4NGY0YThiOT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"name\": \"89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"properties\": {\r\n \"activityId\": \"966b5729-bdf6-4933-b4f9-6a7f10694d62 ActivityId: 8170a7d7-4bd2-4748-b499-bdbc10c2f2d4\",\r\n \"scenarioName\": \"ReverseReplication\",\r\n \"friendlyName\": \"Reverse replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"330d52c6-1572-4c4a-9824-315f6aa6be19\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.6953595Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Reverse replicate (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"ReverseReplicateGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"7c6bd1f6-8d5f-4498-a692-04e7d8b45bb4\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.2099169Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/efff6e08-cb62-4c9f-b08a-c29c5ccf0d76\",\r\n \"jobFriendlyName\": \"Reverse replication\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"ReverseReplication\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:01:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "e97ad48a-821a-4ba3-98e1-14d6998dedd8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14120" + ], + "x-ms-correlation-request-id": [ + "e9d6bafb-78be-41b0-bea4-28a74a390414" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180136Z:e9d6bafb-78be-41b0-bea4-28a74a390414" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/99a280aa-53ed-4151-a6ed-c47b84f4a8b9?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk5YTI4MGFhLTUzZWQtNDE1MS1hNmVkLWM0N2I4NGY0YThiOT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"name\": \"89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"properties\": {\r\n \"activityId\": \"966b5729-bdf6-4933-b4f9-6a7f10694d62 ActivityId: 8170a7d7-4bd2-4748-b499-bdbc10c2f2d4\",\r\n \"scenarioName\": \"ReverseReplication\",\r\n \"friendlyName\": \"Reverse replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"330d52c6-1572-4c4a-9824-315f6aa6be19\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.6953595Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Reverse replicate (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"ReverseReplicateGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"7c6bd1f6-8d5f-4498-a692-04e7d8b45bb4\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.2099169Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/efff6e08-cb62-4c9f-b08a-c29c5ccf0d76\",\r\n \"jobFriendlyName\": \"Reverse replication\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"ReverseReplication\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:02:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "bce7bc66-57a2-489c-a95f-2184e379f57a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14104" + ], + "x-ms-correlation-request-id": [ + "7893dae4-32ca-4b93-a41c-4f62f18aba55" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180207Z:7893dae4-32ca-4b93-a41c-4f62f18aba55" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/99a280aa-53ed-4151-a6ed-c47b84f4a8b9?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzk5YTI4MGFhLTUzZWQtNDE1MS1hNmVkLWM0N2I4NGY0YThiOT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"name\": \"89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"properties\": {\r\n \"activityId\": \"966b5729-bdf6-4933-b4f9-6a7f10694d62 ActivityId: 8170a7d7-4bd2-4748-b499-bdbc10c2f2d4\",\r\n \"scenarioName\": \"ReverseReplication\",\r\n \"friendlyName\": \"Reverse replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"330d52c6-1572-4c4a-9824-315f6aa6be19\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.6953595Z\",\r\n \"endTime\": \"2017-05-13T18:02:25.8838803Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Reverse replicate (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"ReverseReplicateGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"7c6bd1f6-8d5f-4498-a692-04e7d8b45bb4\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T17:59:49.2099169Z\",\r\n \"endTime\": \"2017-05-13T18:02:25.8838803Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/efff6e08-cb62-4c9f-b08a-c29c5ccf0d76\",\r\n \"jobFriendlyName\": \"Reverse replication\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"ReverseReplication\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"endTime\": \"2017-05-13T18:02:25Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T17:59:36.0737145Z\",\r\n \"endTime\": \"2017-05-13T18:02:25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:02:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d672790a-7842-448e-b1ee-b87d3dd1e82a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14098" + ], + "x-ms-correlation-request-id": [ + "1ed08885-da0f-4837-93b5-f52d0db04600" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180237Z:1ed08885-da0f-4837-93b5-f52d0db04600" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7097d455-78a5-4346-99d0-c2cadcffd979" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\"\r\n ],\r\n \"lastPlannedFailoverTime\": \"2017-05-13T17:49:23.8812431Z\",\r\n \"lastTestFailoverTime\": \"2017-05-13T14:36:28.4407195Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"ReverseReplication\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/89591aa2-4ba9-4f08-9bd1-052932ba2045\",\r\n \"startTime\": \"2017-05-13T17:59:49.6836337Z\"\r\n },\r\n \"currentScenarioStatus\": \"Succeeded\",\r\n \"currentScenarioStatusDescription\": \"Completed\",\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:02:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "7097d455-78a5-4346-99d0-c2cadcffd979 5/13/2017 6:02:38 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "7097d455-78a5-4346-99d0-c2cadcffd979" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14097" + ], + "x-ms-correlation-request-id": [ + "c32f66ab-1a9d-4c4c-b7be-9986dc07cbdc" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180238Z:c32f66ab-1a9d-4c4c-b7be-9986dc07cbdc" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPTestFailover.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPTestFailover.json new file mode 100644 index 000000000000..ed84492b4008 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPTestFailover.json @@ -0,0 +1,608 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/testFailover?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDEvdGVzdEZhaWxvdmVyP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"failoverDirection\": \"PrimaryToRecovery\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"networkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"skipTestFailoverCleanup\": \"True\",\r\n \"providerSpecificDetails\": [\r\n {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"vaultLocation\": \"West US\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "457" + ], + "x-ms-client-request-id": [ + "227f7e15-f4ec-4869-8284-51098a4ef430" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:36:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67", + "227f7e15-f4ec-4869-8284-51098a4ef430 5/13/2017 2:36:26 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "227f7e15-f4ec-4869-8284-51098a4ef430" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "1f12b83b-6508-4015-a622-3c0e63db47ad" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T143626Z:1f12b83b-6508-4015-a622-3c0e63db47ad" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2UwNTk0OTY5LWNlMGMtNDEyZS05NGIyLTZjYWZhMDE5NmU2Nz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"name\": \"315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"properties\": {\r\n \"activityId\": \"227f7e15-f4ec-4869-8284-51098a4ef430 ActivityId: 1f12b83b-6508-4015-a622-3c0e63db47ad\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bcc99dc2-c001-4d55-8f17-0254e6b6000c\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:36:28.9250842Z\",\r\n \"endTime\": \"2017-05-13T14:36:32.5411475Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f0d959cf-24fe-49b3-82be-f7d60d21ca7e\",\r\n \"name\": \"RpTfoNetworkCreation\",\r\n \"startTime\": \"2017-05-13T14:36:32.8386095Z\",\r\n \"endTime\": \"2017-05-13T14:36:33.386577Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the test environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df6eef0f-df62-4a17-b67d-1f465015db90\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c6f95fdd-036f-4a3b-8442-2d66b16170fb\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"88af60e2-b5e3-4e32-9f35-6be3672cf610\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"63e455f7-0600-41c9-8ec8-26552326410f\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:36:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "de60371a-c9b0-4336-9dcb-8c451f732006" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14956" + ], + "x-ms-correlation-request-id": [ + "fa1d0b52-a57d-4823-ae68-bbb39bf651f2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T143657Z:fa1d0b52-a57d-4823-ae68-bbb39bf651f2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2UwNTk0OTY5LWNlMGMtNDEyZS05NGIyLTZjYWZhMDE5NmU2Nz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"name\": \"315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"properties\": {\r\n \"activityId\": \"227f7e15-f4ec-4869-8284-51098a4ef430 ActivityId: 1f12b83b-6508-4015-a622-3c0e63db47ad\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bcc99dc2-c001-4d55-8f17-0254e6b6000c\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:36:28.9250842Z\",\r\n \"endTime\": \"2017-05-13T14:36:32.5411475Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f0d959cf-24fe-49b3-82be-f7d60d21ca7e\",\r\n \"name\": \"RpTfoNetworkCreation\",\r\n \"startTime\": \"2017-05-13T14:36:32.8386095Z\",\r\n \"endTime\": \"2017-05-13T14:36:33.386577Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the test environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df6eef0f-df62-4a17-b67d-1f465015db90\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c6f95fdd-036f-4a3b-8442-2d66b16170fb\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"88af60e2-b5e3-4e32-9f35-6be3672cf610\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"63e455f7-0600-41c9-8ec8-26552326410f\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:37:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2a7748ad-6c92-481b-aa9d-3f61b73f1501" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14936" + ], + "x-ms-correlation-request-id": [ + "5877d0ba-abdc-49e3-b86f-243299173cf9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T143728Z:5877d0ba-abdc-49e3-b86f-243299173cf9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2UwNTk0OTY5LWNlMGMtNDEyZS05NGIyLTZjYWZhMDE5NmU2Nz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"name\": \"315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"properties\": {\r\n \"activityId\": \"227f7e15-f4ec-4869-8284-51098a4ef430 ActivityId: 1f12b83b-6508-4015-a622-3c0e63db47ad\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bcc99dc2-c001-4d55-8f17-0254e6b6000c\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:36:28.9250842Z\",\r\n \"endTime\": \"2017-05-13T14:36:32.5411475Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f0d959cf-24fe-49b3-82be-f7d60d21ca7e\",\r\n \"name\": \"RpTfoNetworkCreation\",\r\n \"startTime\": \"2017-05-13T14:36:32.8386095Z\",\r\n \"endTime\": \"2017-05-13T14:36:33.386577Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the test environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5792333Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df6eef0f-df62-4a17-b67d-1f465015db90\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5359308Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c6f95fdd-036f-4a3b-8442-2d66b16170fb\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"88af60e2-b5e3-4e32-9f35-6be3672cf610\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/7fcf071d-aad3-429e-9105-2526f14fe70d\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"63e455f7-0600-41c9-8ec8-26552326410f\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:38:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b1a0e71e-2406-4e41-8c62-ebf4383b70b0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14924" + ], + "x-ms-correlation-request-id": [ + "fca25c47-b13a-4f75-9574-c2c1c76327f6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T143801Z:fca25c47-b13a-4f75-9574-c2c1c76327f6" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2UwNTk0OTY5LWNlMGMtNDEyZS05NGIyLTZjYWZhMDE5NmU2Nz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"name\": \"315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"properties\": {\r\n \"activityId\": \"227f7e15-f4ec-4869-8284-51098a4ef430 ActivityId: 1f12b83b-6508-4015-a622-3c0e63db47ad\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bcc99dc2-c001-4d55-8f17-0254e6b6000c\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:36:28.9250842Z\",\r\n \"endTime\": \"2017-05-13T14:36:32.5411475Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f0d959cf-24fe-49b3-82be-f7d60d21ca7e\",\r\n \"name\": \"RpTfoNetworkCreation\",\r\n \"startTime\": \"2017-05-13T14:36:32.8386095Z\",\r\n \"endTime\": \"2017-05-13T14:36:33.386577Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the test environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5792333Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df6eef0f-df62-4a17-b67d-1f465015db90\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5359308Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c6f95fdd-036f-4a3b-8442-2d66b16170fb\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"88af60e2-b5e3-4e32-9f35-6be3672cf610\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/7fcf071d-aad3-429e-9105-2526f14fe70d\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"63e455f7-0600-41c9-8ec8-26552326410f\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:38:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "709f4584-d65c-4946-b7f2-873e34aeb2b6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14917" + ], + "x-ms-correlation-request-id": [ + "b76f4443-d49f-4cd0-976c-322847cdc5d6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T143832Z:b76f4443-d49f-4cd0-976c-322847cdc5d6" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2UwNTk0OTY5LWNlMGMtNDEyZS05NGIyLTZjYWZhMDE5NmU2Nz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"name\": \"315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"properties\": {\r\n \"activityId\": \"227f7e15-f4ec-4869-8284-51098a4ef430 ActivityId: 1f12b83b-6508-4015-a622-3c0e63db47ad\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bcc99dc2-c001-4d55-8f17-0254e6b6000c\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:36:28.9250842Z\",\r\n \"endTime\": \"2017-05-13T14:36:32.5411475Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f0d959cf-24fe-49b3-82be-f7d60d21ca7e\",\r\n \"name\": \"RpTfoNetworkCreation\",\r\n \"startTime\": \"2017-05-13T14:36:32.8386095Z\",\r\n \"endTime\": \"2017-05-13T14:36:33.386577Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the test environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5792333Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df6eef0f-df62-4a17-b67d-1f465015db90\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5359308Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c6f95fdd-036f-4a3b-8442-2d66b16170fb\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"88af60e2-b5e3-4e32-9f35-6be3672cf610\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/7fcf071d-aad3-429e-9105-2526f14fe70d\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"63e455f7-0600-41c9-8ec8-26552326410f\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:39:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "32e8fa99-27fb-4272-8fc5-4b57f72082da" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14908" + ], + "x-ms-correlation-request-id": [ + "e032bc28-fe12-410f-98fd-5ca1eecf007d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T143902Z:e032bc28-fe12-410f-98fd-5ca1eecf007d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2UwNTk0OTY5LWNlMGMtNDEyZS05NGIyLTZjYWZhMDE5NmU2Nz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"name\": \"315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"properties\": {\r\n \"activityId\": \"227f7e15-f4ec-4869-8284-51098a4ef430 ActivityId: 1f12b83b-6508-4015-a622-3c0e63db47ad\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bcc99dc2-c001-4d55-8f17-0254e6b6000c\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:36:28.9250842Z\",\r\n \"endTime\": \"2017-05-13T14:36:32.5411475Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f0d959cf-24fe-49b3-82be-f7d60d21ca7e\",\r\n \"name\": \"RpTfoNetworkCreation\",\r\n \"startTime\": \"2017-05-13T14:36:32.8386095Z\",\r\n \"endTime\": \"2017-05-13T14:36:33.386577Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the test environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5792333Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df6eef0f-df62-4a17-b67d-1f465015db90\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5359308Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c6f95fdd-036f-4a3b-8442-2d66b16170fb\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"88af60e2-b5e3-4e32-9f35-6be3672cf610\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/7fcf071d-aad3-429e-9105-2526f14fe70d\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"63e455f7-0600-41c9-8ec8-26552326410f\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:39:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "046adb42-e982-4936-b25c-6eba06fdd498" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14904" + ], + "x-ms-correlation-request-id": [ + "f2f8f39f-8f4a-4476-a6df-ab4eaabd72b8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T143933Z:f2f8f39f-8f4a-4476-a6df-ab4eaabd72b8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/e0594969-ce0c-412e-94b2-6cafa0196e67?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2UwNTk0OTY5LWNlMGMtNDEyZS05NGIyLTZjYWZhMDE5NmU2Nz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"name\": \"315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"properties\": {\r\n \"activityId\": \"227f7e15-f4ec-4869-8284-51098a4ef430 ActivityId: 1f12b83b-6508-4015-a622-3c0e63db47ad\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"bcc99dc2-c001-4d55-8f17-0254e6b6000c\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:36:28.9250842Z\",\r\n \"endTime\": \"2017-05-13T14:36:32.5411475Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f0d959cf-24fe-49b3-82be-f7d60d21ca7e\",\r\n \"name\": \"RpTfoNetworkCreation\",\r\n \"startTime\": \"2017-05-13T14:36:32.8386095Z\",\r\n \"endTime\": \"2017-05-13T14:36:33.386577Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the test environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5792333Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"df6eef0f-df62-4a17-b67d-1f465015db90\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:36:33.5897258Z\",\r\n \"endTime\": \"2017-05-13T14:37:44.5359308Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/c6f95fdd-036f-4a3b-8442-2d66b16170fb\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"2017-05-13T14:39:56.9833673Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"88af60e2-b5e3-4e32-9f35-6be3672cf610\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:37:45.0323658Z\",\r\n \"endTime\": \"2017-05-13T14:39:56.9364442Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/7fcf071d-aad3-429e-9105-2526f14fe70d\",\r\n \"jobFriendlyName\": \"Test failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"63e455f7-0600-41c9-8ec8-26552326410f\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"2017-05-13T14:39:57.3895879Z\",\r\n \"endTime\": \"2017-05-13T14:39:58.4520855Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"endTime\": \"2017-05-13T14:39:57Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [\r\n {\r\n \"name\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"friendlyName\": \"vm1\",\r\n \"testVmName\": \"vm1-test\",\r\n \"testVmFriendlyName\": \"vm1-test\",\r\n \"networkConnectionStatus\": \"Connected\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"subnet\": \"Subnet1\"\r\n }\r\n ],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:36:28.1970111Z\",\r\n \"endTime\": \"2017-05-13T14:39:57Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:40:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "25ce8085-cbc8-435a-aeec-46258e7673c5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14891" + ], + "x-ms-correlation-request-id": [ + "b489fb23-eb66-4edb-97e2-9504798a7720" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144004Z:b489fb23-eb66-4edb-97e2-9504798a7720" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0d4f89e8-f135-4a05-a66a-79fcdae3de50" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"TestFailoverCleanup\"\r\n ],\r\n \"lastTestFailoverTime\": \"2017-05-13T14:36:28.4407195Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"TestFailover\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/315635dd-1ac0-474e-9fc2-a5e77465cb14\",\r\n \"startTime\": \"2017-05-13T14:36:32.6661592Z\"\r\n },\r\n \"currentScenarioStatus\": \"Suspended\",\r\n \"currentScenarioStatusDescription\": \"WaitingForStopTestFailover\",\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:40:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0d4f89e8-f135-4a05-a66a-79fcdae3de50 5/13/2017 2:40:10 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "0d4f89e8-f135-4a05-a66a-79fcdae3de50" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14889" + ], + "x-ms-correlation-request-id": [ + "679697f0-7116-410c-bc56-bda40e5336e6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144010Z:679697f0-7116-410c-bc56-bda40e5336e6" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPTestFailoverCleanup.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPTestFailoverCleanup.json new file mode 100644 index 000000000000..fa2db2d23011 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPTestFailoverCleanup.json @@ -0,0 +1,608 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/testFailoverCleanup?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDEvdGVzdEZhaWxvdmVyQ2xlYW51cD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"comments\": \"Cleaning up\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "59" + ], + "x-ms-client-request-id": [ + "02709c23-c58b-4881-821b-2facc6a772ea" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:46:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6", + "02709c23-c58b-4881-821b-2facc6a772ea 5/13/2017 2:46:53 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "02709c23-c58b-4881-821b-2facc6a772ea" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "a5511f6a-c662-4ca0-8e4e-65fb30450c08" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144653Z:a5511f6a-c662-4ca0-8e4e-65fb30450c08" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhiMGY4Zjg2LWZhMDUtNDhiZC1iMGYwLTg5YmUxNzkzNDJiNj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"name\": \"3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"properties\": {\r\n \"activityId\": \"02709c23-c58b-4881-821b-2facc6a772ea ActivityId: a5511f6a-c662-4ca0-8e4e-65fb30450c08\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"906cadf4-59df-4433-9a92-053b5c76dc52\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:46:55.6906188Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f486f2b9-5c81-4dc1-a9fe-b8162ef1d88f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Test failover cleanup (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"TestFailoverCleanupGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"4b0569cb-2e52-4fdf-a168-cd9dadd1696c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"1df90e92-e162-45d2-96fb-45fb723d4ee7\",\r\n \"name\": \"RpTfoDeleteTestNetwork\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test environment\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"563ca63b-a770-40cf-a716-62b4fb45e040\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:47:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a6992491-8b34-4a1e-b833-cbb75ce9286e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14435" + ], + "x-ms-correlation-request-id": [ + "c1643129-4c9a-4483-9075-6158a9049f24" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144723Z:c1643129-4c9a-4483-9075-6158a9049f24" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhiMGY4Zjg2LWZhMDUtNDhiZC1iMGYwLTg5YmUxNzkzNDJiNj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"name\": \"3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"properties\": {\r\n \"activityId\": \"02709c23-c58b-4881-821b-2facc6a772ea ActivityId: a5511f6a-c662-4ca0-8e4e-65fb30450c08\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"906cadf4-59df-4433-9a92-053b5c76dc52\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:46:55.6906188Z\",\r\n \"endTime\": \"2017-05-13T14:47:26.3762555Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f486f2b9-5c81-4dc1-a9fe-b8162ef1d88f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Test failover cleanup (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"TestFailoverCleanupGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"4b0569cb-2e52-4fdf-a168-cd9dadd1696c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d0fea0b0-737f-4e34-8bf1-03340a00f384\",\r\n \"jobFriendlyName\": \"Test failover cleanup\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailoverCleanup\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"1df90e92-e162-45d2-96fb-45fb723d4ee7\",\r\n \"name\": \"RpTfoDeleteTestNetwork\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test environment\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"563ca63b-a770-40cf-a716-62b4fb45e040\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:47:53 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "27907bb7-62c2-4495-a933-eaaac90f441a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14426" + ], + "x-ms-correlation-request-id": [ + "ec4144a8-e5a2-4b61-baa8-24a6fe1ed9e9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144754Z:ec4144a8-e5a2-4b61-baa8-24a6fe1ed9e9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhiMGY4Zjg2LWZhMDUtNDhiZC1iMGYwLTg5YmUxNzkzNDJiNj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"name\": \"3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"properties\": {\r\n \"activityId\": \"02709c23-c58b-4881-821b-2facc6a772ea ActivityId: a5511f6a-c662-4ca0-8e4e-65fb30450c08\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"906cadf4-59df-4433-9a92-053b5c76dc52\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:46:55.6906188Z\",\r\n \"endTime\": \"2017-05-13T14:47:26.3762555Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f486f2b9-5c81-4dc1-a9fe-b8162ef1d88f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Test failover cleanup (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"TestFailoverCleanupGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"4b0569cb-2e52-4fdf-a168-cd9dadd1696c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d0fea0b0-737f-4e34-8bf1-03340a00f384\",\r\n \"jobFriendlyName\": \"Test failover cleanup\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailoverCleanup\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"1df90e92-e162-45d2-96fb-45fb723d4ee7\",\r\n \"name\": \"RpTfoDeleteTestNetwork\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test environment\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"563ca63b-a770-40cf-a716-62b4fb45e040\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:48:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9d2b93f4-c5a6-4265-a22a-6090c50c157a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14417" + ], + "x-ms-correlation-request-id": [ + "97dd89f5-0169-4b0f-8b49-98060edfe72f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144824Z:97dd89f5-0169-4b0f-8b49-98060edfe72f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhiMGY4Zjg2LWZhMDUtNDhiZC1iMGYwLTg5YmUxNzkzNDJiNj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"name\": \"3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"properties\": {\r\n \"activityId\": \"02709c23-c58b-4881-821b-2facc6a772ea ActivityId: a5511f6a-c662-4ca0-8e4e-65fb30450c08\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"906cadf4-59df-4433-9a92-053b5c76dc52\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:46:55.6906188Z\",\r\n \"endTime\": \"2017-05-13T14:47:26.3762555Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f486f2b9-5c81-4dc1-a9fe-b8162ef1d88f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Test failover cleanup (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"TestFailoverCleanupGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"4b0569cb-2e52-4fdf-a168-cd9dadd1696c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d0fea0b0-737f-4e34-8bf1-03340a00f384\",\r\n \"jobFriendlyName\": \"Test failover cleanup\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailoverCleanup\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"1df90e92-e162-45d2-96fb-45fb723d4ee7\",\r\n \"name\": \"RpTfoDeleteTestNetwork\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test environment\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"563ca63b-a770-40cf-a716-62b4fb45e040\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:48:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "2e0bf672-bd7c-42be-9763-7bc133f2489f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14410" + ], + "x-ms-correlation-request-id": [ + "76acb51c-e233-4838-8071-83140bc0a76f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144855Z:76acb51c-e233-4838-8071-83140bc0a76f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhiMGY4Zjg2LWZhMDUtNDhiZC1iMGYwLTg5YmUxNzkzNDJiNj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"name\": \"3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"properties\": {\r\n \"activityId\": \"02709c23-c58b-4881-821b-2facc6a772ea ActivityId: a5511f6a-c662-4ca0-8e4e-65fb30450c08\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"906cadf4-59df-4433-9a92-053b5c76dc52\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:46:55.6906188Z\",\r\n \"endTime\": \"2017-05-13T14:47:26.3762555Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f486f2b9-5c81-4dc1-a9fe-b8162ef1d88f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Test failover cleanup (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"TestFailoverCleanupGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"4b0569cb-2e52-4fdf-a168-cd9dadd1696c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d0fea0b0-737f-4e34-8bf1-03340a00f384\",\r\n \"jobFriendlyName\": \"Test failover cleanup\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailoverCleanup\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"1df90e92-e162-45d2-96fb-45fb723d4ee7\",\r\n \"name\": \"RpTfoDeleteTestNetwork\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test environment\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"563ca63b-a770-40cf-a716-62b4fb45e040\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:49:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "6880ed0a-46ce-49a9-a4fc-109689b380bd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14403" + ], + "x-ms-correlation-request-id": [ + "5fc57e80-538d-417c-930f-ddfd6538e1a2" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144926Z:5fc57e80-538d-417c-930f-ddfd6538e1a2" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhiMGY4Zjg2LWZhMDUtNDhiZC1iMGYwLTg5YmUxNzkzNDJiNj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"name\": \"3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"properties\": {\r\n \"activityId\": \"02709c23-c58b-4881-821b-2facc6a772ea ActivityId: a5511f6a-c662-4ca0-8e4e-65fb30450c08\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"906cadf4-59df-4433-9a92-053b5c76dc52\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:46:55.6906188Z\",\r\n \"endTime\": \"2017-05-13T14:47:26.3762555Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f486f2b9-5c81-4dc1-a9fe-b8162ef1d88f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Test failover cleanup (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"TestFailoverCleanupGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"4b0569cb-2e52-4fdf-a168-cd9dadd1696c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d0fea0b0-737f-4e34-8bf1-03340a00f384\",\r\n \"jobFriendlyName\": \"Test failover cleanup\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailoverCleanup\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"1df90e92-e162-45d2-96fb-45fb723d4ee7\",\r\n \"name\": \"RpTfoDeleteTestNetwork\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test environment\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"563ca63b-a770-40cf-a716-62b4fb45e040\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:49:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "671e835d-219f-4f98-8762-9d625ea7cea4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14397" + ], + "x-ms-correlation-request-id": [ + "9d9f1faa-fced-417f-81ee-016c5b10aa5a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T144957Z:9d9f1faa-fced-417f-81ee-016c5b10aa5a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/8b0f8f86-fa05-48bd-b0f0-89be179342b6?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzhiMGY4Zjg2LWZhMDUtNDhiZC1iMGYwLTg5YmUxNzkzNDJiNj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"name\": \"3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"properties\": {\r\n \"activityId\": \"02709c23-c58b-4881-821b-2facc6a772ea ActivityId: a5511f6a-c662-4ca0-8e4e-65fb30450c08\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"906cadf4-59df-4433-9a92-053b5c76dc52\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T14:46:55.6906188Z\",\r\n \"endTime\": \"2017-05-13T14:47:26.3762555Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"f486f2b9-5c81-4dc1-a9fe-b8162ef1d88f\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"2017-05-13T14:50:06.7303788Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Test failover cleanup (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"TestFailoverCleanupGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"4b0569cb-2e52-4fdf-a168-cd9dadd1696c\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T14:47:26.4543628Z\",\r\n \"endTime\": \"2017-05-13T14:50:06.7197498Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/d0fea0b0-737f-4e34-8bf1-03340a00f384\",\r\n \"jobFriendlyName\": \"Test failover cleanup\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"TestFailoverCleanup\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"1df90e92-e162-45d2-96fb-45fb723d4ee7\",\r\n \"name\": \"RpTfoDeleteTestNetwork\",\r\n \"startTime\": \"2017-05-13T14:50:06.9357986Z\",\r\n \"endTime\": \"2017-05-13T14:50:07.8114633Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"563ca63b-a770-40cf-a716-62b4fb45e040\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"2017-05-13T14:50:08.0902141Z\",\r\n \"endTime\": \"2017-05-13T14:50:08.2803026Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"endTime\": \"2017-05-13T14:50:07Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:46:54.9562446Z\",\r\n \"endTime\": \"2017-05-13T14:50:07Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:50:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "6303dce2-7d64-4f78-baad-19a371b02a42" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14379" + ], + "x-ms-correlation-request-id": [ + "b751f73d-c506-4de4-bc7d-44977a6324af" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T145029Z:b751f73d-c506-4de4-bc7d-44977a6324af" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bf168d5b-c6f9-4e25-8a17-ffcb0bfa8d7f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\"\r\n ],\r\n \"lastTestFailoverTime\": \"2017-05-13T14:36:28.4407195Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/3f7a5ab0-d562-4acb-878a-4514844255e1\",\r\n \"startTime\": \"2017-05-13T14:46:55.9250119Z\"\r\n },\r\n \"currentScenarioStatus\": \"Succeeded\",\r\n \"currentScenarioStatusDescription\": \"Completed\",\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:51:28 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "bf168d5b-c6f9-4e25-8a17-ffcb0bfa8d7f 5/13/2017 2:51:29 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "bf168d5b-c6f9-4e25-8a17-ffcb0bfa8d7f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14362" + ], + "x-ms-correlation-request-id": [ + "e75618ab-886a-400e-891b-0261a109014f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T145129Z:e75618ab-886a-400e-891b-0261a109014f" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPUnplannedFailover.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPUnplannedFailover.json new file mode 100644 index 000000000000..af290ec1bfed --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RPUnplannedFailover.json @@ -0,0 +1,608 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/unplannedFailover?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDEvdW5wbGFubmVkRmFpbG92ZXI/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"failoverDirection\": \"PrimaryToRecovery\",\r\n \"sourceSiteOperations\": \"NotRequired\",\r\n \"providerSpecificDetails\": [\r\n {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"vaultLocation\": \"West US\"\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "261" + ], + "x-ms-client-request-id": [ + "6ffb7fc8-8b34-45ee-a9b9-df73754c31b0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:05:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481", + "6ffb7fc8-8b34-45ee-a9b9-df73754c31b0 5/13/2017 6:05:44 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "6ffb7fc8-8b34-45ee-a9b9-df73754c31b0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "cc24a43e-a0e3-4f10-ac68-25718c094545" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180544Z:cc24a43e-a0e3-4f10-ac68-25718c094545" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkNWIwMjY0LTdjZjEtNDQ3Ni05MzZlLTAzNTJlZDAzMjQ4MT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"name\": \"1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"properties\": {\r\n \"activityId\": \"6ffb7fc8-8b34-45ee-a9b9-df73754c31b0 ActivityId: cc24a43e-a0e3-4f10-ac68-25718c094545\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"629e5ffe-9365-473e-a66a-43f4390fb984\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T18:05:47.6008035Z\",\r\n \"endTime\": \"2017-05-13T18:05:52.677206Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"b73181f5-1d9c-4613-97ce-ac2263976c80\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T18:05:52.7709422Z\",\r\n \"endTime\": \"2017-05-13T18:05:54.0694669Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"af29e4a4-ff52-4265-a16b-45bf902e302e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/07cf6e6d-f31b-4ebd-92b5-d457b5ce944c\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"c1d19f3a-ebde-484f-ab75-6a8b860feb62\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"88085fd9-113c-4539-a22b-61211da9645d\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:06:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5277d915-7d7b-4a43-bca8-4154b52127b1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14083" + ], + "x-ms-correlation-request-id": [ + "02a5b292-153e-4893-af2d-b60b12e111d7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180615Z:02a5b292-153e-4893-af2d-b60b12e111d7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkNWIwMjY0LTdjZjEtNDQ3Ni05MzZlLTAzNTJlZDAzMjQ4MT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"name\": \"1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"properties\": {\r\n \"activityId\": \"6ffb7fc8-8b34-45ee-a9b9-df73754c31b0 ActivityId: cc24a43e-a0e3-4f10-ac68-25718c094545\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"629e5ffe-9365-473e-a66a-43f4390fb984\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T18:05:47.6008035Z\",\r\n \"endTime\": \"2017-05-13T18:05:52.677206Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"b73181f5-1d9c-4613-97ce-ac2263976c80\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T18:05:52.7709422Z\",\r\n \"endTime\": \"2017-05-13T18:05:54.0694669Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"af29e4a4-ff52-4265-a16b-45bf902e302e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/07cf6e6d-f31b-4ebd-92b5-d457b5ce944c\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"c1d19f3a-ebde-484f-ab75-6a8b860feb62\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/\",\r\n \"jobFriendlyName\": \"Unknown\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"Unknown\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"88085fd9-113c-4539-a22b-61211da9645d\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:06:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "acf7f10c-df79-449f-b804-565c123d1ac9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14072" + ], + "x-ms-correlation-request-id": [ + "2e9401cf-c413-47ce-9c4b-40ce448f4353" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180645Z:2e9401cf-c413-47ce-9c4b-40ce448f4353" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkNWIwMjY0LTdjZjEtNDQ3Ni05MzZlLTAzNTJlZDAzMjQ4MT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"name\": \"1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"properties\": {\r\n \"activityId\": \"6ffb7fc8-8b34-45ee-a9b9-df73754c31b0 ActivityId: cc24a43e-a0e3-4f10-ac68-25718c094545\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"629e5ffe-9365-473e-a66a-43f4390fb984\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T18:05:47.6008035Z\",\r\n \"endTime\": \"2017-05-13T18:05:52.677206Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"b73181f5-1d9c-4613-97ce-ac2263976c80\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T18:05:52.7709422Z\",\r\n \"endTime\": \"2017-05-13T18:05:54.0694669Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7590169Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"af29e4a4-ff52-4265-a16b-45bf902e302e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7277598Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/07cf6e6d-f31b-4ebd-92b5-d457b5ce944c\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"c1d19f3a-ebde-484f-ab75-6a8b860feb62\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f1e83365-6c9f-4511-994c-87460a349494\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"88085fd9-113c-4539-a22b-61211da9645d\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:07:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "80c00394-9b86-40d0-bd25-ca7e44da8be0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14058" + ], + "x-ms-correlation-request-id": [ + "380cdc86-d4d8-404e-a098-e5abde4c8a1f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180716Z:380cdc86-d4d8-404e-a098-e5abde4c8a1f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkNWIwMjY0LTdjZjEtNDQ3Ni05MzZlLTAzNTJlZDAzMjQ4MT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"name\": \"1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"properties\": {\r\n \"activityId\": \"6ffb7fc8-8b34-45ee-a9b9-df73754c31b0 ActivityId: cc24a43e-a0e3-4f10-ac68-25718c094545\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"629e5ffe-9365-473e-a66a-43f4390fb984\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T18:05:47.6008035Z\",\r\n \"endTime\": \"2017-05-13T18:05:52.677206Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"b73181f5-1d9c-4613-97ce-ac2263976c80\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T18:05:52.7709422Z\",\r\n \"endTime\": \"2017-05-13T18:05:54.0694669Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7590169Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"af29e4a4-ff52-4265-a16b-45bf902e302e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7277598Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/07cf6e6d-f31b-4ebd-92b5-d457b5ce944c\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"c1d19f3a-ebde-484f-ab75-6a8b860feb62\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f1e83365-6c9f-4511-994c-87460a349494\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"88085fd9-113c-4539-a22b-61211da9645d\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:07:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b6512903-f39c-4792-a9b2-72f31fe9c969" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14040" + ], + "x-ms-correlation-request-id": [ + "eb15b3c6-c279-4007-9bcf-416a6199a877" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180747Z:eb15b3c6-c279-4007-9bcf-416a6199a877" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkNWIwMjY0LTdjZjEtNDQ3Ni05MzZlLTAzNTJlZDAzMjQ4MT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"name\": \"1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"properties\": {\r\n \"activityId\": \"6ffb7fc8-8b34-45ee-a9b9-df73754c31b0 ActivityId: cc24a43e-a0e3-4f10-ac68-25718c094545\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"629e5ffe-9365-473e-a66a-43f4390fb984\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T18:05:47.6008035Z\",\r\n \"endTime\": \"2017-05-13T18:05:52.677206Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"b73181f5-1d9c-4613-97ce-ac2263976c80\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T18:05:52.7709422Z\",\r\n \"endTime\": \"2017-05-13T18:05:54.0694669Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7590169Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"af29e4a4-ff52-4265-a16b-45bf902e302e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7277598Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/07cf6e6d-f31b-4ebd-92b5-d457b5ce944c\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"c1d19f3a-ebde-484f-ab75-6a8b860feb62\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f1e83365-6c9f-4511-994c-87460a349494\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"88085fd9-113c-4539-a22b-61211da9645d\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:08:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "7b8d4afd-44ea-4ec5-8c55-a6b341566b26" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14030" + ], + "x-ms-correlation-request-id": [ + "1748fdf2-ce35-4884-8a99-1b80fe156eec" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180817Z:1748fdf2-ce35-4884-8a99-1b80fe156eec" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkNWIwMjY0LTdjZjEtNDQ3Ni05MzZlLTAzNTJlZDAzMjQ4MT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"name\": \"1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"properties\": {\r\n \"activityId\": \"6ffb7fc8-8b34-45ee-a9b9-df73754c31b0 ActivityId: cc24a43e-a0e3-4f10-ac68-25718c094545\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"629e5ffe-9365-473e-a66a-43f4390fb984\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T18:05:47.6008035Z\",\r\n \"endTime\": \"2017-05-13T18:05:52.677206Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"b73181f5-1d9c-4613-97ce-ac2263976c80\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T18:05:52.7709422Z\",\r\n \"endTime\": \"2017-05-13T18:05:54.0694669Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7590169Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"af29e4a4-ff52-4265-a16b-45bf902e302e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7277598Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/07cf6e6d-f31b-4ebd-92b5-d457b5ce944c\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"c1d19f3a-ebde-484f-ab75-6a8b860feb62\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f1e83365-6c9f-4511-994c-87460a349494\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"88085fd9-113c-4539-a22b-61211da9645d\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:08:47 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3e7d2a32-e60c-496b-8f9b-198496e1ba51" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14019" + ], + "x-ms-correlation-request-id": [ + "b63ba511-b1c7-4b9a-a72b-d95191893f40" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180848Z:b63ba511-b1c7-4b9a-a72b-d95191893f40" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d5b0264-7cf1-4476-936e-0352ed032481?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkNWIwMjY0LTdjZjEtNDQ3Ni05MzZlLTAzNTJlZDAzMjQ4MT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"name\": \"1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"properties\": {\r\n \"activityId\": \"6ffb7fc8-8b34-45ee-a9b9-df73754c31b0 ActivityId: cc24a43e-a0e3-4f10-ac68-25718c094545\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"629e5ffe-9365-473e-a66a-43f4390fb984\",\r\n \"name\": \"RpSrsPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T18:05:47.6008035Z\",\r\n \"endTime\": \"2017-05-13T18:05:52.677206Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"b73181f5-1d9c-4613-97ce-ac2263976c80\",\r\n \"name\": \"RpEnvironmentCreationTask\",\r\n \"startTime\": \"2017-05-13T18:05:52.7709422Z\",\r\n \"endTime\": \"2017-05-13T18:05:54.0694669Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Create the environment\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverAllActionGroup\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7590169Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Recovery plan failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"FailoverAllActionGroup\",\r\n \"groupId\": \"FailoverAllActionGroup\",\r\n \"rpGroupType\": \"RpFailoverTask\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"af29e4a4-ff52-4265-a16b-45bf902e302e\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:05:54.2554224Z\",\r\n \"endTime\": \"2017-05-13T18:07:03.7277598Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/07cf6e6d-f31b-4ebd-92b5-d457b5ce944c\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"Group1\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"2017-05-13T18:09:13.093107Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Group 1: Start (1)\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"name\": \"Group1\",\r\n \"groupId\": \"Group1\",\r\n \"rpGroupType\": \"BootGroup\",\r\n \"instanceType\": \"RecoveryPlanGroupTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"c1d19f3a-ebde-484f-ab75-6a8b860feb62\",\r\n \"name\": \"Unknown\",\r\n \"startTime\": \"2017-05-13T18:07:04.0558687Z\",\r\n \"endTime\": \"2017-05-13T18:09:13.0618543Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"vm1\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"VirtualMachineTaskDetails\",\r\n \"customDetails\": {\r\n \"skippedReason\": \"None\",\r\n \"skippedReasonString\": null,\r\n \"jobTask\": {\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/f1e83365-6c9f-4511-994c-87460a349494\",\r\n \"jobFriendlyName\": \"Failover\",\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"Vm\",\r\n \"jobScenarioName\": \"UnplannedFailover\"\r\n },\r\n \"instanceType\": \"VirtualMachineTaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"88085fd9-113c-4539-a22b-61211da9645d\",\r\n \"name\": \"EndRecoveryPlanTask\",\r\n \"startTime\": \"2017-05-13T18:09:13.3512019Z\",\r\n \"endTime\": \"2017-05-13T18:09:13.5699605Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Finalizing the recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"endTime\": \"2017-05-13T18:09:13Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"bc06a2b0-c8b0-47ae-af1c-0dae26a8b61e\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T18:05:47.0820086Z\",\r\n \"endTime\": \"2017-05-13T18:09:13Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:09:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8f5a1c96-00b7-4375-b30e-7dfe4c4130cf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14013" + ], + "x-ms-correlation-request-id": [ + "53263c18-e0cc-42a6-82e0-62e0dc1cd0e7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180918Z:53263c18-e0cc-42a6-82e0-62e0dc1cd0e7" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "550d3f8c-0b37-4961-9a07-08b8551c2311" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\",\r\n \"Commit\"\r\n ],\r\n \"lastPlannedFailoverTime\": \"2017-05-13T17:49:23.8812431Z\",\r\n \"lastTestFailoverTime\": \"2017-05-13T14:36:28.4407195Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/1b8fb560-633e-4329-83fd-c8ee9cda0fd8\",\r\n \"startTime\": \"2017-05-13T18:05:52.677206Z\"\r\n },\r\n \"currentScenarioStatus\": \"Succeeded\",\r\n \"currentScenarioStatusDescription\": \"Completed\",\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"virtualMachineId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 18:09:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "550d3f8c-0b37-4961-9a07-08b8551c2311 5/13/2017 6:09:19 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "550d3f8c-0b37-4961-9a07-08b8551c2311" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14012" + ], + "x-ms-correlation-request-id": [ + "568353e6-add6-40c5-b8d6-a94b8faf9662" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T180919Z:568353e6-add6-40c5-b8d6-a94b8faf9662" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RefreshRsp.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RefreshRsp.json new file mode 100644 index 000000000000..0412fbdc30c3 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RefreshRsp.json @@ -0,0 +1,412 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9bade4ff-1a6b-41eb-a0b5-2f4f3ae81d77" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:46:22 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9bade4ff-1a6b-41eb-a0b5-2f4f3ae81d77 5/11/2017 5:46:23 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9bade4ff-1a6b-41eb-a0b5-2f4f3ae81d77" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13863" + ], + "x-ms-correlation-request-id": [ + "82d80f7a-6d57-4f9a-9359-7d96532bbc2a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174623Z:82d80f7a-6d57-4f9a-9359-7d96532bbc2a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998/refreshProvider?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblJlY292ZXJ5U2VydmljZXNQcm92aWRlcnMvYmEyYTJkMjUtMzc3Zi00ZjRiLTk0YTQtMjk4MWM3OWIwOTk4L3JlZnJlc2hQcm92aWRlcj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2b2e0012-db10-416a-a888-002d3d744462" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:46:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998/operationresults/2d9589c9-d300-4291-90ef-c804137843c0?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "2b2e0012-db10-416a-a888-002d3d744462 5/11/2017 5:46:24 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "2b2e0012-db10-416a-a888-002d3d744462" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "508050c2-4f08-46aa-8431-71b2af4b511a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174624Z:508050c2-4f08-46aa-8431-71b2af4b511a" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkOTU4OWM5LWQzMDAtNDI5MS05MGVmLWM4MDQxMzc4NDNjMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0\",\r\n \"name\": \"2d9589c9-d300-4291-90ef-c804137843c0\",\r\n \"properties\": {\r\n \"activityId\": \"2b2e0012-db10-416a-a888-002d3d744462 ActivityId: 508050c2-4f08-46aa-8431-71b2af4b511a\",\r\n \"scenarioName\": \"RefreshFabricLayout\",\r\n \"friendlyName\": \"Refresh server details\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"RefreshFabricLayoutTask\",\r\n \"name\": \"RefreshFabricLayoutTask\",\r\n \"startTime\": \"2017-05-11T17:46:25.9880883Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Getting details from server\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"WaitForLayoutProcessingTask\",\r\n \"name\": \"WaitForLayoutProcessingTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Processing details\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-11T17:46:24.7083123Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"targetObjectName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-11T17:46:24.7083123Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:46:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "fd90a3e9-7265-4dd0-b690-148c58daf8e6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13855" + ], + "x-ms-correlation-request-id": [ + "9bd0a66b-33cc-4c27-85ff-c4547774e5b0" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174655Z:9bd0a66b-33cc-4c27-85ff-c4547774e5b0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkOTU4OWM5LWQzMDAtNDI5MS05MGVmLWM4MDQxMzc4NDNjMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0\",\r\n \"name\": \"2d9589c9-d300-4291-90ef-c804137843c0\",\r\n \"properties\": {\r\n \"activityId\": \"2b2e0012-db10-416a-a888-002d3d744462 ActivityId: 508050c2-4f08-46aa-8431-71b2af4b511a\",\r\n \"scenarioName\": \"RefreshFabricLayout\",\r\n \"friendlyName\": \"Refresh server details\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"RefreshFabricLayoutTask\",\r\n \"name\": \"RefreshFabricLayoutTask\",\r\n \"startTime\": \"2017-05-11T17:46:25.9880883Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Getting details from server\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"WaitForLayoutProcessingTask\",\r\n \"name\": \"WaitForLayoutProcessingTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Processing details\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-11T17:46:24.7083123Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"targetObjectName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-11T17:46:24.7083123Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:47:26 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c2aae84f-9e7b-424a-8e5b-8bc4f795a6a7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13852" + ], + "x-ms-correlation-request-id": [ + "0a852155-a091-461c-a304-077292cccc40" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174726Z:0a852155-a091-461c-a304-077292cccc40" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzJkOTU4OWM5LWQzMDAtNDI5MS05MGVmLWM4MDQxMzc4NDNjMD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0\",\r\n \"name\": \"2d9589c9-d300-4291-90ef-c804137843c0\",\r\n \"properties\": {\r\n \"activityId\": \"2b2e0012-db10-416a-a888-002d3d744462 ActivityId: 508050c2-4f08-46aa-8431-71b2af4b511a\",\r\n \"scenarioName\": \"RefreshFabricLayout\",\r\n \"friendlyName\": \"Refresh server details\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"RefreshFabricLayoutTask\",\r\n \"name\": \"RefreshFabricLayoutTask\",\r\n \"startTime\": \"2017-05-11T17:46:25.9880883Z\",\r\n \"endTime\": \"2017-05-11T17:47:56.0114741Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Getting details from server\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"WaitForLayoutProcessingTask\",\r\n \"name\": \"WaitForLayoutProcessingTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Processing details\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-11T17:46:24.7083123Z\",\r\n \"endTime\": \"2017-05-11T17:47:55Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"targetObjectName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-11T17:46:24.7083123Z\",\r\n \"endTime\": \"2017-05-11T17:47:55Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:47:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/2d9589c9-d300-4291-90ef-c804137843c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f14421e7-3046-499e-9076-df55c43aaf23" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13843" + ], + "x-ms-correlation-request-id": [ + "1db012ba-8dab-472a-ba1f-3b58b0aa6ea9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174757Z:1db012ba-8dab-472a-ba1f-3b58b0aa6ea9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblJlY292ZXJ5U2VydmljZXNQcm92aWRlcnMvYmEyYTJkMjUtMzc3Zi00ZjRiLTk0YTQtMjk4MWM3OWIwOTk4P2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eb0e406d-a070-4907-b672-cb073912ee80" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationRecoveryServicesProviders\",\r\n \"name\": \"ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"properties\": {\r\n \"fabricType\": \"HyperVSite\",\r\n \"friendlyName\": \"CP-B3L40406-12.ntdev.corp.microsoft.com\",\r\n \"providerVersion\": \"5.1.2250.0\",\r\n \"serverVersion\": \"3.2.7510.0\",\r\n \"providerVersionState\": \"Latest\",\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"lastHeartBeat\": \"2017-05-11T17:47:55.9942917Z\",\r\n \"connectionStatus\": \"Connected\",\r\n \"protectedItemCount\": 0,\r\n \"allowedScenarios\": [\r\n \"Refresh\",\r\n \"Purge\"\r\n ],\r\n \"healthErrorDetails\": []\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:47:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "eb0e406d-a070-4907-b672-cb073912ee80 5/11/2017 5:47:58 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "eb0e406d-a070-4907-b672-cb073912ee80" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13842" + ], + "x-ms-correlation-request-id": [ + "4c61702d-0af1-4c09-bec1-7c2386904af7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T174758Z:4c61702d-0af1-4c09-bec1-7c2386904af7" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RenewCertificate.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RenewCertificate.json new file mode 100644 index 000000000000..7727370e082f --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RenewCertificate.json @@ -0,0 +1,347 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/renewCertificate?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZW5ld0NlcnRpZmljYXRlP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"renewCertificateType\": \"Cloud\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "65" + ], + "x-ms-client-request-id": [ + "e419cab4-1df6-4cf0-b87c-9e14fded0825" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:24:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/operationresults/39d9f663-6456-4983-997c-ed6e74b15e0e?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "e419cab4-1df6-4cf0-b87c-9e14fded0825 5/13/2017 7:24:07 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "e419cab4-1df6-4cf0-b87c-9e14fded0825" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "f164cc4e-1ff1-4f5f-a293-78808b8bf73b" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T192407Z:f164cc4e-1ff1-4f5f-a293-78808b8bf73b" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzM5ZDlmNjYzLTY0NTYtNDk4My05OTdjLWVkNmU3NGIxNWUwZT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e\",\r\n \"name\": \"39d9f663-6456-4983-997c-ed6e74b15e0e\",\r\n \"properties\": {\r\n \"activityId\": \"e419cab4-1df6-4cf0-b87c-9e14fded0825 ActivityId: f164cc4e-1ff1-4f5f-a293-78808b8bf73b\",\r\n \"scenarioName\": \"CertificateRenewal\",\r\n \"friendlyName\": \"Renewing certificates for servers or sites\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"371f87f9-53e5-429f-b10b-f14700a4b137\",\r\n \"name\": \"HvrAzureCertificateRenewalTask\",\r\n \"startTime\": \"2017-05-13T19:24:08.0235135Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing certificates for replication to Azure\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"InlineWorkflowTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"workflowIds\": [\r\n \"441f078c-c001-428a-81ce-8dabef5a82a4\"\r\n ],\r\n \"instanceType\": \"InlineWorkflowTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"HvrAzureCloudCertificateRenewalTask\",\r\n \"name\": \"HvrAzureCloudCertificateRenewalTask\",\r\n \"startTime\": \"2017-05-13T19:24:08.4597339Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing certificates for replication to Azure\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"HvrAzureHostCertificateRenewalTask\",\r\n \"name\": \"HvrAzureHostCertificateRenewalTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing virtual machine certificates for Hyper-V Replica Azure\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:24:07.1246831Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"targetObjectName\": \"SiteRecoveryTestSite1\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:24:07.1246831Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:24:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8afadac1-cd3d-42a1-a78b-a8f3c2d4dcfd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13957" + ], + "x-ms-correlation-request-id": [ + "e9d7f89e-6106-469e-8520-320d897a00f5" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T192437Z:e9d7f89e-6106-469e-8520-320d897a00f5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzM5ZDlmNjYzLTY0NTYtNDk4My05OTdjLWVkNmU3NGIxNWUwZT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e\",\r\n \"name\": \"39d9f663-6456-4983-997c-ed6e74b15e0e\",\r\n \"properties\": {\r\n \"activityId\": \"e419cab4-1df6-4cf0-b87c-9e14fded0825 ActivityId: f164cc4e-1ff1-4f5f-a293-78808b8bf73b\",\r\n \"scenarioName\": \"CertificateRenewal\",\r\n \"friendlyName\": \"Renewing certificates for servers or sites\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"371f87f9-53e5-429f-b10b-f14700a4b137\",\r\n \"name\": \"HvrAzureCertificateRenewalTask\",\r\n \"startTime\": \"2017-05-13T19:24:08.0235135Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing certificates for replication to Azure\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"InlineWorkflowTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"workflowIds\": [\r\n \"441f078c-c001-428a-81ce-8dabef5a82a4\"\r\n ],\r\n \"instanceType\": \"InlineWorkflowTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"HvrAzureCloudCertificateRenewalTask\",\r\n \"name\": \"HvrAzureCloudCertificateRenewalTask\",\r\n \"startTime\": \"2017-05-13T19:24:08.4597339Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing certificates for replication to Azure\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"HvrAzureHostCertificateRenewalTask\",\r\n \"name\": \"HvrAzureHostCertificateRenewalTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing virtual machine certificates for Hyper-V Replica Azure\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:24:07.1246831Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"targetObjectName\": \"SiteRecoveryTestSite1\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:24:07.1246831Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:25:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b814aab2-1080-4c09-913e-d949b9893eea" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14027" + ], + "x-ms-correlation-request-id": [ + "0d4e3752-70ef-4f40-86c4-f693e23663e8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T192508Z:0d4e3752-70ef-4f40-86c4-f693e23663e8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzM5ZDlmNjYzLTY0NTYtNDk4My05OTdjLWVkNmU3NGIxNWUwZT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e\",\r\n \"name\": \"39d9f663-6456-4983-997c-ed6e74b15e0e\",\r\n \"properties\": {\r\n \"activityId\": \"e419cab4-1df6-4cf0-b87c-9e14fded0825 ActivityId: f164cc4e-1ff1-4f5f-a293-78808b8bf73b\",\r\n \"scenarioName\": \"CertificateRenewal\",\r\n \"friendlyName\": \"Renewing certificates for servers or sites\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"371f87f9-53e5-429f-b10b-f14700a4b137\",\r\n \"name\": \"HvrAzureCertificateRenewalTask\",\r\n \"startTime\": \"2017-05-13T19:24:08.0235135Z\",\r\n \"endTime\": \"2017-05-13T19:25:30Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing certificates for replication to Azure\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"InlineWorkflowTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"workflowIds\": [\r\n \"441f078c-c001-428a-81ce-8dabef5a82a4\"\r\n ],\r\n \"instanceType\": \"InlineWorkflowTaskDetails\",\r\n \"childTasks\": [\r\n {\r\n \"taskId\": \"HvrAzureCloudCertificateRenewalTask\",\r\n \"name\": \"HvrAzureCloudCertificateRenewalTask\",\r\n \"startTime\": \"2017-05-13T19:24:08.4597339Z\",\r\n \"endTime\": \"2017-05-13T19:25:21.1085312Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing certificates for replication to Azure\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"HvrAzureHostCertificateRenewalTask\",\r\n \"name\": \"HvrAzureHostCertificateRenewalTask\",\r\n \"startTime\": \"2017-05-13T19:25:21.1085312Z\",\r\n \"endTime\": \"2017-05-13T19:25:31.186941Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Renewing virtual machine certificates for Hyper-V Replica Azure\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ]\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:24:07.1246831Z\",\r\n \"endTime\": \"2017-05-13T19:25:31Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"targetObjectName\": \"SiteRecoveryTestSite1\",\r\n \"targetInstanceType\": \"Server\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:24:07.1246831Z\",\r\n \"endTime\": \"2017-05-13T19:25:31Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:25:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/39d9f663-6456-4983-997c-ed6e74b15e0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "08772b13-f7ab-4526-99bc-2eef0e53971e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14016" + ], + "x-ms-correlation-request-id": [ + "a6179fcb-b992-4d42-b9da-02c53ae8ebb4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T192539Z:a6179fcb-b992-4d42-b9da-02c53ae8ebb4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cd3aa600-4bef-4b33-b55f-80eccff9f004" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:25:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "cd3aa600-4bef-4b33-b55f-80eccff9f004 5/13/2017 7:25:58 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "cd3aa600-4bef-4b33-b55f-80eccff9f004" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14008" + ], + "x-ms-correlation-request-id": [ + "aae3de62-c7e8-4eaf-b6b5-6235b159d809" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T192558Z:aae3de62-c7e8-4eaf-b6b5-6235b159d809" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RepairReplication.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RepairReplication.json new file mode 100644 index 000000000000..1121f2ad1a3c --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/RepairReplication.json @@ -0,0 +1,413 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "57bc3268-ae41-4f90-9df5-0a2078de88ca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:52:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "57bc3268-ae41-4f90-9df5-0a2078de88ca 5/13/2017 7:52:15 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "57bc3268-ae41-4f90-9df5-0a2078de88ca" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14012" + ], + "x-ms-correlation-request-id": [ + "164ae070-be49-4fd1-857d-8708963f3c82" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195215Z:164ae070-be49-4fd1-857d-8708963f3c82" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/repairReplication?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9yZXBhaXJSZXBsaWNhdGlvbj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5f41b39c-a82e-4497-9c98-1a86034a5d44" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:52:20 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/5c8174cc-7cb0-4701-a5e5-ea557899c99c?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c", + "5f41b39c-a82e-4497-9c98-1a86034a5d44 5/13/2017 7:52:21 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "5f41b39c-a82e-4497-9c98-1a86034a5d44" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "281f538b-cf35-496a-a47c-cacdd4aa9173" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195220Z:281f538b-cf35-496a-a47c-cacdd4aa9173" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzVjODE3NGNjLTdjYjAtNDcwMS1hNWU1LWVhNTU3ODk5Yzk5Yz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c\",\r\n \"name\": \"5c8174cc-7cb0-4701-a5e5-ea557899c99c\",\r\n \"properties\": {\r\n \"activityId\": \"5f41b39c-a82e-4497-9c98-1a86034a5d44 ActivityId: 281f538b-cf35-496a-a47c-cacdd4aa9173\",\r\n \"scenarioName\": \"RepairVMReplication\",\r\n \"friendlyName\": \"Resynchronize the virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"c5112561-3f05-427c-98d2-340d92fc68cb\",\r\n \"name\": \"RepairVmReplicationTask\",\r\n \"startTime\": \"2017-05-13T19:52:21.3421671Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting resynchronization for the virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:52:20.927696Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:52:20.927696Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:52:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "3720c635-c91a-45e4-b8b1-4c53d2fa5399" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13998" + ], + "x-ms-correlation-request-id": [ + "7ca7403d-10b2-47e8-8f1b-6514f4c2d413" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195251Z:7ca7403d-10b2-47e8-8f1b-6514f4c2d413" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzVjODE3NGNjLTdjYjAtNDcwMS1hNWU1LWVhNTU3ODk5Yzk5Yz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c\",\r\n \"name\": \"5c8174cc-7cb0-4701-a5e5-ea557899c99c\",\r\n \"properties\": {\r\n \"activityId\": \"5f41b39c-a82e-4497-9c98-1a86034a5d44 ActivityId: 281f538b-cf35-496a-a47c-cacdd4aa9173\",\r\n \"scenarioName\": \"RepairVMReplication\",\r\n \"friendlyName\": \"Resynchronize the virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"c5112561-3f05-427c-98d2-340d92fc68cb\",\r\n \"name\": \"RepairVmReplicationTask\",\r\n \"startTime\": \"2017-05-13T19:52:21.3421671Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting resynchronization for the virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:52:20.927696Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:52:20.927696Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:53:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "42fa9dc3-41a4-4f3c-8cca-10eaca109b17" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13989" + ], + "x-ms-correlation-request-id": [ + "c93da9df-0b3d-4bc8-9cc8-1300a923e762" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195322Z:c93da9df-0b3d-4bc8-9cc8-1300a923e762" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzVjODE3NGNjLTdjYjAtNDcwMS1hNWU1LWVhNTU3ODk5Yzk5Yz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c\",\r\n \"name\": \"5c8174cc-7cb0-4701-a5e5-ea557899c99c\",\r\n \"properties\": {\r\n \"activityId\": \"5f41b39c-a82e-4497-9c98-1a86034a5d44 ActivityId: 281f538b-cf35-496a-a47c-cacdd4aa9173\",\r\n \"scenarioName\": \"RepairVMReplication\",\r\n \"friendlyName\": \"Resynchronize the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"c5112561-3f05-427c-98d2-340d92fc68cb\",\r\n \"name\": \"RepairVmReplicationTask\",\r\n \"startTime\": \"2017-05-13T19:52:21.3421671Z\",\r\n \"endTime\": \"2017-05-13T19:53:38.8060122Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting resynchronization for the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T19:52:20.927696Z\",\r\n \"endTime\": \"2017-05-13T19:53:37Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T19:52:20.927696Z\",\r\n \"endTime\": \"2017-05-13T19:53:37Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:53:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/5c8174cc-7cb0-4701-a5e5-ea557899c99c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "ada95a63-314b-488b-9f9a-41a9981dcb4e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13980" + ], + "x-ms-correlation-request-id": [ + "1caf6198-1e68-4982-a53f-1fefe878acf1" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195352Z:1caf6198-1e68-4982-a53f-1fefe878acf1" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "504a64d8-81e4-414c-b56f-240eb69fa46f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": null,\r\n \"recoveryVMSubnetName\": \"\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByDefault\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": null,\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": null,\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"NoLicenseType\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 19:53:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "504a64d8-81e4-414c-b56f-240eb69fa46f 5/13/2017 7:54:00 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "504a64d8-81e4-414c-b56f-240eb69fa46f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13977" + ], + "x-ms-correlation-request-id": [ + "89fd072a-5f0d-44b3-9330-4b3564c385ee" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T195400Z:89fd072a-5f0d-44b3-9330-4b3564c385ee" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/Reprotect.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/Reprotect.json new file mode 100644 index 000000000000..300f24831b2b --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/Reprotect.json @@ -0,0 +1,425 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e0046460-27ce-43d0-95b0-55b1fe3ff2e5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:14:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e0046460-27ce-43d0-95b0-55b1fe3ff2e5 5/15/2017 2:14:37 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "e0046460-27ce-43d0-95b0-55b1fe3ff2e5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13926" + ], + "x-ms-correlation-request-id": [ + "5ea33427-e511-4d9c-8894-bed0d034eb59" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141437Z:5ea33427-e511-4d9c-8894-bed0d034eb59" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RhYmxlSXRlbXM/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5b7910bb-7cc3-4409-bb0f-5c8f9b8b251d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/02c2292c-04ac-4da4-8598-f333e04888c9\",\r\n \"name\": \"02c2292c-04ac-4da4-8598-f333e04888c9\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"02c2292c-04ac-4da4-8598-f333e04888c9\",\r\n \"generation\": \"0\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"name\": \"687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm11\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"687ec666-8b4f-4fea-97f5-247c793765d1\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"5bb00ca8-d850-49fb-afdc-052413458ea2\",\r\n \"vhdName\": \"vm11\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"name\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectionStatus\": \"Protected\",\r\n \"replicationProtectedItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"generation\": \"1\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 1024,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"name\": \"fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectableItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"Nakul\",\r\n \"protectionStatus\": \"Unprotected\",\r\n \"replicationProtectedItemId\": null,\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"protectionReadinessErrors\": [],\r\n \"supportedReplicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVVirtualMachine\",\r\n \"sourceItemId\": \"fb40cf9f-b731-4c16-9d31-ef3d5e81193d\",\r\n \"generation\": \"2\",\r\n \"osDetails\": null,\r\n \"diskDetails\": [\r\n {\r\n \"maxSizeMB\": 25600,\r\n \"vhdType\": \"Data\",\r\n \"vhdId\": \"bb2ce67e-8f5b-49ee-ac6a-a0b14e8622c1\",\r\n \"vhdName\": \"FRTest\"\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems?api-version=2016-08-10&%24skipToken=ReplicationGroup%3aBegin\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:14:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5b7910bb-7cc3-4409-bb0f-5c8f9b8b251d 5/15/2017 2:14:37 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5b7910bb-7cc3-4409-bb0f-5c8f9b8b251d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13924" + ], + "x-ms-correlation-request-id": [ + "43bd91e4-2e58-4501-8e93-fde72c7e9448" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141437Z:43bd91e4-2e58-4501-8e93-fde72c7e9448" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "619b2ea3-2662-4b68-acb0-0ff0bd953da8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"RestoreFinalized\",\r\n \"protectionStateDescription\": \"Failback finalized\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"ReverseReplicate\",\r\n \"DisableProtection\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"lastSuccessfulFailoverTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/92eb6e67-ac18-4043-af5e-6cd5d5891810\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": \"2017-05-15T06:47:31Z\",\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"RestoreFinalized\",\r\n \"vmProtectionStateDescription\": \"Failback finalized\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:14:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "619b2ea3-2662-4b68-acb0-0ff0bd953da8 5/15/2017 2:14:38 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "619b2ea3-2662-4b68-acb0-0ff0bd953da8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13923" + ], + "x-ms-correlation-request-id": [ + "6d6003ba-e697-4f98-bae1-f83ccf834d4f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141438Z:6d6003ba-e697-4f98-bae1-f83ccf834d4f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/reProtect?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi9yZVByb3RlY3Q/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"failoverDirection\": \"PrimaryToRecovery\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"hvHostVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmName\": \"vm2\",\r\n \"osType\": \"Windows\",\r\n \"vHDId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"storageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "498" + ], + "x-ms-client-request-id": [ + "1a65c6d4-4cb5-4691-8a01-edfaa95973e2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:14:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/668e4a43-2d07-41cd-8e2d-f9029a5f6173?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/668e4a43-2d07-41cd-8e2d-f9029a5f6173", + "1a65c6d4-4cb5-4691-8a01-edfaa95973e2 5/15/2017 2:14:39 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/668e4a43-2d07-41cd-8e2d-f9029a5f6173?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "1a65c6d4-4cb5-4691-8a01-edfaa95973e2" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "23552313-783e-46b1-a80c-54e4c2e7974e" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141439Z:23552313-783e-46b1-a80c-54e4c2e7974e" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/668e4a43-2d07-41cd-8e2d-f9029a5f6173?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2OGU0YTQzLTJkMDctNDFjZC04ZTJkLWY5MDI5YTVmNjE3Mz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/668e4a43-2d07-41cd-8e2d-f9029a5f6173\",\r\n \"name\": \"668e4a43-2d07-41cd-8e2d-f9029a5f6173\",\r\n \"properties\": {\r\n \"activityId\": \"1a65c6d4-4cb5-4691-8a01-edfaa95973e2 ActivityId: 23552313-783e-46b1-a80c-54e4c2e7974e\",\r\n \"scenarioName\": \"ReprotectReplicationGroup\",\r\n \"friendlyName\": \"Reverse replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CreateProtectionTargetTask\",\r\n \"name\": \"CreateProtectionTarget\",\r\n \"startTime\": \"2017-05-15T14:14:41.6661798Z\",\r\n \"endTime\": \"2017-05-15T14:14:50.1649389Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Identifying the replication target\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EnableProtectionTask\",\r\n \"name\": \"EnableProtection\",\r\n \"startTime\": \"2017-05-15T14:14:50.1649389Z\",\r\n \"endTime\": \"2017-05-15T14:14:57.3035349Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Enable replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartInitialReplicationTask\",\r\n \"name\": \"VmStartInitialReplication\",\r\n \"startTime\": \"2017-05-15T14:14:57.3035349Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting initial replication\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:14:39.1592956Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"PrimaryCloudName\": \"Microsoft Azure\",\r\n \"RecoveryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:14:39.1592956Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:15:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/668e4a43-2d07-41cd-8e2d-f9029a5f6173" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d98a9498-e887-4b2d-9709-d3331d618469" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13977" + ], + "x-ms-correlation-request-id": [ + "f2b0d7f7-7b61-49ea-9c93-84cc7549c1bb" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141509Z:f2b0d7f7-7b61-49ea-9c93-84cc7549c1bb" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/668e4a43-2d07-41cd-8e2d-f9029a5f6173?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY2OGU0YTQzLTJkMDctNDFjZC04ZTJkLWY5MDI5YTVmNjE3Mz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/668e4a43-2d07-41cd-8e2d-f9029a5f6173\",\r\n \"name\": \"668e4a43-2d07-41cd-8e2d-f9029a5f6173\",\r\n \"properties\": {\r\n \"activityId\": \"1a65c6d4-4cb5-4691-8a01-edfaa95973e2 ActivityId: 23552313-783e-46b1-a80c-54e4c2e7974e\",\r\n \"scenarioName\": \"ReprotectReplicationGroup\",\r\n \"friendlyName\": \"Reverse replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"CreateProtectionTargetTask\",\r\n \"name\": \"CreateProtectionTarget\",\r\n \"startTime\": \"2017-05-15T14:14:41.6661798Z\",\r\n \"endTime\": \"2017-05-15T14:14:50.1649389Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Identifying the replication target\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EnableProtectionTask\",\r\n \"name\": \"EnableProtection\",\r\n \"startTime\": \"2017-05-15T14:14:50.1649389Z\",\r\n \"endTime\": \"2017-05-15T14:14:57.3035349Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Enable replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartInitialReplicationTask\",\r\n \"name\": \"VmStartInitialReplication\",\r\n \"startTime\": \"2017-05-15T14:14:57.3035349Z\",\r\n \"endTime\": \"2017-05-15T14:15:16.2644447Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting initial replication\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:14:39.1592956Z\",\r\n \"endTime\": \"2017-05-15T14:15:16Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"PrimaryCloudName\": \"Microsoft Azure\",\r\n \"RecoveryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"PrimaryVmmName\": \"Microsoft Azure\",\r\n \"RecoveryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"RecoveryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"PrimaryFabricProviderId\": \"Azure\",\r\n \"RecoveryFabricProviderId\": \"HyperVSite\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:14:39.1592956Z\",\r\n \"endTime\": \"2017-05-15T14:15:16Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:15:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/668e4a43-2d07-41cd-8e2d-f9029a5f6173" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "885e1d02-595e-4d2d-bb9a-678d9099279e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13965" + ], + "x-ms-correlation-request-id": [ + "45f90ada-0aed-4654-8f47-7df077918ca1" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141542Z:45f90ada-0aed-4654-8f47-7df077918ca1" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/TestFailover.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/TestFailover.json new file mode 100644 index 000000000000..d56d8b31db54 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/TestFailover.json @@ -0,0 +1,614 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5b906379-7d3d-4793-ba73-ad934c610a21" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:39:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "5b906379-7d3d-4793-ba73-ad934c610a21 5/13/2017 12:39:38 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "5b906379-7d3d-4793-ba73-ad934c610a21" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13840" + ], + "x-ms-correlation-request-id": [ + "a7ed684c-c481-4980-989d-817b401b8de5" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T123938Z:a7ed684c-c481-4980-989d-817b401b8de5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a533297e-e940-4ab3-9509-93bd75861a1f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"name\": \"vm1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm1\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkY4NDkxRTRGLTgxN0EtNDBERC1BOTBDLUFGNzczOTc4Qzc1Qlw3NjAwMzMxRS03NDk4LTQ0QTQtQjdDNy0xQjY1NkJDREQ1MkQ=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": \"Never\",\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:39:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a533297e-e940-4ab3-9509-93bd75861a1f 5/13/2017 12:39:39 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a533297e-e940-4ab3-9509-93bd75861a1f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13838" + ], + "x-ms-correlation-request-id": [ + "f8dcf9c0-6e32-4e6d-9f1a-9e4710d5684c" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T123938Z:f8dcf9c0-6e32-4e6d-9f1a-9e4710d5684c" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/testFailover?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMS90ZXN0RmFpbG92ZXI/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"networkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"skipTestFailoverCleanup\": \"True\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"vaultLocation\": \"West US\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "388" + ], + "x-ms-client-request-id": [ + "cf534bce-351b-46a5-8a9f-781dd3077e63" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:39:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/operationresults/ced26549-4a87-4214-94d6-22e281691afc?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc", + "cf534bce-351b-46a5-8a9f-781dd3077e63 5/13/2017 12:39:40 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "cf534bce-351b-46a5-8a9f-781dd3077e63" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "0427520a-4444-4b57-a1a6-44ffff0cc14f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T123939Z:0427520a-4444-4b57-a1a6-44ffff0cc14f" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2NlZDI2NTQ5LTRhODctNDIxNC05NGQ2LTIyZTI4MTY5MWFmYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"name\": \"ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"properties\": {\r\n \"activityId\": \"cf534bce-351b-46a5-8a9f-781dd3077e63 ActivityId: 0427520a-4444-4b57-a1a6-44ffff0cc14f\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverPreflightChecksTask\",\r\n \"name\": \"VmTfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T12:39:43.7222639Z\",\r\n \"endTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BeginTestFailoverTask\",\r\n \"name\": \"VmTfoInitiateFailover\",\r\n \"startTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoPrepareTestVm\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Creating test virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BootTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoBootTestVm\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:40:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "47e93ed3-eea9-4234-93cb-b4dadcef95bf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13916" + ], + "x-ms-correlation-request-id": [ + "f4431f98-47f4-45ca-a3a7-732e400b08c4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124010Z:f4431f98-47f4-45ca-a3a7-732e400b08c4" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2NlZDI2NTQ5LTRhODctNDIxNC05NGQ2LTIyZTI4MTY5MWFmYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"name\": \"ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"properties\": {\r\n \"activityId\": \"cf534bce-351b-46a5-8a9f-781dd3077e63 ActivityId: 0427520a-4444-4b57-a1a6-44ffff0cc14f\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverPreflightChecksTask\",\r\n \"name\": \"VmTfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T12:39:43.7222639Z\",\r\n \"endTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BeginTestFailoverTask\",\r\n \"name\": \"VmTfoInitiateFailover\",\r\n \"startTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoPrepareTestVm\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Creating test virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BootTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoBootTestVm\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:40:41 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "cf74de7a-f5b8-45fd-8541-94efcca2a891" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13902" + ], + "x-ms-correlation-request-id": [ + "185c855d-d02c-40af-88f3-90e58f769ed8" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124041Z:185c855d-d02c-40af-88f3-90e58f769ed8" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2NlZDI2NTQ5LTRhODctNDIxNC05NGQ2LTIyZTI4MTY5MWFmYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"name\": \"ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"properties\": {\r\n \"activityId\": \"cf534bce-351b-46a5-8a9f-781dd3077e63 ActivityId: 0427520a-4444-4b57-a1a6-44ffff0cc14f\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverPreflightChecksTask\",\r\n \"name\": \"VmTfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T12:39:43.7222639Z\",\r\n \"endTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BeginTestFailoverTask\",\r\n \"name\": \"VmTfoInitiateFailover\",\r\n \"startTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"endTime\": \"2017-05-13T12:40:51.9305031Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoPrepareTestVm\",\r\n \"startTime\": \"2017-05-13T12:40:51.9305031Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Creating test virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BootTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoBootTestVm\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:41:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d10b3455-18b2-4d69-a22c-ea0e3a5c0dd1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13888" + ], + "x-ms-correlation-request-id": [ + "d3ecb050-2684-4e48-99d0-f7d2f982edac" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124112Z:d3ecb050-2684-4e48-99d0-f7d2f982edac" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2NlZDI2NTQ5LTRhODctNDIxNC05NGQ2LTIyZTI4MTY5MWFmYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"name\": \"ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"properties\": {\r\n \"activityId\": \"cf534bce-351b-46a5-8a9f-781dd3077e63 ActivityId: 0427520a-4444-4b57-a1a6-44ffff0cc14f\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverPreflightChecksTask\",\r\n \"name\": \"VmTfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T12:39:43.7222639Z\",\r\n \"endTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BeginTestFailoverTask\",\r\n \"name\": \"VmTfoInitiateFailover\",\r\n \"startTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"endTime\": \"2017-05-13T12:40:51.9305031Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoPrepareTestVm\",\r\n \"startTime\": \"2017-05-13T12:40:51.9305031Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Creating test virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BootTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoBootTestVm\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:41:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "a59db953-2e09-4eb1-9cd1-3729f9447769" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13884" + ], + "x-ms-correlation-request-id": [ + "43efeba8-8219-4f1e-bb54-2008e4ed6a33" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124143Z:43efeba8-8219-4f1e-bb54-2008e4ed6a33" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2NlZDI2NTQ5LTRhODctNDIxNC05NGQ2LTIyZTI4MTY5MWFmYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"name\": \"ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"properties\": {\r\n \"activityId\": \"cf534bce-351b-46a5-8a9f-781dd3077e63 ActivityId: 0427520a-4444-4b57-a1a6-44ffff0cc14f\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverPreflightChecksTask\",\r\n \"name\": \"VmTfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T12:39:43.7222639Z\",\r\n \"endTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BeginTestFailoverTask\",\r\n \"name\": \"VmTfoInitiateFailover\",\r\n \"startTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"endTime\": \"2017-05-13T12:40:51.9305031Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoPrepareTestVm\",\r\n \"startTime\": \"2017-05-13T12:40:51.9305031Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Creating test virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BootTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoBootTestVm\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:42:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "dba2ef12-6f62-4a36-9550-51059395c01e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13866" + ], + "x-ms-correlation-request-id": [ + "7469e844-99e2-4f90-9913-ecd647395b3d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124215Z:7469e844-99e2-4f90-9913-ecd647395b3d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2NlZDI2NTQ5LTRhODctNDIxNC05NGQ2LTIyZTI4MTY5MWFmYz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"name\": \"ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"properties\": {\r\n \"activityId\": \"cf534bce-351b-46a5-8a9f-781dd3077e63 ActivityId: 0427520a-4444-4b57-a1a6-44ffff0cc14f\",\r\n \"scenarioName\": \"TestFailover\",\r\n \"friendlyName\": \"Test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverPreflightChecksTask\",\r\n \"name\": \"VmTfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-13T12:39:43.7222639Z\",\r\n \"endTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BeginTestFailoverTask\",\r\n \"name\": \"VmTfoInitiateFailover\",\r\n \"startTime\": \"2017-05-13T12:39:44.254346Z\",\r\n \"endTime\": \"2017-05-13T12:40:51.9305031Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Starting test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoPrepareTestVm\",\r\n \"startTime\": \"2017-05-13T12:40:51.9305031Z\",\r\n \"endTime\": \"2017-05-13T12:42:28.2405233Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Creating test virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"BootTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoBootTestVm\",\r\n \"startTime\": \"2017-05-13T12:42:28.2405233Z\",\r\n \"endTime\": \"2017-05-13T12:42:28.4280165Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"endTime\": \"2017-05-13T12:42:27Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": \"Active\",\r\n \"comments\": null,\r\n \"networkName\": \"vnetavrai\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"networkType\": \"VmNetworkAsInput\",\r\n \"protectedItemDetails\": [\r\n {\r\n \"name\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"friendlyName\": \"vm1\",\r\n \"testVmName\": \"vm1-test\",\r\n \"testVmFriendlyName\": \"vm1-test\",\r\n \"networkConnectionStatus\": \"Connected\",\r\n \"networkFriendlyName\": \"vnetavrai\",\r\n \"subnet\": \"Subnet1\"\r\n }\r\n ],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"endTime\": \"2017-05-13T12:42:27Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:42:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "4ed99425-807b-468e-bc06-e44fdc29f8d5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13857" + ], + "x-ms-correlation-request-id": [ + "7091e776-6fda-4280-8958-073c713c2438" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124245Z:7091e776-6fda-4280-8958-073c713c2438" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/TestFailoverCleanup.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/TestFailoverCleanup.json new file mode 100644 index 000000000000..b708f33a6d5e --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/TestFailoverCleanup.json @@ -0,0 +1,614 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9e138988-9da7-409f-b5d4-5bdd25c257d1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:45:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "9e138988-9da7-409f-b5d4-5bdd25c257d1 5/13/2017 12:45:12 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9e138988-9da7-409f-b5d4-5bdd25c257d1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13975" + ], + "x-ms-correlation-request-id": [ + "daa30ccb-ca18-4331-a35f-fef1ac01208e" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124512Z:daa30ccb-ca18-4331-a35f-fef1ac01208e" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0af2b26e-e823-4cfa-a1f2-c980ea90630c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1\",\r\n \"name\": \"vm1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm1\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"WaitingForCompletion\",\r\n \"testFailoverStateDescription\": \"Waiting for user input\",\r\n \"allowedOperations\": [\r\n \"TestFailoverCleanup\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"lastSuccessfulTestFailoverTime\": \"2017-05-13T12:39:39.9690575Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"TestFailover\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/ced26549-4a87-4214-94d6-22e281691afc\",\r\n \"startTime\": \"2017-05-13T12:39:39.9690575Z\"\r\n },\r\n \"failoverRecoveryPointId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/recoveryPoints/32975a4a-61ed-45df-a4a5-dd8051e61d2d\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"5f01e3a8-73fb-4c60-8cfc-e69297e5d96b\",\r\n \"vhdName\": \"vm1\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm1\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkY4NDkxRTRGLTgxN0EtNDBERC1BOTBDLUFGNzczOTc4Qzc1Qlw3NjAwMzMxRS03NDk4LTQ0QTQtQjdDNy0xQjY1NkJDREQ1MkQ=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": \"Never\",\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:45:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "0af2b26e-e823-4cfa-a1f2-c980ea90630c 5/13/2017 12:45:13 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "0af2b26e-e823-4cfa-a1f2-c980ea90630c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13974" + ], + "x-ms-correlation-request-id": [ + "67f069cb-c7d5-4c37-822f-8bbcc9cc09ac" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124513Z:67f069cb-c7d5-4c37-822f-8bbcc9cc09ac" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/testFailoverCleanup?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMS90ZXN0RmFpbG92ZXJDbGVhbnVwP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"comments\": \"Cleaning up\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "59" + ], + "x-ms-client-request-id": [ + "7868c79d-f1c0-4705-98e1-a1a7e675fc36" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:45:14 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm1/operationresults/a397be34-de4e-4bdf-bc88-f53df657224d?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d", + "7868c79d-f1c0-4705-98e1-a1a7e675fc36 5/13/2017 12:45:14 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "7868c79d-f1c0-4705-98e1-a1a7e675fc36" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "83fb9eb4-5637-4004-b744-131a3a79eb51" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124514Z:83fb9eb4-5637-4004-b744-131a3a79eb51" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2EzOTdiZTM0LWRlNGUtNGJkZi1iYzg4LWY1M2RmNjU3MjI0ZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"name\": \"a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"properties\": {\r\n \"activityId\": \"7868c79d-f1c0-4705-98e1-a1a7e675fc36 ActivityId: 83fb9eb4-5637-4004-b744-131a3a79eb51\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverCleanupPreflightChecksTask\",\r\n \"name\": \"VmTfoCleanupPreflightsCheck\",\r\n \"startTime\": \"2017-05-13T12:45:15.157968Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover cleanup\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EndTestFailoverTask\",\r\n \"name\": \"VmTfoEndFailover\",\r\n \"startTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Ending test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CleanupTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoDeleteTestVm\",\r\n \"startTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:45:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "cc9854d2-8b5d-4e6a-8735-44afaf9590f2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13967" + ], + "x-ms-correlation-request-id": [ + "7b589962-2ab5-4c5b-9e7a-4bc9a32c73a3" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124545Z:7b589962-2ab5-4c5b-9e7a-4bc9a32c73a3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2EzOTdiZTM0LWRlNGUtNGJkZi1iYzg4LWY1M2RmNjU3MjI0ZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"name\": \"a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"properties\": {\r\n \"activityId\": \"7868c79d-f1c0-4705-98e1-a1a7e675fc36 ActivityId: 83fb9eb4-5637-4004-b744-131a3a79eb51\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverCleanupPreflightChecksTask\",\r\n \"name\": \"VmTfoCleanupPreflightsCheck\",\r\n \"startTime\": \"2017-05-13T12:45:15.157968Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover cleanup\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EndTestFailoverTask\",\r\n \"name\": \"VmTfoEndFailover\",\r\n \"startTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Ending test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CleanupTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoDeleteTestVm\",\r\n \"startTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:46:15 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "6db8aff8-2547-4c56-a50c-1e76c6adb9e1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13955" + ], + "x-ms-correlation-request-id": [ + "eff22e43-7a40-4b3e-af08-37702d431b11" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124616Z:eff22e43-7a40-4b3e-af08-37702d431b11" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2EzOTdiZTM0LWRlNGUtNGJkZi1iYzg4LWY1M2RmNjU3MjI0ZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"name\": \"a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"properties\": {\r\n \"activityId\": \"7868c79d-f1c0-4705-98e1-a1a7e675fc36 ActivityId: 83fb9eb4-5637-4004-b744-131a3a79eb51\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverCleanupPreflightChecksTask\",\r\n \"name\": \"VmTfoCleanupPreflightsCheck\",\r\n \"startTime\": \"2017-05-13T12:45:15.157968Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover cleanup\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EndTestFailoverTask\",\r\n \"name\": \"VmTfoEndFailover\",\r\n \"startTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Ending test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CleanupTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoDeleteTestVm\",\r\n \"startTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:46:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "85119190-3035-4c12-af8b-874e3850622d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13940" + ], + "x-ms-correlation-request-id": [ + "c2e058dc-55e2-4658-adad-10505a2d98be" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124646Z:c2e058dc-55e2-4658-adad-10505a2d98be" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2EzOTdiZTM0LWRlNGUtNGJkZi1iYzg4LWY1M2RmNjU3MjI0ZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"name\": \"a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"properties\": {\r\n \"activityId\": \"7868c79d-f1c0-4705-98e1-a1a7e675fc36 ActivityId: 83fb9eb4-5637-4004-b744-131a3a79eb51\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverCleanupPreflightChecksTask\",\r\n \"name\": \"VmTfoCleanupPreflightsCheck\",\r\n \"startTime\": \"2017-05-13T12:45:15.157968Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover cleanup\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EndTestFailoverTask\",\r\n \"name\": \"VmTfoEndFailover\",\r\n \"startTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Ending test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CleanupTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoDeleteTestVm\",\r\n \"startTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:47:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "7e2b9ce7-a281-4f91-8be3-a0e6f421fbc5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13929" + ], + "x-ms-correlation-request-id": [ + "3c7ed814-f2ea-4ddd-bd7f-d35d853cf5ce" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124717Z:3c7ed814-f2ea-4ddd-bd7f-d35d853cf5ce" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2EzOTdiZTM0LWRlNGUtNGJkZi1iYzg4LWY1M2RmNjU3MjI0ZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"name\": \"a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"properties\": {\r\n \"activityId\": \"7868c79d-f1c0-4705-98e1-a1a7e675fc36 ActivityId: 83fb9eb4-5637-4004-b744-131a3a79eb51\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverCleanupPreflightChecksTask\",\r\n \"name\": \"VmTfoCleanupPreflightsCheck\",\r\n \"startTime\": \"2017-05-13T12:45:15.157968Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover cleanup\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EndTestFailoverTask\",\r\n \"name\": \"VmTfoEndFailover\",\r\n \"startTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Ending test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CleanupTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoDeleteTestVm\",\r\n \"startTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test virtual machine\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:47:46 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "ec693427-a2b3-407f-bab6-70e368980da2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13915" + ], + "x-ms-correlation-request-id": [ + "c2df7c51-8342-428c-b727-7f8acb1f67ce" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124747Z:c2df7c51-8342-428c-b727-7f8acb1f67ce" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2EzOTdiZTM0LWRlNGUtNGJkZi1iYzg4LWY1M2RmNjU3MjI0ZD9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"name\": \"a397be34-de4e-4bdf-bc88-f53df657224d\",\r\n \"properties\": {\r\n \"activityId\": \"7868c79d-f1c0-4705-98e1-a1a7e675fc36 ActivityId: 83fb9eb4-5637-4004-b744-131a3a79eb51\",\r\n \"scenarioName\": \"TestFailoverCleanup\",\r\n \"friendlyName\": \"Test failover cleanup\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"TestFailoverCleanupPreflightChecksTask\",\r\n \"name\": \"VmTfoCleanupPreflightsCheck\",\r\n \"startTime\": \"2017-05-13T12:45:15.157968Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for test failover cleanup\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"EndTestFailoverTask\",\r\n \"name\": \"VmTfoEndFailover\",\r\n \"startTime\": \"2017-05-13T12:45:15.3766885Z\",\r\n \"endTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Ending test failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"CleanupTestProtectedEntitiesTask\",\r\n \"name\": \"VmTfoDeleteTestVm\",\r\n \"startTime\": \"2017-05-13T12:45:15.8298074Z\",\r\n \"endTime\": \"2017-05-13T12:48:05.998296Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Clean up the test virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"endTime\": \"2017-05-13T12:48:05Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"targetObjectName\": \"vm1\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TestFailoverJobDetails\",\r\n \"testFailoverStatus\": null,\r\n \"comments\": \"Cleaning up\",\r\n \"networkName\": null,\r\n \"networkFriendlyName\": null,\r\n \"networkType\": null,\r\n \"protectedItemDetails\": [],\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"f8491e4f-817a-40dd-a90c-af773978c75b\",\r\n \"PrimaryVmName\": \"vm1\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm1\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T12:45:14.5685792Z\",\r\n \"endTime\": \"2017-05-13T12:48:05Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 12:48:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a397be34-de4e-4bdf-bc88-f53df657224d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "72d15f60-06a6-4cdc-a4b9-216428809ce7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13894" + ], + "x-ms-correlation-request-id": [ + "2e539b09-8ad4-44c1-870f-cf22490b895a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T124818Z:2e539b09-8ad4-44c1-870f-cf22490b895a" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UnplannedFailover.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UnplannedFailover.json new file mode 100644 index 000000000000..96d0fa598f44 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UnplannedFailover.json @@ -0,0 +1,685 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "80bdbb27-f8d4-4d32-85b4-3186a7646550" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:17:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "80bdbb27-f8d4-4d32-85b4-3186a7646550 5/15/2017 2:17:01 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "80bdbb27-f8d4-4d32-85b4-3186a7646550" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14128" + ], + "x-ms-correlation-request-id": [ + "0f18c4b9-0fec-4265-9267-e1aaa02d1847" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141701Z:0f18c4b9-0fec-4265-9267-e1aaa02d1847" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "beec0bc5-acb8-4e20-860b-2ff00bf6fac9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"lastSuccessfulFailoverTime\": \"2017-05-15T13:46:00.071433Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/92eb6e67-ac18-4043-af5e-6cd5d5891810\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": \"2017-05-15T07:11:11Z\",\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:17:01 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "beec0bc5-acb8-4e20-860b-2ff00bf6fac9 5/15/2017 2:17:02 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "beec0bc5-acb8-4e20-860b-2ff00bf6fac9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14126" + ], + "x-ms-correlation-request-id": [ + "0fada571-8c79-47c3-a1af-9d188eaf1b85" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141701Z:0fada571-8c79-47c3-a1af-9d188eaf1b85" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c2b25723-d7c4-4b34-8261-0fef0d7b1454" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"UnplannedFailoverCommitPendingStatesBegin\",\r\n \"protectionStateDescription\": \"Failover completed\",\r\n \"activeLocation\": \"Recovery\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"CompleteMigration\",\r\n \"Commit\",\r\n \"DisableProtection\",\r\n \"ChangePit\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"lastSuccessfulFailoverTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/recoveryPoints/96626452-deec-4c09-8436-bc67127aac2f\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": \"https://storavrai.blob.core.windows.net/failover-vm2-cf29eb7a-58e1-45b4-b760-c530c1134df4-55046/copied-bc7a4898-0357-4390-97a4-8f3d285ae5d7-695176b6-2f3b-4611-bdbb-0e1554e5b46b.vhd\",\r\n \"targetDiskName\": \"vm2_vhdx\",\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": \"2017-05-15T07:11:11Z\",\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"UnplannedFailoverCommitPendingStatesBegin\",\r\n \"vmProtectionStateDescription\": \"Failover completed\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:20:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c2b25723-d7c4-4b34-8261-0fef0d7b1454 5/15/2017 2:20:07 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "c2b25723-d7c4-4b34-8261-0fef0d7b1454" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14110" + ], + "x-ms-correlation-request-id": [ + "4a2a52e3-bd36-4fe0-8e9e-07767d5ec699" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142006Z:4a2a52e3-bd36-4fe0-8e9e-07767d5ec699" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/unplannedFailover?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMi91bnBsYW5uZWRGYWlsb3Zlcj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"failoverDirection\": \"PrimaryToRecovery\",\r\n \"sourceSiteOperations\": \"NotRequired\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"vaultLocation\": \"West US\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "239" + ], + "x-ms-client-request-id": [ + "6efffda2-64f5-478f-a250-b3a651d04f9c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:17:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/695176b6-2f3b-4611-bdbb-0e1554e5b46b?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b", + "6efffda2-64f5-478f-a250-b3a651d04f9c 5/15/2017 2:17:03 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "6efffda2-64f5-478f-a250-b3a651d04f9c" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "343ac66a-2b3f-40eb-9fc5-8b4a4fd0c956" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141703Z:343ac66a-2b3f-40eb-9fc5-8b4a4fd0c956" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY5NTE3NmI2LTJmM2ItNDYxMS1iZGJiLTBlMTU1NGU1YjQ2Yj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"name\": \"695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"properties\": {\r\n \"activityId\": \"6efffda2-64f5-478f-a250-b3a651d04f9c ActivityId: 343ac66a-2b3f-40eb-9fc5-8b4a4fd0c956\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"UnplannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmUfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T14:17:05.937056Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimaryForUFO\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForUnPlannedFailoverTask\",\r\n \"name\": \"VmPrepareForUnPlannedFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Synchronizing the latest changes\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.9370604Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:17:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b4a68393-74f8-4939-9736-417bee38fb33" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14116" + ], + "x-ms-correlation-request-id": [ + "d35f79a1-4b6a-409c-b8ee-d7651117a5af" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141733Z:d35f79a1-4b6a-409c-b8ee-d7651117a5af" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY5NTE3NmI2LTJmM2ItNDYxMS1iZGJiLTBlMTU1NGU1YjQ2Yj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"name\": \"695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"properties\": {\r\n \"activityId\": \"6efffda2-64f5-478f-a250-b3a651d04f9c ActivityId: 343ac66a-2b3f-40eb-9fc5-8b4a4fd0c956\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"UnplannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmUfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T14:17:05.937056Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimaryForUFO\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForUnPlannedFailoverTask\",\r\n \"name\": \"VmPrepareForUnPlannedFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Synchronizing the latest changes\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.9370604Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:18:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b08beeb4-b424-4dd8-9c90-6f12d1e7a40e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14101" + ], + "x-ms-correlation-request-id": [ + "59311426-64aa-414d-ab57-bfe57ee8261a" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141804Z:59311426-64aa-414d-ab57-bfe57ee8261a" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY5NTE3NmI2LTJmM2ItNDYxMS1iZGJiLTBlMTU1NGU1YjQ2Yj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"name\": \"695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"properties\": {\r\n \"activityId\": \"6efffda2-64f5-478f-a250-b3a651d04f9c ActivityId: 343ac66a-2b3f-40eb-9fc5-8b4a4fd0c956\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"UnplannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmUfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T14:17:05.937056Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimaryForUFO\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForUnPlannedFailoverTask\",\r\n \"name\": \"VmPrepareForUnPlannedFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Synchronizing the latest changes\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.9370604Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:18:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "4149837a-c834-429c-8487-33e81625635d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14095" + ], + "x-ms-correlation-request-id": [ + "c17de1f9-c24a-4ca0-adda-5d5aa6084f94" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141835Z:c17de1f9-c24a-4ca0-adda-5d5aa6084f94" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY5NTE3NmI2LTJmM2ItNDYxMS1iZGJiLTBlMTU1NGU1YjQ2Yj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"name\": \"695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"properties\": {\r\n \"activityId\": \"6efffda2-64f5-478f-a250-b3a651d04f9c ActivityId: 343ac66a-2b3f-40eb-9fc5-8b4a4fd0c956\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"UnplannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmUfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T14:17:05.937056Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimaryForUFO\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForUnPlannedFailoverTask\",\r\n \"name\": \"VmPrepareForUnPlannedFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Synchronizing the latest changes\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.9370604Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:19:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "e65b44fa-77cc-4129-96aa-6ecb937197ff" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14087" + ], + "x-ms-correlation-request-id": [ + "70d318a7-2e61-4f55-9287-1e78aa64af14" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141905Z:70d318a7-2e61-4f55-9287-1e78aa64af14" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY5NTE3NmI2LTJmM2ItNDYxMS1iZGJiLTBlMTU1NGU1YjQ2Yj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"name\": \"695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"properties\": {\r\n \"activityId\": \"6efffda2-64f5-478f-a250-b3a651d04f9c ActivityId: 343ac66a-2b3f-40eb-9fc5-8b4a4fd0c956\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"UnplannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmUfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T14:17:05.937056Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimaryForUFO\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForUnPlannedFailoverTask\",\r\n \"name\": \"VmPrepareForUnPlannedFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Synchronizing the latest changes\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.9370604Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"InProgress\",\r\n \"stateDescription\": \"InProgress\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"NotStarted\",\r\n \"stateDescription\": \"NotStarted\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"allowedActions\": [\r\n \"Cancel\"\r\n ],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"InProgress\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"endTime\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:19:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f10d48c7-5486-440c-82bc-6e414b7148ef" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14077" + ], + "x-ms-correlation-request-id": [ + "63bcdcb5-7200-4d2b-ba0d-563683865479" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T141935Z:63bcdcb5-7200-4d2b-ba0d-563683865479" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY5NTE3NmI2LTJmM2ItNDYxMS1iZGJiLTBlMTU1NGU1YjQ2Yj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"name\": \"695176b6-2f3b-4611-bdbb-0e1554e5b46b\",\r\n \"properties\": {\r\n \"activityId\": \"6efffda2-64f5-478f-a250-b3a651d04f9c ActivityId: 343ac66a-2b3f-40eb-9fc5-8b4a4fd0c956\",\r\n \"scenarioName\": \"UnplannedFailover\",\r\n \"friendlyName\": \"Failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"UnplannedFailoverPreflightChecksTask\",\r\n \"name\": \"VmUfoPrerequisitesCheck\",\r\n \"startTime\": \"2017-05-15T14:17:05.937056Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ShutdownVmOnPrimaryForUFO\",\r\n \"name\": \"VmShutdownVmOnPrimary\",\r\n \"startTime\": \"2017-05-15T14:17:06.2183112Z\",\r\n \"endTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Shut down the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"PrepareForUnPlannedFailoverTask\",\r\n \"name\": \"VmPrepareForUnPlannedFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.3745613Z\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Synchronizing the latest changes\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"FailoverTask\",\r\n \"name\": \"VmFailover\",\r\n \"startTime\": \"2017-05-15T14:17:06.9370604Z\",\r\n \"endTime\": \"2017-05-15T14:19:52.5535838Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start failover\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"StartVmOnSecondary\",\r\n \"name\": \"VmFoStartVmOnSecondary\",\r\n \"startTime\": \"2017-05-15T14:19:52.5535838Z\",\r\n \"endTime\": \"2017-05-15T14:19:52.7128812Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Start the replica virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"endTime\": \"2017-05-15T14:19:52Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T14:17:02.945914Z\",\r\n \"endTime\": \"2017-05-15T14:19:52Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 14:20:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/695176b6-2f3b-4611-bdbb-0e1554e5b46b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "9d1e473e-dc78-4255-921f-5d8e2f1452c9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14112" + ], + "x-ms-correlation-request-id": [ + "b4154209-2fc1-43dc-8489-78dc1cd6eccc" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T142006Z:b4154209-2fc1-43dc-8489-78dc1cd6eccc" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateNetworkMapping.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateNetworkMapping.json new file mode 100644 index 000000000000..5eef94861731 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateNetworkMapping.json @@ -0,0 +1,282 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3MvTldNYXBwaW5nP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"recoveryFabricName\": \"Microsoft Azure\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"fabricSpecificDetails\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "317" + ], + "x-ms-client-request-id": [ + "d583ee21-b9b7-49ce-a2e7-99fca5c3b9eb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 12:53:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping/operationresults/00ef26d6-4d80-49a4-aaa7-e4dfebd2815f?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/00ef26d6-4d80-49a4-aaa7-e4dfebd2815f?api-version=2016-08-10" + ], + "x-ms-request-id": [ + "d583ee21-b9b7-49ce-a2e7-99fca5c3b9eb 5/15/2017 12:53:56 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "d583ee21-b9b7-49ce-a2e7-99fca5c3b9eb" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "8b97e5a6-92b1-4ac4-a9f7-d71b8c43cad7" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T125355Z:8b97e5a6-92b1-4ac4-a9f7-d71b8c43cad7" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/00ef26d6-4d80-49a4-aaa7-e4dfebd2815f?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzAwZWYyNmQ2LTRkODAtNDlhNC1hYWE3LWU0ZGZlYmQyODE1Zj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/00ef26d6-4d80-49a4-aaa7-e4dfebd2815f\",\r\n \"name\": \"00ef26d6-4d80-49a4-aaa7-e4dfebd2815f\",\r\n \"properties\": {\r\n \"activityId\": \"d583ee21-b9b7-49ce-a2e7-99fca5c3b9eb ActivityId: 8b97e5a6-92b1-4ac4-a9f7-d71b8c43cad7\",\r\n \"scenarioName\": \"NetworkPairing\",\r\n \"friendlyName\": \"Map Networks\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"3848b9d7-c28e-4f32-a721-28a5b6f11c58\",\r\n \"name\": \"ModifyVMNetworksPairingStatusTask\",\r\n \"startTime\": \"2017-05-15T12:53:56.646107Z\",\r\n \"endTime\": \"2017-05-15T12:54:25.1574917Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Map network\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"add0062c-e85d-48f9-9f38-91e0dde6d3a4\",\r\n \"name\": \"VMNetworksUpdateVMNicsTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Attach network (0)\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"GroupTaskDetails\",\r\n \"customDetails\": null,\r\n \"groupTaskCustomDetails\": {\r\n \"instanceType\": \"GroupTaskDetails\",\r\n \"childTasks\": []\r\n },\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T12:53:56.1092544Z\",\r\n \"endTime\": \"2017-05-15T12:54:25Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"corp\",\r\n \"targetObjectName\": \"corp\",\r\n \"targetInstanceType\": \"Network\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryNetworkId\": \"c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"PrimaryNetworkName\": \"corp\",\r\n \"RecoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"RecoveryNetworkName\": \"vnetavrai\",\r\n \"PrimaryVmmId\": \"2a34ba3d-e783-4c78-9e67-ab9d4c46b639\",\r\n \"PrimaryVmmName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"VMM\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T12:53:56.1092544Z\",\r\n \"endTime\": \"2017-05-15T12:54:25Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 12:54:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/00ef26d6-4d80-49a4-aaa7-e4dfebd2815f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8a405fbe-0535-48ff-afca-4ec5edaed55f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13995" + ], + "x-ms-correlation-request-id": [ + "f12720b0-760c-49c0-b1f3-adacce942f0d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T125438Z:f12720b0-760c-49c0-b1f3-adacce942f0d" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3MvTldNYXBwaW5nP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping\",\r\n \"name\": \"NWMapping\",\r\n \"properties\": {\r\n \"state\": \"Paired\",\r\n \"primaryNetworkFriendlyName\": \"corp\",\r\n \"primaryNetworkId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"primaryFabricFriendlyName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"recoveryNetworkFriendlyName\": \"vnetavrai\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryFabricArmId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"fabricSpecificSettings\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 12:54:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "aa1bc354-e7f9-40f3-887e-82881b73b8b8 5/15/2017 12:54:39 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "aa1bc354-e7f9-40f3-887e-82881b73b8b8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13994" + ], + "x-ms-correlation-request-id": [ + "26b0adba-0248-4d5e-a3ad-1393a6ef1e35" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T125439Z:26b0adba-0248-4d5e-a3ad-1393a6ef1e35" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL2QxODhkYzM3OGE3OGM4MTliZmI4YjFmMDdlYmEyYzE1NTExZTE3ODhjNDFiYTI3NzkyZDk0MzNmYzZhNGUwODcvcmVwbGljYXRpb25OZXR3b3Jrcy9jNDFlZGE4Ni05NmQ1LTQ1NDEtYTZmOC1jNDdkNGI3NWEyNGEvcmVwbGljYXRpb25OZXR3b3JrTWFwcGluZ3MvTldNYXBwaW5nP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "63534ad3-534d-491e-b6ca-7b9cdaad5b20" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationNetworks/replicationNetworkMappings\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d188dc378a78c819bfb8b1f07eba2c15511e1788c41ba27792d9433fc6a4e087/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a/replicationNetworkMappings/NWMapping\",\r\n \"name\": \"NWMapping\",\r\n \"properties\": {\r\n \"state\": \"Paired\",\r\n \"primaryNetworkFriendlyName\": \"corp\",\r\n \"primaryNetworkId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationNetworks/c41eda86-96d5-4541-a6f8-c47d4b75a24a\",\r\n \"primaryFabricFriendlyName\": \"CP-B3L40405-03.fareast.corp.microsoft.com\",\r\n \"recoveryNetworkFriendlyName\": \"vnetavrai\",\r\n \"recoveryNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryFabricArmId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"fabricSpecificSettings\": {\r\n \"instanceType\": \"VmmToAzure\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 12:54:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "63534ad3-534d-491e-b6ca-7b9cdaad5b20 5/15/2017 12:54:43 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "63534ad3-534d-491e-b6ca-7b9cdaad5b20" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13991" + ], + "x-ms-correlation-request-id": [ + "f155cd61-115a-4abc-8766-1ad244aeb553" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T125442Z:f155cd61-115a-4abc-8766-1ad244aeb553" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdatePolicy.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdatePolicy.json new file mode 100644 index 000000000000..eab6609ee0a6 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdatePolicy.json @@ -0,0 +1,283 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"replicationProviderSettings\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDuration\": 3,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disable\",\r\n \"storageAccounts\": [\r\n \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n ]\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "473" + ], + "x-ms-client-request-id": [ + "faa2174b-ee83-4c96-93ea-e601c1aa0492" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:51:38 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1/operationresults/a84a60e8-6e56-46a6-a66a-f8790313cc33?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a84a60e8-6e56-46a6-a66a-f8790313cc33", + "faa2174b-ee83-4c96-93ea-e601c1aa0492 5/11/2017 5:51:39 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a84a60e8-6e56-46a6-a66a-f8790313cc33?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "faa2174b-ee83-4c96-93ea-e601c1aa0492" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "49a91096-de54-4c36-8f41-c331179ce568" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175138Z:49a91096-de54-4c36-8f41-c331179ce568" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a84a60e8-6e56-46a6-a66a-f8790313cc33?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzL2E4NGE2MGU4LTZlNTYtNDZhNi1hNjZhLWY4NzkwMzEzY2MzMz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a84a60e8-6e56-46a6-a66a-f8790313cc33\",\r\n \"name\": \"a84a60e8-6e56-46a6-a66a-f8790313cc33\",\r\n \"properties\": {\r\n \"activityId\": \"faa2174b-ee83-4c96-93ea-e601c1aa0492 ActivityId: 49a91096-de54-4c36-8f41-c331179ce568\",\r\n \"scenarioName\": \"ModifyProtectionProfile\",\r\n \"friendlyName\": \"Modify settings of the replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"ModifyProtectionProfilePreflightChecksTask\",\r\n \"name\": \"ModifyProtectionProfilePreflightChecksTask\",\r\n \"startTime\": \"2017-05-11T17:51:41.8100333Z\",\r\n \"endTime\": \"2017-05-11T17:51:41.9194122Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Prerequisites check for updating the replication policy\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ModifyProtectionProfileAssociationParentTask\",\r\n \"name\": \"ModifyProtectionProfileAssociationParentTask\",\r\n \"startTime\": \"0001-01-01T00:00:00\",\r\n \"endTime\": \"0001-01-01T00:00:00\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Updating replication configuration\",\r\n \"state\": \"Other\",\r\n \"stateDescription\": \"Skipped\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n },\r\n {\r\n \"taskId\": \"ModifyProtectionProfileTask\",\r\n \"name\": \"ModifyProtectionProfileTask\",\r\n \"startTime\": \"2017-05-11T17:51:41.9194122Z\",\r\n \"endTime\": \"2017-05-11T17:51:41.9194122Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Updating the replication policy settings\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-11T17:51:38.990435Z\",\r\n \"endTime\": \"2017-05-11T17:51:41Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"targetObjectName\": \"protectionprofile1\",\r\n \"targetInstanceType\": \"ProtectionProfile\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {}\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-11T17:51:38.990435Z\",\r\n \"endTime\": \"2017-05-11T17:51:41Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:52:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/a84a60e8-6e56-46a6-a66a-f8790313cc33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "8ea6fc57-d5f6-406c-acac-bb15152a029f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13861" + ], + "x-ms-correlation-request-id": [ + "0e320d28-58c3-4a0a-8ba6-791025188c19" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175209Z:0e320d28-58c3-4a0a-8ba6-791025188c19" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"name\": \"protectionprofile1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"protectionprofile1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 3,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:52:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "867f276a-89be-4376-b54e-83c7c8f7667d 5/11/2017 5:52:09 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "867f276a-89be-4376-b54e-83c7c8f7667d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13860" + ], + "x-ms-correlation-request-id": [ + "2c68f944-aa28-4630-b07e-c2a1656112e6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175209Z:2c68f944-aa28-4630-b07e-c2a1656112e6" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Qb2xpY2llcy9wcm90ZWN0aW9ucHJvZmlsZTE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "48f297dc-0c70-44c9-8574-6929a90e7619" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"name\": \"protectionprofile1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationPolicies\",\r\n \"properties\": {\r\n \"friendlyName\": \"protectionprofile1\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryPointHistoryDurationInHours\": 3,\r\n \"applicationConsistentSnapshotFrequencyInHours\": 2,\r\n \"replicationInterval\": 300,\r\n \"encryption\": \"Disabled\",\r\n \"activeStorageAccountId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 May 2017 17:52:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "48f297dc-0c70-44c9-8574-6929a90e7619 5/11/2017 5:52:10 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "48f297dc-0c70-44c9-8574-6929a90e7619" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13859" + ], + "x-ms-correlation-request-id": [ + "aaa21a05-4fc0-4736-b1b1-191998c41caa" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170511T175210Z:aaa21a05-4fc0-4736-b1b1-191998c41caa" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateProtectedItem.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateProtectedItem.json new file mode 100644 index 000000000000..b9b0fb8a06e1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateProtectedItem.json @@ -0,0 +1,425 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f37c6041-d989-4bfd-bc1a-e53fb30df3df" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 1,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:43:31 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "f37c6041-d989-4bfd-bc1a-e53fb30df3df 5/15/2017 1:43:32 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "f37c6041-d989-4bfd-bc1a-e53fb30df3df" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14063" + ], + "x-ms-correlation-request-id": [ + "731073ba-194d-4c2e-8625-291fae29057f" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134332Z:731073ba-194d-4c2e-8625-291fae29057f" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b613bdf2-f612-4e41-b6c3-3bfb11ba2e36" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": \"2017-05-15T06:39:35Z\",\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:43:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b613bdf2-f612-4e41-b6c3-3bfb11ba2e36 5/15/2017 1:43:32 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b613bdf2-f612-4e41-b6c3-3bfb11ba2e36" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14062" + ], + "x-ms-correlation-request-id": [ + "8a2960eb-336b-4f43-b32d-f3ddcd69d7ce" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134332Z:8a2960eb-336b-4f43-b32d-f3ddcd69d7ce" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": \"2017-05-15T06:39:35Z\",\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:44:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "1590e2fb-8257-449e-80e5-0ebf8d4827d3 5/15/2017 1:44:07 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "1590e2fb-8257-449e-80e5-0ebf8d4827d3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14049" + ], + "x-ms-correlation-request-id": [ + "21506294-44ae-4943-8652-be9aab789cc9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134406Z:21506294-44ae-4943-8652-be9aab789cc9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "594c095d-180f-45d3-bb4b-9cebd73c0073" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/6672aaf3-0aa2-4b8e-a3bd-fc015ccfd345\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": \"2017-05-15T06:39:35Z\",\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": null,\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:44:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "594c095d-180f-45d3-bb4b-9cebd73c0073 5/15/2017 1:44:07 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "594c095d-180f-45d3-bb4b-9cebd73c0073" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14047" + ], + "x-ms-correlation-request-id": [ + "9ae82e7d-1949-45ab-99ab-352bb7f427e3" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134407Z:9ae82e7d-1949-45ab-99ab-352bb7f427e3" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"licenseType\": \"WindowsServer\",\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"recoveryAzureV2ResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "799" + ], + "x-ms-client-request-id": [ + "e04bee61-50c6-4b2b-bf6c-619903b45b3c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:43:34 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2/operationresults/69ff3cca-bd16-4a50-8967-2d9aca678893?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/69ff3cca-bd16-4a50-8967-2d9aca678893", + "e04bee61-50c6-4b2b-bf6c-619903b45b3c 5/15/2017 1:43:35 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/69ff3cca-bd16-4a50-8967-2d9aca678893?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "e04bee61-50c6-4b2b-bf6c-619903b45b3c" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "5cf644e8-7bf1-41ca-b9f3-3e5ddbe2d7c4" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134335Z:5cf644e8-7bf1-41ca-b9f3-3e5ddbe2d7c4" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/69ff3cca-bd16-4a50-8967-2d9aca678893?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzY5ZmYzY2NhLWJkMTYtNGE1MC04OTY3LTJkOWFjYTY3ODg5Mz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/69ff3cca-bd16-4a50-8967-2d9aca678893\",\r\n \"name\": \"69ff3cca-bd16-4a50-8967-2d9aca678893\",\r\n \"properties\": {\r\n \"activityId\": \"e04bee61-50c6-4b2b-bf6c-619903b45b3c ActivityId: 5cf644e8-7bf1-41ca-b9f3-3e5ddbe2d7c4\",\r\n \"scenarioName\": \"UpdateVmProperties\",\r\n \"friendlyName\": \"Update the virtual machine\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"12346c85-a561-43b1-a63e-7cdcbb59463e\",\r\n \"name\": \"UpdateVmPropertiesTask\",\r\n \"startTime\": \"2017-05-15T13:43:35.4504276Z\",\r\n \"endTime\": \"2017-05-15T13:43:37.9817042Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Update the virtual machine properties\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-15T13:43:35.3920964Z\",\r\n \"endTime\": \"2017-05-15T13:43:38Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"targetObjectName\": \"vm2\",\r\n \"targetInstanceType\": \"ProtectionEntity\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"PrimaryVmName\": \"vm2\",\r\n \"RecoveryVmId\": \"\",\r\n \"RecoveryVmName\": \"vm2\",\r\n \"ProtectionProfileId\": \"0cf7844a-0d07-5dcc-9184-43f90652cd9c\",\r\n \"PrimaryCloudId\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryCloudName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryCloudId\": \"d38048d4-b460-4791-8ece-108395ee8478\",\r\n \"RecoveryCloudName\": \"Microsoft Azure\",\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-15T13:43:35.3920964Z\",\r\n \"endTime\": \"2017-05-15T13:43:38Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 May 2017 13:44:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/69ff3cca-bd16-4a50-8967-2d9aca678893" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "243181f4-dd3c-421a-9573-8843653f22a5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14051" + ], + "x-ms-correlation-request-id": [ + "37cbc325-1f5f-4bf3-ae6d-04b4cf29fcc6" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170515T134405Z:37cbc325-1f5f-4bf3-ae6d-04b4cf29fcc6" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateRecoveryPlan.json b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateRecoveryPlan.json new file mode 100644 index 000000000000..7cc6db75accf --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.Tests/SessionRecords/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Tests.ScenarioTests.ASRTests/UpdateRecoveryPlan.json @@ -0,0 +1,496 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMT9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "18fde195-ef89-45c2-9bad-ef98ebc8f4d4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SiteRecoveryTestSite1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics\",\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"properties\": {\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"encryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"rolloverEncryptionDetails\": {\r\n \"kekState\": \"None\",\r\n \"kekCertThumbprint\": null\r\n },\r\n \"internalIdentifier\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"bcdrState\": \"Valid\",\r\n \"customDetails\": {\r\n \"instanceType\": \"HyperVSite\"\r\n },\r\n \"healthErrorDetails\": [],\r\n \"health\": \"Normal\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:04:03 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "18fde195-ef89-45c2-9bad-ef98ebc8f4d4 5/13/2017 2:04:04 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "18fde195-ef89-45c2-9bad-ef98ebc8f4d4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13747" + ], + "x-ms-correlation-request-id": [ + "26dfc2e5-3dba-4270-9a39-4f267dfdcbee" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140403Z:26dfc2e5-3dba-4270-9a39-4f267dfdcbee" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTYtMDgtMTA=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d4dca308-c3a0-4c1e-88e6-f7755560e735" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"name\": \"cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers\",\r\n \"properties\": {\r\n \"fabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"friendlyName\": \"SiteRecoveryTestSite1\",\r\n \"fabricType\": \"HyperVSite\",\r\n \"protectedItemCount\": 2,\r\n \"pairingStatus\": \"Paired\",\r\n \"role\": \"Primary\",\r\n \"fabricSpecificDetails\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:04:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "d4dca308-c3a0-4c1e-88e6-f7755560e735 5/13/2017 2:04:04 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "d4dca308-c3a0-4c1e-88e6-f7755560e735" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13746" + ], + "x-ms-correlation-request-id": [ + "57918211-c0f8-4f03-8337-c6d9890d7f79" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140404Z:57918211-c0f8-4f03-8337-c6d9890d7f79" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25GYWJyaWNzL1NpdGVSZWNvdmVyeVRlc3RTaXRlMS9yZXBsaWNhdGlvblByb3RlY3Rpb25Db250YWluZXJzL2Nsb3VkX2ZhMDZlMDNiLWUzMDYtNTJmNC1hMDFmLTg4Y2RlYmE2N2ExYy9yZXBsaWNhdGlvblByb3RlY3RlZEl0ZW1zL3ZtMj9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b687cd20-ba39-4f69-b706-c7d28292f100" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"name\": \"vm2\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems\",\r\n \"properties\": {\r\n \"friendlyName\": \"vm2\",\r\n \"protectedItemType\": \"HyperVVirtualMachine\",\r\n \"protectableItemId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectableItems/cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"recoveryServicesProviderId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationRecoveryServicesProviders/ba2a2d25-377f-4f4b-94a4-2981c79b0998\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"primaryProtectionContainerFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryProtectionContainerFriendlyName\": \"Microsoft Azure\",\r\n \"protectionState\": \"Protected\",\r\n \"protectionStateDescription\": \"Protected\",\r\n \"activeLocation\": \"Primary\",\r\n \"testFailoverState\": \"None\",\r\n \"testFailoverStateDescription\": \"None\",\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"DisableProtection\",\r\n \"TestFailover\"\r\n ],\r\n \"replicationHealth\": \"Normal\",\r\n \"replicationHealthErrors\": [],\r\n \"policyId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationPolicies/protectionprofile1\",\r\n \"policyFriendlyName\": \"protectionprofile1\",\r\n \"currentScenario\": {\r\n \"scenarioName\": \"None\",\r\n \"jobId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/None\",\r\n \"startTime\": \"1753-01-01T01:01:01Z\"\r\n },\r\n \"failoverRecoveryPointId\": null,\r\n \"providerSpecificDetails\": {\r\n \"instanceType\": \"HyperVReplicaAzure\",\r\n \"azureVMDiskDetails\": [\r\n {\r\n \"vhdType\": \"OperatingSystem\",\r\n \"vhdId\": \"474006f7-6ae8-4c26-9143-e056b30374ab\",\r\n \"vhdName\": \"vm2\",\r\n \"maxSizeMB\": \"1024\",\r\n \"targetDiskLocation\": null,\r\n \"targetDiskName\": null,\r\n \"lunId\": \"0\"\r\n }\r\n ],\r\n \"recoveryAzureVMName\": \"vm2\",\r\n \"recoveryAzureVMSize\": \"Basic_A0\",\r\n \"recoveryAzureStorageAccount\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.Storage/storageAccounts/storavrai\",\r\n \"recoveryAzureLogStorageAccountId\": null,\r\n \"lastReplicatedTime\": null,\r\n \"vmId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\",\r\n \"vmProtectionState\": \"Protected\",\r\n \"vmProtectionStateDescription\": \"Protected\",\r\n \"initialReplicationDetails\": {\r\n \"initialReplicationType\": \"InitialReplication\",\r\n \"initialReplicationProgressPercentage\": \"0\"\r\n },\r\n \"vmNics\": [\r\n {\r\n \"nicId\": \"TWljcm9zb2Z0OkNGMjlFQjdBLTU4RTEtNDVCNC1CNzYwLUM1MzBDMTEzNERGNFw0NDYyM0NDRS02NDJDLTQ0MTYtOTI0My0wMzVDMjhGRjM1MTc=\",\r\n \"replicaNicId\": null,\r\n \"sourceNicArmId\": null,\r\n \"vMSubnetName\": \"FRExternalNetwork\",\r\n \"vMNetworkName\": \"FRExternalNetwork\",\r\n \"recoveryVMNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"recoveryVMSubnetName\": \"Subnet1\",\r\n \"ipAddressType\": \"Static\",\r\n \"primaryNicStaticIPAddress\": null,\r\n \"replicaNicStaticIPAddress\": \"\",\r\n \"selectionType\": \"SelectedByUser\"\r\n }\r\n ],\r\n \"selectedRecoveryAzureNetworkId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai\",\r\n \"encryption\": \"Disabled\",\r\n \"oSDetails\": {\r\n \"osType\": \"Windows\",\r\n \"productType\": \"UNKNOWN\",\r\n \"osEdition\": \"Standard\",\r\n \"oSVersion\": \"1.1.1.1\",\r\n \"oSMajorVersion\": \"0\",\r\n \"oSMinorVersion\": \"0\"\r\n },\r\n \"sourceVmRAMSizeInMB\": 32,\r\n \"sourceVmCPUCount\": 1,\r\n \"enableRDPOnTargetOption\": \"Never\",\r\n \"recoveryAzureResourceGroupId\": \"/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1\",\r\n \"recoveryAvailabilitySetId\": \"\",\r\n \"useManagedDisks\": \"false\",\r\n \"licenseType\": \"WindowsServer\"\r\n },\r\n \"recoveryContainerId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/d49858f157601230a6ac5862fbbc6e63bf38d23ecd96cf953767945d457fe9d5/replicationProtectionContainers/d38048d4-b460-4791-8ece-108395ee8478\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:04:04 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "b687cd20-ba39-4f69-b706-c7d28292f100 5/13/2017 2:04:05 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "b687cd20-ba39-4f69-b706-c7d28292f100" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13745" + ], + "x-ms-correlation-request-id": [ + "e184dfd2-4473-47eb-8022-5eef932e71d5" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140404Z:e184dfd2-4473-47eb-8022-5eef932e71d5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"virtualMachineId\": \"vm2\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "588" + ], + "x-ms-client-request-id": [ + "2deb0d8c-1c1f-402d-879b-7beafa458b2e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:04:09 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1/operationresults/866c3b61-622c-426d-b402-c7d13a0b4b17?api-version=2016-08-10" + ], + "Retry-After": [ + "30" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/866c3b61-622c-426d-b402-c7d13a0b4b17", + "2deb0d8c-1c1f-402d-879b-7beafa458b2e 5/13/2017 2:04:09 PM" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/866c3b61-622c-426d-b402-c7d13a0b4b17?api-version=2016-08-10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-client-request-id": [ + "2deb0d8c-1c1f-402d-879b-7beafa458b2e" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "99b3d377-7915-4660-9395-b408229e067d" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140409Z:99b3d377-7915-4660-9395-b408229e067d" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/866c3b61-622c-426d-b402-c7d13a0b4b17?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25Kb2JzLzg2NmMzYjYxLTYyMmMtNDI2ZC1iNDAyLWM3ZDEzYTBiNGIxNz9hcGktdmVyc2lvbj0yMDE2LTA4LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/866c3b61-622c-426d-b402-c7d13a0b4b17\",\r\n \"name\": \"866c3b61-622c-426d-b402-c7d13a0b4b17\",\r\n \"properties\": {\r\n \"activityId\": \"2deb0d8c-1c1f-402d-879b-7beafa458b2e ActivityId: 99b3d377-7915-4660-9395-b408229e067d\",\r\n \"scenarioName\": \"UpdateRecoveryPlan\",\r\n \"friendlyName\": \"Save a recovery plan\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"tasks\": [\r\n {\r\n \"taskId\": \"fa110cc8-09b8-4d97-84de-d6c54df300dc\",\r\n \"name\": \"SaveRecoveryPlanTask\",\r\n \"startTime\": \"2017-05-13T14:04:09.9589112Z\",\r\n \"endTime\": \"2017-05-13T14:04:10.2870387Z\",\r\n \"allowedActions\": [],\r\n \"friendlyName\": \"Save a recovery plan task\",\r\n \"state\": \"Succeeded\",\r\n \"stateDescription\": \"Completed\",\r\n \"taskType\": \"TaskDetails\",\r\n \"customDetails\": {\r\n \"instanceType\": \"TaskDetails\"\r\n },\r\n \"groupTaskCustomDetails\": null,\r\n \"errors\": []\r\n }\r\n ],\r\n \"errors\": [],\r\n \"startTime\": \"2017-05-13T14:04:09.5743171Z\",\r\n \"endTime\": \"2017-05-13T14:04:09Z\",\r\n \"allowedActions\": [],\r\n \"targetObjectId\": \"ab73c1fe-3edc-4a6f-b891-a0f161ffc3ff\",\r\n \"targetObjectName\": \"rpTest1\",\r\n \"targetInstanceType\": \"RecoveryPlan\",\r\n \"customDetails\": {\r\n \"instanceType\": \"AsrJobDetails\",\r\n \"affectedObjectDetails\": {\r\n \"PrimaryVmmId\": \"fa06e03b-e306-52f4-a01f-88cdeba67a1c\",\r\n \"PrimaryVmmName\": \"SiteRecoveryTestSite1\",\r\n \"RecoveryVmmId\": \"21a9403c-6ec1-44f2-b744-b4e50b792387\",\r\n \"RecoveryVmmName\": \"Microsoft Azure\",\r\n \"PrimaryFabricProviderId\": \"HyperVSite\",\r\n \"RecoveryFabricProviderId\": \"Azure\"\r\n }\r\n }\r\n },\r\n \"status\": \"Succeeded\",\r\n \"error\": null,\r\n \"startTime\": \"2017-05-13T14:04:09.5743171Z\",\r\n \"endTime\": \"2017-05-13T14:04:09Z\"\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:04:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationJobs/866c3b61-622c-426d-b402-c7d13a0b4b17" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "e2a11312-7c74-4aca-9f76-0e74e593b0a2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13732" + ], + "x-ms-correlation-request-id": [ + "b92cfbe8-023a-4f15-8e5a-d9e60ad59bcf" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140440Z:b92cfbe8-023a-4f15-8e5a-d9e60ad59bcf" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\"\r\n ],\r\n \"currentScenario\": null,\r\n \"currentScenarioStatus\": null,\r\n \"currentScenarioStatusDescription\": null,\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"virtualMachineId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:04:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ccf5ed72-e179-4fb4-add3-109e3665689e 5/13/2017 2:04:41 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "ccf5ed72-e179-4fb4-add3-109e3665689e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13731" + ], + "x-ms-correlation-request-id": [ + "4e0d95a0-d868-433e-92e4-5fa51f7a16d9" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140441Z:4e0d95a0-d868-433e-92e4-5fa51f7a16d9" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1?api-version=2016-08-10", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvYzE4Mzg2NWUtNjA3Ny00NmYyLWEzYjEtZGViMGY0ZjQ2NTBhL3Jlc291cmNlR3JvdXBzL3NpdGVyZWNvdmVyeXByb2QxL3Byb3ZpZGVycy9NaWNyb3NvZnQuUmVjb3ZlcnlTZXJ2aWNlcy92YXVsdHMvU0RLVmF1bHQvcmVwbGljYXRpb25SZWNvdmVyeVBsYW5zL3JwVGVzdDE/YXBpLXZlcnNpb249MjAxNi0wOC0xMA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "32827b6f-4644-4c47-9740-acd57605a700" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.25009.03", + "Microsoft.Azure.Management.RecoveryServices.SiteRecovery.SiteRecoveryManagementClient/1.4.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationRecoveryPlans/rpTest1\",\r\n \"name\": \"rpTest1\",\r\n \"type\": \"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans\",\r\n \"properties\": {\r\n \"friendlyName\": \"rpTest1\",\r\n \"primaryFabricId\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1\",\r\n \"primaryFabricFriendlyName\": \"SiteRecoveryTestSite1\",\r\n \"recoveryFabricId\": \"Microsoft Azure\",\r\n \"recoveryFabricFriendlyName\": \"Microsoft Azure\",\r\n \"failoverDeploymentModel\": \"ResourceManager\",\r\n \"replicationProviders\": [\r\n \"HyperVReplicaAzure\"\r\n ],\r\n \"allowedOperations\": [\r\n \"PlannedFailover\",\r\n \"UnplannedFailover\",\r\n \"TestFailover\"\r\n ],\r\n \"currentScenario\": null,\r\n \"currentScenarioStatus\": null,\r\n \"currentScenarioStatusDescription\": null,\r\n \"groups\": [\r\n {\r\n \"groupType\": \"Shutdown\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Failover\",\r\n \"replicationProtectedItems\": [],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n },\r\n {\r\n \"groupType\": \"Boot\",\r\n \"replicationProtectedItems\": [\r\n {\r\n \"id\": \"/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryprod1/providers/Microsoft.RecoveryServices/vaults/SDKVault/replicationFabrics/SiteRecoveryTestSite1/replicationProtectionContainers/cloud_fa06e03b-e306-52f4-a01f-88cdeba67a1c/replicationProtectedItems/vm2\",\r\n \"virtualMachineId\": \"cf29eb7a-58e1-45b4-b760-c530c1134df4\"\r\n }\r\n ],\r\n \"startGroupActions\": [],\r\n \"endGroupActions\": []\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sat, 13 May 2017 14:04:43 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Server": [ + "Microsoft-IIS/8.0", + "Microsoft-IIS/8.5" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "32827b6f-4644-4c47-9740-acd57605a700 5/13/2017 2:04:44 PM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-client-request-id": [ + "32827b6f-4644-4c47-9740-acd57605a700" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "13728" + ], + "x-ms-correlation-request-id": [ + "8ba93b9a-037d-40f2-90cd-c53f7c14fa34" + ], + "x-ms-routing-request-id": [ + "CENTRALINDIA:20170513T140444Z:8ba93b9a-037d-40f2-90cd-c53f7c14fa34" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "c183865e-6077-46f2-a3b1-deb0f4f4650a" + } +} \ No newline at end of file diff --git a/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.sln b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.sln new file mode 100644 index 000000000000..7391a59636b4 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/RecoveryServices.SiteRecovery.sln @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26403.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RecoveryServices.SiteRecovery.Tests", "RecoveryServices.SiteRecovery.Tests\RecoveryServices.SiteRecovery.Tests.csproj", "{27EFA488-E3C5-4D97-BBF3-138AF1326F93}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.RecoveryServices.SiteRecovery", "Management.RecoveryServices.SiteRecovery\Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj", "{F97E7A6E-5781-4823-8F9C-F72619BEEC33}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug-Net45|Any CPU = Debug-Net45|Any CPU + Debug-Net45|x64 = Debug-Net45|x64 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Debug|x64.ActiveCfg = Debug|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Debug|x64.Build.0 = Debug|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Debug-Net45|Any CPU.ActiveCfg = Debug|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Debug-Net45|Any CPU.Build.0 = Debug|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Debug-Net45|x64.ActiveCfg = Debug|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Debug-Net45|x64.Build.0 = Debug|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Release|Any CPU.Build.0 = Release|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Release|x64.ActiveCfg = Release|Any CPU + {27EFA488-E3C5-4D97-BBF3-138AF1326F93}.Release|x64.Build.0 = Release|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Debug|x64.ActiveCfg = Debug|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Debug|x64.Build.0 = Debug|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Debug-Net45|Any CPU.ActiveCfg = Debug|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Debug-Net45|Any CPU.Build.0 = Debug|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Debug-Net45|x64.ActiveCfg = Debug|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Debug-Net45|x64.Build.0 = Debug|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Release|Any CPU.Build.0 = Release|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Release|x64.ActiveCfg = Release|Any CPU + {F97E7A6E-5781-4823-8F9C-F72619BEEC33}.Release|x64.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal