Skip to content

Commit 7df8f9d

Browse files
Fixed naming
1 parent 361f09f commit 7df8f9d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

compute/cloud-client/src/main/java/compute/snapshot/GetSnapshotSchedule.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,23 @@ public static void main(String[] args) throws IOException {
3131
// Name of the region in which your snapshot schedule is located.
3232
String region = "us-central1";
3333
// Name of your snapshot schedule.
34-
String scheduleName = "YOUR_SCHEDULE_NAME";
34+
String snapshotScheduleName = "YOUR_SCHEDULE_NAME";
3535

36-
getSnapshotSchedule(projectId, region, scheduleName);
36+
getSnapshotSchedule(projectId, region, snapshotScheduleName);
3737
}
3838

3939
// Retrieves the details of a snapshot schedule.
4040
public static ResourcePolicy getSnapshotSchedule(
41-
String projectId, String region, String scheduleName) throws IOException {
41+
String projectId, String region, String snapshotScheduleName) throws IOException {
4242
// Initialize client that will be used to send requests. This client only needs to be created
4343
// once, and can be reused for multiple requests.
4444
try (ResourcePoliciesClient resourcePoliciesClient = ResourcePoliciesClient.create()) {
4545
GetResourcePolicyRequest request = GetResourcePolicyRequest.newBuilder()
4646
.setProject(projectId)
4747
.setRegion(region)
48-
.setResourcePolicy(scheduleName)
48+
.setResourcePolicy(snapshotScheduleName)
4949
.build();
50+
5051
return resourcePoliciesClient.get(request);
5152
}
5253
}

0 commit comments

Comments
 (0)