google-cloud-spanner 1.16.2 → 2.4.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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +66 -0
  4. data/CONTRIBUTING.md +1 -1
  5. data/lib/google-cloud-spanner.rb +11 -13
  6. data/lib/google/cloud/spanner.rb +13 -13
  7. data/lib/google/cloud/spanner/admin/database/credentials.rb +2 -2
  8. data/lib/google/cloud/spanner/admin/instance/credentials.rb +2 -2
  9. data/lib/google/cloud/spanner/backup.rb +9 -1
  10. data/lib/google/cloud/spanner/backup/job.rb +2 -2
  11. data/lib/google/cloud/spanner/backup/job/list.rb +2 -2
  12. data/lib/google/cloud/spanner/backup/list.rb +1 -2
  13. data/lib/google/cloud/spanner/backup/restore/job.rb +2 -2
  14. data/lib/google/cloud/spanner/batch_client.rb +2 -2
  15. data/lib/google/cloud/spanner/batch_snapshot.rb +120 -23
  16. data/lib/google/cloud/spanner/batch_update.rb +1 -1
  17. data/lib/google/cloud/spanner/client.rb +388 -47
  18. data/lib/google/cloud/spanner/commit.rb +14 -14
  19. data/lib/google/cloud/spanner/commit_response.rb +87 -0
  20. data/lib/google/cloud/spanner/commit_response/commit_stats.rb +51 -0
  21. data/lib/google/cloud/spanner/convert.rb +16 -7
  22. data/lib/google/cloud/spanner/credentials.rb +2 -2
  23. data/lib/google/cloud/spanner/data.rb +2 -2
  24. data/lib/google/cloud/spanner/database.rb +47 -25
  25. data/lib/google/cloud/spanner/database/backup_info.rb +13 -4
  26. data/lib/google/cloud/spanner/database/job.rb +3 -3
  27. data/lib/google/cloud/spanner/database/job/list.rb +2 -2
  28. data/lib/google/cloud/spanner/database/list.rb +1 -1
  29. data/lib/google/cloud/spanner/database/restore_info.rb +1 -1
  30. data/lib/google/cloud/spanner/fields.rb +8 -8
  31. data/lib/google/cloud/spanner/instance.rb +5 -12
  32. data/lib/google/cloud/spanner/instance/config.rb +1 -1
  33. data/lib/google/cloud/spanner/instance/config/list.rb +1 -1
  34. data/lib/google/cloud/spanner/instance/job.rb +2 -2
  35. data/lib/google/cloud/spanner/instance/list.rb +1 -1
  36. data/lib/google/cloud/spanner/partition.rb +4 -4
  37. data/lib/google/cloud/spanner/policy.rb +2 -2
  38. data/lib/google/cloud/spanner/results.rb +103 -24
  39. data/lib/google/cloud/spanner/service.rb +369 -350
  40. data/lib/google/cloud/spanner/session.rb +370 -39
  41. data/lib/google/cloud/spanner/snapshot.rb +60 -6
  42. data/lib/google/cloud/spanner/transaction.rb +116 -10
  43. data/lib/google/cloud/spanner/version.rb +1 -1
  44. metadata +20 -107
  45. data/lib/google/cloud/spanner/admin/database.rb +0 -149
  46. data/lib/google/cloud/spanner/admin/database/v1.rb +0 -147
  47. data/lib/google/cloud/spanner/admin/database/v1/credentials.rb +0 -46
  48. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client.rb +0 -1513
  49. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client_config.json +0 -111
  50. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/iam_policy.rb +0 -64
  51. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/options.rb +0 -33
  52. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/policy.rb +0 -151
  53. data/lib/google/cloud/spanner/admin/database/v1/doc/google/longrunning/operations.rb +0 -51
  54. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/any.rb +0 -131
  55. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/empty.rb +0 -29
  56. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/field_mask.rb +0 -222
  57. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/timestamp.rb +0 -113
  58. data/lib/google/cloud/spanner/admin/database/v1/doc/google/rpc/status.rb +0 -39
  59. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/backup.rb +0 -325
  60. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/spanner_database_admin.rb +0 -368
  61. data/lib/google/cloud/spanner/admin/database/v1/doc/google/type/expr.rb +0 -45
  62. data/lib/google/cloud/spanner/admin/instance.rb +0 -164
  63. data/lib/google/cloud/spanner/admin/instance/v1.rb +0 -162
  64. data/lib/google/cloud/spanner/admin/instance/v1/credentials.rb +0 -46
  65. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/iam_policy.rb +0 -64
  66. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/options.rb +0 -33
  67. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/policy.rb +0 -151
  68. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/longrunning/operations.rb +0 -51
  69. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/any.rb +0 -131
  70. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/empty.rb +0 -29
  71. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/field_mask.rb +0 -222
  72. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/rpc/status.rb +0 -39
  73. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb +0 -334
  74. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/type/expr.rb +0 -45
  75. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client.rb +0 -975
  76. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client_config.json +0 -76
  77. data/lib/google/cloud/spanner/v1.rb +0 -16
  78. data/lib/google/cloud/spanner/v1/credentials.rb +0 -42
  79. data/lib/google/cloud/spanner/v1/doc/google/protobuf/any.rb +0 -131
  80. data/lib/google/cloud/spanner/v1/doc/google/protobuf/duration.rb +0 -91
  81. data/lib/google/cloud/spanner/v1/doc/google/protobuf/empty.rb +0 -29
  82. data/lib/google/cloud/spanner/v1/doc/google/protobuf/struct.rb +0 -74
  83. data/lib/google/cloud/spanner/v1/doc/google/protobuf/timestamp.rb +0 -113
  84. data/lib/google/cloud/spanner/v1/doc/google/rpc/status.rb +0 -39
  85. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/keys.rb +0 -150
  86. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/mutation.rb +0 -95
  87. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/query_plan.rb +0 -121
  88. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/result_set.rb +0 -190
  89. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/spanner.rb +0 -570
  90. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/transaction.rb +0 -432
  91. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/type.rb +0 -112
  92. data/lib/google/cloud/spanner/v1/spanner_client.rb +0 -1485
  93. data/lib/google/cloud/spanner/v1/spanner_client_config.json +0 -121
  94. data/lib/google/spanner/admin/database/v1/backup_pb.rb +0 -98
  95. data/lib/google/spanner/admin/database/v1/common_pb.rb +0 -28
  96. data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +0 -141
  97. data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +0 -169
  98. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +0 -125
  99. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +0 -181
  100. data/lib/google/spanner/v1/keys_pb.rb +0 -34
  101. data/lib/google/spanner/v1/mutation_pb.rb +0 -39
  102. data/lib/google/spanner/v1/query_plan_pb.rb +0 -48
  103. data/lib/google/spanner/v1/result_set_pb.rb +0 -48
  104. data/lib/google/spanner/v1/spanner_pb.rb +0 -179
  105. data/lib/google/spanner/v1/spanner_services_pb.rb +0 -179
  106. data/lib/google/spanner/v1/transaction_pb.rb +0 -56
  107. data/lib/google/spanner/v1/type_pb.rb +0 -44
@@ -1,162 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- require "google/cloud/spanner/admin/instance/v1/instance_admin_client"
17
- require "google/spanner/admin/instance/v1/spanner_instance_admin_pb"
18
-
19
- module Google
20
- module Cloud
21
- module Spanner
22
- module Admin
23
- module Instance
24
- # rubocop:disable LineLength
25
-
26
- ##
27
- # # Ruby Client for Cloud Spanner Instance Admin API
28
- #
29
- # [Cloud Spanner Instance Admin API][Product Documentation]:
30
- #
31
- # - [Product Documentation][]
32
- #
33
- # ## Quick Start
34
- # In order to use this library, you first need to go through the following
35
- # steps:
36
- #
37
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
38
- # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
39
- # 3. [Enable the Cloud Spanner Instance Admin API.](https://console.cloud.google.com/apis/library/spanner.googleapis.com)
40
- # 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-spanner/latest/file.AUTHENTICATION.html)
41
- #
42
- # ### Installation
43
- # ```
44
- # $ gem install google-cloud-spanner
45
- # ```
46
- #
47
- # ### Next Steps
48
- # - Read the [Cloud Spanner Instance Admin API Product documentation][Product Documentation]
49
- # to learn more about the product and see How-to Guides.
50
- # - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
51
- # to see the full list of Cloud APIs that we cover.
52
- #
53
- # [Product Documentation]: https://cloud.google.com/spanner
54
- #
55
- # ## Enabling Logging
56
- #
57
- # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
58
- # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
59
- # or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
60
- # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
61
- # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
62
- #
63
- # Configuring a Ruby stdlib logger:
64
- #
65
- # ```ruby
66
- # require "logger"
67
- #
68
- # module MyLogger
69
- # LOGGER = Logger.new $stderr, level: Logger::WARN
70
- # def logger
71
- # LOGGER
72
- # end
73
- # end
74
- #
75
- # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
76
- # module GRPC
77
- # extend MyLogger
78
- # end
79
- # ```
80
- #
81
- module V1
82
- # rubocop:enable LineLength
83
-
84
- ##
85
- # Cloud Spanner Instance Admin API
86
- #
87
- # The Cloud Spanner Instance Admin API can be used to create, delete,
88
- # modify and list instances. Instances are dedicated Cloud Spanner serving
89
- # and storage resources to be used by Cloud Spanner databases.
90
- #
91
- # Each instance has a "configuration", which dictates where the
92
- # serving resources for the Cloud Spanner instance are located (e.g.,
93
- # US-central, Europe). Configurations are created by Google based on
94
- # resource availability.
95
- #
96
- # Cloud Spanner billing is based on the instances that exist and their
97
- # sizes. After an instance exists, there are no additional
98
- # per-database or per-operation charges for use of the instance
99
- # (though there may be additional network bandwidth charges).
100
- # Instances offer isolation: problems with databases in one instance
101
- # will not affect other instances. However, within an instance
102
- # databases can affect each other. For example, if one database in an
103
- # instance receives a lot of requests and consumes most of the
104
- # instance resources, fewer resources are available for other
105
- # databases in that instance, and their performance may suffer.
106
- #
107
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
108
- # Provides the means for authenticating requests made by the client. This parameter can
109
- # be many types.
110
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
111
- # authenticating requests made by this client.
112
- # A `String` will be treated as the path to the keyfile to be used for the construction of
113
- # credentials for this client.
114
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
115
- # credentials for this client.
116
- # A `GRPC::Core::Channel` will be used to make calls through.
117
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
118
- # should already be composed with a `GRPC::Core::CallCredentials` object.
119
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
120
- # metadata for requests, generally, to give OAuth credentials.
121
- # @param scopes [Array<String>]
122
- # The OAuth scopes for this service. This parameter is ignored if
123
- # an updater_proc is supplied.
124
- # @param client_config [Hash]
125
- # A Hash for call options for each method. See
126
- # Google::Gax#construct_settings for the structure of
127
- # this data. Falls back to the default config if not specified
128
- # or the specified config is missing data points.
129
- # @param timeout [Numeric]
130
- # The default timeout, in seconds, for calls made through this client.
131
- # @param metadata [Hash]
132
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
133
- # @param exception_transformer [Proc]
134
- # An optional proc that intercepts any exceptions raised during an API call to inject
135
- # custom error handling.
136
- def self.new \
137
- credentials: nil,
138
- scopes: nil,
139
- client_config: nil,
140
- timeout: nil,
141
- metadata: nil,
142
- exception_transformer: nil,
143
- lib_name: nil,
144
- lib_version: nil
145
- kwargs = {
146
- credentials: credentials,
147
- scopes: scopes,
148
- client_config: client_config,
149
- timeout: timeout,
150
- metadata: metadata,
151
- exception_transformer: exception_transformer,
152
- lib_name: lib_name,
153
- lib_version: lib_version
154
- }.select { |_, v| v != nil }
155
- Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdminClient.new(**kwargs)
156
- end
157
- end
158
- end
159
- end
160
- end
161
- end
162
- end
@@ -1,46 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- require "googleauth"
17
-
18
- module Google
19
- module Cloud
20
- module Spanner
21
- module Admin
22
- module Instance
23
- module V1
24
- class Credentials < Google::Auth::Credentials
25
- SCOPE = [
26
- "https://www.googleapis.com/auth/cloud-platform",
27
- "https://www.googleapis.com/auth/spanner.admin"
28
- ].freeze
29
- PATH_ENV_VARS = %w(SPANNER_ADMIN_INSTANCE_CREDENTIALS
30
- SPANNER_ADMIN_INSTANCE_KEYFILE
31
- GOOGLE_CLOUD_CREDENTIALS
32
- GOOGLE_CLOUD_KEYFILE
33
- GCLOUD_KEYFILE)
34
- JSON_ENV_VARS = %w(SPANNER_ADMIN_INSTANCE_CREDENTIALS_JSON
35
- SPANNER_ADMIN_INSTANCE_KEYFILE_JSON
36
- GOOGLE_CLOUD_CREDENTIALS_JSON
37
- GOOGLE_CLOUD_KEYFILE_JSON
38
- GCLOUD_KEYFILE_JSON)
39
- DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
40
- end
41
- end
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,64 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Iam
18
- module V1
19
- # Request message for `SetIamPolicy` method.
20
- # @!attribute [rw] resource
21
- # @return [String]
22
- # REQUIRED: The resource for which the policy is being specified.
23
- # See the operation documentation for the appropriate value for this field.
24
- # @!attribute [rw] policy
25
- # @return [Google::Iam::V1::Policy]
26
- # REQUIRED: The complete policy to be applied to the `resource`. The size of
27
- # the policy is limited to a few 10s of KB. An empty policy is a
28
- # valid policy but certain Cloud Platform services (such as Projects)
29
- # might reject them.
30
- class SetIamPolicyRequest; end
31
-
32
- # Request message for `GetIamPolicy` method.
33
- # @!attribute [rw] resource
34
- # @return [String]
35
- # REQUIRED: The resource for which the policy is being requested.
36
- # See the operation documentation for the appropriate value for this field.
37
- # @!attribute [rw] options
38
- # @return [Google::Iam::V1::GetPolicyOptions]
39
- # OPTIONAL: A `GetPolicyOptions` object for specifying options to
40
- # `GetIamPolicy`. This field is only used by Cloud IAM.
41
- class GetIamPolicyRequest; end
42
-
43
- # Request message for `TestIamPermissions` method.
44
- # @!attribute [rw] resource
45
- # @return [String]
46
- # REQUIRED: The resource for which the policy detail is being requested.
47
- # See the operation documentation for the appropriate value for this field.
48
- # @!attribute [rw] permissions
49
- # @return [Array<String>]
50
- # The set of permissions to check for the `resource`. Permissions with
51
- # wildcards (such as '*' or 'storage.*') are not allowed. For more
52
- # information see
53
- # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
54
- class TestIamPermissionsRequest; end
55
-
56
- # Response message for `TestIamPermissions` method.
57
- # @!attribute [rw] permissions
58
- # @return [Array<String>]
59
- # A subset of `TestPermissionsRequest.permissions` that the caller is
60
- # allowed.
61
- class TestIamPermissionsResponse; end
62
- end
63
- end
64
- end
@@ -1,33 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Iam
18
- module V1
19
- # Encapsulates settings provided to GetIamPolicy.
20
- # @!attribute [rw] requested_policy_version
21
- # @return [Integer]
22
- # Optional. The policy format version to be returned.
23
- #
24
- # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
25
- # rejected.
26
- #
27
- # Requests for policies with any conditional bindings must specify version 3.
28
- # Policies without any conditional bindings may specify any valid value or
29
- # leave the field unset.
30
- class GetPolicyOptions; end
31
- end
32
- end
33
- end
@@ -1,151 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Iam
18
- module V1
19
- # Defines an Identity and Access Management (IAM) policy. It is used to
20
- # specify access control policies for Cloud Platform resources.
21
- #
22
- #
23
- # A `Policy` is a collection of `bindings`. A `binding` binds one or more
24
- # `members` to a single `role`. Members can be user accounts, service accounts,
25
- # Google groups, and domains (such as G Suite). A `role` is a named list of
26
- # permissions (defined by IAM or configured by users). A `binding` can
27
- # optionally specify a `condition`, which is a logic expression that further
28
- # constrains the role binding based on attributes about the request and/or
29
- # target resource.
30
- #
31
- # **JSON Example**
32
- #
33
- # {
34
- # "bindings": [
35
- # {
36
- # "role": "roles/resourcemanager.organizationAdmin",
37
- # "members": [
38
- # "user:mike@example.com",
39
- # "group:admins@example.com",
40
- # "domain:google.com",
41
- # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
42
- # ]
43
- # },
44
- # {
45
- # "role": "roles/resourcemanager.organizationViewer",
46
- # "members": ["user:eve@example.com"],
47
- # "condition": {
48
- # "title": "expirable access",
49
- # "description": "Does not grant access after Sep 2020",
50
- # "expression": "request.time <
51
- # timestamp('2020-10-01T00:00:00.000Z')",
52
- # }
53
- # }
54
- # ]
55
- # }
56
- #
57
- # **YAML Example**
58
- #
59
- # bindings:
60
- # * members:
61
- # * user:mike@example.com
62
- # * group:admins@example.com
63
- # * domain:google.com
64
- # * serviceAccount:my-project-id@appspot.gserviceaccount.com
65
- # role: roles/resourcemanager.organizationAdmin
66
- # * members:
67
- # * user:eve@example.com
68
- # role: roles/resourcemanager.organizationViewer
69
- # condition:
70
- # title: expirable access
71
- # description: Does not grant access after Sep 2020
72
- # expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
73
- #
74
- # For a description of IAM and its features, see the
75
- # [IAM developer's guide](https://cloud.google.com/iam/docs).
76
- # @!attribute [rw] version
77
- # @return [Integer]
78
- # Specifies the format of the policy.
79
- #
80
- # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
81
- # rejected.
82
- #
83
- # Operations affecting conditional bindings must specify version 3. This can
84
- # be either setting a conditional policy, modifying a conditional binding,
85
- # or removing a binding (conditional or unconditional) from the stored
86
- # conditional policy.
87
- # Operations on non-conditional policies may specify any valid value or
88
- # leave the field unset.
89
- #
90
- # If no etag is provided in the call to `setIamPolicy`, version compliance
91
- # checks against the stored policy is skipped.
92
- # @!attribute [rw] bindings
93
- # @return [Array<Google::Iam::V1::Binding>]
94
- # Associates a list of `members` to a `role`. Optionally may specify a
95
- # `condition` that determines when binding is in effect.
96
- # `bindings` with no members will result in an error.
97
- # @!attribute [rw] etag
98
- # @return [String]
99
- # `etag` is used for optimistic concurrency control as a way to help
100
- # prevent simultaneous updates of a policy from overwriting each other.
101
- # It is strongly suggested that systems make use of the `etag` in the
102
- # read-modify-write cycle to perform policy updates in order to avoid race
103
- # conditions: An `etag` is returned in the response to `getIamPolicy`, and
104
- # systems are expected to put that etag in the request to `setIamPolicy` to
105
- # ensure that their change will be applied to the same version of the policy.
106
- #
107
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing
108
- # policy is overwritten. Due to blind-set semantics of an etag-less policy,
109
- # 'setIamPolicy' will not fail even if the incoming policy version does not
110
- # meet the requirements for modifying the stored policy.
111
- class Policy; end
112
-
113
- # Associates `members` with a `role`.
114
- # @!attribute [rw] role
115
- # @return [String]
116
- # Role that is assigned to `members`.
117
- # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
118
- # @!attribute [rw] members
119
- # @return [Array<String>]
120
- # Specifies the identities requesting access for a Cloud Platform resource.
121
- # `members` can have the following values:
122
- #
123
- # * `allUsers`: A special identifier that represents anyone who is
124
- # on the internet; with or without a Google account.
125
- #
126
- # * `allAuthenticatedUsers`: A special identifier that represents anyone
127
- # who is authenticated with a Google account or a service account.
128
- #
129
- # * `user:{emailid}`: An email address that represents a specific Google
130
- # account. For example, `alice@example.com` .
131
- #
132
- #
133
- # * `serviceAccount:{emailid}`: An email address that represents a service
134
- # account. For example, `my-other-app@appspot.gserviceaccount.com`.
135
- #
136
- # * `group:{emailid}`: An email address that represents a Google group.
137
- # For example, `admins@example.com`.
138
- #
139
- #
140
- # * `domain:{domain}`: The G Suite domain (primary) that represents all the
141
- # users of that domain. For example, `google.com` or `example.com`.
142
- # @!attribute [rw] condition
143
- # @return [Google::Type::Expr]
144
- # The condition that is associated with this binding.
145
- # NOTE: An unsatisfied condition will not allow user access via current
146
- # binding. Different bindings, including their conditions, are examined
147
- # independently.
148
- class Binding; end
149
- end
150
- end
151
- end