feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# -*- 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
"""Manage Revision resources."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.GA)
class Revisions(base.Group):
"""Manage Revision resources."""

View File

@@ -0,0 +1,14 @@
- release_tracks: [GA]
help_text:
brief: Describe revisions
description: Describe a revision
examples: |-
To describe the revision `r-0` under deployment `example-deployment` at location `us-central1`, run:
$ {command} projects/p1/locations/us-central1/deployments/example-deployment/revisions/r-0
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.infra_manager.resources:revision
help_text: The revision to describe
request:
collection: config.projects.locations.deployments.revisions

View File

@@ -0,0 +1,69 @@
# -*- 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.
"""Export revision state file command."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.infra_manager import configmanager_util
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.infra_manager import deploy_util
from googlecloudsdk.command_lib.infra_manager import resource_args
from googlecloudsdk.command_lib.util.concepts import concept_parsers
@base.ReleaseTracks(base.ReleaseTrack.GA)
class ExportStatefile(base.Command):
"""Export a terraform state file.
This command generates a signed url to download a terraform state file.
"""
detailed_help = {'EXAMPLES': """
Export state file for revision `projects/p1/locations/l1/deployments/d1/revisions/r-0`:
$ {command} projects/p1/locations/l1/deployments/d1/revisions/r-0
"""}
@staticmethod
def Args(parser):
concept_parsers.ConceptParser(
[
resource_args.GetRevisionResourceArgSpec(
'the revision to be used as parent.'
)
]
).AddToParser(parser)
def Run(self, args):
"""This is what gets called when the user runs this command.
Args:
args: an argparse namespace. All the arguments that were provided to this
command invocation.
Returns:
The statefile containing signed url that can be used to upload state file.
"""
messages = configmanager_util.GetMessagesModule()
revision_ref = args.CONCEPTS.revision.Parse()
revision_full_name = revision_ref.RelativeName()
return deploy_util.ExportRevisionStateFile(
messages,
revision_full_name,
)

View File

@@ -0,0 +1,25 @@
- release_tracks: [GA]
help_text:
brief: List revisions
description: List revisions for a deployment
examples: |-
To list all revisions for deployment projects/p1/locations/l1/deployments/d1, run:
$ {command} --deployment=projects/p1/locations/l1/deployments/d1
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.infra_manager.resources:deployment
help_text: The deployment for which we want to list all revisions.
request:
collection: config.projects.locations.deployments.revisions
response:
id_field: name
output:
format: |
table(
name.basename(),
state,
tfVersion,
createTime:sort=1,
updateTime
)