google-cloud-gke_backup-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +144 -0
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +2980 -0
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/credentials.rb +47 -0
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb +767 -0
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb +216 -0
- data/lib/google/cloud/gke_backup/v1/backup_for_gke.rb +51 -0
- data/lib/google/cloud/gke_backup/v1/version.rb +28 -0
- data/lib/google/cloud/gke_backup/v1.rb +40 -0
- data/lib/google/cloud/gkebackup/v1/backup_pb.rb +74 -0
- data/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +61 -0
- data/lib/google/cloud/gkebackup/v1/common_pb.rb +37 -0
- data/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb +213 -0
- data/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb +92 -0
- data/lib/google/cloud/gkebackup/v1/restore_pb.rb +101 -0
- data/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb +36 -0
- data/lib/google/cloud/gkebackup/v1/volume_pb.rb +83 -0
- data/lib/google-cloud-gke_backup-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/gkebackup/v1/backup.rb +226 -0
- data/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +196 -0
- data/proto_docs/google/cloud/gkebackup/v1/common.rb +67 -0
- data/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb +658 -0
- data/proto_docs/google/cloud/gkebackup/v1/restore.rb +325 -0
- data/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb +92 -0
- data/proto_docs/google/cloud/gkebackup/v1/volume.rb +214 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +229 -0
@@ -0,0 +1,222 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
37
|
+
# };
|
38
|
+
# }
|
39
|
+
#
|
40
|
+
# The ResourceDescriptor Yaml config will look like:
|
41
|
+
#
|
42
|
+
# resources:
|
43
|
+
# - type: "pubsub.googleapis.com/Topic"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
45
|
+
#
|
46
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
47
|
+
# live under multiple parents.
|
48
|
+
#
|
49
|
+
# Example:
|
50
|
+
#
|
51
|
+
# message LogEntry {
|
52
|
+
# option (google.api.resource) = {
|
53
|
+
# type: "logging.googleapis.com/LogEntry"
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
58
|
+
# };
|
59
|
+
# }
|
60
|
+
#
|
61
|
+
# The ResourceDescriptor Yaml config will look like:
|
62
|
+
#
|
63
|
+
# resources:
|
64
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
69
|
+
# @!attribute [rw] type
|
70
|
+
# @return [::String]
|
71
|
+
# The resource type. It must be in the format of
|
72
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
73
|
+
# singular and must not include version numbers.
|
74
|
+
#
|
75
|
+
# Example: `storage.googleapis.com/Bucket`
|
76
|
+
#
|
77
|
+
# The value of the resource_type_kind must follow the regular expression
|
78
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
79
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
80
|
+
# characters allowed for the `resource_type_kind` is 100.
|
81
|
+
# @!attribute [rw] pattern
|
82
|
+
# @return [::Array<::String>]
|
83
|
+
# Optional. The relative resource name pattern associated with this resource
|
84
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
85
|
+
#
|
86
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
87
|
+
# syntax:
|
88
|
+
#
|
89
|
+
# Template = Segment { "/" Segment } ;
|
90
|
+
# Segment = LITERAL | Variable ;
|
91
|
+
# Variable = "{" LITERAL "}" ;
|
92
|
+
#
|
93
|
+
# Examples:
|
94
|
+
#
|
95
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
96
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
97
|
+
#
|
98
|
+
# The components in braces correspond to the IDs for each resource in the
|
99
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
100
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
101
|
+
# type of resource.
|
102
|
+
# @!attribute [rw] name_field
|
103
|
+
# @return [::String]
|
104
|
+
# Optional. The field on the resource that designates the resource name
|
105
|
+
# field. If omitted, this is assumed to be "name".
|
106
|
+
# @!attribute [rw] history
|
107
|
+
# @return [::Google::Api::ResourceDescriptor::History]
|
108
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
109
|
+
#
|
110
|
+
# Example:
|
111
|
+
#
|
112
|
+
# // The InspectTemplate message originally only supported resource
|
113
|
+
# // names with organization, and project was added later.
|
114
|
+
# message InspectTemplate {
|
115
|
+
# option (google.api.resource) = {
|
116
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
117
|
+
# pattern:
|
118
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
119
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
120
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
121
|
+
# };
|
122
|
+
# }
|
123
|
+
# @!attribute [rw] plural
|
124
|
+
# @return [::String]
|
125
|
+
# The plural name used in the resource name and permission names, such as
|
126
|
+
# 'projects' for the resource name of 'projects/\\{project}' and the permission
|
127
|
+
# name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
|
128
|
+
# concept of the `plural` field in k8s CRD spec
|
129
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
130
|
+
#
|
131
|
+
# Note: The plural form is required even for singleton resources. See
|
132
|
+
# https://aip.dev/156
|
133
|
+
# @!attribute [rw] singular
|
134
|
+
# @return [::String]
|
135
|
+
# The same concept of the `singular` field in k8s CRD spec
|
136
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
137
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
138
|
+
# @!attribute [rw] style
|
139
|
+
# @return [::Array<::Google::Api::ResourceDescriptor::Style>]
|
140
|
+
# Style flag(s) for this resource.
|
141
|
+
# These indicate that a resource is expected to conform to a given
|
142
|
+
# style. See the specific style flags for additional information.
|
143
|
+
class ResourceDescriptor
|
144
|
+
include ::Google::Protobuf::MessageExts
|
145
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
146
|
+
|
147
|
+
# A description of the historical or future-looking state of the
|
148
|
+
# resource pattern.
|
149
|
+
module History
|
150
|
+
# The "unset" value.
|
151
|
+
HISTORY_UNSPECIFIED = 0
|
152
|
+
|
153
|
+
# The resource originally had one pattern and launched as such, and
|
154
|
+
# additional patterns were added later.
|
155
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
156
|
+
|
157
|
+
# The resource has one pattern, but the API owner expects to add more
|
158
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
159
|
+
# that from being necessary once there are multiple patterns.)
|
160
|
+
FUTURE_MULTI_PATTERN = 2
|
161
|
+
end
|
162
|
+
|
163
|
+
# A flag representing a specific style that a resource claims to conform to.
|
164
|
+
module Style
|
165
|
+
# The unspecified value. Do not use.
|
166
|
+
STYLE_UNSPECIFIED = 0
|
167
|
+
|
168
|
+
# This resource is intended to be "declarative-friendly".
|
169
|
+
#
|
170
|
+
# Declarative-friendly resources must be more strictly consistent, and
|
171
|
+
# setting this to true communicates to tools that this resource should
|
172
|
+
# adhere to declarative-friendly expectations.
|
173
|
+
#
|
174
|
+
# Note: This is used by the API linter (linter.aip.dev) to enable
|
175
|
+
# additional checks.
|
176
|
+
DECLARATIVE_FRIENDLY = 1
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Defines a proto annotation that describes a string field that refers to
|
181
|
+
# an API resource.
|
182
|
+
# @!attribute [rw] type
|
183
|
+
# @return [::String]
|
184
|
+
# The resource type that the annotated field references.
|
185
|
+
#
|
186
|
+
# Example:
|
187
|
+
#
|
188
|
+
# message Subscription {
|
189
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
190
|
+
# type: "pubsub.googleapis.com/Topic"
|
191
|
+
# }];
|
192
|
+
# }
|
193
|
+
#
|
194
|
+
# Occasionally, a field may reference an arbitrary resource. In this case,
|
195
|
+
# APIs use the special value * in their resource reference.
|
196
|
+
#
|
197
|
+
# Example:
|
198
|
+
#
|
199
|
+
# message GetIamPolicyRequest {
|
200
|
+
# string resource = 2 [(google.api.resource_reference) = {
|
201
|
+
# type: "*"
|
202
|
+
# }];
|
203
|
+
# }
|
204
|
+
# @!attribute [rw] child_type
|
205
|
+
# @return [::String]
|
206
|
+
# The resource type of a child collection that the annotated field
|
207
|
+
# references. This is useful for annotating the `parent` field that
|
208
|
+
# doesn't have a fixed resource type.
|
209
|
+
#
|
210
|
+
# Example:
|
211
|
+
#
|
212
|
+
# message ListLogEntriesRequest {
|
213
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
214
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
215
|
+
# };
|
216
|
+
# }
|
217
|
+
class ResourceReference
|
218
|
+
include ::Google::Protobuf::MessageExts
|
219
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
@@ -0,0 +1,226 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module GkeBackup
|
23
|
+
module V1
|
24
|
+
# Represents a request to perform a single point-in-time capture of
|
25
|
+
# some portion of the state of a GKE cluster, the record of the backup
|
26
|
+
# operation itself, and an anchor for the underlying artifacts that
|
27
|
+
# comprise the Backup (the config backup and VolumeBackups).
|
28
|
+
# Next id: 28
|
29
|
+
# @!attribute [r] name
|
30
|
+
# @return [::String]
|
31
|
+
# Output only. The fully qualified name of the Backup.
|
32
|
+
# projects/*/locations/*/backupPlans/*/backups/*
|
33
|
+
# @!attribute [r] uid
|
34
|
+
# @return [::String]
|
35
|
+
# Output only. Server generated global unique identifier of
|
36
|
+
# [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier)
|
37
|
+
# @!attribute [r] create_time
|
38
|
+
# @return [::Google::Protobuf::Timestamp]
|
39
|
+
# Output only. The timestamp when this Backup resource was created.
|
40
|
+
# @!attribute [r] update_time
|
41
|
+
# @return [::Google::Protobuf::Timestamp]
|
42
|
+
# Output only. The timestamp when this Backup resource was last updated.
|
43
|
+
# @!attribute [r] manual
|
44
|
+
# @return [::Boolean]
|
45
|
+
# Output only. This flag indicates whether this Backup resource was created manually
|
46
|
+
# by a user or via a schedule in the BackupPlan. A value of True means that
|
47
|
+
# the Backup was created manually.
|
48
|
+
# @!attribute [rw] labels
|
49
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
50
|
+
# A set of custom labels supplied by user.
|
51
|
+
# @!attribute [rw] delete_lock_days
|
52
|
+
# @return [::Integer]
|
53
|
+
# Minimum age for this Backup (in days). If this field is set to a non-zero
|
54
|
+
# value, the Backup will be "locked" against deletion (either manual or
|
55
|
+
# automatic deletion) for the number of days provided (measured from the
|
56
|
+
# creation time of the Backup). MUST be an integer value between 0-90
|
57
|
+
# (inclusive).
|
58
|
+
#
|
59
|
+
# Defaults to parent BackupPlan's
|
60
|
+
# {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_delete_lock_days backup_delete_lock_days}
|
61
|
+
# setting and may only be increased
|
62
|
+
# (either at creation time or in a subsequent update).
|
63
|
+
# @!attribute [r] delete_lock_expire_time
|
64
|
+
# @return [::Google::Protobuf::Timestamp]
|
65
|
+
# Output only. The time at which an existing delete lock will expire for this backup
|
66
|
+
# (calculated from create_time + {::Google::Cloud::GkeBackup::V1::Backup#delete_lock_days delete_lock_days}).
|
67
|
+
# @!attribute [rw] retain_days
|
68
|
+
# @return [::Integer]
|
69
|
+
# The age (in days) after which this Backup will be automatically deleted.
|
70
|
+
# Must be an integer value >= 0:
|
71
|
+
#
|
72
|
+
# - If 0, no automatic deletion will occur for this Backup.
|
73
|
+
# - If not 0, this must be >= {::Google::Cloud::GkeBackup::V1::Backup#delete_lock_days delete_lock_days}.
|
74
|
+
#
|
75
|
+
# Once a Backup is created, this value may only be increased.
|
76
|
+
#
|
77
|
+
# Defaults to the parent BackupPlan's
|
78
|
+
# {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_retain_days backup_retain_days} value.
|
79
|
+
# @!attribute [r] retain_expire_time
|
80
|
+
# @return [::Google::Protobuf::Timestamp]
|
81
|
+
# Output only. The time at which this Backup will be automatically deleted (calculated
|
82
|
+
# from create_time + {::Google::Cloud::GkeBackup::V1::Backup#retain_days retain_days}).
|
83
|
+
# @!attribute [r] encryption_key
|
84
|
+
# @return [::Google::Cloud::GkeBackup::V1::EncryptionKey]
|
85
|
+
# Output only. The customer managed encryption key that was used to encrypt the Backup's
|
86
|
+
# artifacts. Inherited from the parent BackupPlan's
|
87
|
+
# {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#encryption_key encryption_key} value.
|
88
|
+
# @!attribute [r] all_namespaces
|
89
|
+
# @return [::Boolean]
|
90
|
+
# Output only. If True, all namespaces were included in the Backup.
|
91
|
+
# @!attribute [r] selected_namespaces
|
92
|
+
# @return [::Google::Cloud::GkeBackup::V1::Namespaces]
|
93
|
+
# Output only. If set, the list of namespaces that were included in the Backup.
|
94
|
+
# @!attribute [r] selected_applications
|
95
|
+
# @return [::Google::Cloud::GkeBackup::V1::NamespacedNames]
|
96
|
+
# Output only. If set, the list of ProtectedApplications whose resources were included
|
97
|
+
# in the Backup.
|
98
|
+
# @!attribute [r] contains_volume_data
|
99
|
+
# @return [::Boolean]
|
100
|
+
# Output only. Whether or not the Backup contains volume data. Controlled by the parent
|
101
|
+
# BackupPlan's
|
102
|
+
# {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#include_volume_data include_volume_data} value.
|
103
|
+
# @!attribute [r] contains_secrets
|
104
|
+
# @return [::Boolean]
|
105
|
+
# Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the
|
106
|
+
# parent BackupPlan's
|
107
|
+
# {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#include_secrets include_secrets} value.
|
108
|
+
# @!attribute [r] cluster_metadata
|
109
|
+
# @return [::Google::Cloud::GkeBackup::V1::Backup::ClusterMetadata]
|
110
|
+
# Output only. Information about the GKE cluster from which this Backup was created.
|
111
|
+
# @!attribute [r] state
|
112
|
+
# @return [::Google::Cloud::GkeBackup::V1::Backup::State]
|
113
|
+
# Output only. Current state of the Backup
|
114
|
+
# @!attribute [r] state_reason
|
115
|
+
# @return [::String]
|
116
|
+
# Output only. Human-readable description of why the backup is in the current `state`.
|
117
|
+
# @!attribute [r] complete_time
|
118
|
+
# @return [::Google::Protobuf::Timestamp]
|
119
|
+
# Output only. Completion time of the Backup
|
120
|
+
# @!attribute [r] resource_count
|
121
|
+
# @return [::Integer]
|
122
|
+
# Output only. The total number of Kubernetes resources included in the Backup.
|
123
|
+
# @!attribute [r] volume_count
|
124
|
+
# @return [::Integer]
|
125
|
+
# Output only. The total number of volume backups contained in the Backup.
|
126
|
+
# @!attribute [r] size_bytes
|
127
|
+
# @return [::Integer]
|
128
|
+
# Output only. The total size of the Backup in bytes = config backup size + sum(volume
|
129
|
+
# backup sizes)
|
130
|
+
# @!attribute [r] etag
|
131
|
+
# @return [::String]
|
132
|
+
# Output only. `etag` is used for optimistic concurrency control as a way to help
|
133
|
+
# prevent simultaneous updates of a backup from overwriting each other.
|
134
|
+
# It is strongly suggested that systems make use of the `etag` in the
|
135
|
+
# read-modify-write cycle to perform backup updates in order to avoid
|
136
|
+
# race conditions: An `etag` is returned in the response to `GetBackup`,
|
137
|
+
# and systems are expected to put that etag in the request to
|
138
|
+
# `UpdateBackup` or `DeleteBackup` to ensure that their change will be
|
139
|
+
# applied to the same version of the resource.
|
140
|
+
# @!attribute [rw] description
|
141
|
+
# @return [::String]
|
142
|
+
# User specified descriptive string for this Backup.
|
143
|
+
# @!attribute [r] pod_count
|
144
|
+
# @return [::Integer]
|
145
|
+
# Output only. The total number of Kubernetes Pods contained in the Backup.
|
146
|
+
# @!attribute [r] config_backup_size_bytes
|
147
|
+
# @return [::Integer]
|
148
|
+
# Output only. The size of the config backup in bytes.
|
149
|
+
class Backup
|
150
|
+
include ::Google::Protobuf::MessageExts
|
151
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
152
|
+
|
153
|
+
# Information about the GKE cluster from which this Backup was created.
|
154
|
+
# @!attribute [rw] cluster
|
155
|
+
# @return [::String]
|
156
|
+
# The source cluster from which this Backup was created.
|
157
|
+
# Valid formats:
|
158
|
+
#
|
159
|
+
# - projects/*/locations/*/clusters/*
|
160
|
+
# - projects/*/zones/*/clusters/*
|
161
|
+
#
|
162
|
+
# This is inherited from the parent BackupPlan's
|
163
|
+
# {::Google::Cloud::GkeBackup::V1::BackupPlan#cluster cluster} field.
|
164
|
+
# @!attribute [rw] k8s_version
|
165
|
+
# @return [::String]
|
166
|
+
# The Kubernetes server version of the source cluster.
|
167
|
+
# @!attribute [rw] backup_crd_versions
|
168
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
169
|
+
# A list of the Backup for GKE CRD versions found in the cluster.
|
170
|
+
# @!attribute [rw] gke_version
|
171
|
+
# @return [::String]
|
172
|
+
# GKE version
|
173
|
+
# @!attribute [rw] anthos_version
|
174
|
+
# @return [::String]
|
175
|
+
# Anthos version
|
176
|
+
class ClusterMetadata
|
177
|
+
include ::Google::Protobuf::MessageExts
|
178
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
179
|
+
|
180
|
+
# @!attribute [rw] key
|
181
|
+
# @return [::String]
|
182
|
+
# @!attribute [rw] value
|
183
|
+
# @return [::String]
|
184
|
+
class BackupCrdVersionsEntry
|
185
|
+
include ::Google::Protobuf::MessageExts
|
186
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# @!attribute [rw] key
|
191
|
+
# @return [::String]
|
192
|
+
# @!attribute [rw] value
|
193
|
+
# @return [::String]
|
194
|
+
class LabelsEntry
|
195
|
+
include ::Google::Protobuf::MessageExts
|
196
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
197
|
+
end
|
198
|
+
|
199
|
+
# State
|
200
|
+
module State
|
201
|
+
# The Backup resource is in the process of being created.
|
202
|
+
STATE_UNSPECIFIED = 0
|
203
|
+
|
204
|
+
# The Backup resource has been created and the associated BackupJob
|
205
|
+
# Kubernetes resource has been injected into the source cluster.
|
206
|
+
CREATING = 1
|
207
|
+
|
208
|
+
# The gkebackup agent in the cluster has begun executing the backup
|
209
|
+
# operation.
|
210
|
+
IN_PROGRESS = 2
|
211
|
+
|
212
|
+
# The backup operation has completed successfully.
|
213
|
+
SUCCEEDED = 3
|
214
|
+
|
215
|
+
# The backup operation has failed.
|
216
|
+
FAILED = 4
|
217
|
+
|
218
|
+
# This Backup resource (and its associated artifacts) is in the process
|
219
|
+
# of being deleted.
|
220
|
+
DELETING = 5
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
@@ -0,0 +1,196 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module GkeBackup
|
23
|
+
module V1
|
24
|
+
# Defines the configuration and scheduling for a "line" of Backups.
|
25
|
+
# @!attribute [r] name
|
26
|
+
# @return [::String]
|
27
|
+
# Output only. The full name of the BackupPlan resource.
|
28
|
+
# Format: projects/*/locations/*/backupPlans/*
|
29
|
+
# @!attribute [r] uid
|
30
|
+
# @return [::String]
|
31
|
+
# Output only. Server generated global unique identifier of
|
32
|
+
# [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
|
33
|
+
# @!attribute [r] create_time
|
34
|
+
# @return [::Google::Protobuf::Timestamp]
|
35
|
+
# Output only. The timestamp when this BackupPlan resource was created.
|
36
|
+
# @!attribute [r] update_time
|
37
|
+
# @return [::Google::Protobuf::Timestamp]
|
38
|
+
# Output only. The timestamp when this BackupPlan resource was last
|
39
|
+
# updated.
|
40
|
+
# @!attribute [rw] description
|
41
|
+
# @return [::String]
|
42
|
+
# User specified descriptive string for this BackupPlan.
|
43
|
+
# @!attribute [rw] cluster
|
44
|
+
# @return [::String]
|
45
|
+
# Required. Immutable. The source cluster from which Backups will be created via
|
46
|
+
# this BackupPlan.
|
47
|
+
# Valid formats:
|
48
|
+
#
|
49
|
+
# - projects/*/locations/*/clusters/*
|
50
|
+
# - projects/*/zones/*/clusters/*
|
51
|
+
# @!attribute [rw] retention_policy
|
52
|
+
# @return [::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy]
|
53
|
+
# RetentionPolicy governs lifecycle of Backups created under this plan.
|
54
|
+
# @!attribute [rw] labels
|
55
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
56
|
+
# A set of custom labels supplied by user.
|
57
|
+
# @!attribute [rw] backup_schedule
|
58
|
+
# @return [::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule]
|
59
|
+
# Defines a schedule for automatic Backup creation via this BackupPlan.
|
60
|
+
# @!attribute [r] etag
|
61
|
+
# @return [::String]
|
62
|
+
# Output only. `etag` is used for optimistic concurrency control as a way to help
|
63
|
+
# prevent simultaneous updates of a backup plan from overwriting each other.
|
64
|
+
# It is strongly suggested that systems make use of the 'etag' in the
|
65
|
+
# read-modify-write cycle to perform BackupPlan updates in order to avoid
|
66
|
+
# race conditions: An `etag` is returned in the response to `GetBackupPlan`,
|
67
|
+
# and systems are expected to put that etag in the request to
|
68
|
+
# `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change
|
69
|
+
# will be applied to the same version of the resource.
|
70
|
+
# @!attribute [rw] deactivated
|
71
|
+
# @return [::Boolean]
|
72
|
+
# This flag indicates whether this BackupPlan has been deactivated.
|
73
|
+
# Setting this field to True locks the BackupPlan such that no further
|
74
|
+
# updates will be allowed (except deletes), including the deactivated field
|
75
|
+
# itself. It also prevents any new Backups from being created via this
|
76
|
+
# BackupPlan (including scheduled Backups).
|
77
|
+
#
|
78
|
+
# Default: False
|
79
|
+
# @!attribute [rw] backup_config
|
80
|
+
# @return [::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig]
|
81
|
+
# Defines the configuration of Backups created via this BackupPlan.
|
82
|
+
# @!attribute [r] protected_pod_count
|
83
|
+
# @return [::Integer]
|
84
|
+
# Output only. The number of Kubernetes Pods backed up in the
|
85
|
+
# last successful Backup created via this BackupPlan.
|
86
|
+
class BackupPlan
|
87
|
+
include ::Google::Protobuf::MessageExts
|
88
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
89
|
+
|
90
|
+
# RetentionPolicy defines a Backup retention policy for a BackupPlan.
|
91
|
+
# @!attribute [rw] backup_delete_lock_days
|
92
|
+
# @return [::Integer]
|
93
|
+
# Minimum age for Backups created via this BackupPlan (in days).
|
94
|
+
# This field MUST be an integer value between 0-90 (inclusive).
|
95
|
+
# A Backup created under this BackupPlan will NOT be deletable until it
|
96
|
+
# reaches Backup's (create_time + backup_delete_lock_days).
|
97
|
+
# Updating this field of a BackupPlan does NOT affect existing Backups
|
98
|
+
# under it. Backups created AFTER a successful update will inherit
|
99
|
+
# the new value.
|
100
|
+
#
|
101
|
+
# Default: 0 (no delete blocking)
|
102
|
+
# @!attribute [rw] backup_retain_days
|
103
|
+
# @return [::Integer]
|
104
|
+
# The default maximum age of a Backup created via this BackupPlan.
|
105
|
+
# This field MUST be an integer value >= 0.
|
106
|
+
# If specified, a Backup created under this BackupPlan will be
|
107
|
+
# automatically deleted after its age reaches (create_time +
|
108
|
+
# backup_retain_days).
|
109
|
+
# If not specified, Backups created under this BackupPlan will NOT be
|
110
|
+
# subject to automatic deletion.
|
111
|
+
# Updating this field does NOT affect existing Backups under it. Backups
|
112
|
+
# created AFTER a successful update will automatically pick up the new
|
113
|
+
# value.
|
114
|
+
# NOTE: backup_retain_days must be >= {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_delete_lock_days backup_delete_lock_days}.
|
115
|
+
#
|
116
|
+
# Default: 0 (no automatic deletion)
|
117
|
+
# @!attribute [rw] locked
|
118
|
+
# @return [::Boolean]
|
119
|
+
# This flag denotes whether the retention policy of this BackupPlan is
|
120
|
+
# locked. If set to True, no further update is allowed on this policy,
|
121
|
+
# including the `locked` field itself.
|
122
|
+
#
|
123
|
+
# Default: False
|
124
|
+
class RetentionPolicy
|
125
|
+
include ::Google::Protobuf::MessageExts
|
126
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
127
|
+
end
|
128
|
+
|
129
|
+
# Schedule defines scheduling parameters for automatically creating Backups
|
130
|
+
# via this BackupPlan.
|
131
|
+
# @!attribute [rw] cron_schedule
|
132
|
+
# @return [::String]
|
133
|
+
# A standard [cron](https://wikipedia.com/wiki/cron) string that defines a
|
134
|
+
# repeating schedule for creating Backups via this BackupPlan.
|
135
|
+
#
|
136
|
+
# Default (empty): no automatic backup creation will occur.
|
137
|
+
# @!attribute [rw] paused
|
138
|
+
# @return [::Boolean]
|
139
|
+
# This flag denotes whether automatic Backup creation is paused for this
|
140
|
+
# BackupPlan.
|
141
|
+
#
|
142
|
+
# Default: False
|
143
|
+
class Schedule
|
144
|
+
include ::Google::Protobuf::MessageExts
|
145
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
146
|
+
end
|
147
|
+
|
148
|
+
# BackupConfig defines the configuration of Backups created via this
|
149
|
+
# BackupPlan.
|
150
|
+
# @!attribute [rw] all_namespaces
|
151
|
+
# @return [::Boolean]
|
152
|
+
# If True, include all namespaced resources
|
153
|
+
# @!attribute [rw] selected_namespaces
|
154
|
+
# @return [::Google::Cloud::GkeBackup::V1::Namespaces]
|
155
|
+
# If set, include just the resources in the listed namespaces.
|
156
|
+
# @!attribute [rw] selected_applications
|
157
|
+
# @return [::Google::Cloud::GkeBackup::V1::NamespacedNames]
|
158
|
+
# If set, include just the resources referenced by the listed
|
159
|
+
# ProtectedApplications.
|
160
|
+
# @!attribute [rw] include_volume_data
|
161
|
+
# @return [::Boolean]
|
162
|
+
# This flag specifies whether volume data should be backed up when
|
163
|
+
# PVCs are included in the scope of a Backup.
|
164
|
+
#
|
165
|
+
# Default: False
|
166
|
+
# @!attribute [rw] include_secrets
|
167
|
+
# @return [::Boolean]
|
168
|
+
# This flag specifies whether Kubernetes Secret resources should be
|
169
|
+
# included when they fall into the scope of Backups.
|
170
|
+
#
|
171
|
+
# Default: False
|
172
|
+
# @!attribute [rw] encryption_key
|
173
|
+
# @return [::Google::Cloud::GkeBackup::V1::EncryptionKey]
|
174
|
+
# This defines a customer managed encryption key that will be used to
|
175
|
+
# encrypt the "config" portion (the Kubernetes resources) of Backups
|
176
|
+
# created via this plan.
|
177
|
+
#
|
178
|
+
# Default (empty): Config backup artifacts will not be encrypted.
|
179
|
+
class BackupConfig
|
180
|
+
include ::Google::Protobuf::MessageExts
|
181
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
182
|
+
end
|
183
|
+
|
184
|
+
# @!attribute [rw] key
|
185
|
+
# @return [::String]
|
186
|
+
# @!attribute [rw] value
|
187
|
+
# @return [::String]
|
188
|
+
class LabelsEntry
|
189
|
+
include ::Google::Protobuf::MessageExts
|
190
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|