Type du point de restauration. Les valeurs possibles sont None, FastRestore, UnknownFutureValue. Optional.
valeurs restorePointPreference
Member
Description
dernier
Retourne le dernier point de restauration pour une période de protection donnée.
aîné
Retourne le point de restauration le plus ancien pour une période de protection donnée.
Réponse
Si elle réussit, cette action renvoie un 200 OK code de réponse et un objet restorePointSearchResponse dans le corps de la réponse.
Remarque
Les appels retournent un maximum de cinq points de restauration.
Vous pouvez inclure un maximum de 20 unités de protection dans une seule requête, et la réponse n’est pas paginée.
Lorsque vous fournissez une expression pour la propriété artifactQuery , vous devez fournir un seul ID d’unité de protection dans la propriété protectionUnitIds .
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Solutions.BackupRestore.RestorePoints.Search;
using Microsoft.Graph.Models;
var requestBody = new SearchPostRequestBody
{
ProtectionUnitIds = new List<string>
{
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
"43014d8c-71fe-4d00-a01a-31850bc5b42b",
"63014d8c-71fe-4d00-a01a-31850bc5b42c",
"83014d8c-71fe-4d00-a01a-31850bc5b42d",
},
ProtectionTimePeriod = new TimePeriod
{
StartDateTime = DateTimeOffset.Parse("2021-01-01T00:00:00Z"),
EndDateTime = DateTimeOffset.Parse("2021-01-08T00:00:00Z"),
},
RestorePointPreference = RestorePointPreference.Latest,
Tags = RestorePointTags.FastRestore,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BackupRestore.RestorePoints.Search.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.solutions.backuprestore.restorepoints.search.SearchPostRequestBody searchPostRequestBody = new com.microsoft.graph.solutions.backuprestore.restorepoints.search.SearchPostRequestBody();
LinkedList<String> protectionUnitIds = new LinkedList<String>();
protectionUnitIds.add("23014d8c-71fe-4d00-a01a-31850bc5b42a");
protectionUnitIds.add("43014d8c-71fe-4d00-a01a-31850bc5b42b");
protectionUnitIds.add("63014d8c-71fe-4d00-a01a-31850bc5b42c");
protectionUnitIds.add("83014d8c-71fe-4d00-a01a-31850bc5b42d");
searchPostRequestBody.setProtectionUnitIds(protectionUnitIds);
TimePeriod protectionTimePeriod = new TimePeriod();
OffsetDateTime startDateTime = OffsetDateTime.parse("2021-01-01T00:00:00Z");
protectionTimePeriod.setStartDateTime(startDateTime);
OffsetDateTime endDateTime = OffsetDateTime.parse("2021-01-08T00:00:00Z");
protectionTimePeriod.setEndDateTime(endDateTime);
searchPostRequestBody.setProtectionTimePeriod(protectionTimePeriod);
searchPostRequestBody.setRestorePointPreference(RestorePointPreference.Latest);
searchPostRequestBody.setTags(EnumSet.of(RestorePointTags.FastRestore));
var result = graphClient.solutions().backupRestore().restorePoints().search().post(searchPostRequestBody);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.solutions.backuprestore.restorepoints.search.search_post_request_body import SearchPostRequestBody
from msgraph.generated.models.time_period import TimePeriod
from msgraph.generated.models.restore_point_preference import RestorePointPreference
from msgraph.generated.models.restore_point_tags import RestorePointTags
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SearchPostRequestBody(
protection_unit_ids = [
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
"43014d8c-71fe-4d00-a01a-31850bc5b42b",
"63014d8c-71fe-4d00-a01a-31850bc5b42c",
"83014d8c-71fe-4d00-a01a-31850bc5b42d",
],
protection_time_period = TimePeriod(
start_date_time = "2021-01-01T00:00:00Z",
end_date_time = "2021-01-08T00:00:00Z",
),
restore_point_preference = RestorePointPreference.Latest,
tags = RestorePointTags.FastRestore,
)
result = await graph_client.solutions.backup_restore.restore_points.search.post(request_body)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Solutions.BackupRestore.RestorePoints.Search;
using Microsoft.Graph.Models;
var requestBody = new SearchPostRequestBody
{
ArtifactQuery = new ArtifactQuery
{
QueryExpression = "(Sender -eq 'abc@contoso.com') -and (Subject -like '*Check email*' -or Subject -like ' Important') -and (HasAttachment -eq 'true') -and (PitrDumpsterActionTriggeredTime -gt '{2024-09-21T08:20:00.0000000Z}')",
ArtifactType = RestorableArtifact.Message,
},
ProtectionUnitIds = new List<string>
{
"23014d8c-71fe-4d00-a01a-31850bc5b42a",
},
ProtectionTimePeriod = new TimePeriod
{
StartDateTime = DateTimeOffset.Parse("2021-01-01T00:00:00Z"),
},
RestorePointPreference = RestorePointPreference.Oldest,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BackupRestore.RestorePoints.Search.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.solutions.backuprestore.restorepoints.search.SearchPostRequestBody searchPostRequestBody = new com.microsoft.graph.solutions.backuprestore.restorepoints.search.SearchPostRequestBody();
ArtifactQuery artifactQuery = new ArtifactQuery();
artifactQuery.setQueryExpression("(Sender -eq 'abc@contoso.com') -and (Subject -like '*Check email*' -or Subject -like ' Important') -and (HasAttachment -eq 'true') -and (PitrDumpsterActionTriggeredTime -gt '{2024-09-21T08:20:00.0000000Z}')");
artifactQuery.setArtifactType(RestorableArtifact.Message);
searchPostRequestBody.setArtifactQuery(artifactQuery);
LinkedList<String> protectionUnitIds = new LinkedList<String>();
protectionUnitIds.add("23014d8c-71fe-4d00-a01a-31850bc5b42a");
searchPostRequestBody.setProtectionUnitIds(protectionUnitIds);
TimePeriod protectionTimePeriod = new TimePeriod();
OffsetDateTime startDateTime = OffsetDateTime.parse("2021-01-01T00:00:00Z");
protectionTimePeriod.setStartDateTime(startDateTime);
searchPostRequestBody.setProtectionTimePeriod(protectionTimePeriod);
searchPostRequestBody.setRestorePointPreference(RestorePointPreference.Oldest);
var result = graphClient.solutions().backupRestore().restorePoints().search().post(searchPostRequestBody);