Share via


SiteRecoveryPolicyCollection.GetIfExists(String, CancellationToken) Method

Definition

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}
  • Operation Id: ReplicationPolicies_Get
  • Default Api Version: 2023-08-01
  • Resource: SiteRecoveryPolicyResource
public virtual Azure.NullableResponse<Azure.ResourceManager.RecoveryServicesSiteRecovery.SiteRecoveryPolicyResource> GetIfExists (string policyName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.RecoveryServicesSiteRecovery.SiteRecoveryPolicyResource>
override this.GetIfExists : string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.RecoveryServicesSiteRecovery.SiteRecoveryPolicyResource>
Public Overridable Function GetIfExists (policyName As String, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of SiteRecoveryPolicyResource)

Parameters

policyName
String

Replication policy name.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

policyName is an empty string, and was expected to be non-empty.

policyName is null.

Applies to