Skip to content

Commit

Permalink
feat: [Bigtable] add ability to partially update a cluster (#5088)
Browse files Browse the repository at this point in the history
* chore(bazel): update gapic-generator-php v1.4.2

Changes include:
- backwards-compat field_behavior patches

PiperOrigin-RevId: 425704951

Source-Link: googleapis/googleapis@69be729

Source-Link: googleapis/googleapis-gen@8484a7d
Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6Ijg0ODRhN2QwNmRlMTU3MDMzMTgyYzlmOWI0YWQ5OWNlYjAzY2RhYzYifQ==

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Feb 2, 2022
1 parent 6ad467b commit 8d280df
Show file tree
Hide file tree
Showing 29 changed files with 1,476 additions and 221 deletions.
89 changes: 49 additions & 40 deletions Bigtable/metadata/Admin/V2/BigtableInstanceAdmin.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Bigtable/metadata/Admin/V2/BigtableTableAdmin.php
Binary file not shown.
Binary file modified Bigtable/metadata/Admin/V2/Common.php
Binary file not shown.
Binary file modified Bigtable/metadata/Admin/V2/Instance.php
Binary file not shown.
Binary file modified Bigtable/metadata/Admin/V2/Table.php
Binary file not shown.
Binary file modified Bigtable/metadata/V2/Bigtable.php
Binary file not shown.
101 changes: 101 additions & 0 deletions Bigtable/src/Admin/V2/AutoscalingLimits.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions Bigtable/src/Admin/V2/AutoscalingTargets.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions Bigtable/src/Admin/V2/BigtableInstanceAdminGrpcClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ public function __construct($hostname, $opts, $channel = null) {

/**
* Create an instance within a project.
*
* Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If
* serve_nodes is set to non-zero, then the cluster is manually scaled. If
* cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
* enabled.
* @param \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
Expand Down Expand Up @@ -129,6 +135,12 @@ public function DeleteInstance(\Google\Cloud\Bigtable\Admin\V2\DeleteInstanceReq

/**
* Creates a cluster within an instance.
*
* Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If
* serve_nodes is set to non-zero, then the cluster is manually scaled. If
* cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
* enabled.
* @param \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
Expand Down Expand Up @@ -174,6 +186,10 @@ public function ListClusters(\Google\Cloud\Bigtable\Admin\V2\ListClustersRequest

/**
* Updates a cluster within an instance.
*
* Note that UpdateCluster does not support updating
* cluster_config.cluster_autoscaling_config. In order to update it, you
* must use PartialUpdateCluster.
* @param \Google\Cloud\Bigtable\Admin\V2\Cluster $argument input argument
* @param array $metadata metadata
* @param array $options call options
Expand All @@ -187,6 +203,32 @@ public function UpdateCluster(\Google\Cloud\Bigtable\Admin\V2\Cluster $argument,
$metadata, $options);
}

/**
* Partially updates a cluster within a project. This method is the preferred
* way to update a Cluster.
*
* To enable and update autoscaling, set
* cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
* serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
* are ignored. Note that an update cannot simultaneously set serve_nodes to
* non-zero and cluster_config.cluster_autoscaling_config to non-empty, and
* also specify both in the update_mask.
*
* To disable autoscaling, clear cluster_config.cluster_autoscaling_config,
* and explicitly set a serve_node count via the update_mask.
* @param \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
* @return \Grpc\UnaryCall
*/
public function PartialUpdateCluster(\Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateCluster',
$argument,
['\Google\LongRunning\Operation', 'decode'],
$metadata, $options);
}

/**
* Deletes a cluster from an instance.
* @param \Google\Cloud\Bigtable\Admin\V2\DeleteClusterRequest $argument input argument
Expand Down
Loading

0 comments on commit 8d280df

Please sign in to comment.