Share via


BackupProtectedItemCollection.GetIfExists Method

Definition

Tries to get details for this resource from the service.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}
  • Operation Id: ProtectedItems_Get
public virtual Azure.NullableResponse<Azure.ResourceManager.RecoveryServicesBackup.BackupProtectedItemResource> GetIfExists (string protectedItemName, string filter = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExists : string * string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.RecoveryServicesBackup.BackupProtectedItemResource>
override this.GetIfExists : string * string * System.Threading.CancellationToken -> Azure.NullableResponse<Azure.ResourceManager.RecoveryServicesBackup.BackupProtectedItemResource>
Public Overridable Function GetIfExists (protectedItemName As String, Optional filter As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As NullableResponse(Of BackupProtectedItemResource)

Parameters

protectedItemName
String

Backed up item name whose details are to be fetched.

filter
String

OData filter options.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

protectedItemName is null.

Applies to