Service Client: Google::Cloud::Run::V2::Instance::InstancesClient

Client stub representing the remote Instances gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to run.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Run::V2::Instance - Compiled Protocol Buffers messages for google/cloud/run/v2/instance.proto

SYNOPSIS

use Google::Cloud::Run::V2::Instance;

my $msg = Google::Cloud::Run::V2::Instance::CreateInstanceRequest->new({
    parent => $parent,
    instance => $instance,
    instance_id => $instance_id,
    validate_only => $validate_only,
});

# Read or update a field
my $val = $msg->parent();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Run::V2::Instance::CreateInstanceRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/run/v2/instance.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Run::V2::Instance::CreateInstanceRequest

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The location and project in which this Instance should be created.

  • $msg->instance() / $msg->instance($value)

    Type: Message (Google::Cloud::Run::V2::Instance::Instance)

  • $msg->instance_id() / $msg->instance_id($value)

    Type: String

    Optional. The unique identifier for the Instance. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the instance becomes {parent}/instances/{instance_id}. If not provided, the server will generate a unique `instance_id`.

  • $msg->validate_only() / $msg->validate_only($value)

    Type: Bool

    Optional. Indicates that the request should be validated and default values populated, without persisting the request or creating any resources.

Google::Cloud::Run::V2::Instance::UpdateInstanceRequest

Request message for updating an Instance.

Inherits from Protobuf::Message.

Accessors

  • $msg->update_mask() / $msg->update_mask($value)

    Type: Message (Google::Protobuf::FieldMask::FieldMask)

    Optional. The list of fields to be updated.

  • $msg->instance() / $msg->instance($value)

    Type: Message (Google::Cloud::Run::V2::Instance::Instance)

    Required. The Instance to be updated.

  • $msg->validate_only() / $msg->validate_only($value)

    Type: Bool

    Optional. Indicates that the request should be validated and default values populated, without persisting the request or updating any resources.

  • $msg->allow_missing() / $msg->allow_missing($value)

    Type: Bool

    Optional. If set to `true`, and if the Instance does not exist, it will create a new one. The caller must have `run.instances.create` permissions if this is set to `true` and the Instance does not exist.

Google::Cloud::Run::V2::Instance::GetInstanceRequest

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the Instance to retrieve.

Google::Cloud::Run::V2::Instance::DeleteInstanceRequest

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the Instance to delete.

  • $msg->validate_only() / $msg->validate_only($value)

    Type: Bool

    Optional. Indicates that the request should be validated without actually deleting any resources.

  • $msg->etag() / $msg->etag($value)

    Type: String

    Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

Google::Cloud::Run::V2::Instance::ListInstancesRequest

Request message for retrieving a list of Instances.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The location and project to list resources on.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    Optional. Maximum number of Instances to return in this call.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    Optional. A page token received from a previous call to ListInstances. All other parameters must match.

  • $msg->show_deleted() / $msg->show_deleted($value)

    Type: Bool

    Optional. If true, returns deleted (but unexpired) resources along with active ones.

Google::Cloud::Run::V2::Instance::ListInstancesResponse

Response message containing a list of Instances.

Inherits from Protobuf::Message.

Accessors

  • $msg->instances() / $msg->instances($value)

    Type: Message (Google::Cloud::Run::V2::Instance::Instance)

    The resulting list of Instances.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    A token indicating there are more items than page_size. Use it in the next ListInstances request to continue.

Google::Cloud::Run::V2::Instance::StopInstanceRequest

Request message for deleting an Instance.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the Instance to stop.

  • $msg->validate_only() / $msg->validate_only($value)

    Type: Bool

    Optional. Indicates that the request should be validated without actually stopping any resources.

  • $msg->etag() / $msg->etag($value)

    Type: String

    Optional. A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates.

Google::Cloud::Run::V2::Instance::StartInstanceRequest

Request message for starting an Instance.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the Instance to start.

  • $msg->validate_only() / $msg->validate_only($value)

    Type: Bool

    Optional. Indicates that the request should be validated without actually stopping any resources.

  • $msg->etag() / $msg->etag($value)

    Type: String

    Optional. A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates.

Google::Cloud::Run::V2::Instance::Instance

A Cloud Run Instance represents a single group of containers running in a region.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The fully qualified name of this Instance. In `CreateInstanceRequest`, this field is ignored, and instead composed from `CreateInstanceRequest.parent` and `CreateInstanceRequest.instance_id`.

  • $msg->description() / $msg->description($value)

    Type: String

    User-provided description of the Instance. This field currently has a 512-character limit.

  • $msg->uid() / $msg->uid($value)

    Type: String

    Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

  • $msg->generation() / $msg->generation($value)

    Type: Int64

    Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an `int64` value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`.

  • $msg->labels() / $msg->labels($value)

    Type: Message (Google::Cloud::Run::V2::Instance::Instance::LabelsEntry)

  • $msg->annotations() / $msg->annotations($value)

    Type: Message (Google::Cloud::Run::V2::Instance::Instance::AnnotationsEntry)

  • $msg->create_time() / $msg->create_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. The creation time.

  • $msg->update_time() / $msg->update_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. The last-modified time.

  • $msg->delete_time() / $msg->delete_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. The deletion time.

  • $msg->expire_time() / $msg->expire_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. For a deleted resource, the time after which it will be permamently deleted.

  • $msg->creator() / $msg->creator($value)

    Type: String

    Output only. Email address of the authenticated creator.

  • $msg->last_modifier() / $msg->last_modifier($value)

    Type: String

    Output only. Email address of the last authenticated modifier.

  • $msg->client() / $msg->client($value)

    Type: String

    Arbitrary identifier for the API client.

  • $msg->client_version() / $msg->client_version($value)

    Type: String

    Arbitrary version identifier for the API client.

  • $msg->launch_stage() / $msg->launch_stage($value)

    Type: Enum (Google::Api::LaunchStage)

    The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, `GA` is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features.

    For example, if `ALPHA` is provided as input, but only `BETA` and
    `GA`-level features are used, this field will be `BETA` on output.
  • $msg->binary_authorization() / $msg->binary_authorization($value)

    Type: Message (Google::Cloud::Run::V2::VendorSettings::BinaryAuthorization)

    Settings for the Binary Authorization feature.

  • $msg->vpc_access() / $msg->vpc_access($value)

    Type: Message (Google::Cloud::Run::V2::VendorSettings::VpcAccess)

    Optional. VPC Access configuration to use for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.

  • $msg->service_account() / $msg->service_account($value)

    Type: String

  • $msg->containers() / $msg->containers($value)

    Type: Message (Google::Cloud::Run::V2::K8sMin::Container)

    Required. Holds the single container that defines the unit of execution for this Instance.

  • $msg->sandboxes() / $msg->sandboxes($value)

    Type: Message (Google::Cloud::Run::V2::Sandbox::SandboxConfiguration)

    Optional. Configuration for sandboxes.

  • $msg->volumes() / $msg->volumes($value)

    Type: Message (Google::Cloud::Run::V2::K8sMin::Volume)

    A list of Volumes to make available to containers.

  • $msg->encryption_key() / $msg->encryption_key($value)

    Type: String

    A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek

  • $msg->encryption_key_revocation_action() / $msg->encryption_key_revocation_action($value)

    Type: Enum (Google::Cloud::Run::V2::EncryptionKeyRevocationAction)

    The action to take if the encryption key is revoked.

  • $msg->encryption_key_shutdown_duration() / $msg->encryption_key_shutdown_duration($value)

    Type: Message (Google::Protobuf::Duration::Duration)

    If `encryption_key_revocation_action` is `SHUTDOWN`, the duration before shutting down all instances. The minimum increment is 1 hour.

  • $msg->node_selector() / $msg->node_selector($value)

    Type: Message (Google::Cloud::Run::V2::VendorSettings::NodeSelector)

    Optional. The node selector for the instance.

  • $msg->gpu_zonal_redundancy_disabled() / $msg->gpu_zonal_redundancy_disabled($value)

    Type: Bool

    Optional. True if GPU zonal redundancy is disabled on this instance.

  • $msg->ingress() / $msg->ingress($value)

    Type: Enum (Google::Cloud::Run::V2::IngressTraffic)

    Optional. Provides the ingress settings for this Instance. On output, returns the currently observed ingress settings, or `INGRESS_TRAFFIC_UNSPECIFIED` if no revision is active.

  • $msg->invoker_iam_disabled() / $msg->invoker_iam_disabled($value)

    Type: Bool

    Optional. Disables IAM permission check for `run.routes.invoke` for callers of this Instance. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.

  • $msg->default_uri_disabled() / $msg->default_uri_disabled($value)

    Type: Bool

    Optional. Disables public resolution of the default URI of this Instance.

  • $msg->iap_enabled() / $msg->iap_enabled($value)

    Type: Bool

    Optional. IAP settings on the Instance.

  • $msg->ssh_enabled() / $msg->ssh_enabled($value)

    Type: Bool

    Optional. Enables SSH access to the Instance.

  • $msg->restart_policy() / $msg->restart_policy($value)

    Type: Enum (Google::Cloud::Run::V2::Instance::RestartPolicy)

    Optional. Restart policy for the Instance.

  • $msg->observed_generation() / $msg->observed_generation($value)

    Type: Int64

    Output only. The generation of this Instance currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an `int64` value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`.

  • $msg->log_uri() / $msg->log_uri($value)

    Type: String

    Output only. The Google Console URI to obtain logs for the Instance.

  • $msg->terminal_condition() / $msg->terminal_condition($value)

    Type: Message (Google::Cloud::Run::V2::Condition::Condition)

    Output only. The Condition of this Instance, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.

  • $msg->conditions() / $msg->conditions($value)

    Type: Message (Google::Cloud::Run::V2::Condition::Condition)

    Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Instance does not reach its Serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.

  • $msg->container_statuses() / $msg->container_statuses($value)

    Type: Message (Google::Cloud::Run::V2::ContainerStatus::ContainerStatus)

    Output only. Status information for each of the specified containers. The status includes the resolved digest for specified images.

  • $msg->satisfies_pzs() / $msg->satisfies_pzs($value)

    Type: Bool

    Output only. Reserved for future use.

  • $msg->urls() / $msg->urls($value)

    Type: String

    Output only. All URLs serving traffic for this Instance.

  • $msg->reconciling() / $msg->reconciling($value)

    Type: Bool

    Output only. Returns `true` if the Instance is currently being acted upon by the system to bring it into the desired state.

    When a new Instance is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Instance to the desired serving state. This process is called reconciliation. While reconciliation is in process, `observed_generation` will have a transient value that might mismatch the intended state. Once reconciliation is over (and this field is `false`), there are two possible outcomes: reconciliation succeeded and the serving state matches the Instance, or there was an error, and reconciliation failed. This state can be found in `terminal_condition.state`.

  • $msg->etag() / $msg->etag($value)

    Type: String

    Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

Enum: Instance::RestartPolicy

  • RESTART_POLICY_UNSPECIFIED => 0

  • ALWAYS => 1

  • ON_FAILURE => 2

  • NEVER => 3

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Run::V2::Instance::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.