Service Client: Google::Cloud::Run::V2::Service::ServicesClient

Client stub representing the remote Services 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::Service - Compiled Protocol Buffers messages for google/cloud/run/v2/service.proto

SYNOPSIS

use Google::Cloud::Run::V2::Service;

my $msg = Google::Cloud::Run::V2::Service::CreateServiceRequest->new({
    parent => $parent,
    service => $service,
    service_id => $service_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::Service::CreateServiceRequest->parse($bytes);

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

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/run/v2/service.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::Service::CreateServiceRequest

Request message for creating a Service.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The location and project in which this service should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number. Only lowercase characters, digits, and hyphens.

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

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

    Required. The Service instance to create.

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

    Type: String

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

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

    Type: Bool

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

Google::Cloud::Run::V2::Service::UpdateServiceRequest

Request message for updating a service.

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->service() / $msg->service($value)

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

    Required. The Service to be updated.

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

    Type: Bool

    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 Service does not exist, it will create a new one. The caller must have 'run.services.create' permissions if this is set to true and the Service does not exist.

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

    Type: Bool

    Optional. If set to true, a new revision will be created from the template even if the system doesn't detect any changes from the previously deployed revision.

    This may be useful for cases where the underlying resources need to be recreated or reinitialized. For example if the image is specified by label, but the underlying image digest has changed) or if the container performs deployment initialization work that needs to be performed again.

Google::Cloud::Run::V2::Service::ListServicesRequest

Request message for retrieving a list of Services.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The location and project to list resources on. Location must be a valid Google Cloud region, and cannot be the "-" wildcard. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

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

    Type: Int32

    Maximum number of Services to return in this call.

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

    Type: String

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

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

    Type: Bool

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

Google::Cloud::Run::V2::Service::ListServicesResponse

Response message containing a list of Services.

Inherits from Protobuf::Message.

Accessors

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

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

    The resulting list of Services.

  • $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 ListServices request to continue.

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

    Type: String

    Output only. For global requests, returns the list of regions that could not be reached within the deadline.

Google::Cloud::Run::V2::Service::GetServiceRequest

Request message for obtaining a Service by its full name.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The full name of the Service. Format: projects/{project}/locations/{location}/services/{service}, where {project} can be project id or number.

Google::Cloud::Run::V2::Service::DeleteServiceRequest

Request message to delete a Service by its full name.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The full name of the Service. Format: projects/{project}/locations/{location}/services/{service}, where {project} can be project id or number.

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

    Type: Bool

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

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

    Type: String

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

Google::Cloud::Run::V2::Service::Service

Service acts as a top-level container that manages a set of configurations and revision templates which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Identifier. The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id.

    Format: projects/{project}/locations/{location}/services/{service_id}

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

    Type: String

    User-provided description of the Service. 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::Service::Service::LabelsEntry)

    Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels.

    <p>Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service.

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

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

    Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.

    <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service.

    <p>This field follows Kubernetes annotations' namespacing, limits, and rules.

  • $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. It is only populated as a response to a Delete request.

  • $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 permanently 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->ingress() / $msg->ingress($value)

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

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

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

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

    Optional. 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)

    Optional. Settings for the Binary Authorization feature.

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

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

    Required. The template used to create revisions for this Service.

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

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

    Optional. Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest `Ready` Revision.

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

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

    Optional. Specifies service-level scaling settings

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

    Type: Bool

    Optional. Disables IAM permission check for run.routes.invoke for callers of this service. 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 service.

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

    Type: String

    Output only. All URLs serving traffic for this Service.

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

    Type: Bool

    Optional. IAP settings on the Service.

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

    Type: Bool

    Optional. Enables SSH access to the Service.

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

    Type: Message (Google::Cloud::Run::V2::Service::Service::MultiRegionSettings)

    Optional. Settings for multi-region deployment.

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

    Type: String

    One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.

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

    Type: Int64

    Output only. The generation of this Service 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->terminal_condition() / $msg->terminal_condition($value)

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

    Output only. The Condition of this Service, 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 Service does not reach its Serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.

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

    Type: String

    Output only. Name of the latest revision that is serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.

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

    Type: String

    Output only. Name of the last created revision. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.

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

    Type: Message (Google::Cloud::Run::V2::TrafficTarget::TrafficTargetStatus)

    Output only. Detailed status information for corresponding traffic targets. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.

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

    Type: String

    Output only. The main URI in which this Service is serving traffic.

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

    Type: Bool

    Output only. Reserved for future use.

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

    Type: Bool

    Output only. True if Cloud Run Threat Detection monitoring is enabled for the parent project of this Service.

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

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

    Optional. Configuration for building a Cloud Run function.

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

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

    Optional. The functional type of the Service.

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

    Type: Bool

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

    When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, `observed_generation`, `latest_ready_revision`, `traffic_statuses`, and `uri` will have transient values 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 Service, or there was an error, and reconciliation failed. This state can be found in `terminal_condition.state`.

    If reconciliation succeeded, the following fields will match: `traffic` and `traffic_statuses`, `observed_generation` and `generation`, `latest_ready_revision` and `latest_created_revision`.

    If reconciliation failed, `traffic_statuses`, `observed_generation`, and `latest_ready_revision` will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in `terminal_condition` and `conditions`.

  • $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.

SEE ALSO

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

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.