getBackupPlan method
Returns BackupPlan details for the specified
BackupPlanId. The details are the body of a backup plan in
JSON format, in addition to plan metadata.
May throw InvalidParameterValueException.
May throw MissingParameterValueException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter backupPlanId :
Uniquely identifies a backup plan.
Parameter maxScheduledRunsPreview :
Number of future scheduled backup runs to preview. When set to 0
(default), no scheduled runs preview is included in the response. Valid
range is 0-10.
Parameter versionId :
Unique, randomly generated, Unicode, UTF-8 encoded strings that are at
most 1,024 bytes long. Version IDs cannot be edited.
Implementation
Future<GetBackupPlanOutput> getBackupPlan({
required String backupPlanId,
int? maxScheduledRunsPreview,
String? versionId,
}) async {
_s.validateNumRange(
'maxScheduledRunsPreview',
maxScheduledRunsPreview,
0,
10,
);
final $query = <String, List<String>>{
if (maxScheduledRunsPreview != null)
'MaxScheduledRunsPreview': [maxScheduledRunsPreview.toString()],
if (versionId != null) 'versionId': [versionId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/backup/plans/${Uri.encodeComponent(backupPlanId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetBackupPlanOutput.fromJson(response);
}