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,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
"""Manage Migration Workflow resources."""
from googlecloudsdk.calliope import base
from surface.bq.migration_workflows import _init_extensions as extensions
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
@base.Autogenerated
class MigrationWorkflowsAlpha(extensions.MigrationWorkflowsAlpha):
"""Manage Migration Workflow resources."""
@base.ReleaseTracks(base.ReleaseTrack.BETA)
@base.Autogenerated
class MigrationWorkflowsBeta(extensions.MigrationWorkflowsBeta):
"""Manage Migration Workflow resources."""
@base.ReleaseTracks(base.ReleaseTrack.GA)
@base.Autogenerated
class MigrationWorkflowsGa(extensions.MigrationWorkflowsGa):
"""Manage Migration Workflow 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 MigrationWorkflowsAlpha(base.Group):
"""Optional no-auto-generated code for ALPHA."""
class MigrationWorkflowsBeta(base.Group):
"""Optional no-auto-generated code for BETA."""
class MigrationWorkflowsGa(base.Group):
"""Optional no-auto-generated code for GA."""

View File

@@ -0,0 +1,40 @@
# -*- 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: Delete migration workflows
description: Delete a migration workflow
examples: |-
To delete a migration workflow `projects/123/locations/eu/workflows/1234`, run:
$ {command} projects/123/locations/eu/workflows/1234
arguments:
params:
- help_text: |-
The unique identifier for the migration workflow.
Example: `projects/123/locations/us/workflows/1234`
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations_workflows
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows

View File

@@ -0,0 +1,40 @@
# -*- 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:
- BETA
auto_generated: true
help_text:
brief: Delete migration workflows
description: Delete a migration workflow
examples: |-
To delete a migration workflow `projects/123/locations/eu/workflows/1234`, run:
$ {command} projects/123/locations/eu/workflows/1234
arguments:
params:
- help_text: |-
The unique identifier for the migration workflow.
Example: `projects/123/locations/us/workflows/1234`
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations_workflows
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows

View File

@@ -0,0 +1,40 @@
# -*- 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: Delete migration workflows
description: Delete a migration workflow
examples: |-
To delete a migration workflow `projects/123/locations/eu/workflows/1234`, run:
$ {command} projects/123/locations/eu/workflows/1234
arguments:
params:
- help_text: |-
The unique identifier for the migration workflow.
Example: `projects/123/locations/us/workflows/1234`
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations_workflows
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows

View File

@@ -0,0 +1,40 @@
# -*- 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 migration workflows
description: Describe a migration workflow
examples: |-
To describe a migration workflow `projects/123/locations/eu/workflows/1234`, run:
$ {command} projects/123/locations/eu/workflows/1234
arguments:
params:
- help_text: |-
The unique identifier for the migration workflow.
Example: `projects/123/locations/us/workflows/1234`
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations_workflows
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows

View File

@@ -0,0 +1,40 @@
# -*- 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:
- BETA
auto_generated: true
help_text:
brief: Describe migration workflows
description: Describe a migration workflow
examples: |-
To describe a migration workflow `projects/123/locations/eu/workflows/1234`, run:
$ {command} projects/123/locations/eu/workflows/1234
arguments:
params:
- help_text: |-
The unique identifier for the migration workflow.
Example: `projects/123/locations/us/workflows/1234`
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations_workflows
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows

View File

@@ -0,0 +1,40 @@
# -*- 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 migration workflows
description: Describe a migration workflow
examples: |-
To describe a migration workflow `projects/123/locations/eu/workflows/1234`, run:
$ {command} projects/123/locations/eu/workflows/1234
arguments:
params:
- help_text: |-
The unique identifier for the migration workflow.
Example: `projects/123/locations/us/workflows/1234`
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations_workflows
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows

View File

@@ -0,0 +1,49 @@
# -*- 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: List migration workflows
description: List migration workflows
examples: |-
To list all migration workflows in location `EU`, run:
$ {command} --location=eu
arguments:
params:
- help_text: |-
The project and location of the migration workflows to list.
Example: `projects/123/locations/us`
is_positional: false
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows
response:
id_field: name
output:
format: |-
table(name,
displayName,
state,
createTime,
lastUpdateTime)

View File

@@ -0,0 +1,49 @@
# -*- 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:
- BETA
auto_generated: true
help_text:
brief: List migration workflows
description: List migration workflows
examples: |-
To list all migration workflows in location `EU`, run:
$ {command} --location=eu
arguments:
params:
- help_text: |-
The project and location of the migration workflows to list.
Example: `projects/123/locations/us`
is_positional: false
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows
response:
id_field: name
output:
format: |-
table(name,
displayName,
state,
createTime,
lastUpdateTime)

View File

@@ -0,0 +1,49 @@
# -*- 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: List migration workflows
description: List migration workflows
examples: |-
To list all migration workflows in location `EU`, run:
$ {command} --location=eu
arguments:
params:
- help_text: |-
The project and location of the migration workflows to list.
Example: `projects/123/locations/us`
is_positional: false
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.bq.v2_resources:projects_locations
required: true
request:
api_version: v2
collection:
- bigquerymigration.projects.locations.workflows
response:
id_field: name
output:
format: |-
table(name,
displayName,
state,
createTime,
lastUpdateTime)

View File

@@ -0,0 +1,96 @@
# -*- 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.
"""Implements command to create a migration workflow."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.bq import util as api_util
from googlecloudsdk.api_lib.util import waiter
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.bq import command_utils
from googlecloudsdk.core import properties
from googlecloudsdk.core import resources
@base.UniverseCompatible
@base.ReleaseTracks(
base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA, base.ReleaseTrack.GA
)
class Create(base.Command):
"""Create a migration workflow."""
detailed_help = {
'brief': 'create migration workflows',
'DESCRIPTION': 'Create a migration workflow',
'EXAMPLES': """\
To create a migration workflow in EU synchronously based on a config file, run:
$ {command} --location=EU --config-file=config_file.yaml --no-async
""",
}
@staticmethod
def Args(parser):
base.ASYNC_FLAG.AddToParser(parser)
parser.add_argument(
'--location',
help='Location of the migration workflow.',
required=True,
)
parser.add_argument(
'--config-file',
help='Path to the migration workflows config file.',
required=True,
)
def Run(self, args):
client = api_util.GetMigrationApiClient()
migration_service = client.projects_locations_workflows
request_type = api_util.GetMigrationApiMessage(
'BigquerymigrationProjectsLocationsWorkflowsCreateRequest'
)
request = request_type()
project = args.project or properties.VALUES.core.project.Get(required=True)
location = args.location
migration_workflow = command_utils.GetResourceFromFile(
args.config_file,
api_util.GetMigrationApiMessage(
'GoogleCloudBigqueryMigrationV2MigrationWorkflow'
),
)
request.parent = f'projects/{project}/locations/{location}'
request.googleCloudBigqueryMigrationV2MigrationWorkflow = migration_workflow
response = migration_service.Create(request)
if args.async_:
return response
else:
migration_workflow_ref = resources.REGISTRY.ParseRelativeName(
response.name,
collection='bigquerymigration.projects.locations.workflows',
)
poller = command_utils.BqMigrationWorkflowPoller(migration_service)
response = waiter.WaitFor(
poller=poller,
operation_ref=migration_workflow_ref,
message='Running migration workflow [{}]'.format(response.name),
)
return response

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,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,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