google-apis-spanner_v1 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e78ad941475c64b6bc0ab3f7446eea631189be763717866bd3be6bcf21d9b50c
4
- data.tar.gz: 4e34aa25826908b168e6a14edb32427fc16fdbdab56cf0ebaf38f83e48b9072c
3
+ metadata.gz: e42a960ecd4f9e727c6f53a253641190fcad7d2b676a0c9ae81b8c017494a6c9
4
+ data.tar.gz: fe81793f3082340b0f8dd1eaeeae2db7d3ca62518cc242fbfd1e6d1f82ef226c
5
5
  SHA512:
6
- metadata.gz: c2cf6552a7562b09415ac97f188f825d7853e3e879102c5efee977eb832b50dfeb408dc71240dd29340dfa551906ddf7782737ae3054645883f79668bdb75d57
7
- data.tar.gz: 4804cc6f59cb512c0215f31bc0c1b9a12c1e87960923e169f278e74379253352f5b7d1a9affefb1fb0c70c940941bcb9df2fa93718cf87878484ecf081a0516c
6
+ metadata.gz: 89ec5bf262127144401a77814546aed9462541f7a83e5a6d3a4927931f549973f08875b332b3c9b90006b5864e35b0f2b0c0a9d30790fff3c380f5b15a21af49
7
+ data.tar.gz: a4b4601d4cb60cb577883b664a5f5d0921e03023d85d5c99a5c563410166188008acf863c0fd72b02e9840f05b98c6a90fec40ff32513f6ce18cd1333ba1dfeb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-spanner_v1
2
2
 
3
+ ### v0.4.0 (2021-02-24)
4
+
5
+ * Regenerated from discovery document revision 20210217
6
+
3
7
  ### v0.3.0 (2021-02-13)
4
8
 
5
9
  * Regenerated from discovery document revision 20210206
@@ -40,6 +40,11 @@ module Google
40
40
  # @return [String]
41
41
  attr_accessor :database
42
42
 
43
+ # Encryption information for a Cloud Spanner database or backup.
44
+ # Corresponds to the JSON property `encryptionInfo`
45
+ # @return [Google::Apis::SpannerV1::EncryptionInfo]
46
+ attr_accessor :encryption_info
47
+
43
48
  # Required for the CreateBackup operation. The expiration time of the backup,
44
49
  # with microseconds granularity that must be at least 6 hours and at most 366
45
50
  # days from the time the CreateBackup request is processed. Once the `
@@ -95,6 +100,7 @@ module Google
95
100
  def update!(**args)
96
101
  @create_time = args[:create_time] if args.key?(:create_time)
97
102
  @database = args[:database] if args.key?(:database)
103
+ @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
98
104
  @expire_time = args[:expire_time] if args.key?(:expire_time)
99
105
  @name = args[:name] if args.key?(:name)
100
106
  @referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
@@ -805,6 +811,11 @@ module Google
805
811
  # @return [String]
806
812
  attr_accessor :create_statement
807
813
 
814
+ # Encryption configuration for a Cloud Spanner database.
815
+ # Corresponds to the JSON property `encryptionConfig`
816
+ # @return [Google::Apis::SpannerV1::EncryptionConfig]
817
+ attr_accessor :encryption_config
818
+
808
819
  # Optional. A list of DDL statements to run inside the newly created database.
809
820
  # Statements can create tables, indexes, etc. These statements execute
810
821
  # atomically with the creation of the database: if there is an error in any
@@ -820,6 +831,7 @@ module Google
820
831
  # Update properties of this object
821
832
  def update!(**args)
822
833
  @create_statement = args[:create_statement] if args.key?(:create_statement)
834
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
823
835
  @extra_statements = args[:extra_statements] if args.key?(:extra_statements)
824
836
  end
825
837
  end
@@ -926,6 +938,21 @@ module Google
926
938
  # @return [String]
927
939
  attr_accessor :earliest_version_time
928
940
 
941
+ # Encryption configuration for a Cloud Spanner database.
942
+ # Corresponds to the JSON property `encryptionConfig`
943
+ # @return [Google::Apis::SpannerV1::EncryptionConfig]
944
+ attr_accessor :encryption_config
945
+
946
+ # Output only. For databases that are using customer managed encryption, this
947
+ # field contains the encryption information for the database, such as encryption
948
+ # state and the Cloud KMS key versions that are in use. For databases that are
949
+ # using Google default or other types of encryption, this field is empty. This
950
+ # field is propagated lazily from the backend. There might be a delay from when
951
+ # a key version is being used and when it appears in this field.
952
+ # Corresponds to the JSON property `encryptionInfo`
953
+ # @return [Array<Google::Apis::SpannerV1::EncryptionInfo>]
954
+ attr_accessor :encryption_info
955
+
929
956
  # Required. The name of the database. Values are of the form `projects//
930
957
  # instances//databases/`, where `` is as specified in the `CREATE DATABASE`
931
958
  # statement. This name can be passed to other API methods to identify the
@@ -959,6 +986,8 @@ module Google
959
986
  def update!(**args)
960
987
  @create_time = args[:create_time] if args.key?(:create_time)
961
988
  @earliest_version_time = args[:earliest_version_time] if args.key?(:earliest_version_time)
989
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
990
+ @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
962
991
  @name = args[:name] if args.key?(:name)
963
992
  @restore_info = args[:restore_info] if args.key?(:restore_info)
964
993
  @state = args[:state] if args.key?(:state)
@@ -1012,6 +1041,63 @@ module Google
1012
1041
  end
1013
1042
  end
1014
1043
 
1044
+ # Encryption configuration for a Cloud Spanner database.
1045
+ class EncryptionConfig
1046
+ include Google::Apis::Core::Hashable
1047
+
1048
+ # The Cloud KMS key to be used for encrypting and decrypting the database.
1049
+ # Values are of the form `projects//locations//keyRings//cryptoKeys/`.
1050
+ # Corresponds to the JSON property `kmsKeyName`
1051
+ # @return [String]
1052
+ attr_accessor :kms_key_name
1053
+
1054
+ def initialize(**args)
1055
+ update!(**args)
1056
+ end
1057
+
1058
+ # Update properties of this object
1059
+ def update!(**args)
1060
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1061
+ end
1062
+ end
1063
+
1064
+ # Encryption information for a Cloud Spanner database or backup.
1065
+ class EncryptionInfo
1066
+ include Google::Apis::Core::Hashable
1067
+
1068
+ # The `Status` type defines a logical error model that is suitable for different
1069
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1070
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1071
+ # data: error code, error message, and error details. You can find out more
1072
+ # about this error model and how to work with it in the [API Design Guide](https:
1073
+ # //cloud.google.com/apis/design/errors).
1074
+ # Corresponds to the JSON property `encryptionStatus`
1075
+ # @return [Google::Apis::SpannerV1::Status]
1076
+ attr_accessor :encryption_status
1077
+
1078
+ # Output only. The type of encryption.
1079
+ # Corresponds to the JSON property `encryptionType`
1080
+ # @return [String]
1081
+ attr_accessor :encryption_type
1082
+
1083
+ # Output only. A Cloud KMS key version that is being used to protect the
1084
+ # database or backup.
1085
+ # Corresponds to the JSON property `kmsKeyVersion`
1086
+ # @return [String]
1087
+ attr_accessor :kms_key_version
1088
+
1089
+ def initialize(**args)
1090
+ update!(**args)
1091
+ end
1092
+
1093
+ # Update properties of this object
1094
+ def update!(**args)
1095
+ @encryption_status = args[:encryption_status] if args.key?(:encryption_status)
1096
+ @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
1097
+ @kms_key_version = args[:kms_key_version] if args.key?(:kms_key_version)
1098
+ end
1099
+ end
1100
+
1015
1101
  # The request for ExecuteBatchDml.
1016
1102
  class ExecuteBatchDmlRequest
1017
1103
  include Google::Apis::Core::Hashable
@@ -2657,6 +2743,34 @@ module Google
2657
2743
  end
2658
2744
  end
2659
2745
 
2746
+ # Encryption configuration for the restored database.
2747
+ class RestoreDatabaseEncryptionConfig
2748
+ include Google::Apis::Core::Hashable
2749
+
2750
+ # Required. The encryption type of the restored database.
2751
+ # Corresponds to the JSON property `encryptionType`
2752
+ # @return [String]
2753
+ attr_accessor :encryption_type
2754
+
2755
+ # Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored
2756
+ # database. This field should be set only when encryption_type is `
2757
+ # CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
2758
+ # keyRings//cryptoKeys/`.
2759
+ # Corresponds to the JSON property `kmsKeyName`
2760
+ # @return [String]
2761
+ attr_accessor :kms_key_name
2762
+
2763
+ def initialize(**args)
2764
+ update!(**args)
2765
+ end
2766
+
2767
+ # Update properties of this object
2768
+ def update!(**args)
2769
+ @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
2770
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
2771
+ end
2772
+ end
2773
+
2660
2774
  # Metadata type for the long-running operation returned by RestoreDatabase.
2661
2775
  class RestoreDatabaseMetadata
2662
2776
  include Google::Apis::Core::Hashable
@@ -2739,6 +2853,11 @@ module Google
2739
2853
  # @return [String]
2740
2854
  attr_accessor :database_id
2741
2855
 
2856
+ # Encryption configuration for the restored database.
2857
+ # Corresponds to the JSON property `encryptionConfig`
2858
+ # @return [Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig]
2859
+ attr_accessor :encryption_config
2860
+
2742
2861
  def initialize(**args)
2743
2862
  update!(**args)
2744
2863
  end
@@ -2747,6 +2866,7 @@ module Google
2747
2866
  def update!(**args)
2748
2867
  @backup = args[:backup] if args.key?(:backup)
2749
2868
  @database_id = args[:database_id] if args.key?(:database_id)
2869
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
2750
2870
  end
2751
2871
  end
2752
2872
 
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module SpannerV1
18
18
  # Version of the google-apis-spanner_v1 gem
19
- GEM_VERSION = "0.3.0"
19
+ GEM_VERSION = "0.4.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.1.2"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210206"
25
+ REVISION = "20210217"
26
26
  end
27
27
  end
28
28
  end
@@ -136,6 +136,18 @@ module Google
136
136
  include Google::Apis::Core::JsonObjectSupport
137
137
  end
138
138
 
139
+ class EncryptionConfig
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class EncryptionInfo
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
139
151
  class ExecuteBatchDmlRequest
140
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
141
153
 
@@ -370,6 +382,12 @@ module Google
370
382
  include Google::Apis::Core::JsonObjectSupport
371
383
  end
372
384
 
385
+ class RestoreDatabaseEncryptionConfig
386
+ class Representation < Google::Apis::Core::JsonRepresentation; end
387
+
388
+ include Google::Apis::Core::JsonObjectSupport
389
+ end
390
+
373
391
  class RestoreDatabaseMetadata
374
392
  class Representation < Google::Apis::Core::JsonRepresentation; end
375
393
 
@@ -519,6 +537,8 @@ module Google
519
537
  class Representation < Google::Apis::Core::JsonRepresentation
520
538
  property :create_time, as: 'createTime'
521
539
  property :database, as: 'database'
540
+ property :encryption_info, as: 'encryptionInfo', class: Google::Apis::SpannerV1::EncryptionInfo, decorator: Google::Apis::SpannerV1::EncryptionInfo::Representation
541
+
522
542
  property :expire_time, as: 'expireTime'
523
543
  property :name, as: 'name'
524
544
  collection :referencing_databases, as: 'referencingDatabases'
@@ -632,6 +652,8 @@ module Google
632
652
  # @private
633
653
  class Representation < Google::Apis::Core::JsonRepresentation
634
654
  property :create_statement, as: 'createStatement'
655
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::EncryptionConfig, decorator: Google::Apis::SpannerV1::EncryptionConfig::Representation
656
+
635
657
  collection :extra_statements, as: 'extraStatements'
636
658
  end
637
659
  end
@@ -669,6 +691,10 @@ module Google
669
691
  class Representation < Google::Apis::Core::JsonRepresentation
670
692
  property :create_time, as: 'createTime'
671
693
  property :earliest_version_time, as: 'earliestVersionTime'
694
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::EncryptionConfig, decorator: Google::Apis::SpannerV1::EncryptionConfig::Representation
695
+
696
+ collection :encryption_info, as: 'encryptionInfo', class: Google::Apis::SpannerV1::EncryptionInfo, decorator: Google::Apis::SpannerV1::EncryptionInfo::Representation
697
+
672
698
  property :name, as: 'name'
673
699
  property :restore_info, as: 'restoreInfo', class: Google::Apis::SpannerV1::RestoreInfo, decorator: Google::Apis::SpannerV1::RestoreInfo::Representation
674
700
 
@@ -692,6 +718,23 @@ module Google
692
718
  end
693
719
  end
694
720
 
721
+ class EncryptionConfig
722
+ # @private
723
+ class Representation < Google::Apis::Core::JsonRepresentation
724
+ property :kms_key_name, as: 'kmsKeyName'
725
+ end
726
+ end
727
+
728
+ class EncryptionInfo
729
+ # @private
730
+ class Representation < Google::Apis::Core::JsonRepresentation
731
+ property :encryption_status, as: 'encryptionStatus', class: Google::Apis::SpannerV1::Status, decorator: Google::Apis::SpannerV1::Status::Representation
732
+
733
+ property :encryption_type, as: 'encryptionType'
734
+ property :kms_key_version, as: 'kmsKeyVersion'
735
+ end
736
+ end
737
+
695
738
  class ExecuteBatchDmlRequest
696
739
  # @private
697
740
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1094,6 +1137,14 @@ module Google
1094
1137
  end
1095
1138
  end
1096
1139
 
1140
+ class RestoreDatabaseEncryptionConfig
1141
+ # @private
1142
+ class Representation < Google::Apis::Core::JsonRepresentation
1143
+ property :encryption_type, as: 'encryptionType'
1144
+ property :kms_key_name, as: 'kmsKeyName'
1145
+ end
1146
+ end
1147
+
1097
1148
  class RestoreDatabaseMetadata
1098
1149
  # @private
1099
1150
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1113,6 +1164,8 @@ module Google
1113
1164
  class Representation < Google::Apis::Core::JsonRepresentation
1114
1165
  property :backup, as: 'backup'
1115
1166
  property :database_id, as: 'databaseId'
1167
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig, decorator: Google::Apis::SpannerV1::RestoreDatabaseEncryptionConfig::Representation
1168
+
1116
1169
  end
1117
1170
  end
1118
1171
 
@@ -549,6 +549,12 @@ module Google
549
549
  # @param [String] backup_id
550
550
  # Required. The id of the backup to be created. The `backup_id` appended to `
551
551
  # parent` forms the full backup name of the form `projects//instances//backups/`.
552
+ # @param [String] encryption_config_encryption_type
553
+ # Required. The encryption type of the backup.
554
+ # @param [String] encryption_config_kms_key_name
555
+ # Optional. The Cloud KMS key that will be used to protect the backup. This
556
+ # field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
557
+ # Values are of the form `projects//locations//keyRings//cryptoKeys/`.
552
558
  # @param [String] fields
553
559
  # Selector specifying which fields to include in a partial response.
554
560
  # @param [String] quota_user
@@ -566,7 +572,7 @@ module Google
566
572
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
567
573
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
568
574
  # @raise [Google::Apis::AuthorizationError] Authorization is required
569
- def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, fields: nil, quota_user: nil, options: nil, &block)
575
+ def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, encryption_config_encryption_type: nil, encryption_config_kms_key_name: nil, fields: nil, quota_user: nil, options: nil, &block)
570
576
  command = make_simple_command(:post, 'v1/{+parent}/backups', options)
571
577
  command.request_representation = Google::Apis::SpannerV1::Backup::Representation
572
578
  command.request_object = backup_object
@@ -574,6 +580,8 @@ module Google
574
580
  command.response_class = Google::Apis::SpannerV1::Operation
575
581
  command.params['parent'] = parent unless parent.nil?
576
582
  command.query['backupId'] = backup_id unless backup_id.nil?
583
+ command.query['encryptionConfig.encryptionType'] = encryption_config_encryption_type unless encryption_config_encryption_type.nil?
584
+ command.query['encryptionConfig.kmsKeyName'] = encryption_config_kms_key_name unless encryption_config_kms_key_name.nil?
577
585
  command.query['fields'] = fields unless fields.nil?
578
586
  command.query['quotaUser'] = quota_user unless quota_user.nil?
579
587
  execute_or_queue_command(command, &block)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-spanner_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-15 00:00:00.000000000 Z
11
+ date: 2021-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -52,7 +52,7 @@ licenses:
52
52
  metadata:
53
53
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
54
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-spanner_v1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.3.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.4.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-spanner_v1
57
57
  post_install_message:
58
58
  rdoc_options: []
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.2.6
72
+ rubygems_version: 3.2.11
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Simple REST client for Cloud Spanner API V1