@@ -451,21 +451,21 @@ ConfigurationAsyncClient configurationAsyncClient = new ConfigurationClientBuild
451451
452452### Create a Snapshot
453453
454- To create a snapshot, you need to instantiate the ` ConfigurationSettingsSnapshot ` class and specify filters to determine
454+ To create a snapshot, you need to instantiate the ` ConfigurationSnapshot ` class and specify filters to determine
455455which configuration settings should be included. The creation process is a Long-Running Operation (LRO) and can be
456456achieved by calling the ` beginCreateSnapshot ` method.
457457
458458``` java readme-sample-createSnapshot
459459String snapshotName = " {snapshotName}" ;
460460// Prepare the snapshot filters
461- List<SnapshotSettingFilter > filters = new ArrayList<> ();
461+ List<ConfigurationSettingsFilter > filters = new ArrayList<> ();
462462// Key Name also supports RegExp but only support prefix end with "*", such as "k*" and is case-sensitive.
463- filters. add(new SnapshotSettingFilter (" Test*" ));
464- SyncPoller<CreateSnapshotOperationDetail , ConfigurationSettingsSnapshot > poller =
465- configurationClient. beginCreateSnapshot(snapshotName, new ConfigurationSettingsSnapshot (filters), Context . NONE );
463+ filters. add(new ConfigurationSettingsFilter (" Test*" ));
464+ SyncPoller<PollResult , ConfigurationSnapshot > poller =
465+ configurationClient. beginCreateSnapshot(snapshotName, new ConfigurationSnapshot (filters), Context . NONE );
466466poller. setPollInterval(Duration . ofSeconds(10 ));
467467poller. waitForCompletion();
468- ConfigurationSettingsSnapshot snapshot = poller. getFinalResult();
468+ ConfigurationSnapshot snapshot = poller. getFinalResult();
469469System . out. printf(" Snapshot name=%s is created at %s, snapshot status is %s.%n" ,
470470 snapshot. getName(), snapshot. getCreatedAt(), snapshot. getStatus());
471471```
@@ -476,7 +476,7 @@ Once a configuration setting snapshot is created, you can retrieve it using the
476476
477477``` java readme-sample-getSnapshot
478478String snapshotName = " {snapshotName}" ;
479- ConfigurationSettingsSnapshot getSnapshot = configurationClient. getSnapshot(snapshotName);
479+ ConfigurationSnapshot getSnapshot = configurationClient. getSnapshot(snapshotName);
480480System . out. printf(" Snapshot name=%s is created at %s, snapshot status is %s.%n" ,
481481 getSnapshot. getName(), getSnapshot. getCreatedAt(), getSnapshot. getStatus());
482482```
@@ -488,7 +488,7 @@ to `archived`.
488488
489489``` java readme-sample-archiveSnapshot
490490String snapshotName = " {snapshotName}" ;
491- ConfigurationSettingsSnapshot archivedSnapshot = configurationClient. archiveSnapshot(snapshotName);
491+ ConfigurationSnapshot archivedSnapshot = configurationClient. archiveSnapshot(snapshotName);
492492System . out. printf(" Archived snapshot name=%s is created at %s, snapshot status is %s.%n" ,
493493 archivedSnapshot. getName(), archivedSnapshot. getCreatedAt(), archivedSnapshot. getStatus());
494494```
@@ -500,7 +500,7 @@ snapshot to `ready`.
500500
501501``` java readme-sample-recoverSnapshot
502502String snapshotName = " {snapshotName}" ;
503- ConfigurationSettingsSnapshot recoveredSnapshot = configurationClient. recoverSnapshot(snapshotName);
503+ ConfigurationSnapshot recoveredSnapshot = configurationClient. recoverSnapshot(snapshotName);
504504System . out. printf(" Recovered snapshot name=%s is created at %s, snapshot status is %s.%n" ,
505505 recoveredSnapshot. getName(), recoveredSnapshot. getCreatedAt(), recoveredSnapshot. getStatus());
506506```
@@ -511,10 +511,10 @@ To retrieve all snapshots, you can use the `listSnapshots` method.
511511
512512``` java readme-sample-getAllSnapshots
513513String snapshotNameProduct = " {snapshotNameInProduct}" ;
514- SnapshotSelector snapshotSelector = new SnapshotSelector (). setName (snapshotNameProduct);
515- PagedIterable<ConfigurationSettingsSnapshot > configurationSettingsSnapshots =
514+ SnapshotSelector snapshotSelector = new SnapshotSelector (). setNameFilter (snapshotNameProduct);
515+ PagedIterable<ConfigurationSnapshot > configurationSnapshots =
516516 configurationClient. listSnapshots(snapshotSelector);
517- for (ConfigurationSettingsSnapshot snapshot : configurationSettingsSnapshots ) {
517+ for (ConfigurationSnapshot snapshot : configurationSnapshots ) {
518518 System . out. printf(" Listed Snapshot name = %s is created at %s, snapshot status is %s.%n" ,
519519 snapshot. getName(), snapshot. getCreatedAt(), snapshot. getStatus());
520520}
0 commit comments