Identity-Aware Proxy V1 API - Class Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client (v0.11.2)

Reference documentation and code samples for the Identity-Aware Proxy V1 API 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.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the IdentityAwareProxyOAuthService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all IdentityAwareProxyOAuthService clients
::Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

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 Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_brand

def create_brand(request, options = nil) -> ::Google::Cloud::Iap::V1::Brand
def create_brand(parent: nil, brand: nil) -> ::Google::Cloud::Iap::V1::Brand

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 Google Workspace 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.

Overloads
def create_brand(request, options = nil) -> ::Google::Cloud::Iap::V1::Brand
Pass arguments to create_brand via a request object, either of type CreateBrandRequest or an equivalent Hash.
Parameters
  • 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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_brand(parent: nil, brand: nil) -> ::Google::Cloud::Iap::V1::Brand
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).
Parameters
  • parent (::String) — Required. GCP Project number/id under which the brand is to be created. In the following format: projects/{project_number/id}.
  • brand (::Google::Cloud::Iap::V1::Brand, ::Hash) — Required. The brand to be created.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/iap/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Iap::V1::CreateBrandRequest.new

# Call the create_brand method.
result = client.create_brand request

# The returned object is of type Google::Cloud::Iap::V1::Brand.
p result

#create_identity_aware_proxy_client

def create_identity_aware_proxy_client(request, options = nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
def create_identity_aware_proxy_client(parent: nil, identity_aware_proxy_client: nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient

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.

Overloads
def create_identity_aware_proxy_client(request, options = nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
Pass arguments to create_identity_aware_proxy_client via a request object, either of type CreateIdentityAwareProxyClientRequest or an equivalent Hash.
Parameters
  • 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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_identity_aware_proxy_client(parent: nil, identity_aware_proxy_client: nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
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).
Parameters
  • 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.
  • identity_aware_proxy_client (::Google::Cloud::Iap::V1::IdentityAwareProxyClient, ::Hash) — Required. Identity Aware Proxy Client to be created.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/iap/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Iap::V1::CreateIdentityAwareProxyClientRequest.new

# Call the create_identity_aware_proxy_client method.
result = client.create_identity_aware_proxy_client request

# The returned object is of type Google::Cloud::Iap::V1::IdentityAwareProxyClient.
p result

#delete_identity_aware_proxy_client

def delete_identity_aware_proxy_client(request, options = nil) -> ::Google::Protobuf::Empty
def delete_identity_aware_proxy_client(name: nil) -> ::Google::Protobuf::Empty

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.

Overloads
def delete_identity_aware_proxy_client(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_identity_aware_proxy_client via a request object, either of type DeleteIdentityAwareProxyClientRequest or an equivalent Hash.
Parameters
  • 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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_identity_aware_proxy_client(name: nil) -> ::Google::Protobuf::Empty
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).
Parameter
  • 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}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/iap/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Iap::V1::DeleteIdentityAwareProxyClientRequest.new

# Call the delete_identity_aware_proxy_client method.
result = client.delete_identity_aware_proxy_client request

# The returned object is of type Google::Protobuf::Empty.
p result

#get_brand

def get_brand(request, options = nil) -> ::Google::Cloud::Iap::V1::Brand
def get_brand(name: nil) -> ::Google::Cloud::Iap::V1::Brand

Retrieves the OAuth brand of the project.

Overloads
def get_brand(request, options = nil) -> ::Google::Cloud::Iap::V1::Brand
Pass arguments to get_brand via a request object, either of type GetBrandRequest or an equivalent Hash.
Parameters
  • 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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_brand(name: nil) -> ::Google::Cloud::Iap::V1::Brand
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).
Parameter
  • name (::String) — Required. Name of the brand to be fetched. In the following format: projects/{project_number/id}/brands/{brand}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/iap/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Iap::V1::GetBrandRequest.new

# Call the get_brand method.
result = client.get_brand request

# The returned object is of type Google::Cloud::Iap::V1::Brand.
p result

#get_identity_aware_proxy_client

def get_identity_aware_proxy_client(request, options = nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
def get_identity_aware_proxy_client(name: nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient

Retrieves an Identity Aware Proxy (IAP) OAuth client. Requires that the client is owned by IAP.

Overloads
def get_identity_aware_proxy_client(request, options = nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
Pass arguments to get_identity_aware_proxy_client via a request object, either of type GetIdentityAwareProxyClientRequest or an equivalent Hash.
Parameters
  • 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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_identity_aware_proxy_client(name: nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
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).
Parameter
  • 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}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/iap/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Iap::V1::GetIdentityAwareProxyClientRequest.new

# Call the get_identity_aware_proxy_client method.
result = client.get_identity_aware_proxy_client request

# The returned object is of type Google::Cloud::Iap::V1::IdentityAwareProxyClient.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new IdentityAwareProxyOAuthService client object.

Yields
  • (config) — Configure the IdentityAwareProxyOAuthService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
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

#list_brands

def list_brands(request, options = nil) -> ::Google::Cloud::Iap::V1::ListBrandsResponse
def list_brands(parent: nil) -> ::Google::Cloud::Iap::V1::ListBrandsResponse

Lists the existing brands for the project.

Overloads
def list_brands(request, options = nil) -> ::Google::Cloud::Iap::V1::ListBrandsResponse
Pass arguments to list_brands via a request object, either of type ListBrandsRequest or an equivalent Hash.
Parameters
  • 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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_brands(parent: nil) -> ::Google::Cloud::Iap::V1::ListBrandsResponse
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).
Parameter
  • parent (::String) — Required. GCP Project number/id. In the following format: projects/{project_number/id}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/iap/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Iap::V1::ListBrandsRequest.new

# Call the list_brands method.
result = client.list_brands request

# The returned object is of type Google::Cloud::Iap::V1::ListBrandsResponse.
p result

#list_identity_aware_proxy_clients

def list_identity_aware_proxy_clients(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::IdentityAwareProxyClient>
def list_identity_aware_proxy_clients(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::IdentityAwareProxyClient>

Lists the existing clients for the brand.

Overloads
def list_identity_aware_proxy_clients(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::IdentityAwareProxyClient>
Pass arguments to list_identity_aware_proxy_clients via a request object, either of type ListIdentityAwareProxyClientsRequest or an equivalent Hash.
Parameters
  • 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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_identity_aware_proxy_clients(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::IdentityAwareProxyClient>
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).
Parameters
  • parent (::String) — Required. Full brand path. In the following format: projects/{project_number/id}/brands/{brand}.
  • 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.
  • 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.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/iap/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Iap::V1::ListIdentityAwareProxyClientsRequest.new

# Call the list_identity_aware_proxy_clients method.
result = client.list_identity_aware_proxy_clients request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Iap::V1::IdentityAwareProxyClient.
  p item
end

#reset_identity_aware_proxy_client_secret

def reset_identity_aware_proxy_client_secret(request, options = nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
def reset_identity_aware_proxy_client_secret(name: nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient

Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the secret was compromised. Requires that the client is owned by IAP.

Overloads
def reset_identity_aware_proxy_client_secret(request, options = nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
Pass arguments to reset_identity_aware_proxy_client_secret via a request object, either of type ResetIdentityAwareProxyClientSecretRequest or an equivalent Hash.
Parameters
  • 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.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def reset_identity_aware_proxy_client_secret(name: nil) -> ::Google::Cloud::Iap::V1::IdentityAwareProxyClient
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).
Parameter
  • 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}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/iap/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Iap::V1::IdentityAwareProxyOAuthService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Iap::V1::ResetIdentityAwareProxyClientSecretRequest.new

# Call the reset_identity_aware_proxy_client_secret method.
result = client.reset_identity_aware_proxy_client_secret request

# The returned object is of type Google::Cloud::Iap::V1::IdentityAwareProxyClient.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)