Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.
REST client for the RuntimeProjectAttachmentService service.
This service is used for managing the runtime project attachments.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the RuntimeProjectAttachmentService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all RuntimeProjectAttachmentService clients ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the RuntimeProjectAttachmentService 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_runtime_project_attachment
def create_runtime_project_attachment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment
def create_runtime_project_attachment(parent: nil, runtime_project_attachment_id: nil, runtime_project_attachment: nil) -> ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment
Attaches a runtime project to the host project.
def create_runtime_project_attachment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment
create_runtime_project_attachment
via a request object, either of type
CreateRuntimeProjectAttachmentRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::CreateRuntimeProjectAttachmentRequest, ::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_runtime_project_attachment(parent: nil, runtime_project_attachment_id: nil, runtime_project_attachment: nil) -> ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment
create_runtime_project_attachment
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 parent resource for the Runtime Project Attachment.
Format:
projects/{project}/locations/{location}
- runtime_project_attachment_id (::String) — Required. The ID to use for the Runtime Project Attachment, which will become the final component of the Runtime Project Attachment's name. The ID must be the same as the project ID of the Google cloud project specified in the runtime_project_attachment.runtime_project field.
- runtime_project_attachment (::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment, ::Hash) — Required. The Runtime Project Attachment to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::CreateRuntimeProjectAttachmentRequest.new # Call the create_runtime_project_attachment method. result = client.create_runtime_project_attachment request # The returned object is of type Google::Cloud::ApiHub::V1::RuntimeProjectAttachment. p result
#delete_runtime_project_attachment
def delete_runtime_project_attachment(request, options = nil) -> ::Google::Protobuf::Empty
def delete_runtime_project_attachment(name: nil) -> ::Google::Protobuf::Empty
Delete a runtime project attachment in the API Hub. This call will detach the runtime project from the host project.
def delete_runtime_project_attachment(request, options = nil) -> ::Google::Protobuf::Empty
delete_runtime_project_attachment
via a request object, either of type
DeleteRuntimeProjectAttachmentRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::DeleteRuntimeProjectAttachmentRequest, ::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_runtime_project_attachment(name: nil) -> ::Google::Protobuf::Empty
delete_runtime_project_attachment
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. The name of the Runtime Project Attachment to delete.
Format:
projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::DeleteRuntimeProjectAttachmentRequest.new # Call the delete_runtime_project_attachment method. result = client.delete_runtime_project_attachment request # The returned object is of type Google::Protobuf::Empty. p result
#get_runtime_project_attachment
def get_runtime_project_attachment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment
def get_runtime_project_attachment(name: nil) -> ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment
Gets a runtime project attachment.
def get_runtime_project_attachment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment
get_runtime_project_attachment
via a request object, either of type
GetRuntimeProjectAttachmentRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::GetRuntimeProjectAttachmentRequest, ::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_runtime_project_attachment(name: nil) -> ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment
get_runtime_project_attachment
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. The name of the API resource to retrieve.
Format:
projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::GetRuntimeProjectAttachmentRequest.new # Call the get_runtime_project_attachment method. result = client.get_runtime_project_attachment request # The returned object is of type Google::Cloud::ApiHub::V1::RuntimeProjectAttachment. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new RuntimeProjectAttachmentService REST client object.
- (config) — Configure the RuntimeProjectAttachmentService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_runtime_project_attachments
def list_runtime_project_attachments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment>
def list_runtime_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment>
List runtime projects attached to the host project.
def list_runtime_project_attachments(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment>
list_runtime_project_attachments
via a request object, either of type
ListRuntimeProjectAttachmentsRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::ListRuntimeProjectAttachmentsRequest, ::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_runtime_project_attachments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment>
list_runtime_project_attachments
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 parent, which owns this collection of runtime project
attachments. Format:
projects/{project}/locations/{location}
- page_size (::Integer) — Optional. The maximum number of runtime project attachments to return. The service may return fewer than this value. If unspecified, at most 50 runtime project attachments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
ListRuntimeProjectAttachments
call. Provide this to retrieve the subsequent page.When paginating, all other parameters (except page_size) provided to
ListRuntimeProjectAttachments
must match the call that provided the page token. -
filter (::String) —
Optional. An expression that filters the list of RuntimeProjectAttachments.
A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string. All standard operators as documented at https://google.aip.dev/160 are supported.
The following fields in the
RuntimeProjectAttachment
are eligible for filtering:name
- The name of the RuntimeProjectAttachment.create_time
- The time at which the RuntimeProjectAttachment was created. The value should be in the (RFC3339)[https://tools.ietf.org/html/rfc3339] format.runtime_project
- The Google cloud project associated with the RuntimeProjectAttachment.
- order_by (::String) — Optional. Hint for how to order the results.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::RuntimeProjectAttachment>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::ListRuntimeProjectAttachmentsRequest.new # Call the list_runtime_project_attachments method. result = client.list_runtime_project_attachments 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::ApiHub::V1::RuntimeProjectAttachment. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#lookup_runtime_project_attachment
def lookup_runtime_project_attachment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::LookupRuntimeProjectAttachmentResponse
def lookup_runtime_project_attachment(name: nil) -> ::Google::Cloud::ApiHub::V1::LookupRuntimeProjectAttachmentResponse
Look up a runtime project attachment. This API can be called in the context of any project.
def lookup_runtime_project_attachment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::LookupRuntimeProjectAttachmentResponse
lookup_runtime_project_attachment
via a request object, either of type
LookupRuntimeProjectAttachmentRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::LookupRuntimeProjectAttachmentRequest, ::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 lookup_runtime_project_attachment(name: nil) -> ::Google::Cloud::ApiHub::V1::LookupRuntimeProjectAttachmentResponse
lookup_runtime_project_attachment
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. Runtime project ID to look up runtime project attachment for.
Lookup happens across all regions. Expected format:
projects/{project}/locations/{location}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::LookupRuntimeProjectAttachmentResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::LookupRuntimeProjectAttachmentRequest.new # Call the lookup_runtime_project_attachment method. result = client.lookup_runtime_project_attachment request # The returned object is of type Google::Cloud::ApiHub::V1::LookupRuntimeProjectAttachmentResponse. p result
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)