google-cloud-dataplex-v1 0.3.0 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08f2e3c54ea7464141f54532909e4a6922c96c1d92983a27c94dc161a3975bcc'
4
- data.tar.gz: 3c15bc88f4a98ffe892fb8b0e8d68b516c21ab9cfd6b005332aa64e02205085c
3
+ metadata.gz: 8fdae0307f328bf97514eb59eda15e43858e53ff185f4a0d1d202ee0c2f64665
4
+ data.tar.gz: ebf6c7b4d1818fae6e7d974686b72d444132d92bbf073ad491b0f22deade6fd8
5
5
  SHA512:
6
- metadata.gz: 6698a536ca3acf60e7b77c04bccced2306b22d3cfcf724be192bca7641b598394cebd88b4f0d9cc76a9e361fa58af4737e60983f641845bbeeb84afc3210fd17
7
- data.tar.gz: 94e7f000a624c22bee8e081f43b3586a4dbdacbd55f55a5fa5e9136c8a5cb2fbb3d1e2e8c4d7c88d5890c0b82d2c1eb706538bcc3827a4b83b1093d0f8fba68d
6
+ metadata.gz: 7bf4419212b2c90cc5f4d7a25194291985c704b24d0b5c8a9053e8451f94830f5ea4e4d5cfaf3397ead3e9d21820391588f0917b5b943a6a57a20cd3afc5519d
7
+ data.tar.gz: 85f84b7b32306d85d53bf0c7c19db9e397fffe60d0047e3b4785395afee95b654146dc297eacf77d5293c583fe488e58877ed942dc105a667cac430f55b6005a
@@ -8,6 +8,8 @@ require 'google/api/client_pb'
8
8
  require 'google/api/field_behavior_pb'
9
9
  require 'google/api/resource_pb'
10
10
  require 'google/cloud/dataplex/v1/analyze_pb'
11
+ require 'google/iam/v1/iam_policy_pb'
12
+ require 'google/iam/v1/policy_pb'
11
13
  require 'google/protobuf/empty_pb'
12
14
  require 'google/protobuf/field_mask_pb'
13
15
 
@@ -18,6 +18,8 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/dataplex/v1/content_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1/iam_policy"
21
23
 
22
24
  module Google
23
25
  module Cloud
@@ -64,6 +66,34 @@ module Google
64
66
  end
65
67
  default_config = Client::Configuration.new parent_config
66
68
 
69
+ default_config.rpcs.create_content.timeout = 60.0
70
+
71
+ default_config.rpcs.update_content.timeout = 60.0
72
+
73
+ default_config.rpcs.delete_content.timeout = 60.0
74
+
75
+ default_config.rpcs.get_content.timeout = 60.0
76
+ default_config.rpcs.get_content.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config.rpcs.get_iam_policy.timeout = 60.0
81
+ default_config.rpcs.get_iam_policy.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config.rpcs.set_iam_policy.timeout = 60.0
86
+
87
+ default_config.rpcs.test_iam_permissions.timeout = 60.0
88
+ default_config.rpcs.test_iam_permissions.retry_policy = {
89
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
90
+ }
91
+
92
+ default_config.rpcs.list_content.timeout = 60.0
93
+ default_config.rpcs.list_content.retry_policy = {
94
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
95
+ }
96
+
67
97
  default_config
68
98
  end
69
99
  yield @configure if block_given?
@@ -133,6 +163,18 @@ module Google
133
163
  @quota_project_id = @config.quota_project
134
164
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
135
165
 
166
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
167
+ config.credentials = credentials
168
+ config.quota_project = @quota_project_id
169
+ config.endpoint = @config.endpoint
170
+ end
171
+
172
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
173
+ config.credentials = credentials
174
+ config.quota_project = @quota_project_id
175
+ config.endpoint = @config.endpoint
176
+ end
177
+
136
178
  @content_service_stub = ::Gapic::ServiceStub.new(
137
179
  ::Google::Cloud::Dataplex::V1::ContentService::Stub,
138
180
  credentials: credentials,
@@ -142,6 +184,20 @@ module Google
142
184
  )
143
185
  end
144
186
 
187
+ ##
188
+ # Get the associated client for mix-in of the Locations.
189
+ #
190
+ # @return [Google::Cloud::Location::Locations::Client]
191
+ #
192
+ attr_reader :location_client
193
+
194
+ ##
195
+ # Get the associated client for mix-in of the IAMPolicy.
196
+ #
197
+ # @return [Google::Iam::V1::IAMPolicy::Client]
198
+ #
199
+ attr_reader :iam_policy_client
200
+
145
201
  # Service calls
146
202
 
147
203
  ##
@@ -500,6 +556,301 @@ module Google
500
556
  raise ::Google::Cloud::Error.from_error(e)
501
557
  end
502
558
 
559
+ ##
560
+ # Gets the access control policy for a contentitem resource. A `NOT_FOUND`
561
+ # error is returned if the resource does not exist. An empty policy is
562
+ # returned if the resource exists but does not have a policy set on it.
563
+ #
564
+ # Caller must have Google IAM `dataplex.content.getIamPolicy` permission
565
+ # on the resource.
566
+ #
567
+ # @overload get_iam_policy(request, options = nil)
568
+ # Pass arguments to `get_iam_policy` via a request object, either of type
569
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
570
+ #
571
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
572
+ # A request object representing the call parameters. Required. To specify no
573
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
574
+ # @param options [::Gapic::CallOptions, ::Hash]
575
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
576
+ #
577
+ # @overload get_iam_policy(resource: nil, options: nil)
578
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
579
+ # least one keyword argument is required. To specify no parameters, or to keep all
580
+ # the default parameter values, pass an empty Hash as a request object (see above).
581
+ #
582
+ # @param resource [::String]
583
+ # REQUIRED: The resource for which the policy is being requested.
584
+ # See the operation documentation for the appropriate value for this field.
585
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
586
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
587
+ # `GetIamPolicy`.
588
+ #
589
+ # @yield [response, operation] Access the result along with the RPC operation
590
+ # @yieldparam response [::Google::Iam::V1::Policy]
591
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
592
+ #
593
+ # @return [::Google::Iam::V1::Policy]
594
+ #
595
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
596
+ #
597
+ # @example Basic example
598
+ # require "google/cloud/dataplex/v1"
599
+ #
600
+ # # Create a client object. The client can be reused for multiple calls.
601
+ # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
602
+ #
603
+ # # Create a request. To set request fields, pass in keyword arguments.
604
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
605
+ #
606
+ # # Call the get_iam_policy method.
607
+ # result = client.get_iam_policy request
608
+ #
609
+ # # The returned object is of type Google::Iam::V1::Policy.
610
+ # p result
611
+ #
612
+ def get_iam_policy request, options = nil
613
+ raise ::ArgumentError, "request must be provided" if request.nil?
614
+
615
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
616
+
617
+ # Converts hash and nil to an options object
618
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
619
+
620
+ # Customize the options with defaults
621
+ metadata = @config.rpcs.get_iam_policy.metadata.to_h
622
+
623
+ # Set x-goog-api-client and x-goog-user-project headers
624
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
625
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
626
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
627
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
628
+
629
+ header_params = {}
630
+ if request.resource
631
+ header_params["resource"] = request.resource
632
+ end
633
+
634
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
635
+ metadata[:"x-goog-request-params"] ||= request_params_header
636
+
637
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
638
+ metadata: metadata,
639
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
640
+
641
+ options.apply_defaults timeout: @config.timeout,
642
+ metadata: @config.metadata,
643
+ retry_policy: @config.retry_policy
644
+
645
+ @content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
646
+ yield response, operation if block_given?
647
+ return response
648
+ end
649
+ rescue ::GRPC::BadStatus => e
650
+ raise ::Google::Cloud::Error.from_error(e)
651
+ end
652
+
653
+ ##
654
+ # Sets the access control policy on the specified contentitem resource.
655
+ # Replaces any existing policy.
656
+ #
657
+ # Caller must have Google IAM `dataplex.content.setIamPolicy` permission
658
+ # on the resource.
659
+ #
660
+ # @overload set_iam_policy(request, options = nil)
661
+ # Pass arguments to `set_iam_policy` via a request object, either of type
662
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
663
+ #
664
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
665
+ # A request object representing the call parameters. Required. To specify no
666
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
667
+ # @param options [::Gapic::CallOptions, ::Hash]
668
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
669
+ #
670
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
671
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
672
+ # least one keyword argument is required. To specify no parameters, or to keep all
673
+ # the default parameter values, pass an empty Hash as a request object (see above).
674
+ #
675
+ # @param resource [::String]
676
+ # REQUIRED: The resource for which the policy is being specified.
677
+ # See the operation documentation for the appropriate value for this field.
678
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
679
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
680
+ # the policy is limited to a few 10s of KB. An empty policy is a
681
+ # valid policy but certain Cloud Platform services (such as Projects)
682
+ # might reject them.
683
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
684
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
685
+ # the fields in the mask will be modified. If no mask is provided, the
686
+ # following default mask is used:
687
+ #
688
+ # `paths: "bindings, etag"`
689
+ #
690
+ # @yield [response, operation] Access the result along with the RPC operation
691
+ # @yieldparam response [::Google::Iam::V1::Policy]
692
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
693
+ #
694
+ # @return [::Google::Iam::V1::Policy]
695
+ #
696
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
697
+ #
698
+ # @example Basic example
699
+ # require "google/cloud/dataplex/v1"
700
+ #
701
+ # # Create a client object. The client can be reused for multiple calls.
702
+ # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
703
+ #
704
+ # # Create a request. To set request fields, pass in keyword arguments.
705
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
706
+ #
707
+ # # Call the set_iam_policy method.
708
+ # result = client.set_iam_policy request
709
+ #
710
+ # # The returned object is of type Google::Iam::V1::Policy.
711
+ # p result
712
+ #
713
+ def set_iam_policy request, options = nil
714
+ raise ::ArgumentError, "request must be provided" if request.nil?
715
+
716
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
717
+
718
+ # Converts hash and nil to an options object
719
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
720
+
721
+ # Customize the options with defaults
722
+ metadata = @config.rpcs.set_iam_policy.metadata.to_h
723
+
724
+ # Set x-goog-api-client and x-goog-user-project headers
725
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
726
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
727
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
728
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
729
+
730
+ header_params = {}
731
+ if request.resource
732
+ header_params["resource"] = request.resource
733
+ end
734
+
735
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
736
+ metadata[:"x-goog-request-params"] ||= request_params_header
737
+
738
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
739
+ metadata: metadata,
740
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
741
+
742
+ options.apply_defaults timeout: @config.timeout,
743
+ metadata: @config.metadata,
744
+ retry_policy: @config.retry_policy
745
+
746
+ @content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
747
+ yield response, operation if block_given?
748
+ return response
749
+ end
750
+ rescue ::GRPC::BadStatus => e
751
+ raise ::Google::Cloud::Error.from_error(e)
752
+ end
753
+
754
+ ##
755
+ # Returns the caller's permissions on a resource.
756
+ # If the resource does not exist, an empty set of
757
+ # permissions is returned (a `NOT_FOUND` error is not returned).
758
+ #
759
+ # A caller is not required to have Google IAM permission to make this
760
+ # request.
761
+ #
762
+ # Note: This operation is designed to be used for building permission-aware
763
+ # UIs and command-line tools, not for authorization checking. This operation
764
+ # may "fail open" without warning.
765
+ #
766
+ # @overload test_iam_permissions(request, options = nil)
767
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
768
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
769
+ #
770
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
771
+ # A request object representing the call parameters. Required. To specify no
772
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
773
+ # @param options [::Gapic::CallOptions, ::Hash]
774
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
775
+ #
776
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
777
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
778
+ # least one keyword argument is required. To specify no parameters, or to keep all
779
+ # the default parameter values, pass an empty Hash as a request object (see above).
780
+ #
781
+ # @param resource [::String]
782
+ # REQUIRED: The resource for which the policy detail is being requested.
783
+ # See the operation documentation for the appropriate value for this field.
784
+ # @param permissions [::Array<::String>]
785
+ # The set of permissions to check for the `resource`. Permissions with
786
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
787
+ # information see
788
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
789
+ #
790
+ # @yield [response, operation] Access the result along with the RPC operation
791
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
792
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
793
+ #
794
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
795
+ #
796
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
797
+ #
798
+ # @example Basic example
799
+ # require "google/cloud/dataplex/v1"
800
+ #
801
+ # # Create a client object. The client can be reused for multiple calls.
802
+ # client = Google::Cloud::Dataplex::V1::ContentService::Client.new
803
+ #
804
+ # # Create a request. To set request fields, pass in keyword arguments.
805
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
806
+ #
807
+ # # Call the test_iam_permissions method.
808
+ # result = client.test_iam_permissions request
809
+ #
810
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
811
+ # p result
812
+ #
813
+ def test_iam_permissions request, options = nil
814
+ raise ::ArgumentError, "request must be provided" if request.nil?
815
+
816
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
817
+
818
+ # Converts hash and nil to an options object
819
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
820
+
821
+ # Customize the options with defaults
822
+ metadata = @config.rpcs.test_iam_permissions.metadata.to_h
823
+
824
+ # Set x-goog-api-client and x-goog-user-project headers
825
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
826
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
827
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
828
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
829
+
830
+ header_params = {}
831
+ if request.resource
832
+ header_params["resource"] = request.resource
833
+ end
834
+
835
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
836
+ metadata[:"x-goog-request-params"] ||= request_params_header
837
+
838
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
839
+ metadata: metadata,
840
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
841
+
842
+ options.apply_defaults timeout: @config.timeout,
843
+ metadata: @config.metadata,
844
+ retry_policy: @config.retry_policy
845
+
846
+ @content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
847
+ yield response, operation if block_given?
848
+ return response
849
+ end
850
+ rescue ::GRPC::BadStatus => e
851
+ raise ::Google::Cloud::Error.from_error(e)
852
+ end
853
+
503
854
  ##
504
855
  # List content.
505
856
  #
@@ -768,6 +1119,21 @@ module Google
768
1119
  #
769
1120
  attr_reader :get_content
770
1121
  ##
1122
+ # RPC-specific configuration for `get_iam_policy`
1123
+ # @return [::Gapic::Config::Method]
1124
+ #
1125
+ attr_reader :get_iam_policy
1126
+ ##
1127
+ # RPC-specific configuration for `set_iam_policy`
1128
+ # @return [::Gapic::Config::Method]
1129
+ #
1130
+ attr_reader :set_iam_policy
1131
+ ##
1132
+ # RPC-specific configuration for `test_iam_permissions`
1133
+ # @return [::Gapic::Config::Method]
1134
+ #
1135
+ attr_reader :test_iam_permissions
1136
+ ##
771
1137
  # RPC-specific configuration for `list_content`
772
1138
  # @return [::Gapic::Config::Method]
773
1139
  #
@@ -783,6 +1149,12 @@ module Google
783
1149
  @delete_content = ::Gapic::Config::Method.new delete_content_config
784
1150
  get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content
785
1151
  @get_content = ::Gapic::Config::Method.new get_content_config
1152
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1153
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1154
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1155
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1156
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1157
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
786
1158
  list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content
787
1159
  @list_content = ::Gapic::Config::Method.new list_content_config
788
1160
 
@@ -41,6 +41,30 @@ module Google
41
41
  rpc :DeleteContent, ::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Google::Protobuf::Empty
42
42
  # Get a content resource.
43
43
  rpc :GetContent, ::Google::Cloud::Dataplex::V1::GetContentRequest, ::Google::Cloud::Dataplex::V1::Content
44
+ # Gets the access control policy for a contentitem resource. A `NOT_FOUND`
45
+ # error is returned if the resource does not exist. An empty policy is
46
+ # returned if the resource exists but does not have a policy set on it.
47
+ #
48
+ # Caller must have Google IAM `dataplex.content.getIamPolicy` permission
49
+ # on the resource.
50
+ rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
51
+ # Sets the access control policy on the specified contentitem resource.
52
+ # Replaces any existing policy.
53
+ #
54
+ # Caller must have Google IAM `dataplex.content.setIamPolicy` permission
55
+ # on the resource.
56
+ rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
57
+ # Returns the caller's permissions on a resource.
58
+ # If the resource does not exist, an empty set of
59
+ # permissions is returned (a `NOT_FOUND` error is not returned).
60
+ #
61
+ # A caller is not required to have Google IAM permission to make this
62
+ # request.
63
+ #
64
+ # Note: This operation is designed to be used for building permission-aware
65
+ # UIs and command-line tools, not for authorization checking. This operation
66
+ # may "fail open" without warning.
67
+ rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
44
68
  # List content.
45
69
  rpc :ListContent, ::Google::Cloud::Dataplex::V1::ListContentRequest, ::Google::Cloud::Dataplex::V1::ListContentResponse
46
70
  end
@@ -18,6 +18,8 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/dataplex/v1/service_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1/iam_policy"
21
23
 
22
24
  module Google
23
25
  module Cloud
@@ -29,9 +31,9 @@ module Google
29
31
  #
30
32
  # Dataplex service provides data lakes as a service. The primary resources
31
33
  # offered by this service are Lakes, Zones and Assets which collectively allow
32
- # a data adminstrator to organize, manage, secure and catalog data across their
33
- # organization located across cloud projects in a variety of storage systems
34
- # including Cloud Storage and BigQuery.
34
+ # a data administrator to organize, manage, secure and catalog data across
35
+ # their organization located across cloud projects in a variety of storage
36
+ # systems including Cloud Storage and BigQuery.
35
37
  #
36
38
  class Client
37
39
  include Paths
@@ -159,6 +161,22 @@ module Google
159
161
 
160
162
  default_config.rpcs.cancel_job.timeout = 60.0
161
163
 
164
+ default_config.rpcs.create_environment.timeout = 60.0
165
+
166
+ default_config.rpcs.update_environment.timeout = 60.0
167
+
168
+ default_config.rpcs.delete_environment.timeout = 60.0
169
+
170
+ default_config.rpcs.list_environments.timeout = 60.0
171
+ default_config.rpcs.list_environments.retry_policy = {
172
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
173
+ }
174
+
175
+ default_config.rpcs.get_environment.timeout = 60.0
176
+ default_config.rpcs.get_environment.retry_policy = {
177
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
178
+ }
179
+
162
180
  default_config
163
181
  end
164
182
  yield @configure if block_given?
@@ -234,6 +252,18 @@ module Google
234
252
  config.endpoint = @config.endpoint
235
253
  end
236
254
 
255
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
256
+ config.credentials = credentials
257
+ config.quota_project = @quota_project_id
258
+ config.endpoint = @config.endpoint
259
+ end
260
+
261
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
262
+ config.credentials = credentials
263
+ config.quota_project = @quota_project_id
264
+ config.endpoint = @config.endpoint
265
+ end
266
+
237
267
  @dataplex_service_stub = ::Gapic::ServiceStub.new(
238
268
  ::Google::Cloud::Dataplex::V1::DataplexService::Stub,
239
269
  credentials: credentials,
@@ -250,6 +280,20 @@ module Google
250
280
  #
251
281
  attr_reader :operations_client
252
282
 
283
+ ##
284
+ # Get the associated client for mix-in of the Locations.
285
+ #
286
+ # @return [Google::Cloud::Location::Locations::Client]
287
+ #
288
+ attr_reader :location_client
289
+
290
+ ##
291
+ # Get the associated client for mix-in of the IAMPolicy.
292
+ #
293
+ # @return [Google::Iam::V1::IAMPolicy::Client]
294
+ #
295
+ attr_reader :iam_policy_client
296
+
253
297
  # Service calls
254
298
 
255
299
  ##
@@ -481,7 +525,7 @@ module Google
481
525
  #
482
526
  # @param name [::String]
483
527
  # Required. The resource name of the lake:
484
- # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
528
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
485
529
  #
486
530
  # @yield [response, operation] Access the result along with the RPC operation
487
531
  # @yieldparam response [::Gapic::Operation]
@@ -767,7 +811,7 @@ module Google
767
811
  #
768
812
  # @param parent [::String]
769
813
  # Required. The resource name of the parent lake:
770
- # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
814
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
771
815
  # @param page_size [::Integer]
772
816
  # Optional. Maximum number of actions to return. The service may return fewer than this
773
817
  # value. If unspecified, at most 10 actions will be returned. The maximum
@@ -1465,7 +1509,7 @@ module Google
1465
1509
  #
1466
1510
  # @param parent [::String]
1467
1511
  # Required. The resource name of the parent zone:
1468
- # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`
1512
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
1469
1513
  # @param asset_id [::String]
1470
1514
  # Required. Asset identifier.
1471
1515
  # This ID will be used to generate names such as table names when publishing
@@ -2460,7 +2504,7 @@ module Google
2460
2504
  #
2461
2505
  # @param name [::String]
2462
2506
  # Required. The resource name of the task:
2463
- # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`
2507
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.
2464
2508
  #
2465
2509
  # @yield [response, operation] Access the result along with the RPC operation
2466
2510
  # @yieldparam response [::Google::Cloud::Dataplex::V1::Task]
@@ -2820,7 +2864,7 @@ module Google
2820
2864
  #
2821
2865
  # @param parent [::String]
2822
2866
  # Required. The resource name of the parent lake:
2823
- # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}
2867
+ # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
2824
2868
  # @param environment_id [::String]
2825
2869
  # Required. Environment identifier.
2826
2870
  # * Must contain only lowercase letters, numbers and hyphens.
@@ -3026,7 +3070,7 @@ module Google
3026
3070
  #
3027
3071
  # @param name [::String]
3028
3072
  # Required. The resource name of the environment:
3029
- # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environments/\\{environment_id}`
3073
+ # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
3030
3074
  #
3031
3075
  # @yield [response, operation] Access the result along with the RPC operation
3032
3076
  # @yieldparam response [::Gapic::Operation]
@@ -3120,7 +3164,7 @@ module Google
3120
3164
  #
3121
3165
  # @param parent [::String]
3122
3166
  # Required. The resource name of the parent lake:
3123
- # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}
3167
+ # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
3124
3168
  # @param page_size [::Integer]
3125
3169
  # Optional. Maximum number of environments to return. The service may return fewer than
3126
3170
  # this value. If unspecified, at most 10 environments will be returned. The
@@ -3226,7 +3270,7 @@ module Google
3226
3270
  #
3227
3271
  # @param name [::String]
3228
3272
  # Required. The resource name of the environment:
3229
- # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environments/\\{environment_id}
3273
+ # `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
3230
3274
  #
3231
3275
  # @yield [response, operation] Access the result along with the RPC operation
3232
3276
  # @yieldparam response [::Google::Cloud::Dataplex::V1::Environment]
@@ -3305,14 +3349,14 @@ module Google
3305
3349
  # @param options [::Gapic::CallOptions, ::Hash]
3306
3350
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3307
3351
  #
3308
- # @overload list_sessions(parent: nil, page_size: nil, page_token: nil)
3352
+ # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil)
3309
3353
  # Pass arguments to `list_sessions` via keyword arguments. Note that at
3310
3354
  # least one keyword argument is required. To specify no parameters, or to keep all
3311
3355
  # the default parameter values, pass an empty Hash as a request object (see above).
3312
3356
  #
3313
3357
  # @param parent [::String]
3314
3358
  # Required. The resource name of the parent environment:
3315
- # projects/\\{project_number}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id}
3359
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.
3316
3360
  # @param page_size [::Integer]
3317
3361
  # Optional. Maximum number of sessions to return. The service may return fewer than
3318
3362
  # this value. If unspecified, at most 10 sessions will be returned. The
@@ -3322,6 +3366,16 @@ module Google
3322
3366
  # retrieve the subsequent page. When paginating, all other parameters
3323
3367
  # provided to `ListSessions` must match the call that provided the page
3324
3368
  # token.
3369
+ # @param filter [::String]
3370
+ # Optional. Filter request. The following `mode` filter is supported to return only the
3371
+ # sessions belonging to the requester when the mode is USER and return
3372
+ # sessions of all the users when the mode is ADMIN. When no filter is sent
3373
+ # default to USER mode.
3374
+ # NOTE: When the mode is ADMIN, the requester should have
3375
+ # `dataplex.environments.listAllSessions` permission to list all sessions,
3376
+ # in absence of the permission, the request fails.
3377
+ #
3378
+ # mode = ADMIN | USER
3325
3379
  #
3326
3380
  # @yield [response, operation] Access the result along with the RPC operation
3327
3381
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Session>]