CloudRedisClusterClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.transports.base.CloudRedisClusterTransport,
typing.Callable[
[...],
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.transports.base.CloudRedisClusterTransport,
],
]
] = None,
client_options: typing.Optional[
typing.Union[google.api_core.client_options.ClientOptions, dict]
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)Configures and manages Cloud Memorystore for Redis clusters
Google Cloud Memorystore for Redis Cluster
The redis.googleapis.com service implements the Google Cloud
Memorystore for Redis API and defines the following resource model
for managing Redis clusters:
- The service works with a collection of cloud projects, named:
/projects/* - Each project has a collection of available locations, named:
/locations/* - Each location has a collection of Redis clusters, named:
/clusters/* - As such, Redis clusters are resources of the form:
/projects/{project_id}/locations/{location_id}/clusters/{instance_id}
Note that location_id must be a GCP region; for example:
projects/redpepper-1290/locations/us-central1/clusters/my-redis
Properties
api_endpoint
Return the API endpoint used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The API endpoint used by the client instance. |
transport
Returns the transport used by the client instance.
| Returns | |
|---|---|
| Type | Description |
CloudRedisClusterTransport |
The transport used by the client instance. |
universe_domain
Return the universe domain used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The universe domain used by the client instance. |
Methods
CloudRedisClusterClient
CloudRedisClusterClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.transports.base.CloudRedisClusterTransport,
typing.Callable[
[...],
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.transports.base.CloudRedisClusterTransport,
],
]
] = None,
client_options: typing.Optional[
typing.Union[google.api_core.client_options.ClientOptions, dict]
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)Instantiates the cloud redis cluster client.
| Parameters | |
|---|---|
| Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Optional[Union[str,CloudRedisClusterTransport,Callable[..., CloudRedisClusterTransport]]]
The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the CloudRedisClusterTransport constructor. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. 1. The |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If mutual TLS transport creation failed for any reason. |
__exit__
__exit__(type, value, traceback)Releases underlying transport's resources.
acl_policy_path
acl_policy_path(project: str, location: str, acl_policy: str) -> strReturns a fully-qualified acl_policy string.
acl_policy_revision_path
acl_policy_revision_path(
project: str, location: str, acl_policy: str, revision: str
) -> strReturns a fully-qualified acl_policy_revision string.
add_auth_token
add_auth_token(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AddAuthTokenRequest,
dict,
]
] = None,
*,
token_auth_user: typing.Optional[str] = None,
auth_token: typing.Optional[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AuthToken
] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationAdds a auth token for a user of a token based auth enabled cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_add_auth_token():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.AddAuthTokenRequest(
token_auth_user="token_auth_user_value",
)
# Make the request
operation = client.add_auth_token(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.AddAuthTokenRequest, dict]
The request object. Request message for [AddAuthToken][]. |
token_auth_user |
str
Required. The name of the token auth user resource that this auth token will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user} This corresponds to the |
auth_token |
google.cloud.redis_cluster_v1.types.AuthToken
Required. The auth token to add. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be TokenAuthUser Represents a token based auth user for the cluster. |
add_token_auth_user
add_token_auth_user(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AddTokenAuthUserRequest,
dict,
]
] = None,
*,
cluster: typing.Optional[str] = None,
token_auth_user: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationAdds a token auth user for a token based auth enabled cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_add_token_auth_user():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.AddTokenAuthUserRequest(
cluster="cluster_value",
token_auth_user="token_auth_user_value",
)
# Make the request
operation = client.add_token_auth_user(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.AddTokenAuthUserRequest, dict]
The request object. Request message for [AddTokenAuthUser][]. |
cluster |
str
Required. The cluster resource that this token auth user will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster} This corresponds to the |
token_auth_user |
str
Required. The id of the token auth user to add. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be Cluster A cluster instance. |
auth_token_path
auth_token_path(
project: str, location: str, cluster: str, token_auth_user: str, auth_token: str
) -> strReturns a fully-qualified auth_token string.
backup_cluster
backup_cluster(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.BackupClusterRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationBackup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_backup_cluster():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.BackupClusterRequest(
name="name_value",
)
# Make the request
operation = client.backup_cluster(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.BackupClusterRequest, dict]
The request object. Request for [BackupCluster]. |
name |
str
Required. Redis cluster resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be Cluster A cluster instance. |
backup_collection_path
backup_collection_path(project: str, location: str, backup_collection: str) -> strReturns a fully-qualified backup_collection string.
backup_path
backup_path(
project: str, location: str, backup_collection: str, backup: str
) -> strReturns a fully-qualified backup string.
ca_pool_path
ca_pool_path(project: str, location: str, ca_pool: str) -> strReturns a fully-qualified ca_pool string.
cancel_operation
cancel_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.CancelOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NoneStarts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success
is not guaranteed. If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
certificate_authority_path
certificate_authority_path(project: str, location: str, cluster: str) -> strReturns a fully-qualified certificate_authority string.
cluster_path
cluster_path(project: str, location: str, cluster: str) -> strReturns a fully-qualified cluster string.
common_billing_account_path
common_billing_account_path(billing_account: str) -> strReturns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> strReturns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> strReturns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> strReturns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> strReturns a fully-qualified project string.
create_acl_policy
create_acl_policy(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.CreateAclPolicyRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
acl_policy: typing.Optional[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AclPolicy
] = None,
acl_policy_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AclPolicyCreates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_create_acl_policy():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
acl_policy = redis_cluster_v1.AclPolicy()
acl_policy.rules.username = "username_value"
acl_policy.rules.rule = "rule_value"
request = redis_cluster_v1.CreateAclPolicyRequest(
parent="parent_value",
acl_policy_id="acl_policy_id_value",
acl_policy=acl_policy,
)
# Make the request
response = client.create_acl_policy(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.CreateAclPolicyRequest, dict]
The request object. Request for |
parent |
str
Required. The resource name of the cluster location using the form: |
acl_policy |
google.cloud.redis_cluster_v1.types.AclPolicy
Required. The ACL policy that is to be created. This corresponds to the |
acl_policy_id |
str
Required. The logical name of the ACL policy in the customer project with the following restrictions: - Must contain only lowercase letters, numbers, and hyphens. - Must start with a letter. - Must be between 1-63 characters. - Must end with a number or a letter. - Must be unique within the customer project / location This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.AclPolicy |
The ACL policy resource. |
create_cluster
create_cluster(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.CreateClusterRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
cluster: typing.Optional[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.Cluster
] = None,
cluster_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationCreates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field.
The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_create_cluster():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
cluster = redis_cluster_v1.Cluster()
cluster.name = "name_value"
request = redis_cluster_v1.CreateClusterRequest(
parent="parent_value",
cluster_id="cluster_id_value",
cluster=cluster,
)
# Make the request
operation = client.create_cluster(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.CreateClusterRequest, dict]
The request object. Request for |
parent |
str
Required. The resource name of the cluster location using the form: |
cluster |
google.cloud.redis_cluster_v1.types.Cluster
Required. The cluster that is to be created. This corresponds to the |
cluster_id |
str
Required. The logical name of the Redis cluster in the customer project with the following restrictions: - Must contain only lowercase letters, numbers, and hyphens. - Must start with a letter. - Must be between 1-63 characters. - Must end with a number or a letter. - Must be unique within the customer project / location This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be Cluster A cluster instance. |
crypto_key_path
crypto_key_path(project: str, location: str, key_ring: str, crypto_key: str) -> strReturns a fully-qualified crypto_key string.
crypto_key_version_path
crypto_key_version_path(
project: str, location: str, key_ring: str, crypto_key: str, crypto_key_version: str
) -> strReturns a fully-qualified crypto_key_version string.
delete_acl_policy
delete_acl_policy(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.DeleteAclPolicyRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationDeletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_delete_acl_policy():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.DeleteAclPolicyRequest(
name="name_value",
)
# Make the request
operation = client.delete_acl_policy(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.DeleteAclPolicyRequest, dict]
The request object. Request for |
name |
str
Required. Redis ACL policy resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_auth_token
delete_auth_token(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.DeleteAuthTokenRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationRemoves a auth token for a user of a token based auth enabled instance.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_delete_auth_token():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.DeleteAuthTokenRequest(
name="name_value",
)
# Make the request
operation = client.delete_auth_token(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.DeleteAuthTokenRequest, dict]
The request object. Request message for [DeleteAuthToken][]. |
name |
str
Required. The name of the token auth user resource that this auth token will be deleted from. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_backup
delete_backup(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.DeleteBackupRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationDeletes a specific backup.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_delete_backup():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.DeleteBackupRequest(
name="name_value",
)
# Make the request
operation = client.delete_backup(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.DeleteBackupRequest, dict]
The request object. Request for [DeleteBackup]. |
name |
str
Required. Redis backup resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_cluster
delete_cluster(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.DeleteClusterRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationDeletes a specific Redis cluster. Cluster stops serving and data is deleted.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_delete_cluster():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.DeleteClusterRequest(
name="name_value",
)
# Make the request
operation = client.delete_cluster(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.DeleteClusterRequest, dict]
The request object. Request for |
name |
str
Required. Redis cluster resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_operation
delete_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.DeleteOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NoneDeletes a long-running operation.
This method indicates that the client is no longer interested
in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
delete_token_auth_user
delete_token_auth_user(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.DeleteTokenAuthUserRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationDeletes a token auth user for a token based auth enabled cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_delete_token_auth_user():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.DeleteTokenAuthUserRequest(
name="name_value",
)
# Make the request
operation = client.delete_token_auth_user(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.DeleteTokenAuthUserRequest, dict]
The request object. Request message for [DeleteTokenAuthUser][]. |
name |
str
Required. The name of the token auth user to delete. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
export_backup
export_backup(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ExportBackupRequest,
dict,
]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationExports a specific backup to a customer target Cloud Storage URI.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_export_backup():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.ExportBackupRequest(
gcs_bucket="gcs_bucket_value",
name="name_value",
)
# Make the request
operation = client.export_backup(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.ExportBackupRequest, dict]
The request object. Request for [ExportBackup]. |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be Backup Backup of a cluster. |
forwarding_rule_path
forwarding_rule_path(project: str, region: str, forwarding_rule: str) -> strReturns a fully-qualified forwarding_rule string.
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)Creates an instance of this client using the provided credentials file.
| Parameter | |
|---|---|
| Name | Description |
filename |
str
The path to the service account private key json file. |
| Returns | |
|---|---|
| Type | Description |
CloudRedisClusterClient |
The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)Creates an instance of this client using the provided credentials info.
| Parameter | |
|---|---|
| Name | Description |
info |
dict
The service account private key info. |
| Returns | |
|---|---|
| Type | Description |
CloudRedisClusterClient |
The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)Creates an instance of this client using the provided credentials file.
| Parameter | |
|---|---|
| Name | Description |
filename |
str
The path to the service account private key json file. |
| Returns | |
|---|---|
| Type | Description |
CloudRedisClusterClient |
The constructed client. |
get_acl_policy
get_acl_policy(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetAclPolicyRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AclPolicyGets the details of a specific Redis Cluster ACL policy.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_acl_policy():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetAclPolicyRequest(
name="name_value",
)
# Make the request
response = client.get_acl_policy(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetAclPolicyRequest, dict]
The request object. Request for |
name |
str
Required. Redis ACL policy resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.AclPolicy |
The ACL policy resource. |
get_acl_policy_revision
get_acl_policy_revision(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetAclPolicyRevisionRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AclPolicyRevisionGets details of a specific ACL policy revision.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_acl_policy_revision():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetAclPolicyRevisionRequest(
name="name_value",
)
# Make the request
response = client.get_acl_policy_revision(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetAclPolicyRevisionRequest, dict]
The request object. Request for |
name |
str
Required. Redis ACL policy revision resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.AclPolicyRevision |
The ACL policy revision resource. |
get_auth_token
get_auth_token(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetAuthTokenRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AuthTokenGets a specific auth token for a specific token auth user.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_auth_token():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetAuthTokenRequest(
name="name_value",
)
# Make the request
response = client.get_auth_token(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetAuthTokenRequest, dict]
The request object. Request message for [GetAuthToken][]. |
name |
str
Required. The name of auth token for a token based auth enabled cluster. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.AuthToken |
Auth token for the cluster. |
get_backup
get_backup(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetBackupRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.BackupGets the details of a specific backup.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_backup():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetBackupRequest(
name="name_value",
)
# Make the request
response = client.get_backup(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetBackupRequest, dict]
The request object. Request for [GetBackup]. |
name |
str
Required. Redis backup resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.Backup |
Backup of a cluster. |
get_backup_collection
get_backup_collection(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetBackupCollectionRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.BackupCollectionGet a backup collection.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_backup_collection():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetBackupCollectionRequest(
name="name_value",
)
# Make the request
response = client.get_backup_collection(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetBackupCollectionRequest, dict]
The request object. Request for [GetBackupCollection]. |
name |
str
Required. Redis backupCollection resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.BackupCollection |
BackupCollection of a cluster. |
get_cluster
get_cluster(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetClusterRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ClusterGets the details of a specific Redis cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_cluster():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetClusterRequest(
name="name_value",
)
# Make the request
response = client.get_cluster(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetClusterRequest, dict]
The request object. Request for |
name |
str
Required. Redis cluster resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.Cluster |
A cluster instance. |
get_cluster_certificate_authority
get_cluster_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetClusterCertificateAuthorityRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.CertificateAuthorityGets the details of certificate authority information for Redis cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_cluster_certificate_authority():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetClusterCertificateAuthorityRequest(
name="name_value",
)
# Make the request
response = client.get_cluster_certificate_authority(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetClusterCertificateAuthorityRequest, dict]
The request object. Request for |
name |
str
Required. Redis cluster certificate authority resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.CertificateAuthority |
Redis cluster certificate authority |
get_location
get_location(
request: typing.Optional[
typing.Union[google.cloud.location.locations_pb2.GetLocationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.LocationGets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Location object. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
)Deprecated. Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
| Parameter | |
|---|---|
| Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If any errors happen. |
| Returns | |
|---|---|
| Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] |
returns the API endpoint and the client cert source to use. |
get_operation
get_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.GetOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.OperationGets the latest state of a long-running operation.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
An Operation object. |
get_shared_regional_certificate_authority
get_shared_regional_certificate_authority(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetSharedRegionalCertificateAuthorityRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.SharedRegionalCertificateAuthority
)Gets the details of regional certificate authority information for Redis cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_shared_regional_certificate_authority():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetSharedRegionalCertificateAuthorityRequest(
name="name_value",
)
# Make the request
response = client.get_shared_regional_certificate_authority(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetSharedRegionalCertificateAuthorityRequest, dict]
The request object. Request for |
name |
str
Required. Regional certificate authority resource name using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.SharedRegionalCertificateAuthority |
Shared regional certificate authority |
get_token_auth_user
get_token_auth_user(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.GetTokenAuthUserRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.types.cloud_redis_cluster.TokenAuthUserGets a specific token auth user for a basic auth enabled cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_get_token_auth_user():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.GetTokenAuthUserRequest(
name="name_value",
)
# Make the request
response = client.get_token_auth_user(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.GetTokenAuthUserRequest, dict]
The request object. Request message for [GetTokenAuthUser][]. |
name |
str
Required. The name of token auth user for a token based auth enabled cluster. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.types.TokenAuthUser |
Represents a token based auth user for the cluster. |
list_acl_policies
list_acl_policies(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ListAclPoliciesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListAclPoliciesPager
)Lists all ACL policies owned by a project in either the specified location (region) or all locations.
The location should have the following format:
projects/{project_id}/locations/{location_id}
If location_id is specified as - (wildcard), then all
regions available to the project are queried, and the results
are aggregated.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_list_acl_policies():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.ListAclPoliciesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_acl_policies(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.ListAclPoliciesRequest, dict]
The request object. Request for |
parent |
str
Required. The resource name of the ACL policy location using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListAclPoliciesPager |
Response for ListAclPolicies. Iterating over this object will yield results and resolve additional pages automatically. |
list_acl_policy_revisions
list_acl_policy_revisions(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ListAclPolicyRevisionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListAclPolicyRevisionsPager
)Lists all ACL policy revisions in a given ACL policy.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_list_acl_policy_revisions():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.ListAclPolicyRevisionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_acl_policy_revisions(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.ListAclPolicyRevisionsRequest, dict]
The request object. Request for |
parent |
str
Required. The name of the ACL policy to list revisions for. Format: "projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}" This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListAclPolicyRevisionsPager |
Response for ListAclPolicyRevisions. Iterating over this object will yield results and resolve additional pages automatically. |
list_auth_tokens
list_auth_tokens(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ListAuthTokensRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListAuthTokensPager
)Lists all the auth tokens for a specific token auth user.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_list_auth_tokens():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.ListAuthTokensRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_auth_tokens(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.ListAuthTokensRequest, dict]
The request object. Request message for [ListAuthTokens][]. |
parent |
str
Required. The parent resource that this auth token will be listed for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListAuthTokensPager |
Response message for [ListAuthTokens][]. Iterating over this object will yield results and resolve additional pages automatically. |
list_backup_collections
list_backup_collections(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ListBackupCollectionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListBackupCollectionsPager
)Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.
If location_id is specified as - (wildcard), then all
regions available to the project are queried, and the results
are aggregated.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_list_backup_collections():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.ListBackupCollectionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_backup_collections(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.ListBackupCollectionsRequest, dict]
The request object. Request for [ListBackupCollections] |
parent |
str
Required. The resource name of the backupCollection location using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListBackupCollectionsPager |
Response for [ListBackupCollections]. Iterating over this object will yield results and resolve additional pages automatically. |
list_backups
list_backups(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ListBackupsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListBackupsPagerLists all backups owned by a backup collection.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_list_backups():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.ListBackupsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_backups(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.ListBackupsRequest, dict]
The request object. Request for [ListBackups]. |
parent |
str
Required. The resource name of the backupCollection using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListBackupsPager |
Response for [ListBackups]. Iterating over this object will yield results and resolve additional pages automatically. |
list_clusters
list_clusters(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ListClustersRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListClustersPager
)Lists all Redis clusters owned by a project in either the specified location (region) or all locations.
The location should have the following format:
projects/{project_id}/locations/{location_id}
If location_id is specified as - (wildcard), then all
regions available to the project are queried, and the results
are aggregated.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_list_clusters():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.ListClustersRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_clusters(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.ListClustersRequest, dict]
The request object. Request for |
parent |
str
Required. The resource name of the cluster location using the form: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListClustersPager |
Response for ListClusters][CloudRedis.ListClusters]. Iterating over this object will yield results and resolve additional pages automatically. |
list_locations
list_locations(
request: typing.Optional[
typing.Union[google.cloud.location.locations_pb2.ListLocationsRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponseLists information about the supported locations for this service.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Response message for ListLocations method. |
list_operations
list_operations(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.ListOperationsRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponseLists operations that match the specified filter in the request.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Response message for ListOperations method. |
list_token_auth_users
list_token_auth_users(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.ListTokenAuthUsersRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListTokenAuthUsersPager
)Lists all the token auth users for a token based auth enabled cluster.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_list_token_auth_users():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.ListTokenAuthUsersRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_token_auth_users(request=request)
# Handle the response
for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.ListTokenAuthUsersRequest, dict]
The request object. Request message for [ListTokenAuthUsers][]. |
parent |
str
Required. The parent resource that this token based auth user will be listed for. Format: projects/{project}/locations/{location}/clusters/{cluster} This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.redis_cluster_v1.services.cloud_redis_cluster.pagers.ListTokenAuthUsersPager |
Response message for [ListTokenAuthUsers][]. Iterating over this object will yield results and resolve additional pages automatically. |
network_path
network_path(project: str, network: str) -> strReturns a fully-qualified network string.
parse_acl_policy_path
parse_acl_policy_path(path: str) -> typing.Dict[str, str]Parses a acl_policy path into its component segments.
parse_acl_policy_revision_path
parse_acl_policy_revision_path(path: str) -> typing.Dict[str, str]Parses a acl_policy_revision path into its component segments.
parse_auth_token_path
parse_auth_token_path(path: str) -> typing.Dict[str, str]Parses a auth_token path into its component segments.
parse_backup_collection_path
parse_backup_collection_path(path: str) -> typing.Dict[str, str]Parses a backup_collection path into its component segments.
parse_backup_path
parse_backup_path(path: str) -> typing.Dict[str, str]Parses a backup path into its component segments.
parse_ca_pool_path
parse_ca_pool_path(path: str) -> typing.Dict[str, str]Parses a ca_pool path into its component segments.
parse_certificate_authority_path
parse_certificate_authority_path(path: str) -> typing.Dict[str, str]Parses a certificate_authority path into its component segments.
parse_cluster_path
parse_cluster_path(path: str) -> typing.Dict[str, str]Parses a cluster path into its component segments.
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]Parse a project path into its component segments.
parse_crypto_key_path
parse_crypto_key_path(path: str) -> typing.Dict[str, str]Parses a crypto_key path into its component segments.
parse_crypto_key_version_path
parse_crypto_key_version_path(path: str) -> typing.Dict[str, str]Parses a crypto_key_version path into its component segments.
parse_forwarding_rule_path
parse_forwarding_rule_path(path: str) -> typing.Dict[str, str]Parses a forwarding_rule path into its component segments.
parse_network_path
parse_network_path(path: str) -> typing.Dict[str, str]Parses a network path into its component segments.
parse_service_attachment_path
parse_service_attachment_path(path: str) -> typing.Dict[str, str]Parses a service_attachment path into its component segments.
parse_shared_regional_certificate_authority_path
parse_shared_regional_certificate_authority_path(
path: str,
) -> typing.Dict[str, str]Parses a shared_regional_certificate_authority path into its component segments.
parse_token_auth_user_path
parse_token_auth_user_path(path: str) -> typing.Dict[str, str]Parses a token_auth_user path into its component segments.
reschedule_cluster_maintenance
reschedule_cluster_maintenance(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.RescheduleClusterMaintenanceRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
reschedule_type: typing.Optional[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.RescheduleClusterMaintenanceRequest.RescheduleType
] = None,
schedule_time: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationReschedules upcoming maintenance event.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_reschedule_cluster_maintenance():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
request = redis_cluster_v1.RescheduleClusterMaintenanceRequest(
name="name_value",
reschedule_type="SPECIFIC_TIME",
)
# Make the request
operation = client.reschedule_cluster_maintenance(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.RescheduleClusterMaintenanceRequest, dict]
The request object. Request for rescheduling a cluster maintenance. |
name |
str
Required. Redis Cluster instance resource name using the form: |
reschedule_type |
google.cloud.redis_cluster_v1.types.RescheduleClusterMaintenanceRequest.RescheduleType
Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. This corresponds to the |
schedule_time |
google.protobuf.timestamp_pb2.Timestamp
Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be Cluster A cluster instance. |
service_attachment_path
service_attachment_path(project: str, region: str, service_attachment: str) -> strReturns a fully-qualified service_attachment string.
shared_regional_certificate_authority_path
shared_regional_certificate_authority_path(project: str, location: str) -> strReturns a fully-qualified shared_regional_certificate_authority string.
token_auth_user_path
token_auth_user_path(
project: str, location: str, cluster: str, token_auth_user: str
) -> strReturns a fully-qualified token_auth_user string.
update_acl_policy
update_acl_policy(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.UpdateAclPolicyRequest,
dict,
]
] = None,
*,
acl_policy: typing.Optional[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.AclPolicy
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationUpdates the ACL policy.
The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters.
Completed longrunning.Operation will contain the new ACL policy object in the response field.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_update_acl_policy():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
acl_policy = redis_cluster_v1.AclPolicy()
acl_policy.rules.username = "username_value"
acl_policy.rules.rule = "rule_value"
request = redis_cluster_v1.UpdateAclPolicyRequest(
acl_policy=acl_policy,
)
# Make the request
operation = client.update_acl_policy(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.UpdateAclPolicyRequest, dict]
The request object. Request for |
acl_policy |
google.cloud.redis_cluster_v1.types.AclPolicy
Required. The ACL policy to be updated. This corresponds to the |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Optional. Mask of fields to be updated. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be AclPolicy The ACL policy resource. |
update_cluster
update_cluster(
request: typing.Optional[
typing.Union[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.UpdateClusterRequest,
dict,
]
] = None,
*,
cluster: typing.Optional[
google.cloud.redis_cluster_v1.types.cloud_redis_cluster.Cluster
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary.Retry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.OperationUpdates the metadata and configuration of a specific Redis cluster. Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.
# This snippet 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 as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import redis_cluster_v1
def sample_update_cluster():
# Create a client
client = redis_cluster_v1.CloudRedisClusterClient()
# Initialize request argument(s)
cluster = redis_cluster_v1.Cluster()
cluster.name = "name_value"
request = redis_cluster_v1.UpdateClusterRequest(
cluster=cluster,
)
# Make the request
operation = client.update_cluster(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Union[google.cloud.redis_cluster_v1.types.UpdateClusterRequest, dict]
The request object. Request for |
cluster |
google.cloud.redis_cluster_v1.types.Cluster
Required. Update description. Only fields specified in update_mask are updated. This corresponds to the |
update_mask |
google.protobuf.field_mask_pb2.FieldMask
Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster: - |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation.Operation |
An object representing a long-running operation. The result type for the operation will be Cluster A cluster instance. |