google-apis-spanner_v1 0.24.0 → 0.25.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d21118bfea939956c650168df9b62ec3b03602e086c44ac41b9091242a624c9b
4
- data.tar.gz: d1f8512a386fa6a10656f8edc4e9de1e3a0be5a2f7e3b51b9c49e8e578d567ba
3
+ metadata.gz: 51541562e98ca4e9c993afc467f0a98ff8adaa1eda1805c36bafd9997211b2bc
4
+ data.tar.gz: ddae8e9f8a2915b8462b04e92914d52f13e1707953dd55bb887473a9e2ba773a
5
5
  SHA512:
6
- metadata.gz: 85476a117c020df05d7f1cfa7f7932277bef795df67d90cdb0f831602256ff04ef6859e1eb252c9583d383493b69b31c7264bb307928a88546e93c18b34e0688
7
- data.tar.gz: a0142e2d38dc8398b5560b60c43b4bd07e79b84f4e27b0aa9950522fded71c631cac300c05728261ca93de9f34211277810811ddbd532946c83aba1111e8ce6a
6
+ metadata.gz: dc983c308f4d10749bbf5e7fb820069f8644ba3afb151c60f8f2ae15522aa813c3de799f45b359ec142103b5aee7c7bfe45f0f9dba9e0d4180b274f9953f816e
7
+ data.tar.gz: 8db003dacedd2fd9421d39537dfd0504241013e30a08eec8951b3e8f0a99ea8916086b55829e532ceca0386a8f99f6f70d2cfeb71bae1ac3b56c49cc859bea3b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-spanner_v1
2
2
 
3
+ ### v0.25.0 (2022-03-19)
4
+
5
+ * Regenerated from discovery document revision 20220310
6
+
3
7
  ### v0.24.0 (2022-02-25)
4
8
 
5
9
  * Regenerated from discovery document revision 20220212
@@ -59,6 +59,15 @@ module Google
59
59
  # @return [String]
60
60
  attr_accessor :expire_time
61
61
 
62
+ # Output only. The max allowed expiration time of the backup, with microseconds
63
+ # granularity. A backup's expiration time can be configured in multiple APIs:
64
+ # CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing
65
+ # backup, the expiration time specified must be less than `Backup.
66
+ # max_expire_time`.
67
+ # Corresponds to the JSON property `maxExpireTime`
68
+ # @return [String]
69
+ attr_accessor :max_expire_time
70
+
62
71
  # Output only for the CreateBackup operation. Required for the UpdateBackup
63
72
  # operation. A globally unique identifier for the backup which cannot be changed.
64
73
  # Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final
@@ -70,6 +79,16 @@ module Google
70
79
  # @return [String]
71
80
  attr_accessor :name
72
81
 
82
+ # Output only. The names of the destination backups being created by copying
83
+ # this source backup. The backup names are of the form `projects//instances//
84
+ # backups/`. Referencing backups may exist in different instances. The existence
85
+ # of any referencing backup prevents the backup from being deleted. When the
86
+ # copy operation is done (either successfully completed or cancelled or the
87
+ # destination backup is deleted), the reference to the backup is removed.
88
+ # Corresponds to the JSON property `referencingBackups`
89
+ # @return [Array<String>]
90
+ attr_accessor :referencing_backups
91
+
73
92
  # Output only. The names of the restored databases that reference the backup.
74
93
  # The database names are of the form `projects//instances//databases/`.
75
94
  # Referencing databases may exist in different instances. The existence of any
@@ -108,7 +127,9 @@ module Google
108
127
  @database_dialect = args[:database_dialect] if args.key?(:database_dialect)
109
128
  @encryption_info = args[:encryption_info] if args.key?(:encryption_info)
110
129
  @expire_time = args[:expire_time] if args.key?(:expire_time)
130
+ @max_expire_time = args[:max_expire_time] if args.key?(:max_expire_time)
111
131
  @name = args[:name] if args.key?(:name)
132
+ @referencing_backups = args[:referencing_backups] if args.key?(:referencing_backups)
112
133
  @referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
113
134
  @size_bytes = args[:size_bytes] if args.key?(:size_bytes)
114
135
  @state = args[:state] if args.key?(:state)
@@ -793,6 +814,125 @@ module Google
793
814
  end
794
815
  end
795
816
 
817
+ # Encryption configuration for the copied backup.
818
+ class CopyBackupEncryptionConfig
819
+ include Google::Apis::Core::Hashable
820
+
821
+ # Required. The encryption type of the backup.
822
+ # Corresponds to the JSON property `encryptionType`
823
+ # @return [String]
824
+ attr_accessor :encryption_type
825
+
826
+ # Optional. The Cloud KMS key that will be used to protect the backup. This
827
+ # field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
828
+ # Values are of the form `projects//locations//keyRings//cryptoKeys/`.
829
+ # Corresponds to the JSON property `kmsKeyName`
830
+ # @return [String]
831
+ attr_accessor :kms_key_name
832
+
833
+ def initialize(**args)
834
+ update!(**args)
835
+ end
836
+
837
+ # Update properties of this object
838
+ def update!(**args)
839
+ @encryption_type = args[:encryption_type] if args.key?(:encryption_type)
840
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
841
+ end
842
+ end
843
+
844
+ # Metadata type for the google.longrunning.Operation returned by CopyBackup.
845
+ class CopyBackupMetadata
846
+ include Google::Apis::Core::Hashable
847
+
848
+ # The time at which cancellation of CopyBackup operation was received.
849
+ # Operations.CancelOperation starts asynchronous cancellation on a long-running
850
+ # operation. The server makes a best effort to cancel the operation, but success
851
+ # is not guaranteed. Clients can use Operations.GetOperation or other methods to
852
+ # check whether the cancellation succeeded or whether the operation completed
853
+ # despite cancellation. On successful cancellation, the operation is not deleted;
854
+ # instead, it becomes an operation with an Operation.error value with a google.
855
+ # rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
856
+ # Corresponds to the JSON property `cancelTime`
857
+ # @return [String]
858
+ attr_accessor :cancel_time
859
+
860
+ # The name of the backup being created through the copy operation. Values are of
861
+ # the form `projects//instances//backups/`.
862
+ # Corresponds to the JSON property `name`
863
+ # @return [String]
864
+ attr_accessor :name
865
+
866
+ # Encapsulates progress related information for a Cloud Spanner long running
867
+ # operation.
868
+ # Corresponds to the JSON property `progress`
869
+ # @return [Google::Apis::SpannerV1::OperationProgress]
870
+ attr_accessor :progress
871
+
872
+ # The name of the source backup that is being copied. Values are of the form `
873
+ # projects//instances//backups/`.
874
+ # Corresponds to the JSON property `sourceBackup`
875
+ # @return [String]
876
+ attr_accessor :source_backup
877
+
878
+ def initialize(**args)
879
+ update!(**args)
880
+ end
881
+
882
+ # Update properties of this object
883
+ def update!(**args)
884
+ @cancel_time = args[:cancel_time] if args.key?(:cancel_time)
885
+ @name = args[:name] if args.key?(:name)
886
+ @progress = args[:progress] if args.key?(:progress)
887
+ @source_backup = args[:source_backup] if args.key?(:source_backup)
888
+ end
889
+ end
890
+
891
+ # The request for CopyBackup.
892
+ class CopyBackupRequest
893
+ include Google::Apis::Core::Hashable
894
+
895
+ # Required. The id of the backup copy. The `backup_id` appended to `parent`
896
+ # forms the full backup_uri of the form `projects//instances//backups/`.
897
+ # Corresponds to the JSON property `backupId`
898
+ # @return [String]
899
+ attr_accessor :backup_id
900
+
901
+ # Encryption configuration for the copied backup.
902
+ # Corresponds to the JSON property `encryptionConfig`
903
+ # @return [Google::Apis::SpannerV1::CopyBackupEncryptionConfig]
904
+ attr_accessor :encryption_config
905
+
906
+ # Required. The expiration time of the backup in microsecond granularity. The
907
+ # expiration time must be at least 6 hours and at most 366 days from the `
908
+ # create_time` of the source backup. Once the `expire_time` has passed, the
909
+ # backup is eligible to be automatically deleted by Cloud Spanner to free the
910
+ # resources used by the backup.
911
+ # Corresponds to the JSON property `expireTime`
912
+ # @return [String]
913
+ attr_accessor :expire_time
914
+
915
+ # Required. The source backup to be copied. The source backup needs to be in
916
+ # READY state for it to be copied. Once CopyBackup is in progress, the source
917
+ # backup cannot be deleted or cleaned up on expiration until CopyBackup is
918
+ # finished. Values are of the form: `projects//instances//backups/`.
919
+ # Corresponds to the JSON property `sourceBackup`
920
+ # @return [String]
921
+ attr_accessor :source_backup
922
+
923
+ def initialize(**args)
924
+ update!(**args)
925
+ end
926
+
927
+ # Update properties of this object
928
+ def update!(**args)
929
+ @backup_id = args[:backup_id] if args.key?(:backup_id)
930
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
931
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
932
+ @source_backup = args[:source_backup] if args.key?(:source_backup)
933
+ end
934
+ end
935
+
796
936
  # Metadata type for the operation returned by CreateBackup.
797
937
  class CreateBackupMetadata
798
938
  include Google::Apis::Core::Hashable
@@ -1657,6 +1797,11 @@ module Google
1657
1797
  # @return [String]
1658
1798
  attr_accessor :config
1659
1799
 
1800
+ # Output only. The time at which the instance was created.
1801
+ # Corresponds to the JSON property `createTime`
1802
+ # @return [String]
1803
+ attr_accessor :create_time
1804
+
1660
1805
  # Required. The descriptive name for this instance as it appears in UIs. Must be
1661
1806
  # unique per project and between 4 and 30 characters in length.
1662
1807
  # Corresponds to the JSON property `displayName`
@@ -1721,6 +1866,11 @@ module Google
1721
1866
  # @return [String]
1722
1867
  attr_accessor :state
1723
1868
 
1869
+ # Output only. The time at which the instance was most recently updated.
1870
+ # Corresponds to the JSON property `updateTime`
1871
+ # @return [String]
1872
+ attr_accessor :update_time
1873
+
1724
1874
  def initialize(**args)
1725
1875
  update!(**args)
1726
1876
  end
@@ -1728,6 +1878,7 @@ module Google
1728
1878
  # Update properties of this object
1729
1879
  def update!(**args)
1730
1880
  @config = args[:config] if args.key?(:config)
1881
+ @create_time = args[:create_time] if args.key?(:create_time)
1731
1882
  @display_name = args[:display_name] if args.key?(:display_name)
1732
1883
  @endpoint_uris = args[:endpoint_uris] if args.key?(:endpoint_uris)
1733
1884
  @labels = args[:labels] if args.key?(:labels)
@@ -1735,6 +1886,7 @@ module Google
1735
1886
  @node_count = args[:node_count] if args.key?(:node_count)
1736
1887
  @processing_units = args[:processing_units] if args.key?(:processing_units)
1737
1888
  @state = args[:state] if args.key?(:state)
1889
+ @update_time = args[:update_time] if args.key?(:update_time)
1738
1890
  end
1739
1891
  end
1740
1892
 
@@ -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.24.0"
19
+ GEM_VERSION = "0.25.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.4.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20220212"
25
+ REVISION = "20220310"
26
26
  end
27
27
  end
28
28
  end
@@ -88,6 +88,24 @@ module Google
88
88
  include Google::Apis::Core::JsonObjectSupport
89
89
  end
90
90
 
91
+ class CopyBackupEncryptionConfig
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class CopyBackupMetadata
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class CopyBackupRequest
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
91
109
  class CreateBackupMetadata
92
110
  class Representation < Google::Apis::Core::JsonRepresentation; end
93
111
 
@@ -643,7 +661,9 @@ module Google
643
661
  property :encryption_info, as: 'encryptionInfo', class: Google::Apis::SpannerV1::EncryptionInfo, decorator: Google::Apis::SpannerV1::EncryptionInfo::Representation
644
662
 
645
663
  property :expire_time, as: 'expireTime'
664
+ property :max_expire_time, as: 'maxExpireTime'
646
665
  property :name, as: 'name'
666
+ collection :referencing_backups, as: 'referencingBackups'
647
667
  collection :referencing_databases, as: 'referencingDatabases'
648
668
  property :size_bytes, :numeric_string => true, as: 'sizeBytes'
649
669
  property :state, as: 'state'
@@ -748,6 +768,36 @@ module Google
748
768
  end
749
769
  end
750
770
 
771
+ class CopyBackupEncryptionConfig
772
+ # @private
773
+ class Representation < Google::Apis::Core::JsonRepresentation
774
+ property :encryption_type, as: 'encryptionType'
775
+ property :kms_key_name, as: 'kmsKeyName'
776
+ end
777
+ end
778
+
779
+ class CopyBackupMetadata
780
+ # @private
781
+ class Representation < Google::Apis::Core::JsonRepresentation
782
+ property :cancel_time, as: 'cancelTime'
783
+ property :name, as: 'name'
784
+ property :progress, as: 'progress', class: Google::Apis::SpannerV1::OperationProgress, decorator: Google::Apis::SpannerV1::OperationProgress::Representation
785
+
786
+ property :source_backup, as: 'sourceBackup'
787
+ end
788
+ end
789
+
790
+ class CopyBackupRequest
791
+ # @private
792
+ class Representation < Google::Apis::Core::JsonRepresentation
793
+ property :backup_id, as: 'backupId'
794
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::CopyBackupEncryptionConfig, decorator: Google::Apis::SpannerV1::CopyBackupEncryptionConfig::Representation
795
+
796
+ property :expire_time, as: 'expireTime'
797
+ property :source_backup, as: 'sourceBackup'
798
+ end
799
+ end
800
+
751
801
  class CreateBackupMetadata
752
802
  # @private
753
803
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -983,6 +1033,7 @@ module Google
983
1033
  # @private
984
1034
  class Representation < Google::Apis::Core::JsonRepresentation
985
1035
  property :config, as: 'config'
1036
+ property :create_time, as: 'createTime'
986
1037
  property :display_name, as: 'displayName'
987
1038
  collection :endpoint_uris, as: 'endpointUris'
988
1039
  hash :labels, as: 'labels'
@@ -990,6 +1041,7 @@ module Google
990
1041
  property :node_count, as: 'nodeCount'
991
1042
  property :processing_units, as: 'processingUnits'
992
1043
  property :state, as: 'state'
1044
+ property :update_time, as: 'updateTime'
993
1045
  end
994
1046
  end
995
1047
 
@@ -499,7 +499,22 @@ module Google
499
499
  # error:*)` - Returns operations where: * The operation's metadata type is
500
500
  # CreateBackupMetadata. * The backup name contains the string "howl". * The
501
501
  # operation started before 2018-03-28T14:50:00Z. * The operation resulted in an
502
- # error.
502
+ # error. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.
503
+ # CopyBackupMetadata) AND` \ `(metadata.source_backup:test) AND` \ `(metadata.
504
+ # progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ `(error:*)` - Returns
505
+ # operations where: * The operation's metadata type is CopyBackupMetadata. * The
506
+ # source backup of the copied backup name contains the string "test". * The
507
+ # operation started before 2022-01-18T14:50:00Z. * The operation resulted in an
508
+ # error. * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.
509
+ # v1.CreateBackupMetadata) AND` \ `(metadata.database:test_db)) OR` \ `((
510
+ # metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.
511
+ # CopyBackupMetadata) AND` \ `(metadata.source_backup:test_bkp)) AND` \ `(error:*
512
+ # )` - Returns operations where: * The operation's metadata matches either of
513
+ # criteria: * The operation's metadata type is CreateBackupMetadata AND the
514
+ # database the backup was taken from has name containing string "test_db" * The
515
+ # operation's metadata type is CopyBackupMetadata AND the backup the backup was
516
+ # copied from has name containing string "test_bkp" * The operation resulted in
517
+ # an error.
503
518
  # @param [Fixnum] page_size
504
519
  # Number of operations to be returned in the response. If 0 or less, defaults to
505
520
  # the server's maximum allowed page size.
@@ -536,6 +551,46 @@ module Google
536
551
  execute_or_queue_command(command, &block)
537
552
  end
538
553
 
554
+ # Starts copying a Cloud Spanner Backup. The returned backup long-running
555
+ # operation will have a name of the format `projects//instances//backups//
556
+ # operations/` and can be used to track copying of the backup. The operation is
557
+ # associated with the destination backup. The metadata field type is
558
+ # CopyBackupMetadata. The response field type is Backup, if successful.
559
+ # Cancelling the returned operation will stop the copying and delete the backup.
560
+ # Concurrent CopyBackup requests can run on the same source backup.
561
+ # @param [String] parent
562
+ # Required. The name of the destination instance that will contain the backup
563
+ # copy. Values are of the form: `projects//instances/`.
564
+ # @param [Google::Apis::SpannerV1::CopyBackupRequest] copy_backup_request_object
565
+ # @param [String] fields
566
+ # Selector specifying which fields to include in a partial response.
567
+ # @param [String] quota_user
568
+ # Available to use for quota purposes for server-side applications. Can be any
569
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
570
+ # @param [Google::Apis::RequestOptions] options
571
+ # Request-specific options
572
+ #
573
+ # @yield [result, err] Result & error if block supplied
574
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
575
+ # @yieldparam err [StandardError] error object if request failed
576
+ #
577
+ # @return [Google::Apis::SpannerV1::Operation]
578
+ #
579
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
580
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
581
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
582
+ def copy_backup(parent, copy_backup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
583
+ command = make_simple_command(:post, 'v1/{+parent}/backups:copy', options)
584
+ command.request_representation = Google::Apis::SpannerV1::CopyBackupRequest::Representation
585
+ command.request_object = copy_backup_request_object
586
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
587
+ command.response_class = Google::Apis::SpannerV1::Operation
588
+ command.params['parent'] = parent unless parent.nil?
589
+ command.query['fields'] = fields unless fields.nil?
590
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
591
+ execute_or_queue_command(command, &block)
592
+ end
593
+
539
594
  # Starts creating a new Cloud Spanner Backup. The returned backup long-running
540
595
  # operation will have a name of the format `projects//instances//backups//
541
596
  # operations/` and can be used to track creation of the backup. The metadata
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.24.0
4
+ version: 0.25.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: 2022-02-28 00:00:00.000000000 Z
11
+ date: 2022-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-spanner_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.24.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.25.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-spanner_v1
63
63
  post_install_message:
64
64
  rdoc_options: []