Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [Memorystore for Redis Cluster] Added support for maintenance window and rescheduling maintenance #28242

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions google-cloud-redis-cluster-v1/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"proto_docs/README.md",
"proto_docs/google/api/client.rb",
"proto_docs/google/api/field_behavior.rb",
"proto_docs/google/api/field_info.rb",
"proto_docs/google/api/launch_stage.rb",
"proto_docs/google/api/resource.rb",
"proto_docs/google/cloud/redis/cluster/v1/cloud_redis_cluster.rb",
Expand All @@ -42,12 +43,22 @@
"proto_docs/google/protobuf/field_mask.rb",
"proto_docs/google/protobuf/timestamp.rb",
"proto_docs/google/rpc/status.rb",
"proto_docs/google/type/dayofweek.rb",
"proto_docs/google/type/timeofday.rb",
"snippets/Gemfile",
"snippets/cloud_redis_cluster/backup_cluster.rb",
"snippets/cloud_redis_cluster/create_cluster.rb",
"snippets/cloud_redis_cluster/delete_backup.rb",
"snippets/cloud_redis_cluster/delete_cluster.rb",
"snippets/cloud_redis_cluster/export_backup.rb",
"snippets/cloud_redis_cluster/get_backup.rb",
"snippets/cloud_redis_cluster/get_backup_collection.rb",
"snippets/cloud_redis_cluster/get_cluster.rb",
"snippets/cloud_redis_cluster/get_cluster_certificate_authority.rb",
"snippets/cloud_redis_cluster/list_backup_collections.rb",
"snippets/cloud_redis_cluster/list_backups.rb",
"snippets/cloud_redis_cluster/list_clusters.rb",
"snippets/cloud_redis_cluster/reschedule_cluster_maintenance.rb",
"snippets/cloud_redis_cluster/update_cluster.rb",
"snippets/snippet_metadata_google.cloud.redis.cluster.v1.json",
"test/google/cloud/redis/cluster/v1/cloud_redis_cluster_operations_test.rb",
Expand Down
40 changes: 40 additions & 0 deletions google-cloud-redis-cluster-v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,46 @@
"methods": [
"get_cluster_certificate_authority"
]
},
"RescheduleClusterMaintenance": {
"methods": [
"reschedule_cluster_maintenance"
]
},
"ListBackupCollections": {
"methods": [
"list_backup_collections"
]
},
"GetBackupCollection": {
"methods": [
"get_backup_collection"
]
},
"ListBackups": {
"methods": [
"list_backups"
]
},
"GetBackup": {
"methods": [
"get_backup"
]
},
"DeleteBackup": {
"methods": [
"delete_backup"
]
},
"ExportBackup": {
"methods": [
"export_backup"
]
},
"BackupCluster": {
"methods": [
"backup_cluster"
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ module V1
# Note that location_id must be a GCP `region`; for example:
# * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
#
# We use API version selector for Flex APIs
# * The versioning strategy is release-based versioning
# * Our backend CLH only deals with the superset version (called v1main)
# * Existing backend for Redis Gen1 and MRR is not touched.
# * More details in go/redis-flex-api-versioning
#
# @example Load this service and instantiate a gRPC client
#
# require "google/cloud/redis/cluster/v1/cloud_redis_cluster"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,46 @@ module V1
module CloudRedisCluster
# Path helper methods for the CloudRedisCluster API.
module Paths
##
# Create a fully-qualified Backup resource string.
#
# The resource will be in the following format:
#
# `projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}`
#
# @param project [String]
# @param location [String]
# @param backup_collection [String]
# @param backup [String]
#
# @return [::String]
def backup_path project:, location:, backup_collection:, backup:
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
raise ::ArgumentError, "backup_collection cannot contain /" if backup_collection.to_s.include? "/"

"projects/#{project}/locations/#{location}/backupCollections/#{backup_collection}/backups/#{backup}"
end

##
# Create a fully-qualified BackupCollection resource string.
#
# The resource will be in the following format:
#
# `projects/{project}/locations/{location}/backupCollections/{backup_collection}`
#
# @param project [String]
# @param location [String]
# @param backup_collection [String]
#
# @return [::String]
def backup_collection_path project:, location:, backup_collection:
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

"projects/#{project}/locations/#{location}/backupCollections/#{backup_collection}"
end

##
# Create a fully-qualified CertificateAuthority resource string.
#
Expand Down Expand Up @@ -63,6 +103,69 @@ def cluster_path project:, location:, cluster:
"projects/#{project}/locations/#{location}/clusters/#{cluster}"
end

##
# Create a fully-qualified CryptoKey resource string.
#
# The resource will be in the following format:
#
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
#
# @param project [String]
# @param location [String]
# @param key_ring [String]
# @param crypto_key [String]
#
# @return [::String]
def crypto_key_path project:, location:, key_ring:, crypto_key:
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"

"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
end

##
# Create a fully-qualified CryptoKeyVersion resource string.
#
# The resource will be in the following format:
#
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`
#
# @param project [String]
# @param location [String]
# @param key_ring [String]
# @param crypto_key [String]
# @param crypto_key_version [String]
#
# @return [::String]
def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"

"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
end

##
# Create a fully-qualified ForwardingRule resource string.
#
# The resource will be in the following format:
#
# `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}`
#
# @param project [String]
# @param region [String]
# @param forwarding_rule [String]
#
# @return [::String]
def forwarding_rule_path project:, region:, forwarding_rule:
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"

"projects/#{project}/regions/#{region}/forwardingRules/#{forwarding_rule}"
end

##
# Create a fully-qualified Location resource string.
#
Expand All @@ -80,6 +183,42 @@ def location_path project:, location:
"projects/#{project}/locations/#{location}"
end

##
# Create a fully-qualified Network resource string.
#
# The resource will be in the following format:
#
# `projects/{project}/global/networks/{network}`
#
# @param project [String]
# @param network [String]
#
# @return [::String]
def network_path project:, network:
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

"projects/#{project}/global/networks/#{network}"
end

##
# Create a fully-qualified ServiceAttachment resource string.
#
# The resource will be in the following format:
#
# `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`
#
# @param project [String]
# @param region [String]
# @param service_attachment [String]
#
# @return [::String]
def service_attachment_path project:, region:, service_attachment:
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"

"projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}"
end

extend self
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ module V1
# Note that location_id must be a GCP `region`; for example:
# * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
#
# We use API version selector for Flex APIs
# * The versioning strategy is release-based versioning
# * Our backend CLH only deals with the superset version (called v1main)
# * Existing backend for Redis Gen1 and MRR is not touched.
# * More details in go/redis-flex-api-versioning
#
# To load this service and instantiate a REST client:
#
# require "google/cloud/redis/cluster/v1/cloud_redis_cluster/rest"
Expand Down
Loading
Loading