Skip to content

Commit

Permalink
feat: Add support for different node types (#7368)
Browse files Browse the repository at this point in the history
feat: Add persistence support
feat: Get details of certificate authority from redis cluster
docs: size_gb field shows the size of the cluster rounded up to the next integer, precise_size_gb field will show the exact size of the cluster
PiperOrigin-RevId: 640389721
Source-Link: googleapis/googleapis@8bca64a
Source-Link: googleapis/googleapis-gen@24dbd22
Copy-Tag: eyJwIjoiUmVkaXNDbHVzdGVyLy5Pd2xCb3QueWFtbCIsImgiOiIyNGRiZDIyN2E1NWU3MzQ3NzMzZDU5MzExODM3Nzk3Yzk2ZDZkNTU0In0=
  • Loading branch information
gcf-owl-bot[bot] authored Jun 5, 2024
1 parent 7a1be5a commit b01e8dc
Show file tree
Hide file tree
Showing 22 changed files with 1,666 additions and 4 deletions.
Binary file modified RedisCluster/metadata/V1/CloudRedisCluster.php
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php
/*
* Copyright 2024 Google LLC
*
* 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
*
* https://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.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_sync]
use Google\ApiCore\ApiException;
use Google\Cloud\Redis\Cluster\V1\CertificateAuthority;
use Google\Cloud\Redis\Cluster\V1\Client\CloudRedisClusterClient;
use Google\Cloud\Redis\Cluster\V1\GetClusterCertificateAuthorityRequest;

/**
* Gets the details of certificate authority information for Redis cluster.
*
* @param string $formattedName Redis cluster certificate authority resource name using the form:
* `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
* where `location_id` refers to a GCP region. Please see
* {@see CloudRedisClusterClient::certificateAuthorityName()} for help formatting this field.
*/
function get_cluster_certificate_authority_sample(string $formattedName): void
{
// Create a client.
$cloudRedisClusterClient = new CloudRedisClusterClient();

// Prepare the request message.
$request = (new GetClusterCertificateAuthorityRequest())
->setName($formattedName);

// Call the API and handle any network failures.
try {
/** @var CertificateAuthority $response */
$response = $cloudRedisClusterClient->getClusterCertificateAuthority($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = CloudRedisClusterClient::certificateAuthorityName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]'
);

get_cluster_certificate_authority_sample($formattedName);
}
// [END redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_sync]
112 changes: 112 additions & 0 deletions RedisCluster/src/V1/CertificateAuthority.php

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

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

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

Loading

0 comments on commit b01e8dc

Please sign in to comment.