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,33 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
# AUTOGEN_CLI_VERSION: HEAD
"""Manage Cloudlocationfinder resources."""
from googlecloudsdk.calliope import base
from surface.cloudlocationfinder import _init_extensions as extensions
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
@base.Autogenerated
class CloudlocationfinderAlpha(extensions.CloudlocationfinderAlpha):
"""Manage Cloudlocationfinder resources."""
@base.ReleaseTracks(base.ReleaseTrack.GA)
@base.Autogenerated
class CloudlocationfinderGa(extensions.CloudlocationfinderGa):
"""Manage Cloudlocationfinder resources."""

View File

@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
# AUTOGEN_CLI_VERSION: HEAD
"""File to add optional custom code to extend __init__.py."""
from googlecloudsdk.calliope import base
class CloudlocationfinderAlpha(base.Group):
"""Optional no-auto-generated code for ALPHA."""
category = base.UNCATEGORIZED_CATEGORY
class CloudlocationfinderBeta(base.Group):
"""Optional no-auto-generated code for BETA."""
category = base.UNCATEGORIZED_CATEGORY
class CloudlocationfinderGa(base.Group):
"""Optional no-auto-generated code for GA."""
category = base.UNCATEGORIZED_CATEGORY

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
# AUTOGEN_CLI_VERSION: HEAD
"""Manage Cloud Location resources."""
from googlecloudsdk.calliope import base
from surface.cloudlocationfinder.cloud_locations import _init_extensions as extensions
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
@base.Autogenerated
class CloudLocationsAlpha(extensions.CloudLocationsAlpha):
"""Manage Cloud Location resources."""
@base.ReleaseTracks(base.ReleaseTrack.GA)
@base.Autogenerated
class CloudLocationsGa(extensions.CloudLocationsGa):
"""Manage Cloud Location resources."""

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
# AUTOGEN_CLI_VERSION: HEAD
"""File to add optional custom code to extend __init__.py."""
from googlecloudsdk.calliope import base
class CloudLocationsAlpha(base.Group):
"""Optional no-auto-generated code for ALPHA."""
class CloudLocationsBeta(base.Group):
"""Optional no-auto-generated code for BETA."""
class CloudLocationsGa(base.Group):
"""Optional no-auto-generated code for GA."""

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- ALPHA
auto_generated: true
help_text:
brief: Describe cloudLocations
description: Describe a cloudLocation
examples: |-
To describe the cloudLocation, run:
$ {command}
arguments:
params:
- help_text: |-
Name of the resource.
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.cloudlocationfinder.v1alpha_resources:projects_locations_cloud_locations
required: true
request:
api_version: v1alpha
collection:
- cloudlocationfinder.projects.locations.cloudLocations

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- GA
auto_generated: true
help_text:
brief: Describe a Cloud Location
description: Describe a Cloud Location
examples: |-
To describe the Cloud Location with name "gcp-us-central1", run:
$ {command} gcp-us-central1
arguments:
params:
- help_text: |-
Name of the resource.
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.cloudlocationfinder.v1_resources:projects_locations_cloud_locations
required: true
request:
api_version: v1
collection:
- cloudlocationfinder.projects.locations.cloudLocations

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
# AUTOGEN_CLI_VERSION: HEAD
_PARTIALS_: true

View File

@@ -0,0 +1,90 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""CloudLocation list command."""
from apitools.base.py import list_pager
from googlecloudsdk.api_lib.util import apis as core_apis
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.cloudlocationfinder import flags
@base.ReleaseTracks(base.ReleaseTrack.GA, base.ReleaseTrack.ALPHA)
@base.UniverseCompatible
class List(base.ListCommand):
"""List cloudLocations.
## EXAMPLES
To list all cloudLocations for `projects/my-project-id`, run:
$ {command} --project=my-project-id
"""
@staticmethod
def Args(parser):
"""Args is called by calliope to gather arguments for this command.
Args:
parser: An argparse parser that you can use to add arguments that go on
the command line after this command. Positional arguments are allowed.
"""
flags.AddListFlags(parser)
def Run(self, args):
"""Run command.
Args:
args: argparse.Namespace, The arguments that this command was invoked
with.
Returns:
List of CloudLocations for specified project.
"""
if self.ReleaseTrack() == base.ReleaseTrack.GA:
api_version = 'v1'
else:
api_version = 'v1alpha'
client = core_apis.GetClientInstance('cloudlocationfinder', api_version)
messages = core_apis.GetMessagesModule('cloudlocationfinder', api_version)
cloud_locations_service = client.projects_locations_cloudLocations
location = args.CONCEPTS.location.Parse().RelativeName()
request = (
messages.CloudlocationfinderProjectsLocationsCloudLocationsListRequest(
parent=location,
pageSize=args.page_size,
filter=args.filter,
)
)
args.filter = ''
args.sorted_by = ''
return list_pager.YieldFromList(
cloud_locations_service,
request,
field='cloudLocations',
limit=args.limit if not args.filter else None,
batch_size_attribute='pageSize',
)
List.detailed_help = {
'DESCRIPTION': """
Request for listing Cloudlocations.
""",
'EXAMPLES': """
To list CloudLocations, run:
$ {command}
""",
}

View File

@@ -0,0 +1,93 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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.
"""CloudLocation search command."""
from apitools.base.py import list_pager
from googlecloudsdk.api_lib.util import apis as core_apis
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.cloudlocationfinder import flags
@base.ReleaseTracks(base.ReleaseTrack.GA, base.ReleaseTrack.ALPHA)
@base.UniverseCompatible
class Search(base.Command):
"""Search cloudLocations.
## EXAMPLES
To search all cloudLocations for `projects/my-project-id`, run:
$ {command} --project=my-project-id
"""
@staticmethod
def Args(parser):
"""Args is called by calliope to gather arguments for this command.
Args:
parser: An argparse parser that you can use to add arguments that go on
the command line after this command. Positional arguments are allowed.
"""
flags.AddSearchFlags(parser)
def Run(self, args):
"""Run command.
Args:
args: argparse.Namespace, The arguments that this command was invoked
with.
Returns:
Search CloudLocations.
"""
if self.ReleaseTrack() == base.ReleaseTrack.GA:
api_version = 'v1'
else:
api_version = 'v1alpha'
client = core_apis.GetClientInstance('cloudlocationfinder', api_version)
messages = core_apis.GetMessagesModule('cloudlocationfinder', api_version)
cloud_locations_service = client.projects_locations_cloudLocations
location = args.CONCEPTS.location.Parse().RelativeName()
source_cloud_location = (
args.CONCEPTS.source_cloud_location.Parse().RelativeName()
)
request = messages.CloudlocationfinderProjectsLocationsCloudLocationsSearchRequest(
parent=location,
pageSize=args.page_size,
sourceCloudLocation=source_cloud_location,
query=args.query,
)
args.query = ''
args.order_by = ''
return list_pager.YieldFromList(
cloud_locations_service,
request,
method='Search',
field='cloudLocations',
limit=args.limit if not args.query else None,
batch_size_attribute='pageSize',
)
Search.detailed_help = {
'DESCRIPTION': """
Search Cloudlocations.
""",
'EXAMPLES': """
To search CloudLocations, run:
$ {command} --source-cloud-location=aws-us-east-1 --query=display_name=\"us-east4\"
""",
}