google-cloud-spanner-admin-database-v1 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,6 +45,50 @@ module Google
45
45
  "projects/#{project}/instances/#{instance}/backups/#{backup}"
46
46
  end
47
47
 
48
+ ##
49
+ # Create a fully-qualified CryptoKey resource string.
50
+ #
51
+ # The resource will be in the following format:
52
+ #
53
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
54
+ #
55
+ # @param project [String]
56
+ # @param location [String]
57
+ # @param key_ring [String]
58
+ # @param crypto_key [String]
59
+ #
60
+ # @return [::String]
61
+ def crypto_key_path project:, location:, key_ring:, crypto_key:
62
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
63
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
64
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
65
+
66
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
67
+ end
68
+
69
+ ##
70
+ # Create a fully-qualified CryptoKeyVersion resource string.
71
+ #
72
+ # The resource will be in the following format:
73
+ #
74
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`
75
+ #
76
+ # @param project [String]
77
+ # @param location [String]
78
+ # @param key_ring [String]
79
+ # @param crypto_key [String]
80
+ # @param crypto_key_version [String]
81
+ #
82
+ # @return [::String]
83
+ def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
84
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
85
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
86
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
87
+ raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"
88
+
89
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
90
+ end
91
+
48
92
  ##
49
93
  # Create a fully-qualified Database resource string.
50
94
  #
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Database
25
25
  module V1
26
- VERSION = "0.3.0"
26
+ VERSION = "0.4.0"
27
27
  end
28
28
  end
29
29
  end
@@ -9,7 +9,6 @@ require 'google/longrunning/operations_pb'
9
9
  require 'google/protobuf/field_mask_pb'
10
10
  require 'google/protobuf/timestamp_pb'
11
11
  require 'google/spanner/admin/database/v1/common_pb'
12
- require 'google/api/annotations_pb'
13
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
13
  add_file("google/spanner/admin/database/v1/backup.proto", :syntax => :proto3) do
15
14
  add_message "google.spanner.admin.database.v1.Backup" do
@@ -21,6 +20,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
21
20
  optional :size_bytes, :int64, 5
22
21
  optional :state, :enum, 6, "google.spanner.admin.database.v1.Backup.State"
23
22
  repeated :referencing_databases, :string, 7
23
+ optional :encryption_info, :message, 8, "google.spanner.admin.database.v1.EncryptionInfo"
24
24
  end
25
25
  add_enum "google.spanner.admin.database.v1.Backup.State" do
26
26
  value :STATE_UNSPECIFIED, 0
@@ -31,6 +31,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
31
  optional :parent, :string, 1
32
32
  optional :backup_id, :string, 2
33
33
  optional :backup, :message, 3, "google.spanner.admin.database.v1.Backup"
34
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.CreateBackupEncryptionConfig"
34
35
  end
35
36
  add_message "google.spanner.admin.database.v1.CreateBackupMetadata" do
36
37
  optional :name, :string, 1
@@ -74,6 +75,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
74
75
  optional :create_time, :message, 2, "google.protobuf.Timestamp"
75
76
  optional :source_database, :string, 3
76
77
  end
78
+ add_message "google.spanner.admin.database.v1.CreateBackupEncryptionConfig" do
79
+ optional :encryption_type, :enum, 1, "google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType"
80
+ optional :kms_key_name, :string, 2
81
+ end
82
+ add_enum "google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType" do
83
+ value :ENCRYPTION_TYPE_UNSPECIFIED, 0
84
+ value :USE_DATABASE_ENCRYPTION, 1
85
+ value :GOOGLE_DEFAULT_ENCRYPTION, 2
86
+ value :CUSTOMER_MANAGED_ENCRYPTION, 3
87
+ end
77
88
  end
78
89
  end
79
90
 
@@ -95,6 +106,8 @@ module Google
95
106
  ListBackupOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsRequest").msgclass
96
107
  ListBackupOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsResponse").msgclass
97
108
  BackupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInfo").msgclass
109
+ CreateBackupEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig").msgclass
110
+ CreateBackupEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType").enummodule
98
111
  end
99
112
  end
100
113
  end
@@ -4,8 +4,9 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
7
8
  require 'google/protobuf/timestamp_pb'
8
- require 'google/api/annotations_pb'
9
+ require 'google/rpc/status_pb'
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/spanner/admin/database/v1/common.proto", :syntax => :proto3) do
11
12
  add_message "google.spanner.admin.database.v1.OperationProgress" do
@@ -13,6 +14,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
13
14
  optional :start_time, :message, 2, "google.protobuf.Timestamp"
14
15
  optional :end_time, :message, 3, "google.protobuf.Timestamp"
15
16
  end
17
+ add_message "google.spanner.admin.database.v1.EncryptionConfig" do
18
+ optional :kms_key_name, :string, 2
19
+ end
20
+ add_message "google.spanner.admin.database.v1.EncryptionInfo" do
21
+ optional :encryption_type, :enum, 3, "google.spanner.admin.database.v1.EncryptionInfo.Type"
22
+ optional :encryption_status, :message, 4, "google.rpc.Status"
23
+ optional :kms_key_version, :string, 2
24
+ end
25
+ add_enum "google.spanner.admin.database.v1.EncryptionInfo.Type" do
26
+ value :TYPE_UNSPECIFIED, 0
27
+ value :GOOGLE_DEFAULT_ENCRYPTION, 1
28
+ value :CUSTOMER_MANAGED_ENCRYPTION, 2
29
+ end
16
30
  end
17
31
  end
18
32
 
@@ -23,6 +37,9 @@ module Google
23
37
  module Database
24
38
  module V1
25
39
  OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OperationProgress").msgclass
40
+ EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionConfig").msgclass
41
+ EncryptionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo").msgclass
42
+ EncryptionInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo.Type").enummodule
26
43
  end
27
44
  end
28
45
  end
@@ -27,6 +27,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
27
27
  optional :state, :enum, 2, "google.spanner.admin.database.v1.Database.State"
28
28
  optional :create_time, :message, 3, "google.protobuf.Timestamp"
29
29
  optional :restore_info, :message, 4, "google.spanner.admin.database.v1.RestoreInfo"
30
+ optional :encryption_config, :message, 5, "google.spanner.admin.database.v1.EncryptionConfig"
31
+ repeated :encryption_info, :message, 8, "google.spanner.admin.database.v1.EncryptionInfo"
30
32
  optional :version_retention_period, :string, 6
31
33
  optional :earliest_version_time, :message, 7, "google.protobuf.Timestamp"
32
34
  end
@@ -49,6 +51,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
49
51
  optional :parent, :string, 1
50
52
  optional :create_statement, :string, 2
51
53
  repeated :extra_statements, :string, 3
54
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.EncryptionConfig"
52
55
  end
53
56
  add_message "google.spanner.admin.database.v1.CreateDatabaseMetadata" do
54
57
  optional :database, :string, 1
@@ -89,10 +92,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
89
92
  add_message "google.spanner.admin.database.v1.RestoreDatabaseRequest" do
90
93
  optional :parent, :string, 1
91
94
  optional :database_id, :string, 2
95
+ optional :encryption_config, :message, 4, "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig"
92
96
  oneof :source do
93
97
  optional :backup, :string, 3
94
98
  end
95
99
  end
100
+ add_message "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig" do
101
+ optional :encryption_type, :enum, 1, "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType"
102
+ optional :kms_key_name, :string, 2
103
+ end
104
+ add_enum "google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType" do
105
+ value :ENCRYPTION_TYPE_UNSPECIFIED, 0
106
+ value :USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION, 1
107
+ value :GOOGLE_DEFAULT_ENCRYPTION, 2
108
+ value :CUSTOMER_MANAGED_ENCRYPTION, 3
109
+ end
96
110
  add_message "google.spanner.admin.database.v1.RestoreDatabaseMetadata" do
97
111
  optional :name, :string, 1
98
112
  optional :source_type, :enum, 2, "google.spanner.admin.database.v1.RestoreSourceType"
@@ -136,6 +150,8 @@ module Google
136
150
  ListDatabaseOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsRequest").msgclass
137
151
  ListDatabaseOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsResponse").msgclass
138
152
  RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseRequest").msgclass
153
+ RestoreDatabaseEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig").msgclass
154
+ RestoreDatabaseEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType").enummodule
139
155
  RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseMetadata").msgclass
140
156
  OptimizeRestoredDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata").msgclass
141
157
  RestoreSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreSourceType").enummodule
@@ -47,8 +47,8 @@ module Google
47
47
  # have a name of the format `<database_name>/operations/<operation_id>` and
48
48
  # can be used to track preparation of the database. The
49
49
  # [metadata][google.longrunning.Operation.metadata] field type is
50
- # [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
51
- # [response][google.longrunning.Operation.response] field type is
50
+ # [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
51
+ # The [response][google.longrunning.Operation.response] field type is
52
52
  # [Database][google.spanner.admin.database.v1.Database], if successful.
53
53
  rpc :CreateDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Google::Longrunning::Operation
54
54
  # Gets the state of a Cloud Spanner database.
@@ -59,7 +59,8 @@ module Google
59
59
  # the format `<database_name>/operations/<operation_id>` and can be used to
60
60
  # track execution of the schema change(s). The
61
61
  # [metadata][google.longrunning.Operation.metadata] field type is
62
- # [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
62
+ # [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
63
+ # The operation has no response.
63
64
  rpc :UpdateDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Google::Longrunning::Operation
64
65
  # Drops (aka deletes) a Cloud Spanner database.
65
66
  # Completed backups for the database will be retained according to their
@@ -103,18 +104,21 @@ module Google
103
104
  # `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
104
105
  # and can be used to track creation of the backup. The
105
106
  # [metadata][google.longrunning.Operation.metadata] field type is
106
- # [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The
107
- # [response][google.longrunning.Operation.response] field type is
108
- # [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the
109
- # creation and delete the backup.
110
- # There can be only one pending backup creation per database. Backup creation
111
- # of different databases can run concurrently.
107
+ # [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
108
+ # The [response][google.longrunning.Operation.response] field type is
109
+ # [Backup][google.spanner.admin.database.v1.Backup], if successful.
110
+ # Cancelling the returned operation will stop the creation and delete the
111
+ # backup. There can be only one pending backup creation per database. Backup
112
+ # creation of different databases can run concurrently.
112
113
  rpc :CreateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Google::Longrunning::Operation
113
- # Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
114
+ # Gets metadata on a pending or completed
115
+ # [Backup][google.spanner.admin.database.v1.Backup].
114
116
  rpc :GetBackup, ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup
115
- # Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
117
+ # Updates a pending or completed
118
+ # [Backup][google.spanner.admin.database.v1.Backup].
116
119
  rpc :UpdateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup
117
- # Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].
120
+ # Deletes a pending or completed
121
+ # [Backup][google.spanner.admin.database.v1.Backup].
118
122
  rpc :DeleteBackup, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Google::Protobuf::Empty
119
123
  # Lists completed and pending backups.
120
124
  # Backups returned are ordered by `create_time` in descending order,
@@ -26,10 +26,10 @@ module Google
26
26
  # A backup of a Cloud Spanner database.
27
27
  # @!attribute [rw] database
28
28
  # @return [::String]
29
- # Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
30
- # Name of the database from which this backup was
31
- # created. This needs to be in the same instance as the backup.
32
- # Values are of the form
29
+ # Required for the
30
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
31
+ # operation. Name of the database from which this backup was created. This
32
+ # needs to be in the same instance as the backup. Values are of the form
33
33
  # `projects/<project>/instances/<instance>/databases/<database>`.
34
34
  # @!attribute [rw] version_time
35
35
  # @return [::Google::Protobuf::Timestamp]
@@ -39,7 +39,8 @@ module Google
39
39
  # backup.
40
40
  # @!attribute [rw] expire_time
41
41
  # @return [::Google::Protobuf::Timestamp]
42
- # Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
42
+ # Required for the
43
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
43
44
  # operation. The expiration time of the backup, with microseconds
44
45
  # granularity that must be at least 6 hours and at most 366 days
45
46
  # from the time the CreateBackup request is processed. Once the `expire_time`
@@ -47,8 +48,11 @@ module Google
47
48
  # Spanner to free the resources used by the backup.
48
49
  # @!attribute [rw] name
49
50
  # @return [::String]
50
- # Output only for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
51
- # Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup} operation.
51
+ # Output only for the
52
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
53
+ # operation. Required for the
54
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}
55
+ # operation.
52
56
  #
53
57
  # A globally unique identifier for the backup which cannot be
54
58
  # changed. Values are of the form
@@ -62,7 +66,8 @@ module Google
62
66
  # `projects/<project>/instances/<instance>`.
63
67
  # @!attribute [r] create_time
64
68
  # @return [::Google::Protobuf::Timestamp]
65
- # Output only. The time the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
69
+ # Output only. The time the
70
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
66
71
  # request is received. If the request does not specify `version_time`, the
67
72
  # `version_time` of the backup will be equivalent to the `create_time`.
68
73
  # @!attribute [r] size_bytes
@@ -80,6 +85,9 @@ module Google
80
85
  # any referencing database prevents the backup from being deleted. When a
81
86
  # restored database from the backup enters the `READY` state, the reference
82
87
  # to the backup is removed.
88
+ # @!attribute [r] encryption_info
89
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo]
90
+ # Output only. The encryption information for the backup.
83
91
  class Backup
84
92
  include ::Google::Protobuf::MessageExts
85
93
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -98,7 +106,8 @@ module Google
98
106
  end
99
107
  end
100
108
 
101
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}.
109
+ # The request for
110
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}.
102
111
  # @!attribute [rw] parent
103
112
  # @return [::String]
104
113
  # Required. The name of the instance in which the backup will be
@@ -115,6 +124,13 @@ module Google
115
124
  # @!attribute [rw] backup
116
125
  # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup]
117
126
  # Required. The backup to create.
127
+ # @!attribute [rw] encryption_config
128
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig]
129
+ # Optional. The encryption configuration used to encrypt the backup. If this
130
+ # field is not specified, the backup will use the same encryption
131
+ # configuration as the database by default, namely
132
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
133
+ # = `USE_DATABASE_ENCRYPTION`.
118
134
  class CreateBackupRequest
119
135
  include ::Google::Protobuf::MessageExts
120
136
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -131,7 +147,8 @@ module Google
131
147
  # @!attribute [rw] progress
132
148
  # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress]
133
149
  # The progress of the
134
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
150
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
151
+ # operation.
135
152
  # @!attribute [rw] cancel_time
136
153
  # @return [::Google::Protobuf::Timestamp]
137
154
  # The time at which cancellation of this operation was received.
@@ -143,14 +160,16 @@ module Google
143
160
  # other methods to check whether the cancellation succeeded or whether the
144
161
  # operation completed despite cancellation. On successful cancellation,
145
162
  # the operation is not deleted; instead, it becomes an operation with
146
- # an [Operation.error][] value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
163
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
164
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
147
165
  # corresponding to `Code.CANCELLED`.
148
166
  class CreateBackupMetadata
149
167
  include ::Google::Protobuf::MessageExts
150
168
  extend ::Google::Protobuf::MessageExts::ClassMethods
151
169
  end
152
170
 
153
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}.
171
+ # The request for
172
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}.
154
173
  # @!attribute [rw] backup
155
174
  # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup]
156
175
  # Required. The backup to update. `backup.name`, and the fields to be updated
@@ -169,7 +188,8 @@ module Google
169
188
  extend ::Google::Protobuf::MessageExts::ClassMethods
170
189
  end
171
190
 
172
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}.
191
+ # The request for
192
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}.
173
193
  # @!attribute [rw] name
174
194
  # @return [::String]
175
195
  # Required. Name of the backup.
@@ -180,7 +200,8 @@ module Google
180
200
  extend ::Google::Protobuf::MessageExts::ClassMethods
181
201
  end
182
202
 
183
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}.
203
+ # The request for
204
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}.
184
205
  # @!attribute [rw] name
185
206
  # @return [::String]
186
207
  # Required. Name of the backup to delete.
@@ -191,7 +212,8 @@ module Google
191
212
  extend ::Google::Protobuf::MessageExts::ClassMethods
192
213
  end
193
214
 
194
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
215
+ # The request for
216
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
195
217
  # @!attribute [rw] parent
196
218
  # @return [::String]
197
219
  # Required. The instance to list backups from. Values are of the
@@ -206,13 +228,16 @@ module Google
206
228
  # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
207
229
  # Colon `:` is the contains operator. Filter rules are not case sensitive.
208
230
  #
209
- # The following fields in the {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for filtering:
231
+ # The following fields in the
232
+ # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
233
+ # filtering:
210
234
  #
211
235
  # * `name`
212
236
  # * `database`
213
237
  # * `state`
214
- # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
215
- # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
238
+ # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
239
+ # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
240
+ # * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
216
241
  # * `size_bytes`
217
242
  #
218
243
  # You can combine multiple expressions by enclosing each expression in
@@ -239,15 +264,17 @@ module Google
239
264
  # @!attribute [rw] page_token
240
265
  # @return [::String]
241
266
  # If non-empty, `page_token` should contain a
242
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} from a
243
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
244
- # `filter`.
267
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
268
+ # from a previous
269
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse}
270
+ # to the same `parent` and with the same `filter`.
245
271
  class ListBackupsRequest
246
272
  include ::Google::Protobuf::MessageExts
247
273
  extend ::Google::Protobuf::MessageExts::ClassMethods
248
274
  end
249
275
 
250
- # The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
276
+ # The response for
277
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
251
278
  # @!attribute [rw] backups
252
279
  # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
253
280
  # The list of matching backups. Backups returned are ordered by `create_time`
@@ -255,8 +282,8 @@ module Google
255
282
  # @!attribute [rw] next_page_token
256
283
  # @return [::String]
257
284
  # `next_page_token` can be sent in a subsequent
258
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups} call to fetch more
259
- # of the matching backups.
285
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}
286
+ # call to fetch more of the matching backups.
260
287
  class ListBackupsResponse
261
288
  include ::Google::Protobuf::MessageExts
262
289
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -284,7 +311,9 @@ module Google
284
311
  # * `name` - The name of the long-running operation
285
312
  # * `done` - False if the operation is in progress, else true.
286
313
  # * `metadata.@type` - the type of metadata. For example, the type string
287
- # for {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} is
314
+ # for
315
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
316
+ # is
288
317
  # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
289
318
  # * `metadata.<field_name>` - any field in metadata.value.
290
319
  # * `error` - Error associated with the long-running operation.
@@ -304,7 +333,8 @@ module Google
304
333
  # `(metadata.name:howl) AND` \
305
334
  # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
306
335
  # `(error:*)` - Returns operations where:
307
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
336
+ # * The operation's metadata type is
337
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
308
338
  # * The backup name contains the string "howl".
309
339
  # * The operation started before 2018-03-28T14:50:00Z.
310
340
  # * The operation resulted in an error.
@@ -316,8 +346,9 @@ module Google
316
346
  # @return [::String]
317
347
  # If non-empty, `page_token` should contain a
318
348
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
319
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} to the
320
- # same `parent` and with the same `filter`.
349
+ # from a previous
350
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse}
351
+ # to the same `parent` and with the same `filter`.
321
352
  class ListBackupOperationsRequest
322
353
  include ::Google::Protobuf::MessageExts
323
354
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -331,11 +362,11 @@ module Google
331
362
  # operations][google.longrunning.Operation]. Each operation's name will be
332
363
  # prefixed by the backup's name and the operation's
333
364
  # {::Google::Longrunning::Operation#metadata metadata} will be of type
334
- # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. Operations returned include those that are
335
- # pending or have completed/failed/canceled within the last 7 days.
336
- # Operations returned are ordered by
337
- # `operation.metadata.value.progress.start_time` in descending order starting
338
- # from the most recently started operation.
365
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
366
+ # Operations returned include those that are pending or have
367
+ # completed/failed/canceled within the last 7 days. Operations returned are
368
+ # ordered by `operation.metadata.value.progress.start_time` in descending
369
+ # order starting from the most recently started operation.
339
370
  # @!attribute [rw] next_page_token
340
371
  # @return [::String]
341
372
  # `next_page_token` can be sent in a subsequent
@@ -354,13 +385,14 @@ module Google
354
385
  # @return [::Google::Protobuf::Timestamp]
355
386
  # The backup contains an externally consistent copy of `source_database` at
356
387
  # the timestamp specified by `version_time`. If the
357
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} request did not specify
358
- # `version_time`, the `version_time` of the backup is equivalent to the
359
- # `create_time`.
388
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
389
+ # request did not specify `version_time`, the `version_time` of the backup is
390
+ # equivalent to the `create_time`.
360
391
  # @!attribute [rw] create_time
361
392
  # @return [::Google::Protobuf::Timestamp]
362
- # The time the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} request was
363
- # received.
393
+ # The time the
394
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
395
+ # request was received.
364
396
  # @!attribute [rw] source_database
365
397
  # @return [::String]
366
398
  # Name of the database the backup was created from.
@@ -368,6 +400,43 @@ module Google
368
400
  include ::Google::Protobuf::MessageExts
369
401
  extend ::Google::Protobuf::MessageExts::ClassMethods
370
402
  end
403
+
404
+ # Encryption configuration for the backup to create.
405
+ # @!attribute [rw] encryption_type
406
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig::EncryptionType]
407
+ # Required. The encryption type of the backup.
408
+ # @!attribute [rw] kms_key_name
409
+ # @return [::String]
410
+ # Optional. The Cloud KMS key that will be used to protect the backup.
411
+ # This field should be set only when
412
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
413
+ # is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
414
+ # `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
415
+ class CreateBackupEncryptionConfig
416
+ include ::Google::Protobuf::MessageExts
417
+ extend ::Google::Protobuf::MessageExts::ClassMethods
418
+
419
+ # Encryption types for the backup.
420
+ module EncryptionType
421
+ # Unspecified. Do not use.
422
+ ENCRYPTION_TYPE_UNSPECIFIED = 0
423
+
424
+ # Use the same encryption configuration as the database. This is the
425
+ # default option when
426
+ # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig encryption_config}
427
+ # is empty. For example, if the database is using
428
+ # `Customer_Managed_Encryption`, the backup will be using the same Cloud
429
+ # KMS key as the database.
430
+ USE_DATABASE_ENCRYPTION = 1
431
+
432
+ # Use Google default encryption.
433
+ GOOGLE_DEFAULT_ENCRYPTION = 2
434
+
435
+ # Use customer managed encryption. If specified, `kms_key_name`
436
+ # must contain a valid Cloud KMS key.
437
+ CUSTOMER_MANAGED_ENCRYPTION = 3
438
+ end
439
+ end
371
440
  end
372
441
  end
373
442
  end