BeyondCorp AppConnectors V1 API - Class Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client (v0.1.0)

Reference documentation and code samples for the BeyondCorp AppConnectors V1 API class Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.

Client for the AppConnectorsService service.

API Overview

The beyondcorp.googleapis.com service implements the Google Cloud BeyondCorp API.

Data Model

The AppConnectorsService exposes the following resource:

  • AppConnectors, named as follows: projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}.

The AppConnectorsService provides methods to manage (create/read/update/delete) BeyondCorp AppConnectors.

Inherits

  • Object

Methods

.configure

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

Configure the AppConnectorsService 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 AppConnectorsService clients
::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the AppConnectorsService 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_app_connector

def create_app_connector(request, options = nil) -> ::Gapic::Operation
def create_app_connector(parent: nil, app_connector_id: nil, app_connector: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation

Creates a new AppConnector in a given project and location.

Overloads
def create_app_connector(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_app_connector via a request object, either of type CreateAppConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::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_app_connector(parent: nil, app_connector_id: nil, app_connector: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
Pass arguments to create_app_connector 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. The resource project name of the AppConnector location using the form: projects/{project_id}/locations/{location_id}
  • app_connector_id (::String) —

    Optional. User-settable AppConnector resource ID.

    • Must start with a letter.
    • Must contain between 4-63 characters from /[a-z][0-9]-/.
    • Must end with a number or a letter.
  • app_connector (::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash) — Required. A BeyondCorp AppConnector resource.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (::Boolean) — Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/beyond_corp/app_connectors/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new

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

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_app_connector

def delete_app_connector(request, options = nil) -> ::Gapic::Operation
def delete_app_connector(name: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation

Deletes a single AppConnector.

Overloads
def delete_app_connector(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_app_connector via a request object, either of type DeleteAppConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::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_app_connector(name: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
Pass arguments to delete_app_connector 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
  • name (::String) — Required. BeyondCorp AppConnector name using the form: projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

    For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (::Boolean) — Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/beyond_corp/app_connectors/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new

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

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#get_app_connector

def get_app_connector(request, options = nil) -> ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector
def get_app_connector(name: nil) -> ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector

Gets details of a single AppConnector.

Overloads
def get_app_connector(request, options = nil) -> ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector
Pass arguments to get_app_connector via a request object, either of type GetAppConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::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_app_connector(name: nil) -> ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector
Pass arguments to get_app_connector 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. BeyondCorp AppConnector name using the form: projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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/beyond_corp/app_connectors/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new

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

# The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector.
p result

#iam_policy_client

def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

Get the associated client for mix-in of the IAMPolicy.

Returns
  • (Google::Iam::V1::IAMPolicy::Client)

#initialize

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

Create a new AppConnectorsService client object.

Yields
  • (config) — Configure the AppConnectorsService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config|
  config.timeout = 10.0
end

#list_app_connectors

def list_app_connectors(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>
def list_app_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>

Lists AppConnectors in a given project and location.

Overloads
def list_app_connectors(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>
Pass arguments to list_app_connectors via a request object, either of type ListAppConnectorsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::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_app_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>
Pass arguments to list_app_connectors 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. The resource name of the AppConnector location using the form: projects/{project_id}/locations/{location_id}
  • page_size (::Integer) — Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to determine if there are more instances left to be queried.
  • page_token (::String) — Optional. The next_page_token value returned from a previous ListAppConnectorsRequest, if any.
  • filter (::String) — Optional. A filter specifying constraints of a list operation.
  • order_by (::String) — Optional. Specifies the ordering of results. See Sorting order for more information.
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/beyond_corp/app_connectors/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector.
  p response
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Client)

#operations_client

def operations_client() -> ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations

Get the associated client for long-running operations.

#report_status

def report_status(request, options = nil) -> ::Gapic::Operation
def report_status(app_connector: nil, resource_info: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation

Report status for a given connector.

Overloads
def report_status(request, options = nil) -> ::Gapic::Operation
Pass arguments to report_status via a request object, either of type ReportStatusRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::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 report_status(app_connector: nil, resource_info: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
Pass arguments to report_status 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
  • app_connector (::String) — Required. BeyondCorp Connector name using the form: projects/{project_id}/locations/{location_id}/connectors/{connector}
  • resource_info (::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo, ::Hash) — Required. Resource info of the connector.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (::Boolean) — Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/beyond_corp/app_connectors/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new

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

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#update_app_connector

def update_app_connector(request, options = nil) -> ::Gapic::Operation
def update_app_connector(update_mask: nil, app_connector: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation

Updates the parameters of a single AppConnector.

Overloads
def update_app_connector(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_app_connector via a request object, either of type UpdateAppConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::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 update_app_connector(update_mask: nil, app_connector: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
Pass arguments to update_app_connector 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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) —

    Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.AppConnector]:

    • labels
    • display_name
  • app_connector (::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash) — Required. AppConnector message with updated fields. Only supported fields specified in update_mask are updated.
  • request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (::Boolean) — Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/beyond_corp/app_connectors/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new

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

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end