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