Reference documentation and code samples for the BeyondCorp AppConnections V1 API class Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.
Client for the AppConnectionsService service.
API Overview:
The beyondcorp.googleapis.com
service implements the Google Cloud
BeyondCorp API.
Data Model:
The AppConnectionsService exposes the following resources:
- AppConnections, named as follows:
projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}
.
The AppConnectionsService service provides methods to manage (create/read/update/delete) BeyondCorp AppConnections.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the AppConnectionsService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AppConnectionsService clients ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the AppConnectionsService 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_app_connection
def create_app_connection(request, options = nil) -> ::Gapic::Operation
def create_app_connection(parent: nil, app_connection_id: nil, app_connection: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
Creates a new AppConnection in a given project and location.
def create_app_connection(request, options = nil) -> ::Gapic::Operation
create_app_connection
via a request object, either of type
CreateAppConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest, ::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_connection(parent: nil, app_connection_id: nil, app_connection: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
create_app_connection
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).
-
parent (::String) — Required. The resource project name of the AppConnection location using the
form:
projects/{project_id}/locations/{location_id}
-
app_connection_id (::String) —
Optional. User-settable AppConnection 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_connection (::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash) — Required. A BeyondCorp AppConnection 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/beyond_corp/app_connections/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BeyondCorp::AppConnections::V1::CreateAppConnectionRequest.new # Call the create_app_connection method. result = client.create_app_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_app_connection
def delete_app_connection(request, options = nil) -> ::Gapic::Operation
def delete_app_connection(name: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
Deletes a single AppConnection.
def delete_app_connection(request, options = nil) -> ::Gapic::Operation
delete_app_connection
via a request object, either of type
DeleteAppConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest, ::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_connection(name: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
delete_app_connection
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).
-
name (::String) — Required. BeyondCorp Connector name using the form:
projects/{project_id}/locations/{location_id}/appConnections/{app_connection_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/beyond_corp/app_connections/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BeyondCorp::AppConnections::V1::DeleteAppConnectionRequest.new # Call the delete_app_connection method. result = client.delete_app_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_app_connection
def get_app_connection(request, options = nil) -> ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection
def get_app_connection(name: nil) -> ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection
Gets details of a single AppConnection.
def get_app_connection(request, options = nil) -> ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection
get_app_connection
via a request object, either of type
GetAppConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest, ::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_connection(name: nil) -> ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection
get_app_connection
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).
-
name (::String) — Required. BeyondCorp AppConnection name using the form:
projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/beyond_corp/app_connections/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BeyondCorp::AppConnections::V1::GetAppConnectionRequest.new # Call the get_app_connection method. result = client.get_app_connection request # The returned object is of type Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new AppConnectionsService client object.
- (config) — Configure the AppConnectionsService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new do |config| config.timeout = 10.0 end
#list_app_connections
def list_app_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>
def list_app_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>
Lists AppConnections in a given project and location.
def list_app_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>
list_app_connections
via a request object, either of type
ListAppConnectionsRequest or an equivalent Hash.
- request (::Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest, ::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_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>
list_app_connections
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).
-
parent (::String) — Required. The resource name of the AppConnection 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.ListAppConnectionsResponse.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 ListAppConnectionsRequest, 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/beyond_corp/app_connections/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BeyondCorp::AppConnections::V1::ListAppConnectionsRequest.new # Call the list_app_connections method. result = client.list_app_connections 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::BeyondCorp::AppConnections::V1::AppConnection. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#operations_client
def operations_client() -> ::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Operations
Get the associated client for long-running operations.
#resolve_app_connections
def resolve_app_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>
def resolve_app_connections(parent: nil, app_connector_id: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>
Resolves AppConnections details for a given AppConnector. An internal method called by a connector to find AppConnections to connect to.
def resolve_app_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>
resolve_app_connections
via a request object, either of type
ResolveAppConnectionsRequest or an equivalent Hash.
- request (::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest, ::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 resolve_app_connections(parent: nil, app_connector_id: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>
resolve_app_connections
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).
-
parent (::String) — Required. The resource name of the AppConnection location using the form:
projects/{project_id}/locations/{location_id}
-
app_connector_id (::String) — Required. BeyondCorp Connector name of the connector associated with those
AppConnections using the form:
projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_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.ResolveAppConnectionsResponse.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 ResolveAppConnectionsResponse, if any.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/beyond_corp/app_connections/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BeyondCorp::AppConnections::V1::ResolveAppConnectionsRequest.new # Call the resolve_app_connections method. result = client.resolve_app_connections 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::BeyondCorp::AppConnections::V1::ResolveAppConnectionsResponse::AppConnectionDetails. p item end
#update_app_connection
def update_app_connection(request, options = nil) -> ::Gapic::Operation
def update_app_connection(update_mask: nil, app_connection: nil, request_id: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
Updates the parameters of a single AppConnection.
def update_app_connection(request, options = nil) -> ::Gapic::Operation
update_app_connection
via a request object, either of type
UpdateAppConnectionRequest or an equivalent Hash.
- request (::Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest, ::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_connection(update_mask: nil, app_connection: nil, request_id: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
update_app_connection
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).
-
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.AppConnection]:
labels
display_name
application_endpoint
connectors
- app_connection (::Google::Cloud::BeyondCorp::AppConnections::V1::AppConnection, ::Hash) — Required. AppConnection 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.
- allow_missing (::Boolean) — Optional. If set as true, will create the resource if it is not found.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/beyond_corp/app_connections/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BeyondCorp::AppConnections::V1::AppConnectionsService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BeyondCorp::AppConnections::V1::UpdateAppConnectionRequest.new # Call the update_app_connection method. result = client.update_app_connection request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end