class Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client
Client
for the IdentityAwareProxyOAuthService
service.
API to programmatically create, list and retrieve Identity Aware Proxy (IAP) OAuth brands; and create, retrieve, delete and reset-secret of IAP OAuth clients.
Attributes
@private
Public Class Methods
Configure the IdentityAwareProxyOAuthService
Client
class.
See {::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client::Configuration} for a description of the configuration fields.
@example
# Modify the configuration for all IdentityAwareProxyOAuthService clients ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.configure do |config| config.timeout = 10.0 end
@yield [config] Configure the Client
client. @yieldparam config [Client::Configuration]
@return [Client::Configuration]
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 56 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Iap", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config end yield @configure if block_given? @configure end
Create a new IdentityAwareProxyOAuthService
client object.
@example
# Create a client using the default configuration client = ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new do |config| config.timeout = 10.0 end
@yield [config] Configure the IdentityAwareProxyOAuthService
client. @yieldparam config [Client::Configuration]
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 111 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/iap/v1/service_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint && !@config.endpoint.split(".").first.include?("-") credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @identity_aware_proxy_o_auth_service_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Stub, credentials: credentials, endpoint: @config.endpoint, channel_args: @config.channel_args, interceptors: @config.interceptors ) end
Public Instance Methods
Configure the IdentityAwareProxyOAuthService
Client
instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on {Client.configure}.
See {::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client::Configuration} for a description of the configuration fields.
@yield [config] Configure the Client
client. @yieldparam config [Client::Configuration]
@return [Client::Configuration]
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 90 def configure yield @config if block_given? @config end
Constructs a new OAuth brand for the project if one does not exist. The created brand is “internal only”, meaning that OAuth clients created under it only accept requests from users who belong to the same G Suite organization as the project. The brand is created in an un-reviewed status. NOTE: The “internal only” status can be manually changed in the Google
Cloud
console. Requires that a brand does not already exist for the project, and that the specified support email is owned by the caller.
@overload create_brand
(request, options = nil)
Pass arguments to `create_brand` via a request object, either of type {::Google::Cloud::Iap::V1::CreateBrandRequest} or an equivalent Hash. @param request [::Google::Cloud::Iap::V1::CreateBrandRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_brand
(parent: nil, brand: nil)
Pass arguments to `create_brand` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. GCP Project number/id under which the brand is to be created. In the following format: projects/\\{project_number/id}. @param brand [::Google::Cloud::Iap::V1::Brand, ::Hash] Required. The brand to be created.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Iap::V1::Brand] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Iap::V1::Brand]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 256 def create_brand request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::CreateBrandRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_brand.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Iap::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_brand.timeout, metadata: metadata, retry_policy: @config.rpcs.create_brand.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @identity_aware_proxy_o_auth_service_stub.call_rpc :create_brand, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned by IAP. Requires that the brand for the project exists and that it is set for internal-only use.
@overload create_identity_aware_proxy_client
(request, options = nil)
Pass arguments to `create_identity_aware_proxy_client` via a request object, either of type {::Google::Cloud::Iap::V1::CreateIdentityAwareProxyClientRequest} or an equivalent Hash. @param request [::Google::Cloud::Iap::V1::CreateIdentityAwareProxyClientRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_identity_aware_proxy_client
(parent: nil, identity_aware_proxy_client: nil)
Pass arguments to `create_identity_aware_proxy_client` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. Path to create the client in. In the following format: projects/\\{project_number/id}/brands/\\{brand}. The project must belong to a G Suite account. @param identity_aware_proxy_client [::Google::Cloud::Iap::V1::IdentityAwareProxyClient, ::Hash] Required. Identity Aware Proxy Client to be created.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Iap::V1::IdentityAwareProxyClient] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 400 def create_identity_aware_proxy_client request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::CreateIdentityAwareProxyClientRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_identity_aware_proxy_client.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Iap::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_identity_aware_proxy_client.timeout, metadata: metadata, retry_policy: @config.rpcs.create_identity_aware_proxy_client.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @identity_aware_proxy_o_auth_service_stub.call_rpc :create_identity_aware_proxy_client, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing obsolete clients, managing the number of clients in a given project, and cleaning up after tests. Requires that the client is owned by IAP.
@overload delete_identity_aware_proxy_client
(request, options = nil)
Pass arguments to `delete_identity_aware_proxy_client` via a request object, either of type {::Google::Cloud::Iap::V1::DeleteIdentityAwareProxyClientRequest} or an equivalent Hash. @param request [::Google::Cloud::Iap::V1::DeleteIdentityAwareProxyClientRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_identity_aware_proxy_client
(name: nil)
Pass arguments to `delete_identity_aware_proxy_client` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. Name of the Identity Aware Proxy client to be deleted. In the following format: projects/\\{project_number/id}/brands/\\{brand}/identityAwareProxyClients/\\{client_id}.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 696 def delete_identity_aware_proxy_client request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::DeleteIdentityAwareProxyClientRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_identity_aware_proxy_client.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Iap::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_identity_aware_proxy_client.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_identity_aware_proxy_client.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @identity_aware_proxy_o_auth_service_stub.call_rpc :delete_identity_aware_proxy_client, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Retrieves the OAuth brand of the project.
@overload get_brand
(request, options = nil)
Pass arguments to `get_brand` via a request object, either of type {::Google::Cloud::Iap::V1::GetBrandRequest} or an equivalent Hash. @param request [::Google::Cloud::Iap::V1::GetBrandRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_brand
(name: nil)
Pass arguments to `get_brand` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. Name of the brand to be fetched. In the following format: projects/\\{project_number/id}/brands/\\{brand}.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Iap::V1::Brand] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Iap::V1::Brand]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 325 def get_brand request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetBrandRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_brand.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Iap::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_brand.timeout, metadata: metadata, retry_policy: @config.rpcs.get_brand.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @identity_aware_proxy_o_auth_service_stub.call_rpc :get_brand, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Retrieves an Identity Aware Proxy (IAP) OAuth client. Requires that the client is owned by IAP.
@overload get_identity_aware_proxy_client
(request, options = nil)
Pass arguments to `get_identity_aware_proxy_client` via a request object, either of type {::Google::Cloud::Iap::V1::GetIdentityAwareProxyClientRequest} or an equivalent Hash. @param request [::Google::Cloud::Iap::V1::GetIdentityAwareProxyClientRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_identity_aware_proxy_client
(name: nil)
Pass arguments to `get_identity_aware_proxy_client` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. Name of the Identity Aware Proxy client to be fetched. In the following format: projects/\\{project_number/id}/brands/\\{brand}/identityAwareProxyClients/\\{client_id}.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Iap::V1::IdentityAwareProxyClient] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 553 def get_identity_aware_proxy_client request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetIdentityAwareProxyClientRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_identity_aware_proxy_client.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Iap::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_identity_aware_proxy_client.timeout, metadata: metadata, retry_policy: @config.rpcs.get_identity_aware_proxy_client.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @identity_aware_proxy_o_auth_service_stub.call_rpc :get_identity_aware_proxy_client, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists the existing brands for the project.
@overload list_brands
(request, options = nil)
Pass arguments to `list_brands` via a request object, either of type {::Google::Cloud::Iap::V1::ListBrandsRequest} or an equivalent Hash. @param request [::Google::Cloud::Iap::V1::ListBrandsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_brands
(parent: nil)
Pass arguments to `list_brands` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. GCP Project number/id. In the following format: projects/\\{project_number/id}.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Iap::V1::ListBrandsResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Iap::V1::ListBrandsResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 179 def list_brands request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ListBrandsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_brands.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Iap::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_brands.timeout, metadata: metadata, retry_policy: @config.rpcs.list_brands.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @identity_aware_proxy_o_auth_service_stub.call_rpc :list_brands, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists the existing clients for the brand.
@overload list_identity_aware_proxy_clients
(request, options = nil)
Pass arguments to `list_identity_aware_proxy_clients` via a request object, either of type {::Google::Cloud::Iap::V1::ListIdentityAwareProxyClientsRequest} or an equivalent Hash. @param request [::Google::Cloud::Iap::V1::ListIdentityAwareProxyClientsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_identity_aware_proxy_clients
(parent: nil, page_size: nil, page_token: nil)
Pass arguments to `list_identity_aware_proxy_clients` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. Full brand path. In the following format: projects/\\{project_number/id}/brands/\\{brand}. @param page_size [::Integer] The maximum number of clients to return. The service may return fewer than this value. If unspecified, at most 100 clients will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. @param page_token [::String] A page token, received from a previous `ListIdentityAwareProxyClients` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListIdentityAwareProxyClients` must match the call that provided the page token.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::IdentityAwareProxyClient>] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::IdentityAwareProxyClient>]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 481 def list_identity_aware_proxy_clients request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ListIdentityAwareProxyClientsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_identity_aware_proxy_clients.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Iap::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_identity_aware_proxy_clients.timeout, metadata: metadata, retry_policy: @config.rpcs.list_identity_aware_proxy_clients.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @identity_aware_proxy_o_auth_service_stub.call_rpc :list_identity_aware_proxy_clients, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @identity_aware_proxy_o_auth_service_stub, :list_identity_aware_proxy_clients, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the secret was compromised. Requires that the client is owned by IAP.
@overload reset_identity_aware_proxy_client_secret
(request, options = nil)
Pass arguments to `reset_identity_aware_proxy_client_secret` via a request object, either of type {::Google::Cloud::Iap::V1::ResetIdentityAwareProxyClientSecretRequest} or an equivalent Hash. @param request [::Google::Cloud::Iap::V1::ResetIdentityAwareProxyClientSecretRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload reset_identity_aware_proxy_client_secret
(name: nil)
Pass arguments to `reset_identity_aware_proxy_client_secret` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. Name of the Identity Aware Proxy client to that will have its secret reset. In the following format: projects/\\{project_number/id}/brands/\\{brand}/identityAwareProxyClients/\\{client_id}.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::Iap::V1::IdentityAwareProxyClient] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::Iap::V1::IdentityAwareProxyClient]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/iap/v1/identity_aware_proxy_o_auth_service/client.rb, line 624 def reset_identity_aware_proxy_client_secret request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ResetIdentityAwareProxyClientSecretRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.reset_identity_aware_proxy_client_secret.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Iap::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.reset_identity_aware_proxy_client_secret.timeout, metadata: metadata, retry_policy: @config.rpcs.reset_identity_aware_proxy_client_secret.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @identity_aware_proxy_o_auth_service_stub.call_rpc :reset_identity_aware_proxy_client_secret, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end