Skip to content

feat(compute): add compute snapshot schedule create/get/edit/list/delete samples #9742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Dec 30, 2024

Conversation

TetyanaYahodska
Copy link
Contributor

@TetyanaYahodska TetyanaYahodska commented Nov 27, 2024

Description

Documentation - https://cloud.google.com/compute/docs/disks/scheduled-snapshots?authuser=0#create_snapshot_schedule , https://cloud.google.com/compute/docs/disks/manage-snapshot-schedules?authuser=0#gcloud_3, https://cloud.google.com/compute/docs/disks/manage-snapshot-schedules?authuser=0#view_snapshot_schedules
Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@TetyanaYahodska TetyanaYahodska added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 27, 2024
@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: compute Issues related to the Compute Engine API. labels Nov 27, 2024
@TetyanaYahodska TetyanaYahodska changed the title Implemented compute_snapshot_schedule_delete and compute_snapshot_sch… feat(compute): add compute snapshot schedule create/delete samples Nov 27, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 1, 2024
@TetyanaYahodska TetyanaYahodska added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 1, 2024
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 1, 2024
@TetyanaYahodska TetyanaYahodska added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 1, 2024
@TetyanaYahodska TetyanaYahodska marked this pull request as ready for review December 1, 2024 17:59
Copy link

snippet-bot bot commented Dec 1, 2024

Here is the summary of changes.

You are about to add 5 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 2, 2024
@iennae
Copy link
Contributor

iennae commented Dec 18, 2024

@gemini review

@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 18, 2024
@TetyanaYahodska TetyanaYahodska added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 18, 2024
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 18, 2024
@TetyanaYahodska TetyanaYahodska added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 19, 2024
// https://cloud.google.com/compute/docs/disks/snapshots?authuser=0#selecting_a_storage_location
String storageLocation = "US";
// Determines what happens to your snapshots if the source disk is deleted.
String onSourceDiskDelete = "KEEP_AUTO_SNAPSHOTS";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an enum that can be used here instead of the string literal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have this enum. Thank you! Fixed

Comment on lines 77 to 95
// Define the daily schedule.
// ResourcePolicyDailyCycle dailySchedule =
// ResourcePolicyDailyCycle.newBuilder()
// .setDaysInCycle(1) // Every day
// .setStartTime(startTime)
// .build();

// Define the weekly schedule.
// List<ResourcePolicyWeeklyCycleDayOfWeek> dayOfWeeks = new ArrayList<>();
// ResourcePolicyWeeklyCycleDayOfWeek tuesdaySchedule =
// ResourcePolicyWeeklyCycleDayOfWeek.newBuilder()
// .setDay(ResourcePolicyWeeklyCycleDayOfWeek.Day.TUESDAY.toString())
// .setStartTime(startTime)
// .build();
// dayOfWeeks.add(tuesdaySchedule);
//
// ResourcePolicyWeeklyCycle weeklyCycle = ResourcePolicyWeeklyCycle.newBuilder()
// .addAllDayOfWeeks(dayOfWeeks)
// .build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to show this in the sample? Having commented out code is not the best practice.
Kindly remove.

Copy link
Contributor Author

@TetyanaYahodska TetyanaYahodska Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Deleted

String snapshotScheduleName, String scheduleDescription, int maxRetentionDays,
String storageLocation, String onSourceDiskDelete)
throws IOException, ExecutionException, InterruptedException, TimeoutException {
String startTime = "08:00";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems odd. Kindly add a relevant documentation on the time specification format.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

START_TIME: the start time in the UTC time zone. The time must start on the hour.

For example:

2:00 PM PST must be specified as 22:00.
If you set a start time of 22:13, you receive an error. https://cloud.google.com/compute/docs/disks/scheduled-snapshots?authuser=0#gcloud

Comment on lines 110 to 111
// .setDailySchedule(dailySchedule) //Set Daily Schedule
// .setWeeklySchedule(weeklyCycle) // Set Weekly Schedule
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question here. I think we should remove this. Makes the code more complicated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Deleted

Comment on lines 66 to 69
ResourcePolicySnapshotSchedulePolicySnapshotProperties snapshotProperties =
ResourcePolicySnapshotSchedulePolicySnapshotProperties.newBuilder()
.addStorageLocations(storageLocation)
.build();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to after line 102 to match the order with snapshotSchedulePolicy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Moved

Comment on lines 56 to 60
for (ResourcePolicy resourcePolicy : resourcePoliciesClient.list(request).iterateAll()) {
list.add(resourcePolicy);
}
}
return list;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggesting to simplify this code. Call the API and get the return value. Iterate the return value, print it and then return it. Please refrain from using additional list data structures as it's not strictly needed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestions! Fixed code and added printing

public static Status editSnapshotSchedule(
String projectId, String region, String snapshotScheduleName)
throws IOException, InterruptedException, ExecutionException, TimeoutException {
String description = "Updated description11";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please modify the value to be more descriptive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Some characters remained after testing. Extra characters have been removed.

String description = "Updated description11";
Map<String, String> snapshotLabels = new HashMap<>();
snapshotLabels.put("key", "value");
ResourcePolicyWeeklyCycleDayOfWeek dayOfWeek = ResourcePolicyWeeklyCycleDayOfWeek.newBuilder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto. Please move all Compute API related code within the try catch block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines 70 to 71
ResourcePolicy existingSchedule = resourcePoliciesClient
.get(projectId, region, snapshotScheduleName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to get the existing schedule to set the new properties? The REST example in the docs looks like they override the old properties.

Have you tried constructing the patch request directly by setting the new properties, instead of retrieving the old ones and clearing them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can construct the patch request directly. Thank you for the suggestion! Fixed code.

Status status = EditSnapshotSchedule.editSnapshotSchedule(
PROJECT_ID, REGION, SCHEDULE_NAME);

assertThat(status).isEqualTo(Status.DONE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggesting to replace checking the status with another assertion. Status may not be always Done and this will cause flakiness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for comment. Added new assertions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly remove the assertion for Status.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted

@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 27, 2024
@TetyanaYahodska TetyanaYahodska added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 27, 2024
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 27, 2024
@TetyanaYahodska TetyanaYahodska added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 27, 2024
@@ -17,11 +17,14 @@
package compute.snapshotschedule;

// [START compute_snapshot_schedule_edit]
import static com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy.OnSourceDiskDelete.APPLY_RETENTION_POLICY;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enums should be prefixed with their class name. Modify the import statement to:

import com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy. OnSourceDiskDelete;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Fixed

@@ -17,6 +17,8 @@
package compute.snapshotschedule;

// [START compute_snapshot_schedule_create]
import static com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy.OnSourceDiskDelete.KEEP_AUTO_SNAPSHOTS;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enums should be prefixed with their class name. Modify the import statement to:

import com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy. OnSourceDiskDelete;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Fixed

@@ -51,7 +53,7 @@ public static void main(String[] args)
// https://cloud.google.com/compute/docs/disks/snapshots?authuser=0#selecting_a_storage_location
String storageLocation = "US";
// Determines what happens to your snapshots if the source disk is deleted.
String onSourceDiskDelete = "KEEP_AUTO_SNAPSHOTS";
String onSourceDiskDelete = KEEP_AUTO_SNAPSHOTS.toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this variable. Inline the enum directly in line 81

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Fixed

Comment on lines 71 to 72
// Define the hourly schedule:
int snapshotInterval = 10; // Create a snapshot every 10 hours
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there two different comment styles? Kindly move the comment on line 72 to top.

Copy link
Contributor Author

@TetyanaYahodska TetyanaYahodska Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed comment styles.

scheduler.clearDailySchedule().clearHourlySchedule();
scheduler.setWeeklySchedule(weeklySchedule);

String onSourceDiskDelete = APPLY_RETENTION_POLICY.toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove variable and inline value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Status status = EditSnapshotSchedule.editSnapshotSchedule(
PROJECT_ID, REGION, SCHEDULE_NAME);

assertThat(status).isEqualTo(Status.DONE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly remove the assertion for Status.


package compute.snapshotschedule;

import static com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy.OnSourceDiskDelete.APPLY_RETENTION_POLICY;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment here. Import the enum class instead of the actual value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Fixed

String startTime = "08:00";
ResourcePolicySnapshotSchedulePolicySnapshotProperties snapshotProperties =
ResourcePolicySnapshotSchedulePolicySnapshotProperties.newBuilder()
.addStorageLocations(storageLocation)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the snapshot properties, we also have the guestFlush and labels.


ResourcePolicySnapshotSchedulePolicySchedule.Builder scheduler =
ResourcePolicySnapshotSchedulePolicySchedule.newBuilder();
scheduler.clearDailySchedule().clearHourlySchedule();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed as the scheduler is constructed from a new builder.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Fixed

@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 30, 2024
@TetyanaYahodska TetyanaYahodska added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 30, 2024
@TetyanaYahodska
Copy link
Contributor Author

@Sita04 The documentation does not require showing how to create a snapshot schedule with guestFlush properties and labels. https://cloud.google.com/compute/docs/disks/scheduled-snapshots?authuser=0#create_snapshot_schedule

Copy link
Contributor

@Sita04 Sita04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@Sita04 Sita04 merged commit f328675 into main Dec 30, 2024
10 checks passed
@Sita04 Sita04 deleted the compute_snapshot_schedule_create branch December 30, 2024 16:53
ludoch added a commit that referenced this pull request Jan 9, 2025
* chore(job): migrate regions by associating them with an official product with a job_ prefix (#9883)

* chore(endpoints): delete region 'swagger' in endpoints/multiple-versions (#9857)

* chore(endpoints): delete region swagger to openapi-v1.yaml

* chore(endpoints): delete region swagger to openapi-v2.yaml

* chore(job): delete sample jobs_java_dependencies_beta (#9810)

* chore(job): delete sample jobs_java_dependencies_beta

* chore(job): delete region_tab 'jobs_java_dependencies_beta' and update 'google-api-services-jobs' version

* feat(compute): add compute disk regional replicated sample (#9697)

* Implemented compute_disk_regional_replicated sample, created test

* Fixed zone

* Fixed test

* Fixed test

* Fixed disk size

* Fixed code as requested in the comment

* feat(compute): add compute disk start/stop replication samples  (#9650)

* Implemented compute_disk_start_replication and compute_disk_stop_replication samples, created tests

* Fixed test

* Deleted not related classes

* Fixed lint issue

* Increased timeout

* Split samples for zonal location

* Fixed code

* Fixed code

* Increased timeout

* Increased timeout

* feat(tpu): add tpu vm create spot sample. (#9610)

* Changed package, added information to CODEOWNERS

* Added information to CODEOWNERS

* Added timeout

* Fixed parameters for test

* Fixed DeleteTpuVm and naming

* Added comment, created Util class

* Fixed naming

* Fixed whitespace

* Split PR into smaller, deleted redundant code

* Implemented tpu_vm_create_spot sample, created test

* changed zone

* Changed zone

* Fixed empty lines and tests, deleted cleanup method

* Changed zone

* Deleted redundant test class

* Increased timeout

* Fixed test

* feat(tpu): add tpu vm create startup script sample. (#9612)

* Changed package, added information to CODEOWNERS

* Added information to CODEOWNERS

* Added timeout

* Fixed parameters for test

* Fixed DeleteTpuVm and naming

* Added comment, created Util class

* Fixed naming

* Fixed whitespace

* Split PR into smaller, deleted redundant code

* Implemented tpu_vm_create_startup_script sample, created test

* Fixed tests and empty lines

* Changed zone

* Deleted redundant test classes

* Increased timeout

* Fixed code

* feat(tpu): add tpu queued resources create/get/delete  samples (#9613)

* Changed package, added information to CODEOWNERS

* Added information to CODEOWNERS

* Added timeout

* Fixed parameters for test

* Fixed DeleteTpuVm and naming

* Added comment, created Util class

* Fixed naming

* Fixed whitespace

* Split PR into smaller, deleted redundant code

* Implemented tpu_queued_resources_create, tpu_queued_resources_get, tpu_queued_resources_delete_force and tpu_queued_resources_delete samples, created tests

* Fixed test

* Fixed tests

* Fixed error massage

* Fixed typo

* Fixed zone

* Fixed test

* Fixed code

* Deleted commented imports

* Fixed code as requested in comments

* feat(tpu): add tpu queued resources create spot (#9615)

Add a code sample for tpu_queued_resources_create_spot

* chore: add translate dev team for translate samples (#9888)

b/385243174

* feat(securitycenter): Add Resource SCC Management API Org ETD Custom Module code samples (Create, Delete, List, Get) (#9743)

* sample codes for event threat detection custom modules

* addressed comments

* addressed comments

* addressed comments

* addressed comments

* fix(compute): fixed compute_reservation_create_shared sample and test to use mocked client (#9840)

* Fixed sample and test to use mocked client

* Fixed code as requested in the comments

* feat(compute): add compute instance create replicated boot disk sample (#9735)

* Implemented compute_instance_create_replicated_boot_disk sample, created test

* Fixed test

* Fixed code as requested in the comments

* Fixed Util class

* Fixed code

* feat(compute): add compute consistency group stop replication (#9694)

* Implemented compute_consistency_group_create and compute_consistency_group_delete samples, created test

* Implemented compute_consistency_group_stop_replication sample

* Implemented compute_consistency_group_stop_replication sample

* Created test and added needed classes for testing

* Fixed test

* Moved clean up methods

* Added clean up methods for reservations

* Fixed clean up method

* Fixed clean up method

* Added timeout

* Reverted not related changes

* Reverted not related changes

* Reverted not related changes

* Reverted not related changes

* Fixed code

* Split samples for zonal location

* Added comments for methods

* Fixed comments

* feat(secretmanager): add optional ttl to create secret sample (#9889)

* feat(secretmanager): add optional ttl to create secret sample

* nit: Update secretmanager/src/main/java/secretmanager/CreateSecret.java

Co-authored-by: code-review-assist[bot] <182814678+code-review-assist[bot]@users.noreply.github.com>

* fix(secretmanager): fix comment indentation to resolve linting issues

---------

Co-authored-by: Jennifer Davis <[email protected]>
Co-authored-by: code-review-assist[bot] <182814678+code-review-assist[bot]@users.noreply.github.com>

* feat(tpu): add tpu  queued resources list sample (#9614)

* Changed package, added information to CODEOWNERS

* Added information to CODEOWNERS

* Added timeout

* Fixed parameters for test

* Fixed DeleteTpuVm and naming

* Added comment, created Util class

* Fixed naming

* Fixed whitespace

* Split PR into smaller, deleted redundant code

* Implemented tpu_queued_resources_create, tpu_queued_resources_get, tpu_queued_resources_delete_force and tpu_queued_resources_delete samples, created tests

* Implemented tpu_queued_resources_list sample, created test

* Fixed test

* Fixed tests, deleted cleanup method

* Fixed test

* Fixed imports

* feat(compute): add compute disk create secondary regional sample (#9641)

* Implemented compute_disk_create_secondary_regional. created test

* Fixed test

* Fixed test

* Fixed test

* Fixed zone

* Fixed naming

* Fixed spaces

* Fixed code

* Fixed indentations

* Fixed variable

* Fixed code

* Added cleanup methods

* Fixed lint issue

* Fixed lint issue

* Fixed test

* Fixed code

* Fixed code

* Fixed code

* Deleted duplicated assertion

* feat(compute): add compute disk create secondary sample. (#9643)

* Implemented compute_disk_create_secondary sample, created test

* Fixed code

* Fixed variable

* Fixed code

* Merged changes from main

* Fixed lint issue

* fix(storage): migrate old region all to storagetransfer_transfer_all step 1 (#9917)

* fix(job): remove old region create_job (#9914)

* feat(compute): attach/ remove snapshot schedule to disk (#9791)

* Implemented compute_snapshot_schedule_attach sample, created test

* Implemented compute_snapshot_schedule_remove sample, created test

* Fixed code

* Fixed code as requested in the comments

* feat(compute): add compute consistency group clone sample (#9885)

* Implemented compute_consistency_group_clone and compute_consistency_group_clone_regional_disk samples, created tests

* Fixed naming

* feat(compute): add compute instance attach regional disk force sample (#9730)

* Implemented compute_instance_attach_regional_disk_force sample, created test

* Added clean up method

* Fixed comments and parameters

* Test order deleted

* Fixed code

* Fixed code

* Fixed code

* Increased timeout

* Increased timeout

* Increased timeout

* Fixed code

* Fixed code

* Fixed code

* Fixed naming

* feat(compute): add compute disk create secondary custom sample (#9644)

* Implemented compute_disk_create_secondary_custom sample, created test

* Fixed code

* Fixed variable

* Fixed code

* Fixed whitespace

* Fixed whitespace

* feat(compute): add compute snapshot schedule create/get/edit/list/delete samples (#9742)

* Implemented compute_snapshot_schedule_delete and compute_snapshot_schedule_create samples, created test

* Fixed test

* Added compute_snapshot_schedule_get sample, created test

* Fixed naming

* Implemented compute_snapshot_schedule_edit, created test

* Fixed naming

* Implemented compute_snapshot_schedule_list sample, created test

* Cleaned resources

* Cleaned resources

* Cleaned resources

* Cleaned resources

* Fixed test

* Added comment

* Fixed tests

* Fixed code

* Fixed code as requested in the comments

* feat(compute): add compute disk create with snapshot schedule (#9788)

* Implemented compute_disk_create_with_snapshot_schedule sample, created test

* Fixed code

* Fixed code

* Fixed test

* Fixed code

* Fixed code as requested in the comments

* Fixed lint issue

* Fixed lint issue

* Deleted redundant code

* feat(tpu): add tpu queued resources time bound sample. (#9617)

* Changed package, added information to CODEOWNERS

* Added information to CODEOWNERS

* Added timeout

* Fixed parameters for test

* Fixed DeleteTpuVm and naming

* Added comment, created Util class

* Fixed naming

* Fixed whitespace

* Split PR into smaller, deleted redundant code

* Implemented tpu_queued_resources_create, tpu_queued_resources_get, tpu_queued_resources_delete_force and tpu_queued_resources_delete samples, created tests

* Implemented tpu_queued_resources_time_bound sample, created test

* Changed zone for tpu

* Cleanup resources

* Fixed tests

* Fixed test

* Fixed code as requested in the comments

* Fixed code as requested in the comments

* fix(job): delete old region tag update_job_with_field_mask (#9940)

* feat(job): migrate region tags to include product prefix (#9966)

* fix(endpoints): migrate all regions (#9943)

* fix: disable flakybot reporting (#9968)

* chore(job): remove unused region tags (#9969)

* feat(securitycenter): Add Resource SCC Management API Org ETD Custom Module code samples (Update, Get Eff, List Eff, List Desc, Validate) (#9912)

* sample codes for event threat detection custom modules

* fixed lint

* addressed comments

* lint fix

* addressed comments

---------

Co-authored-by: OremGLG <[email protected]>
Co-authored-by: eapl.me <[email protected]>
Co-authored-by: Тетяна Ягодська <[email protected]>
Co-authored-by: Jennifer Davis <[email protected]>
Co-authored-by: lovenishs04 <[email protected]>
Co-authored-by: alarconesparza <[email protected]>
Co-authored-by: Jennifer Davis <[email protected]>
Co-authored-by: code-review-assist[bot] <182814678+code-review-assist[bot]@users.noreply.github.com>
Co-authored-by: Brian Dorsey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: compute Issues related to the Compute Engine API. kokoro:run Add this label to force Kokoro to re-run the tests. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants