8.2.34 | Linux | www-data (uid:33)
👁 View: update.py
📁 //snap/google-cloud-cli/current/lib/surface/workbench/instances/update.py
# -*- coding: utf-8 -*- # # Copyright 2023 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """'workbench instances update' command.""" from googlecloudsdk.api_lib.workbench import instances as instance_util from googlecloudsdk.api_lib.workbench import util from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.workbench import flags DETAILED_HELP = { 'DESCRIPTION': """ Updates a workbench instance. """, 'EXAMPLES': """ To update machine type for an instance, run: $ {command} example-instance --machine-type=n1-standard-8 --location=us-central1-a To update labels for an instance, run: $ {command} example-instance --labels=k1=v1,k2=v2 --location=us-central1-a """, } @base.DefaultUniverseOnly @base.ReleaseTracks(base.ReleaseTrack.GA, base.ReleaseTrack.BETA) class Update(base.Command): """Updates a workbench instance.""" @staticmethod def Args(parser): """Register flags for this command.""" flags.AddUpdateInstanceFlags(parser) def Run(self, args): release_track = self.ReleaseTrack() client = util.GetClient(release_track) messages = util.GetMessages(release_track) instance_service = client.projects_locations_instances operation = instance_service.Patch( instance_util.CreateInstanceUpdateRequest(args, messages)) return instance_util.HandleLRO( operation, args, instance_service, release_track, operation_type=instance_util.OperationType.UPDATE) Update.detailed_help = DETAILED_HELP
← Back
💻 Terminal
📤 Upload
📂
Click or Drag & Drop
📁 //snap/google-cloud-cli/current/lib/surface/workbench/instances
NameSizePermModifiedActions
📁 __pycache__/-07752026-10-06 18:39🗑 Delete
__init__.py882B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
add_iam_policy_binding.yaml851B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
check_instance_upgradability.py1.9K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
create.py2.8K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
delete.py2K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
describe.py1.8K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
diagnose.py2.3K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
get_config.py2K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
get_iam_policy.yaml842B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
list.py2.5K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
remove_iam_policy_binding.yaml845B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
reset.py1.9K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
resize_disk.py2.1K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
restore.py2K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
rollback.py2K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
set_iam_policy.yaml1000B06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
start.py1.9K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
stop.py1.9K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
update.py2.1K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
upgrade.py1.9K06441980-01-01 08:00👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del