google-cloud-iap-v1 0.1.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +6 -1
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/client.rb +512 -2
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service/paths.rb +69 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_admin_service.rb +1 -0
- data/lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb +6 -5
- data/lib/google/cloud/iap/v1/service_pb.rb +61 -2
- data/lib/google/cloud/iap/v1/service_services_pb.rb +18 -5
- data/lib/google/cloud/iap/v1/version.rb +1 -1
- data/lib/google/cloud/iap/v1.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/iap/v1/service.rb +164 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +8 -1
- data/proto_docs/google/iam/v1/options.rb +14 -4
- data/proto_docs/google/iam/v1/policy.rb +208 -38
- data/proto_docs/google/protobuf/duration.rb +98 -0
- metadata +9 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d0e2c3423feead8e29e5b6528c55edbbdf659c4c10919f6aafb0797ed31484a
|
4
|
+
data.tar.gz: 3499c5349aa082a92568e12607764fb8ffd8de52db2060233c14f8be8e295a6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c9e63413d86964952f6ca3d0119d06b8f0c0f8863394366a518b5b4b91e25ca94f26fc1deb459b3f8c2398e68758a6975174fa5d86359a4fb6640c87c660960
|
7
|
+
data.tar.gz: 8746f1f52c6beca3e631ad05f5bad0d0ae261c1b94d4cdb11e20ee4a200b6bb026748845ccf28995fd9d760885691e6e97d3dc96bea7561d7ac07327a57e278e
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Iam::V1::SetIamPolicyRequest.new # (request fields as keywor
|
|
37
37
|
response = client.set_iam_policy request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-iap-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/iap/)
|
@@ -69,6 +69,11 @@ module GRPC
|
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
+
|
73
|
+
## Google Cloud Samples
|
74
|
+
|
75
|
+
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
|
+
|
72
77
|
## Supported Ruby Versions
|
73
78
|
|
74
79
|
This library is supported on Ruby 2.5+.
|
@@ -30,6 +30,8 @@ module Google
|
|
30
30
|
# APIs for Identity-Aware Proxy Admin configurations.
|
31
31
|
#
|
32
32
|
class Client
|
33
|
+
include Paths
|
34
|
+
|
33
35
|
# @private
|
34
36
|
attr_reader :identity_aware_proxy_admin_service_stub
|
35
37
|
|
@@ -160,7 +162,7 @@ module Google
|
|
160
162
|
# @param options [::Gapic::CallOptions, ::Hash]
|
161
163
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
162
164
|
#
|
163
|
-
# @overload set_iam_policy(resource: nil, policy: nil)
|
165
|
+
# @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
|
164
166
|
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
165
167
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
166
168
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -173,6 +175,12 @@ module Google
|
|
173
175
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
174
176
|
# valid policy but certain Cloud Platform services (such as Projects)
|
175
177
|
# might reject them.
|
178
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
179
|
+
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
180
|
+
# the fields in the mask will be modified. If no mask is provided, the
|
181
|
+
# following default mask is used:
|
182
|
+
#
|
183
|
+
# `paths: "bindings, etag"`
|
176
184
|
#
|
177
185
|
# @yield [response, operation] Access the result along with the RPC operation
|
178
186
|
# @yieldparam response [::Google::Iam::V1::Policy]
|
@@ -264,7 +272,7 @@ module Google
|
|
264
272
|
# See the operation documentation for the appropriate value for this field.
|
265
273
|
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
266
274
|
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
267
|
-
# `GetIamPolicy`.
|
275
|
+
# `GetIamPolicy`.
|
268
276
|
#
|
269
277
|
# @yield [response, operation] Access the result along with the RPC operation
|
270
278
|
# @yieldparam response [::Google::Iam::V1::Policy]
|
@@ -603,6 +611,473 @@ module Google
|
|
603
611
|
raise ::Google::Cloud::Error.from_error(e)
|
604
612
|
end
|
605
613
|
|
614
|
+
##
|
615
|
+
# Lists the existing TunnelDestGroups. To group across all locations, use a
|
616
|
+
# `-` as the location ID. For example:
|
617
|
+
# `/v1/projects/123/iap_tunnel/locations/-/destGroups`
|
618
|
+
#
|
619
|
+
# @overload list_tunnel_dest_groups(request, options = nil)
|
620
|
+
# Pass arguments to `list_tunnel_dest_groups` via a request object, either of type
|
621
|
+
# {::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest} or an equivalent Hash.
|
622
|
+
#
|
623
|
+
# @param request [::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest, ::Hash]
|
624
|
+
# A request object representing the call parameters. Required. To specify no
|
625
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
626
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
627
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
628
|
+
#
|
629
|
+
# @overload list_tunnel_dest_groups(parent: nil, page_size: nil, page_token: nil)
|
630
|
+
# Pass arguments to `list_tunnel_dest_groups` via keyword arguments. Note that at
|
631
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
632
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
633
|
+
#
|
634
|
+
# @param parent [::String]
|
635
|
+
# Required. Google Cloud Project ID and location.
|
636
|
+
# In the following format:
|
637
|
+
# `projects/{project_number/id}/iap_tunnel/locations/{location}`.
|
638
|
+
# A `-` can be used for the location to group across all locations.
|
639
|
+
# @param page_size [::Integer]
|
640
|
+
# The maximum number of groups to return. The service might return fewer than
|
641
|
+
# this value.
|
642
|
+
# If unspecified, at most 100 groups are returned.
|
643
|
+
# The maximum value is 1000; values above 1000 are coerced to 1000.
|
644
|
+
# @param page_token [::String]
|
645
|
+
# A page token, received from a previous `ListTunnelDestGroups`
|
646
|
+
# call. Provide this to retrieve the subsequent page.
|
647
|
+
#
|
648
|
+
# When paginating, all other parameters provided to
|
649
|
+
# `ListTunnelDestGroups` must match the call that provided the page
|
650
|
+
# token.
|
651
|
+
#
|
652
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
653
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::TunnelDestGroup>]
|
654
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
655
|
+
#
|
656
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::TunnelDestGroup>]
|
657
|
+
#
|
658
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
659
|
+
#
|
660
|
+
# @example Basic example
|
661
|
+
# require "google/cloud/iap/v1"
|
662
|
+
#
|
663
|
+
# # Create a client object. The client can be reused for multiple calls.
|
664
|
+
# client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
|
665
|
+
#
|
666
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
667
|
+
# request = Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest.new
|
668
|
+
#
|
669
|
+
# # Call the list_tunnel_dest_groups method.
|
670
|
+
# result = client.list_tunnel_dest_groups request
|
671
|
+
#
|
672
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
673
|
+
# # iterate over all elements by calling #each, and the enumerable
|
674
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
675
|
+
# # methods are also available for managing paging directly.
|
676
|
+
# result.each do |response|
|
677
|
+
# # Each element is of type ::Google::Cloud::Iap::V1::TunnelDestGroup.
|
678
|
+
# p response
|
679
|
+
# end
|
680
|
+
#
|
681
|
+
def list_tunnel_dest_groups request, options = nil
|
682
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
683
|
+
|
684
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest
|
685
|
+
|
686
|
+
# Converts hash and nil to an options object
|
687
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
688
|
+
|
689
|
+
# Customize the options with defaults
|
690
|
+
metadata = @config.rpcs.list_tunnel_dest_groups.metadata.to_h
|
691
|
+
|
692
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
693
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
694
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
695
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
696
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
697
|
+
|
698
|
+
header_params = {}
|
699
|
+
if request.parent
|
700
|
+
header_params["parent"] = request.parent
|
701
|
+
end
|
702
|
+
|
703
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
704
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
705
|
+
|
706
|
+
options.apply_defaults timeout: @config.rpcs.list_tunnel_dest_groups.timeout,
|
707
|
+
metadata: metadata,
|
708
|
+
retry_policy: @config.rpcs.list_tunnel_dest_groups.retry_policy
|
709
|
+
|
710
|
+
options.apply_defaults timeout: @config.timeout,
|
711
|
+
metadata: @config.metadata,
|
712
|
+
retry_policy: @config.retry_policy
|
713
|
+
|
714
|
+
@identity_aware_proxy_admin_service_stub.call_rpc :list_tunnel_dest_groups, request, options: options do |response, operation|
|
715
|
+
response = ::Gapic::PagedEnumerable.new @identity_aware_proxy_admin_service_stub, :list_tunnel_dest_groups, request, response, operation, options
|
716
|
+
yield response, operation if block_given?
|
717
|
+
return response
|
718
|
+
end
|
719
|
+
rescue ::GRPC::BadStatus => e
|
720
|
+
raise ::Google::Cloud::Error.from_error(e)
|
721
|
+
end
|
722
|
+
|
723
|
+
##
|
724
|
+
# Creates a new TunnelDestGroup.
|
725
|
+
#
|
726
|
+
# @overload create_tunnel_dest_group(request, options = nil)
|
727
|
+
# Pass arguments to `create_tunnel_dest_group` via a request object, either of type
|
728
|
+
# {::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest} or an equivalent Hash.
|
729
|
+
#
|
730
|
+
# @param request [::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest, ::Hash]
|
731
|
+
# A request object representing the call parameters. Required. To specify no
|
732
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
733
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
734
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
735
|
+
#
|
736
|
+
# @overload create_tunnel_dest_group(parent: nil, tunnel_dest_group: nil, tunnel_dest_group_id: nil)
|
737
|
+
# Pass arguments to `create_tunnel_dest_group` via keyword arguments. Note that at
|
738
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
739
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
740
|
+
#
|
741
|
+
# @param parent [::String]
|
742
|
+
# Required. Google Cloud Project ID and location.
|
743
|
+
# In the following format:
|
744
|
+
# `projects/{project_number/id}/iap_tunnel/locations/{location}`.
|
745
|
+
# @param tunnel_dest_group [::Google::Cloud::Iap::V1::TunnelDestGroup, ::Hash]
|
746
|
+
# Required. The TunnelDestGroup to create.
|
747
|
+
# @param tunnel_dest_group_id [::String]
|
748
|
+
# Required. The ID to use for the TunnelDestGroup, which becomes the final component of
|
749
|
+
# the resource name.
|
750
|
+
#
|
751
|
+
# This value must be 4-63 characters, and valid characters
|
752
|
+
# are `[a-z][0-9]-`.
|
753
|
+
#
|
754
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
755
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::TunnelDestGroup]
|
756
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
757
|
+
#
|
758
|
+
# @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
|
759
|
+
#
|
760
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
761
|
+
#
|
762
|
+
# @example Basic example
|
763
|
+
# require "google/cloud/iap/v1"
|
764
|
+
#
|
765
|
+
# # Create a client object. The client can be reused for multiple calls.
|
766
|
+
# client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
|
767
|
+
#
|
768
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
769
|
+
# request = Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest.new
|
770
|
+
#
|
771
|
+
# # Call the create_tunnel_dest_group method.
|
772
|
+
# result = client.create_tunnel_dest_group request
|
773
|
+
#
|
774
|
+
# # The returned object is of type Google::Cloud::Iap::V1::TunnelDestGroup.
|
775
|
+
# p result
|
776
|
+
#
|
777
|
+
def create_tunnel_dest_group request, options = nil
|
778
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
779
|
+
|
780
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest
|
781
|
+
|
782
|
+
# Converts hash and nil to an options object
|
783
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
784
|
+
|
785
|
+
# Customize the options with defaults
|
786
|
+
metadata = @config.rpcs.create_tunnel_dest_group.metadata.to_h
|
787
|
+
|
788
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
789
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
790
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
791
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
792
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
793
|
+
|
794
|
+
header_params = {}
|
795
|
+
if request.parent
|
796
|
+
header_params["parent"] = request.parent
|
797
|
+
end
|
798
|
+
|
799
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
800
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
801
|
+
|
802
|
+
options.apply_defaults timeout: @config.rpcs.create_tunnel_dest_group.timeout,
|
803
|
+
metadata: metadata,
|
804
|
+
retry_policy: @config.rpcs.create_tunnel_dest_group.retry_policy
|
805
|
+
|
806
|
+
options.apply_defaults timeout: @config.timeout,
|
807
|
+
metadata: @config.metadata,
|
808
|
+
retry_policy: @config.retry_policy
|
809
|
+
|
810
|
+
@identity_aware_proxy_admin_service_stub.call_rpc :create_tunnel_dest_group, request, options: options do |response, operation|
|
811
|
+
yield response, operation if block_given?
|
812
|
+
return response
|
813
|
+
end
|
814
|
+
rescue ::GRPC::BadStatus => e
|
815
|
+
raise ::Google::Cloud::Error.from_error(e)
|
816
|
+
end
|
817
|
+
|
818
|
+
##
|
819
|
+
# Retrieves an existing TunnelDestGroup.
|
820
|
+
#
|
821
|
+
# @overload get_tunnel_dest_group(request, options = nil)
|
822
|
+
# Pass arguments to `get_tunnel_dest_group` via a request object, either of type
|
823
|
+
# {::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest} or an equivalent Hash.
|
824
|
+
#
|
825
|
+
# @param request [::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest, ::Hash]
|
826
|
+
# A request object representing the call parameters. Required. To specify no
|
827
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
828
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
829
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
830
|
+
#
|
831
|
+
# @overload get_tunnel_dest_group(name: nil)
|
832
|
+
# Pass arguments to `get_tunnel_dest_group` via keyword arguments. Note that at
|
833
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
834
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
835
|
+
#
|
836
|
+
# @param name [::String]
|
837
|
+
# Required. Name of the TunnelDestGroup to be fetched.
|
838
|
+
# In the following format:
|
839
|
+
# `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
|
840
|
+
#
|
841
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
842
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::TunnelDestGroup]
|
843
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
844
|
+
#
|
845
|
+
# @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
|
846
|
+
#
|
847
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
848
|
+
#
|
849
|
+
# @example Basic example
|
850
|
+
# require "google/cloud/iap/v1"
|
851
|
+
#
|
852
|
+
# # Create a client object. The client can be reused for multiple calls.
|
853
|
+
# client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
|
854
|
+
#
|
855
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
856
|
+
# request = Google::Cloud::Iap::V1::GetTunnelDestGroupRequest.new
|
857
|
+
#
|
858
|
+
# # Call the get_tunnel_dest_group method.
|
859
|
+
# result = client.get_tunnel_dest_group request
|
860
|
+
#
|
861
|
+
# # The returned object is of type Google::Cloud::Iap::V1::TunnelDestGroup.
|
862
|
+
# p result
|
863
|
+
#
|
864
|
+
def get_tunnel_dest_group request, options = nil
|
865
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
866
|
+
|
867
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest
|
868
|
+
|
869
|
+
# Converts hash and nil to an options object
|
870
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
871
|
+
|
872
|
+
# Customize the options with defaults
|
873
|
+
metadata = @config.rpcs.get_tunnel_dest_group.metadata.to_h
|
874
|
+
|
875
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
876
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
877
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
878
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
879
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
880
|
+
|
881
|
+
header_params = {}
|
882
|
+
if request.name
|
883
|
+
header_params["name"] = request.name
|
884
|
+
end
|
885
|
+
|
886
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
887
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
888
|
+
|
889
|
+
options.apply_defaults timeout: @config.rpcs.get_tunnel_dest_group.timeout,
|
890
|
+
metadata: metadata,
|
891
|
+
retry_policy: @config.rpcs.get_tunnel_dest_group.retry_policy
|
892
|
+
|
893
|
+
options.apply_defaults timeout: @config.timeout,
|
894
|
+
metadata: @config.metadata,
|
895
|
+
retry_policy: @config.retry_policy
|
896
|
+
|
897
|
+
@identity_aware_proxy_admin_service_stub.call_rpc :get_tunnel_dest_group, request, options: options do |response, operation|
|
898
|
+
yield response, operation if block_given?
|
899
|
+
return response
|
900
|
+
end
|
901
|
+
rescue ::GRPC::BadStatus => e
|
902
|
+
raise ::Google::Cloud::Error.from_error(e)
|
903
|
+
end
|
904
|
+
|
905
|
+
##
|
906
|
+
# Deletes a TunnelDestGroup.
|
907
|
+
#
|
908
|
+
# @overload delete_tunnel_dest_group(request, options = nil)
|
909
|
+
# Pass arguments to `delete_tunnel_dest_group` via a request object, either of type
|
910
|
+
# {::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest} or an equivalent Hash.
|
911
|
+
#
|
912
|
+
# @param request [::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest, ::Hash]
|
913
|
+
# A request object representing the call parameters. Required. To specify no
|
914
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
915
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
916
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
917
|
+
#
|
918
|
+
# @overload delete_tunnel_dest_group(name: nil)
|
919
|
+
# Pass arguments to `delete_tunnel_dest_group` via keyword arguments. Note that at
|
920
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
921
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
922
|
+
#
|
923
|
+
# @param name [::String]
|
924
|
+
# Required. Name of the TunnelDestGroup to delete.
|
925
|
+
# In the following format:
|
926
|
+
# `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
|
927
|
+
#
|
928
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
929
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
930
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
931
|
+
#
|
932
|
+
# @return [::Google::Protobuf::Empty]
|
933
|
+
#
|
934
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
935
|
+
#
|
936
|
+
# @example Basic example
|
937
|
+
# require "google/cloud/iap/v1"
|
938
|
+
#
|
939
|
+
# # Create a client object. The client can be reused for multiple calls.
|
940
|
+
# client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
|
941
|
+
#
|
942
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
943
|
+
# request = Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest.new
|
944
|
+
#
|
945
|
+
# # Call the delete_tunnel_dest_group method.
|
946
|
+
# result = client.delete_tunnel_dest_group request
|
947
|
+
#
|
948
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
949
|
+
# p result
|
950
|
+
#
|
951
|
+
def delete_tunnel_dest_group request, options = nil
|
952
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
953
|
+
|
954
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest
|
955
|
+
|
956
|
+
# Converts hash and nil to an options object
|
957
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
958
|
+
|
959
|
+
# Customize the options with defaults
|
960
|
+
metadata = @config.rpcs.delete_tunnel_dest_group.metadata.to_h
|
961
|
+
|
962
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
963
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
964
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
965
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
966
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
967
|
+
|
968
|
+
header_params = {}
|
969
|
+
if request.name
|
970
|
+
header_params["name"] = request.name
|
971
|
+
end
|
972
|
+
|
973
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
974
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
975
|
+
|
976
|
+
options.apply_defaults timeout: @config.rpcs.delete_tunnel_dest_group.timeout,
|
977
|
+
metadata: metadata,
|
978
|
+
retry_policy: @config.rpcs.delete_tunnel_dest_group.retry_policy
|
979
|
+
|
980
|
+
options.apply_defaults timeout: @config.timeout,
|
981
|
+
metadata: @config.metadata,
|
982
|
+
retry_policy: @config.retry_policy
|
983
|
+
|
984
|
+
@identity_aware_proxy_admin_service_stub.call_rpc :delete_tunnel_dest_group, request, options: options do |response, operation|
|
985
|
+
yield response, operation if block_given?
|
986
|
+
return response
|
987
|
+
end
|
988
|
+
rescue ::GRPC::BadStatus => e
|
989
|
+
raise ::Google::Cloud::Error.from_error(e)
|
990
|
+
end
|
991
|
+
|
992
|
+
##
|
993
|
+
# Updates a TunnelDestGroup.
|
994
|
+
#
|
995
|
+
# @overload update_tunnel_dest_group(request, options = nil)
|
996
|
+
# Pass arguments to `update_tunnel_dest_group` via a request object, either of type
|
997
|
+
# {::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest} or an equivalent Hash.
|
998
|
+
#
|
999
|
+
# @param request [::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest, ::Hash]
|
1000
|
+
# A request object representing the call parameters. Required. To specify no
|
1001
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1002
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1003
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1004
|
+
#
|
1005
|
+
# @overload update_tunnel_dest_group(tunnel_dest_group: nil, update_mask: nil)
|
1006
|
+
# Pass arguments to `update_tunnel_dest_group` via keyword arguments. Note that at
|
1007
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1008
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1009
|
+
#
|
1010
|
+
# @param tunnel_dest_group [::Google::Cloud::Iap::V1::TunnelDestGroup, ::Hash]
|
1011
|
+
# Required. The new values for the TunnelDestGroup.
|
1012
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1013
|
+
# A field mask that specifies which IAP settings to update.
|
1014
|
+
# If omitted, then all of the settings are updated. See
|
1015
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
1016
|
+
#
|
1017
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1018
|
+
# @yieldparam response [::Google::Cloud::Iap::V1::TunnelDestGroup]
|
1019
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1020
|
+
#
|
1021
|
+
# @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
|
1022
|
+
#
|
1023
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1024
|
+
#
|
1025
|
+
# @example Basic example
|
1026
|
+
# require "google/cloud/iap/v1"
|
1027
|
+
#
|
1028
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1029
|
+
# client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
|
1030
|
+
#
|
1031
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1032
|
+
# request = Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest.new
|
1033
|
+
#
|
1034
|
+
# # Call the update_tunnel_dest_group method.
|
1035
|
+
# result = client.update_tunnel_dest_group request
|
1036
|
+
#
|
1037
|
+
# # The returned object is of type Google::Cloud::Iap::V1::TunnelDestGroup.
|
1038
|
+
# p result
|
1039
|
+
#
|
1040
|
+
def update_tunnel_dest_group request, options = nil
|
1041
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1042
|
+
|
1043
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest
|
1044
|
+
|
1045
|
+
# Converts hash and nil to an options object
|
1046
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1047
|
+
|
1048
|
+
# Customize the options with defaults
|
1049
|
+
metadata = @config.rpcs.update_tunnel_dest_group.metadata.to_h
|
1050
|
+
|
1051
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1052
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1053
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1054
|
+
gapic_version: ::Google::Cloud::Iap::V1::VERSION
|
1055
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1056
|
+
|
1057
|
+
header_params = {}
|
1058
|
+
if request.tunnel_dest_group&.name
|
1059
|
+
header_params["tunnel_dest_group.name"] = request.tunnel_dest_group.name
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1063
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1064
|
+
|
1065
|
+
options.apply_defaults timeout: @config.rpcs.update_tunnel_dest_group.timeout,
|
1066
|
+
metadata: metadata,
|
1067
|
+
retry_policy: @config.rpcs.update_tunnel_dest_group.retry_policy
|
1068
|
+
|
1069
|
+
options.apply_defaults timeout: @config.timeout,
|
1070
|
+
metadata: @config.metadata,
|
1071
|
+
retry_policy: @config.retry_policy
|
1072
|
+
|
1073
|
+
@identity_aware_proxy_admin_service_stub.call_rpc :update_tunnel_dest_group, request, options: options do |response, operation|
|
1074
|
+
yield response, operation if block_given?
|
1075
|
+
return response
|
1076
|
+
end
|
1077
|
+
rescue ::GRPC::BadStatus => e
|
1078
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1079
|
+
end
|
1080
|
+
|
606
1081
|
##
|
607
1082
|
# Configuration class for the IdentityAwareProxyAdminService API.
|
608
1083
|
#
|
@@ -763,6 +1238,31 @@ module Google
|
|
763
1238
|
# @return [::Gapic::Config::Method]
|
764
1239
|
#
|
765
1240
|
attr_reader :update_iap_settings
|
1241
|
+
##
|
1242
|
+
# RPC-specific configuration for `list_tunnel_dest_groups`
|
1243
|
+
# @return [::Gapic::Config::Method]
|
1244
|
+
#
|
1245
|
+
attr_reader :list_tunnel_dest_groups
|
1246
|
+
##
|
1247
|
+
# RPC-specific configuration for `create_tunnel_dest_group`
|
1248
|
+
# @return [::Gapic::Config::Method]
|
1249
|
+
#
|
1250
|
+
attr_reader :create_tunnel_dest_group
|
1251
|
+
##
|
1252
|
+
# RPC-specific configuration for `get_tunnel_dest_group`
|
1253
|
+
# @return [::Gapic::Config::Method]
|
1254
|
+
#
|
1255
|
+
attr_reader :get_tunnel_dest_group
|
1256
|
+
##
|
1257
|
+
# RPC-specific configuration for `delete_tunnel_dest_group`
|
1258
|
+
# @return [::Gapic::Config::Method]
|
1259
|
+
#
|
1260
|
+
attr_reader :delete_tunnel_dest_group
|
1261
|
+
##
|
1262
|
+
# RPC-specific configuration for `update_tunnel_dest_group`
|
1263
|
+
# @return [::Gapic::Config::Method]
|
1264
|
+
#
|
1265
|
+
attr_reader :update_tunnel_dest_group
|
766
1266
|
|
767
1267
|
# @private
|
768
1268
|
def initialize parent_rpcs = nil
|
@@ -776,6 +1276,16 @@ module Google
|
|
776
1276
|
@get_iap_settings = ::Gapic::Config::Method.new get_iap_settings_config
|
777
1277
|
update_iap_settings_config = parent_rpcs.update_iap_settings if parent_rpcs.respond_to? :update_iap_settings
|
778
1278
|
@update_iap_settings = ::Gapic::Config::Method.new update_iap_settings_config
|
1279
|
+
list_tunnel_dest_groups_config = parent_rpcs.list_tunnel_dest_groups if parent_rpcs.respond_to? :list_tunnel_dest_groups
|
1280
|
+
@list_tunnel_dest_groups = ::Gapic::Config::Method.new list_tunnel_dest_groups_config
|
1281
|
+
create_tunnel_dest_group_config = parent_rpcs.create_tunnel_dest_group if parent_rpcs.respond_to? :create_tunnel_dest_group
|
1282
|
+
@create_tunnel_dest_group = ::Gapic::Config::Method.new create_tunnel_dest_group_config
|
1283
|
+
get_tunnel_dest_group_config = parent_rpcs.get_tunnel_dest_group if parent_rpcs.respond_to? :get_tunnel_dest_group
|
1284
|
+
@get_tunnel_dest_group = ::Gapic::Config::Method.new get_tunnel_dest_group_config
|
1285
|
+
delete_tunnel_dest_group_config = parent_rpcs.delete_tunnel_dest_group if parent_rpcs.respond_to? :delete_tunnel_dest_group
|
1286
|
+
@delete_tunnel_dest_group = ::Gapic::Config::Method.new delete_tunnel_dest_group_config
|
1287
|
+
update_tunnel_dest_group_config = parent_rpcs.update_tunnel_dest_group if parent_rpcs.respond_to? :update_tunnel_dest_group
|
1288
|
+
@update_tunnel_dest_group = ::Gapic::Config::Method.new update_tunnel_dest_group_config
|
779
1289
|
|
780
1290
|
yield self if block_given?
|
781
1291
|
end
|