-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for different node types (#7368)
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
1 parent
7a1be5a
commit b01e8dc
Showing
22 changed files
with
1,666 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
77 changes: 77 additions & 0 deletions
77
RedisCluster/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
RedisCluster/src/V1/CertificateAuthority/ManagedCertificateAuthority.php
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
RedisCluster/src/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.