google-cloud-bigtable 1.2.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/CHANGELOG.md +54 -0
- data/TROUBLESHOOTING.md +2 -8
- data/lib/google-cloud-bigtable.rb +30 -27
- data/lib/google/cloud/bigtable.rb +18 -26
- data/lib/google/cloud/bigtable/app_profile.rb +3 -3
- data/lib/google/cloud/bigtable/app_profile/list.rb +6 -4
- data/lib/google/cloud/bigtable/backup.rb +324 -0
- data/lib/google/cloud/bigtable/backup/job.rb +87 -0
- data/lib/google/cloud/bigtable/backup/list.rb +167 -0
- data/lib/google/cloud/bigtable/chunk_processor.rb +1 -1
- data/lib/google/cloud/bigtable/cluster.rb +101 -2
- data/lib/google/cloud/bigtable/cluster/list.rb +2 -2
- data/lib/google/cloud/bigtable/column_family.rb +2 -2
- data/lib/google/cloud/bigtable/column_family_map.rb +11 -11
- data/lib/google/cloud/bigtable/column_range.rb +2 -2
- data/lib/google/cloud/bigtable/credentials.rb +36 -2
- data/lib/google/cloud/bigtable/gc_rule.rb +7 -7
- data/lib/google/cloud/bigtable/instance.rb +6 -6
- data/lib/google/cloud/bigtable/instance/cluster_map.rb +1 -1
- data/lib/google/cloud/bigtable/instance/list.rb +2 -2
- data/lib/google/cloud/bigtable/longrunning_job.rb +13 -2
- data/lib/google/cloud/bigtable/mutation_entry.rb +10 -9
- data/lib/google/cloud/bigtable/mutation_operations.rb +2 -2
- data/lib/google/cloud/bigtable/project.rb +1 -1
- data/lib/google/cloud/bigtable/read_modify_write_rule.rb +2 -2
- data/lib/google/cloud/bigtable/read_operations.rb +2 -2
- data/lib/google/cloud/bigtable/routing_policy.rb +2 -2
- data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +3 -3
- data/lib/google/cloud/bigtable/row_range.rb +2 -2
- data/lib/google/cloud/bigtable/rows_mutator.rb +3 -3
- data/lib/google/cloud/bigtable/rows_reader.rb +10 -10
- data/lib/google/cloud/bigtable/sample_row_key.rb +2 -2
- data/lib/google/cloud/bigtable/service.rb +241 -245
- data/lib/google/cloud/bigtable/table.rb +5 -4
- data/lib/google/cloud/bigtable/table/cluster_state.rb +27 -6
- data/lib/google/cloud/bigtable/table/list.rb +2 -2
- data/lib/google/cloud/bigtable/table/restore_job.rb +117 -0
- data/lib/google/cloud/bigtable/value_range.rb +2 -2
- data/lib/google/cloud/bigtable/version.rb +1 -1
- metadata +18 -96
- data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +0 -145
- data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +0 -90
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +0 -144
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +0 -128
- data/lib/google/bigtable/admin/v2/common_pb.rb +0 -25
- data/lib/google/bigtable/admin/v2/instance_pb.rb +0 -75
- data/lib/google/bigtable/admin/v2/table_pb.rb +0 -91
- data/lib/google/bigtable/v2/bigtable_pb.rb +0 -113
- data/lib/google/bigtable/v2/bigtable_services_pb.rb +0 -68
- data/lib/google/bigtable/v2/data_pb.rb +0 -156
- data/lib/google/cloud/bigtable/admin.rb +0 -202
- data/lib/google/cloud/bigtable/admin/credentials.rb +0 -27
- data/lib/google/cloud/bigtable/admin/v2.rb +0 -222
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +0 -1451
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json +0 -139
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +0 -1257
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +0 -133
- data/lib/google/cloud/bigtable/admin/v2/credentials.rb +0 -51
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +0 -297
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +0 -367
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +0 -193
- data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +0 -200
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +0 -64
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +0 -33
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +0 -151
- data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +0 -29
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +0 -45
- data/lib/google/cloud/bigtable/v2.rb +0 -146
- data/lib/google/cloud/bigtable/v2/bigtable_client.rb +0 -591
- data/lib/google/cloud/bigtable/v2/bigtable_client_config.json +0 -83
- data/lib/google/cloud/bigtable/v2/credentials.rb +0 -46
- data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +0 -290
- data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +0 -493
- data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +0 -34
- data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +0 -39
@@ -1,200 +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 Bigtable
|
18
|
-
module Admin
|
19
|
-
module V2
|
20
|
-
# A collection of user data indexed by row, column, and timestamp.
|
21
|
-
# Each table is served using the resources of its parent cluster.
|
22
|
-
# @!attribute [rw] name
|
23
|
-
# @return [String]
|
24
|
-
# Output only. The unique name of the table. Values are of the form
|
25
|
-
# `projects/<project>/instances/<instance>/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
|
26
|
-
# Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
|
27
|
-
# @!attribute [rw] cluster_states
|
28
|
-
# @return [Hash{String => Google::Bigtable::Admin::V2::Table::ClusterState}]
|
29
|
-
# Output only. Map from cluster ID to per-cluster table state.
|
30
|
-
# If it could not be determined whether or not the table has data in a
|
31
|
-
# particular cluster (for example, if its zone is unavailable), then
|
32
|
-
# there will be an entry for the cluster with UNKNOWN `replication_status`.
|
33
|
-
# Views: `REPLICATION_VIEW`, `FULL`
|
34
|
-
# @!attribute [rw] column_families
|
35
|
-
# @return [Hash{String => Google::Bigtable::Admin::V2::ColumnFamily}]
|
36
|
-
# (`CreationOnly`)
|
37
|
-
# The column families configured for this table, mapped by column family ID.
|
38
|
-
# Views: `SCHEMA_VIEW`, `FULL`
|
39
|
-
# @!attribute [rw] granularity
|
40
|
-
# @return [Google::Bigtable::Admin::V2::Table::TimestampGranularity]
|
41
|
-
# (`CreationOnly`)
|
42
|
-
# The granularity (i.e. `MILLIS`) at which timestamps are stored in
|
43
|
-
# this table. Timestamps not matching the granularity will be rejected.
|
44
|
-
# If unspecified at creation time, the value will be set to `MILLIS`.
|
45
|
-
# Views: `SCHEMA_VIEW`, `FULL`.
|
46
|
-
class Table
|
47
|
-
# The state of a table's data in a particular cluster.
|
48
|
-
# @!attribute [rw] replication_state
|
49
|
-
# @return [Google::Bigtable::Admin::V2::Table::ClusterState::ReplicationState]
|
50
|
-
# Output only. The state of replication for the table in this cluster.
|
51
|
-
class ClusterState
|
52
|
-
# Table replication states.
|
53
|
-
module ReplicationState
|
54
|
-
# The replication state of the table is unknown in this cluster.
|
55
|
-
STATE_NOT_KNOWN = 0
|
56
|
-
|
57
|
-
# The cluster was recently created, and the table must finish copying
|
58
|
-
# over pre-existing data from other clusters before it can begin
|
59
|
-
# receiving live replication updates and serving Data API requests.
|
60
|
-
INITIALIZING = 1
|
61
|
-
|
62
|
-
# The table is temporarily unable to serve Data API requests from this
|
63
|
-
# cluster due to planned internal maintenance.
|
64
|
-
PLANNED_MAINTENANCE = 2
|
65
|
-
|
66
|
-
# The table is temporarily unable to serve Data API requests from this
|
67
|
-
# cluster due to unplanned or emergency maintenance.
|
68
|
-
UNPLANNED_MAINTENANCE = 3
|
69
|
-
|
70
|
-
# The table can serve Data API requests from this cluster. Depending on
|
71
|
-
# replication delay, reads may not immediately reflect the state of the
|
72
|
-
# table in other clusters.
|
73
|
-
READY = 4
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
# Possible timestamp granularities to use when keeping multiple versions
|
78
|
-
# of data in a table.
|
79
|
-
module TimestampGranularity
|
80
|
-
# The user did not specify a granularity. Should not be returned.
|
81
|
-
# When specified during table creation, MILLIS will be used.
|
82
|
-
TIMESTAMP_GRANULARITY_UNSPECIFIED = 0
|
83
|
-
|
84
|
-
# The table keeps data versioned at a granularity of 1ms.
|
85
|
-
MILLIS = 1
|
86
|
-
end
|
87
|
-
|
88
|
-
# Defines a view over a table's fields.
|
89
|
-
module View
|
90
|
-
# Uses the default view for each method as documented in its request.
|
91
|
-
VIEW_UNSPECIFIED = 0
|
92
|
-
|
93
|
-
# Only populates `name`.
|
94
|
-
NAME_ONLY = 1
|
95
|
-
|
96
|
-
# Only populates `name` and fields related to the table's schema.
|
97
|
-
SCHEMA_VIEW = 2
|
98
|
-
|
99
|
-
# Only populates `name` and fields related to the table's replication
|
100
|
-
# state.
|
101
|
-
REPLICATION_VIEW = 3
|
102
|
-
|
103
|
-
# Populates all fields.
|
104
|
-
FULL = 4
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
# A set of columns within a table which share a common configuration.
|
109
|
-
# @!attribute [rw] gc_rule
|
110
|
-
# @return [Google::Bigtable::Admin::V2::GcRule]
|
111
|
-
# Garbage collection rule specified as a protobuf.
|
112
|
-
# Must serialize to at most 500 bytes.
|
113
|
-
#
|
114
|
-
# NOTE: Garbage collection executes opportunistically in the background, and
|
115
|
-
# so it's possible for reads to return a cell even if it matches the active
|
116
|
-
# GC expression for its family.
|
117
|
-
class ColumnFamily; end
|
118
|
-
|
119
|
-
# Rule for determining which cells to delete during garbage collection.
|
120
|
-
# @!attribute [rw] max_num_versions
|
121
|
-
# @return [Integer]
|
122
|
-
# Delete all cells in a column except the most recent N.
|
123
|
-
# @!attribute [rw] max_age
|
124
|
-
# @return [Google::Protobuf::Duration]
|
125
|
-
# Delete cells in a column older than the given age.
|
126
|
-
# Values must be at least one millisecond, and will be truncated to
|
127
|
-
# microsecond granularity.
|
128
|
-
# @!attribute [rw] intersection
|
129
|
-
# @return [Google::Bigtable::Admin::V2::GcRule::Intersection]
|
130
|
-
# Delete cells that would be deleted by every nested rule.
|
131
|
-
# @!attribute [rw] union
|
132
|
-
# @return [Google::Bigtable::Admin::V2::GcRule::Union]
|
133
|
-
# Delete cells that would be deleted by any nested rule.
|
134
|
-
class GcRule
|
135
|
-
# A GcRule which deletes cells matching all of the given rules.
|
136
|
-
# @!attribute [rw] rules
|
137
|
-
# @return [Array<Google::Bigtable::Admin::V2::GcRule>]
|
138
|
-
# Only delete cells which would be deleted by every element of `rules`.
|
139
|
-
class Intersection; end
|
140
|
-
|
141
|
-
# A GcRule which deletes cells matching any of the given rules.
|
142
|
-
# @!attribute [rw] rules
|
143
|
-
# @return [Array<Google::Bigtable::Admin::V2::GcRule>]
|
144
|
-
# Delete cells which would be deleted by any element of `rules`.
|
145
|
-
class Union; end
|
146
|
-
end
|
147
|
-
|
148
|
-
# A snapshot of a table at a particular time. A snapshot can be used as a
|
149
|
-
# checkpoint for data restoration or a data source for a new table.
|
150
|
-
#
|
151
|
-
# Note: This is a private alpha release of Cloud Bigtable snapshots. This
|
152
|
-
# feature is not currently available to most Cloud Bigtable customers. This
|
153
|
-
# feature might be changed in backward-incompatible ways and is not recommended
|
154
|
-
# for production use. It is not subject to any SLA or deprecation policy.
|
155
|
-
# @!attribute [rw] name
|
156
|
-
# @return [String]
|
157
|
-
# Output only. The unique name of the snapshot.
|
158
|
-
# Values are of the form
|
159
|
-
# `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
|
160
|
-
# @!attribute [rw] source_table
|
161
|
-
# @return [Google::Bigtable::Admin::V2::Table]
|
162
|
-
# Output only. The source table at the time the snapshot was taken.
|
163
|
-
# @!attribute [rw] data_size_bytes
|
164
|
-
# @return [Integer]
|
165
|
-
# Output only. The size of the data in the source table at the time the snapshot was
|
166
|
-
# taken. In some cases, this value may be computed asynchronously via a
|
167
|
-
# background process and a placeholder of 0 will be used in the meantime.
|
168
|
-
# @!attribute [rw] create_time
|
169
|
-
# @return [Google::Protobuf::Timestamp]
|
170
|
-
# Output only. The time when the snapshot is created.
|
171
|
-
# @!attribute [rw] delete_time
|
172
|
-
# @return [Google::Protobuf::Timestamp]
|
173
|
-
# Output only. The time when the snapshot will be deleted. The maximum amount of time a
|
174
|
-
# snapshot can stay active is 365 days. If 'ttl' is not specified,
|
175
|
-
# the default maximum of 365 days will be used.
|
176
|
-
# @!attribute [rw] state
|
177
|
-
# @return [Google::Bigtable::Admin::V2::Snapshot::State]
|
178
|
-
# Output only. The current state of the snapshot.
|
179
|
-
# @!attribute [rw] description
|
180
|
-
# @return [String]
|
181
|
-
# Output only. Description of the snapshot.
|
182
|
-
class Snapshot
|
183
|
-
# Possible states of a snapshot.
|
184
|
-
module State
|
185
|
-
# The state of the snapshot could not be determined.
|
186
|
-
STATE_NOT_KNOWN = 0
|
187
|
-
|
188
|
-
# The snapshot has been successfully created and can serve all requests.
|
189
|
-
READY = 1
|
190
|
-
|
191
|
-
# The snapshot is currently being created, and may be destroyed if the
|
192
|
-
# creation process encounters an error. A snapshot may not be restored to a
|
193
|
-
# table while it is being created.
|
194
|
-
CREATING = 2
|
195
|
-
end
|
196
|
-
end
|
197
|
-
end
|
198
|
-
end
|
199
|
-
end
|
200
|
-
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
|