google-cloud-bigtable 0.6.0 → 0.6.1
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 +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +2 -0
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +8 -0
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +148 -0
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +15 -0
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +7 -3
- data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +8 -1
- data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +6 -4
- data/lib/google/cloud/bigtable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d888a5ae0e03db4d343f1f472df17e34e6749305a18907309afc1e9aba13451
|
4
|
+
data.tar.gz: 921696b2987c12c2480bf8407b9d19c500bdbfd0ff2ab2401a58a3880ca357d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f898010312460f67d88380f2252a83b26acfd2e1220c31a09bacc1026c87066ffe184369807fc2fadcf17e49e98cee4ae255aaf771dd54617cdb706ba829f91
|
7
|
+
data.tar.gz: 17358abe5747ae235d77a62cbb4d3e0030939bb254111fbdd2d1dfea8e520681a1dbc4376b9c2a36d0880167864e109b89f4f42317bb1a59a43d748452dff7ec
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.6.1 / 2019-09-05
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* Add IAM to low-level API client
|
8
|
+
* Add BigtableTableAdminClient#get_iam_policy
|
9
|
+
* Add BigtableTableAdminClient#set_iam_policy
|
10
|
+
* Add BigtableTableAdminClient#test_iam_permissions
|
11
|
+
|
12
|
+
#### Documentation
|
13
|
+
|
14
|
+
* Update low-level IAM documentation
|
15
|
+
* Update GetPolicyOption#requested_policy_version docs
|
16
|
+
* Un-deprecate Policy#version
|
17
|
+
|
3
18
|
### 0.6.0 / 2019-08-23
|
4
19
|
|
5
20
|
#### Features
|
@@ -6,6 +6,8 @@ require 'google/protobuf'
|
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
8
|
require 'google/bigtable/admin/v2/table_pb'
|
9
|
+
require 'google/iam/v1/iam_policy_pb'
|
10
|
+
require 'google/iam/v1/policy_pb'
|
9
11
|
require 'google/longrunning/operations_pb'
|
10
12
|
require 'google/protobuf/duration_pb'
|
11
13
|
require 'google/protobuf/empty_pb'
|
@@ -109,6 +109,14 @@ module Google
|
|
109
109
|
# recommended for production use. It is not subject to any SLA or deprecation
|
110
110
|
# policy.
|
111
111
|
rpc :DeleteSnapshot, DeleteSnapshotRequest, Google::Protobuf::Empty
|
112
|
+
# Gets the access control policy for an instance resource. Returns an empty
|
113
|
+
# policy if an table exists but does not have a policy set.
|
114
|
+
rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
|
115
|
+
# Sets the access control policy on a table resource. Replaces any existing
|
116
|
+
# policy.
|
117
|
+
rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
|
118
|
+
# Returns permissions that the caller has on the specified table resource.
|
119
|
+
rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
|
112
120
|
end
|
113
121
|
|
114
122
|
Stub = Service.rpc_stub_class
|
@@ -361,6 +361,30 @@ module Google
|
|
361
361
|
{'name' => request.name}
|
362
362
|
end
|
363
363
|
)
|
364
|
+
@get_iam_policy = Google::Gax.create_api_call(
|
365
|
+
@bigtable_table_admin_stub.method(:get_iam_policy),
|
366
|
+
defaults["get_iam_policy"],
|
367
|
+
exception_transformer: exception_transformer,
|
368
|
+
params_extractor: proc do |request|
|
369
|
+
{'resource' => request.resource}
|
370
|
+
end
|
371
|
+
)
|
372
|
+
@set_iam_policy = Google::Gax.create_api_call(
|
373
|
+
@bigtable_table_admin_stub.method(:set_iam_policy),
|
374
|
+
defaults["set_iam_policy"],
|
375
|
+
exception_transformer: exception_transformer,
|
376
|
+
params_extractor: proc do |request|
|
377
|
+
{'resource' => request.resource}
|
378
|
+
end
|
379
|
+
)
|
380
|
+
@test_iam_permissions = Google::Gax.create_api_call(
|
381
|
+
@bigtable_table_admin_stub.method(:test_iam_permissions),
|
382
|
+
defaults["test_iam_permissions"],
|
383
|
+
exception_transformer: exception_transformer,
|
384
|
+
params_extractor: proc do |request|
|
385
|
+
{'resource' => request.resource}
|
386
|
+
end
|
387
|
+
)
|
364
388
|
@snapshot_table = Google::Gax.create_api_call(
|
365
389
|
@bigtable_table_admin_stub.method(:snapshot_table),
|
366
390
|
defaults["snapshot_table"],
|
@@ -846,6 +870,130 @@ module Google
|
|
846
870
|
@check_consistency.call(req, options, &block)
|
847
871
|
end
|
848
872
|
|
873
|
+
# Gets the access control policy for an instance resource. Returns an empty
|
874
|
+
# policy if an table exists but does not have a policy set.
|
875
|
+
#
|
876
|
+
# @param resource [String]
|
877
|
+
# REQUIRED: The resource for which the policy is being requested.
|
878
|
+
# See the operation documentation for the appropriate value for this field.
|
879
|
+
# @param options_ [Google::Iam::V1::GetPolicyOptions | Hash]
|
880
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
881
|
+
# `GetIamPolicy`. This field is only used by Cloud IAM.
|
882
|
+
# A hash of the same form as `Google::Iam::V1::GetPolicyOptions`
|
883
|
+
# can also be provided.
|
884
|
+
# @param options [Google::Gax::CallOptions]
|
885
|
+
# Overrides the default settings for this call, e.g, timeout,
|
886
|
+
# retries, etc.
|
887
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
888
|
+
# @yieldparam result [Google::Iam::V1::Policy]
|
889
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
890
|
+
# @return [Google::Iam::V1::Policy]
|
891
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
892
|
+
# @example
|
893
|
+
# require "google/cloud/bigtable/admin"
|
894
|
+
#
|
895
|
+
# bigtable_table_admin_client = Google::Cloud::Bigtable::Admin::BigtableTableAdmin.new(version: :v2)
|
896
|
+
# formatted_resource = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdminClient.table_path("[PROJECT]", "[INSTANCE]", "[TABLE]")
|
897
|
+
# response = bigtable_table_admin_client.get_iam_policy(formatted_resource)
|
898
|
+
|
899
|
+
def get_iam_policy \
|
900
|
+
resource,
|
901
|
+
options_: nil,
|
902
|
+
options: nil,
|
903
|
+
&block
|
904
|
+
req = {
|
905
|
+
resource: resource,
|
906
|
+
options: options_
|
907
|
+
}.delete_if { |_, v| v.nil? }
|
908
|
+
req = Google::Gax::to_proto(req, Google::Iam::V1::GetIamPolicyRequest)
|
909
|
+
@get_iam_policy.call(req, options, &block)
|
910
|
+
end
|
911
|
+
|
912
|
+
# Sets the access control policy on a table resource. Replaces any existing
|
913
|
+
# policy.
|
914
|
+
#
|
915
|
+
# @param resource [String]
|
916
|
+
# REQUIRED: The resource for which the policy is being specified.
|
917
|
+
# See the operation documentation for the appropriate value for this field.
|
918
|
+
# @param policy [Google::Iam::V1::Policy | Hash]
|
919
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
920
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
921
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
922
|
+
# might reject them.
|
923
|
+
# A hash of the same form as `Google::Iam::V1::Policy`
|
924
|
+
# can also be provided.
|
925
|
+
# @param options [Google::Gax::CallOptions]
|
926
|
+
# Overrides the default settings for this call, e.g, timeout,
|
927
|
+
# retries, etc.
|
928
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
929
|
+
# @yieldparam result [Google::Iam::V1::Policy]
|
930
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
931
|
+
# @return [Google::Iam::V1::Policy]
|
932
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
933
|
+
# @example
|
934
|
+
# require "google/cloud/bigtable/admin"
|
935
|
+
#
|
936
|
+
# bigtable_table_admin_client = Google::Cloud::Bigtable::Admin::BigtableTableAdmin.new(version: :v2)
|
937
|
+
# formatted_resource = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdminClient.table_path("[PROJECT]", "[INSTANCE]", "[TABLE]")
|
938
|
+
#
|
939
|
+
# # TODO: Initialize `policy`:
|
940
|
+
# policy = {}
|
941
|
+
# response = bigtable_table_admin_client.set_iam_policy(formatted_resource, policy)
|
942
|
+
|
943
|
+
def set_iam_policy \
|
944
|
+
resource,
|
945
|
+
policy,
|
946
|
+
options: nil,
|
947
|
+
&block
|
948
|
+
req = {
|
949
|
+
resource: resource,
|
950
|
+
policy: policy
|
951
|
+
}.delete_if { |_, v| v.nil? }
|
952
|
+
req = Google::Gax::to_proto(req, Google::Iam::V1::SetIamPolicyRequest)
|
953
|
+
@set_iam_policy.call(req, options, &block)
|
954
|
+
end
|
955
|
+
|
956
|
+
# Returns permissions that the caller has on the specified table resource.
|
957
|
+
#
|
958
|
+
# @param resource [String]
|
959
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
960
|
+
# See the operation documentation for the appropriate value for this field.
|
961
|
+
# @param permissions [Array<String>]
|
962
|
+
# The set of permissions to check for the `resource`. Permissions with
|
963
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
964
|
+
# information see
|
965
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
966
|
+
# @param options [Google::Gax::CallOptions]
|
967
|
+
# Overrides the default settings for this call, e.g, timeout,
|
968
|
+
# retries, etc.
|
969
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
970
|
+
# @yieldparam result [Google::Iam::V1::TestIamPermissionsResponse]
|
971
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
972
|
+
# @return [Google::Iam::V1::TestIamPermissionsResponse]
|
973
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
974
|
+
# @example
|
975
|
+
# require "google/cloud/bigtable/admin"
|
976
|
+
#
|
977
|
+
# bigtable_table_admin_client = Google::Cloud::Bigtable::Admin::BigtableTableAdmin.new(version: :v2)
|
978
|
+
# formatted_resource = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdminClient.table_path("[PROJECT]", "[INSTANCE]", "[TABLE]")
|
979
|
+
#
|
980
|
+
# # TODO: Initialize `permissions`:
|
981
|
+
# permissions = []
|
982
|
+
# response = bigtable_table_admin_client.test_iam_permissions(formatted_resource, permissions)
|
983
|
+
|
984
|
+
def test_iam_permissions \
|
985
|
+
resource,
|
986
|
+
permissions,
|
987
|
+
options: nil,
|
988
|
+
&block
|
989
|
+
req = {
|
990
|
+
resource: resource,
|
991
|
+
permissions: permissions
|
992
|
+
}.delete_if { |_, v| v.nil? }
|
993
|
+
req = Google::Gax::to_proto(req, Google::Iam::V1::TestIamPermissionsRequest)
|
994
|
+
@test_iam_permissions.call(req, options, &block)
|
995
|
+
end
|
996
|
+
|
849
997
|
# Creates a new snapshot in the specified cluster from the specified
|
850
998
|
# source table. The cluster and the table must be in the same instance.
|
851
999
|
#
|
@@ -92,6 +92,21 @@
|
|
92
92
|
"retry_codes_name": "idempotent",
|
93
93
|
"retry_params_name": "idempotent_params"
|
94
94
|
},
|
95
|
+
"GetIamPolicy": {
|
96
|
+
"timeout_millis": 60000,
|
97
|
+
"retry_codes_name": "idempotent",
|
98
|
+
"retry_params_name": "idempotent_params"
|
99
|
+
},
|
100
|
+
"SetIamPolicy": {
|
101
|
+
"timeout_millis": 60000,
|
102
|
+
"retry_codes_name": "non_idempotent",
|
103
|
+
"retry_params_name": "non_idempotent_params"
|
104
|
+
},
|
105
|
+
"TestIamPermissions": {
|
106
|
+
"timeout_millis": 60000,
|
107
|
+
"retry_codes_name": "idempotent",
|
108
|
+
"retry_params_name": "idempotent_params"
|
109
|
+
},
|
95
110
|
"SnapshotTable": {
|
96
111
|
"timeout_millis": 60000,
|
97
112
|
"retry_codes_name": "non_idempotent",
|
@@ -20,9 +20,13 @@ module Google
|
|
20
20
|
# @!attribute [rw] requested_policy_version
|
21
21
|
# @return [Integer]
|
22
22
|
# Optional. The policy format version to be returned.
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
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.
|
26
30
|
class GetPolicyOptions; end
|
27
31
|
end
|
28
32
|
end
|
@@ -63,7 +63,14 @@ module Google
|
|
63
63
|
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
64
64
|
# @!attribute [rw] version
|
65
65
|
# @return [Integer]
|
66
|
-
#
|
66
|
+
# Specifies the format of the policy.
|
67
|
+
#
|
68
|
+
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
69
|
+
# rejected.
|
70
|
+
#
|
71
|
+
# Policies with any conditional bindings must specify version 3. Policies
|
72
|
+
# without any conditional bindings may specify any valid value or leave the
|
73
|
+
# field unset.
|
67
74
|
# @!attribute [rw] bindings
|
68
75
|
# @return [Array<Google::Iam::V1::Binding>]
|
69
76
|
# Associates a list of `members` to a `role`.
|
@@ -88,11 +88,13 @@ module Google
|
|
88
88
|
# 01:30 UTC on January 15, 2017.
|
89
89
|
#
|
90
90
|
# In JavaScript, one can convert a Date object to this format using the
|
91
|
-
# standard
|
91
|
+
# standard
|
92
|
+
# [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
92
93
|
# method. In Python, a standard `datetime.datetime` object can be converted
|
93
|
-
# to this format using
|
94
|
-
#
|
95
|
-
#
|
94
|
+
# to this format using
|
95
|
+
# [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
96
|
+
# the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
97
|
+
# the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
96
98
|
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
|
97
99
|
# ) to obtain a formatter capable of generating timestamps in this format.
|
98
100
|
# @!attribute [rw] seconds
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigtable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|