Class PreValidateEnableBackupRequest
java.lang.Object
com.azure.resourcemanager.recoveryservicesbackup.models.PreValidateEnableBackupRequest
Contract to validate if backup can be enabled on the given resource in a given vault and given configuration. It will
validate followings 1. Vault capacity 2. VM is already protected 3. Any VM related configuration passed in
properties.
-
Constructor Summary
ConstructorDescriptionCreates an instance of PreValidateEnableBackupRequest class. -
Method Summary
Modifier and TypeMethodDescriptionGet the properties property: Configuration of VM if any needs to be validated like OS type etc.Get the resourceId property: ARM Virtual Machine Id.Get the resourceType property: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc.void
validate()
Validates the instance.vaultId()
Get the vaultId property: ARM id of the Recovery Services Vault.withProperties
(String properties) Set the properties property: Configuration of VM if any needs to be validated like OS type etc.withResourceId
(String resourceId) Set the resourceId property: ARM Virtual Machine Id.withResourceType
(DataSourceType resourceType) Set the resourceType property: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc.withVaultId
(String vaultId) Set the vaultId property: ARM id of the Recovery Services Vault.
-
Constructor Details
-
PreValidateEnableBackupRequest
public PreValidateEnableBackupRequest()Creates an instance of PreValidateEnableBackupRequest class.
-
-
Method Details
-
resourceType
Get the resourceType property: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc.- Returns:
- the resourceType value.
-
withResourceType
Set the resourceType property: ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc.- Parameters:
resourceType
- the resourceType value to set.- Returns:
- the PreValidateEnableBackupRequest object itself.
-
resourceId
Get the resourceId property: ARM Virtual Machine Id.- Returns:
- the resourceId value.
-
withResourceId
Set the resourceId property: ARM Virtual Machine Id.- Parameters:
resourceId
- the resourceId value to set.- Returns:
- the PreValidateEnableBackupRequest object itself.
-
vaultId
Get the vaultId property: ARM id of the Recovery Services Vault.- Returns:
- the vaultId value.
-
withVaultId
Set the vaultId property: ARM id of the Recovery Services Vault.- Parameters:
vaultId
- the vaultId value to set.- Returns:
- the PreValidateEnableBackupRequest object itself.
-
properties
Get the properties property: Configuration of VM if any needs to be validated like OS type etc.- Returns:
- the properties value.
-
withProperties
Set the properties property: Configuration of VM if any needs to be validated like OS type etc.- Parameters:
properties
- the properties value to set.- Returns:
- the PreValidateEnableBackupRequest object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-