Types for Google Cloud Run v2 API¶
- class google.cloud.run_v2.types.BinaryAuthorization(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Settings for Binary Authorization feature.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- use_default¶
Optional. If True, indicates to use the default project’s binary authorization policy. If False, binary authorization will be disabled.
This field is a member of oneof
binauthz_method
.- Type
- policy¶
Optional. The path to a binary authorization policy. Format:
projects/{project}/platforms/cloudRun/{policy-name}
This field is a member of oneof
binauthz_method
.- Type
- breakglass_justification¶
Optional. If present, indicates to use Breakglass using this justification. If use_default is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass
- Type
- class google.cloud.run_v2.types.CancelExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for deleting an Execution.
- name¶
Required. The name of the Execution to cancel. Format:
projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
, where{project}
can be project id or number.- Type
- validate_only¶
Indicates that the request should be validated without actually cancelling any resources.
- Type
- class google.cloud.run_v2.types.CloudSqlInstance(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a set of Cloud SQL instances. Each one will be available under /cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.
- instances¶
The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format:
{project}:{location}:{instance}
- Type
MutableSequence[str]
- class google.cloud.run_v2.types.Condition(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines a status condition for a resource.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- type_¶
type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include:
“Ready”: True when the Resource is ready.
- Type
- state¶
State of the condition.
- last_transition_time¶
Last time the condition transitioned from one status to another.
- severity¶
How to interpret failures of this condition, one of Error, Warning, Info
- reason¶
Output only. A common (service-level) reason for this condition.
This field is a member of oneof
reasons
.
- revision_reason¶
Output only. A reason for the revision condition.
This field is a member of oneof
reasons
.
- execution_reason¶
Output only. A reason for the execution condition.
This field is a member of oneof
reasons
.
- class CommonReason(value)[source]¶
Bases:
proto.enums.Enum
Reasons common to all types of conditions.
- Values:
- COMMON_REASON_UNDEFINED (0):
Default value.
- UNKNOWN (1):
Reason unknown. Further details will be in message.
- REVISION_FAILED (3):
Revision creation process failed.
- PROGRESS_DEADLINE_EXCEEDED (4):
Timed out waiting for completion.
- CONTAINER_MISSING (6):
The container image path is incorrect.
- CONTAINER_PERMISSION_DENIED (7):
Insufficient permissions on the container image.
- CONTAINER_IMAGE_UNAUTHORIZED (8):
Container image is not authorized by policy.
- CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED (9):
Container image policy authorization check failed.
- ENCRYPTION_KEY_PERMISSION_DENIED (10):
Insufficient permissions on encryption key.
- ENCRYPTION_KEY_CHECK_FAILED (11):
Permission check on encryption key failed.
- SECRETS_ACCESS_CHECK_FAILED (12):
At least one Access check on secrets failed.
- WAITING_FOR_OPERATION (13):
Waiting for operation to complete.
- IMMEDIATE_RETRY (14):
System will retry immediately.
- POSTPONED_RETRY (15):
System will retry later; current attempt failed.
- INTERNAL (16):
An internal error occurred. Further information may be in the message.
- class ExecutionReason(value)[source]¶
Bases:
proto.enums.Enum
Reasons specific to Execution resource.
- Values:
- EXECUTION_REASON_UNDEFINED (0):
Default value.
- JOB_STATUS_SERVICE_POLLING_ERROR (1):
Internal system error getting execution status. System will retry.
- NON_ZERO_EXIT_CODE (2):
A task reached its retry limit and the last attempt failed due to the user container exiting with a non-zero exit code.
- CANCELLED (3):
The execution was cancelled by users.
- CANCELLING (4):
The execution is in the process of being cancelled.
- DELETED (5):
The execution was deleted.
- class RevisionReason(value)[source]¶
Bases:
proto.enums.Enum
Reasons specific to Revision resource.
- Values:
- REVISION_REASON_UNDEFINED (0):
Default value.
- PENDING (1):
Revision in Pending state.
- RESERVE (2):
Revision is in Reserve state.
- RETIRED (3):
Revision is Retired.
- RETIRING (4):
Revision is being retired.
- RECREATING (5):
Revision is being recreated.
- HEALTH_CHECK_CONTAINER_ERROR (6):
There was a health check error.
- CUSTOMIZED_PATH_RESPONSE_PENDING (7):
Health check failed due to user error from customized path of the container. System will retry.
- MIN_INSTANCES_NOT_PROVISIONED (8):
A revision with min_instance_count > 0 was created and is reserved, but it was not configured to serve traffic, so it’s not live. This can also happen momentarily during traffic migration.
- ACTIVE_REVISION_LIMIT_REACHED (9):
The maximum allowed number of active revisions has been reached.
- NO_DEPLOYMENT (10):
There was no deployment defined. This value is no longer used, but Services created in older versions of the API might contain this value.
- HEALTH_CHECK_SKIPPED (11):
A revision’s container has no port specified since the revision is of a manually scaled service with 0 instance count
- MIN_INSTANCES_WARMING (12):
A revision with min_instance_count > 0 was created and is waiting for enough instances to begin a traffic migration.
- class Severity(value)[source]¶
Bases:
proto.enums.Enum
Represents the severity of the condition failures.
- Values:
- SEVERITY_UNSPECIFIED (0):
Unspecified severity
- ERROR (1):
Error severity.
- WARNING (2):
Warning severity.
- INFO (3):
Info severity.
- class State(value)[source]¶
Bases:
proto.enums.Enum
Represents the possible Condition states.
- Values:
- STATE_UNSPECIFIED (0):
The default value. This value is used if the state is omitted.
- CONDITION_PENDING (1):
Transient state: Reconciliation has not started yet.
- CONDITION_RECONCILING (2):
Transient state: reconciliation is still in progress.
- CONDITION_FAILED (3):
Terminal state: Reconciliation did not succeed.
- CONDITION_SUCCEEDED (4):
Terminal state: Reconciliation completed successfully.
- class google.cloud.run_v2.types.Container(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments can be supplied by the system to the container at runtime.
- image¶
Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.
- Type
- command¶
Entrypoint array. Not executed within a shell. The docker image’s ENTRYPOINT is used if this is not provided.
- Type
MutableSequence[str]
- args¶
Arguments to the entrypoint. The docker image’s CMD is used if this is not provided.
- Type
MutableSequence[str]
- env¶
List of environment variables to set in the container.
- Type
MutableSequence[google.cloud.run_v2.types.EnvVar]
- resources¶
Compute Resource requirements by this container.
- ports¶
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on.
- Type
MutableSequence[google.cloud.run_v2.types.ContainerPort]
- volume_mounts¶
Volume to mount into the container’s filesystem.
- Type
MutableSequence[google.cloud.run_v2.types.VolumeMount]
- working_dir¶
Container’s working directory. If not specified, the container runtime’s default will be used, which might be configured in the container image.
- Type
- liveness_probe¶
Periodic probe of container liveness. Container will be restarted if the probe fails.
- startup_probe¶
Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails.
- class google.cloud.run_v2.types.ContainerPort(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ContainerPort represents a network port in a single container.
- name¶
If specified, used to specify which protocol to use. Allowed values are “http1” and “h2c”.
- Type
- class google.cloud.run_v2.types.CreateJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for creating a Job.
- parent¶
Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.
- Type
- job¶
Required. The Job instance to create.
- job_id¶
Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.
- Type
- class google.cloud.run_v2.types.CreateServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for creating a Service.
- parent¶
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.
- Type
- service¶
Required. The Service instance to create.
- service_id¶
Required. 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}.
- Type
- class google.cloud.run_v2.types.DeleteExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for deleting an Execution.
- name¶
Required. The name of the Execution to delete. Format:
projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
, where{project}
can be project id or number.- Type
- validate_only¶
Indicates that the request should be validated without actually deleting any resources.
- Type
- class google.cloud.run_v2.types.DeleteJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message to delete a Job by its full name.
- name¶
Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.
- Type
- validate_only¶
Indicates that the request should be validated without actually deleting any resources.
- Type
- class google.cloud.run_v2.types.DeleteRevisionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for deleting a retired Revision. Revision lifecycle is usually managed by making changes to the parent Service. Only retired revisions can be deleted with this API.
- name¶
Required. The name of the Revision to delete. Format:
projects/{project}/locations/{location}/services/{service}/revisions/{revision}
- Type
- validate_only¶
Indicates that the request should be validated without actually deleting any resources.
- Type
- class google.cloud.run_v2.types.DeleteServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message to delete a Service by its full name.
- name¶
Required. The full name of the Service. Format: projects/{project}/locations/{location}/services/{service}, where {project} can be project id or number.
- Type
- validate_only¶
Indicates that the request should be validated without actually deleting any resources.
- Type
- class google.cloud.run_v2.types.EmptyDirVolumeSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
In memory (tmpfs) ephemeral storage. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs).
- medium¶
The medium on which the data is stored. Acceptable values today is only MEMORY or none. When none, the default will currently be backed by memory but could change over time. +optional
- size_limit¶
Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers. The default is nil which means that the limit is undefined. More info:
https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. Info in Kubernetes:
https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
- Type
- class Medium(value)[source]¶
Bases:
proto.enums.Enum
The different types of medium supported for EmptyDir.
- Values:
- MEDIUM_UNSPECIFIED (0):
When not specified, falls back to the default implementation which is currently in memory (this may change over time).
- MEMORY (1):
Explicitly set the EmptyDir to be in memory. Uses tmpfs.
- class google.cloud.run_v2.types.EncryptionKeyRevocationAction(value)[source]¶
Bases:
proto.enums.Enum
Specifies behavior if an encryption key used by a resource is revoked.
- Values:
- ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED (0):
Unspecified
- PREVENT_NEW (1):
Prevents the creation of new instances.
- SHUTDOWN (2):
Shuts down existing instances, and prevents creation of new ones.
- class google.cloud.run_v2.types.EnvVar(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
EnvVar represents an environment variable present in a Container.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- value¶
Literal value of the environment variable. Defaults to “”, and the maximum length is 32768 bytes. Variable references are not supported in Cloud Run.
This field is a member of oneof
values
.- Type
- class google.cloud.run_v2.types.EnvVarSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
EnvVarSource represents a source for the value of an EnvVar.
- secret_key_ref¶
Selects a secret and a specific version from Cloud Secret Manager.
- class google.cloud.run_v2.types.Execution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Execution represents the configuration of a single execution. A execution an immutable resource that references a container image which is run to completion.
- uid¶
Output only. Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- Type
- generation¶
Output only. A number that monotonically increases every time the user modifies the desired state.
- Type
- labels¶
Output only. 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
- annotations¶
Output only. 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.
- create_time¶
Output only. Represents time when the execution was acknowledged by the execution controller. It is not guaranteed to be set in happens-before order across separate operations.
- start_time¶
Output only. Represents time when the execution started to run. It is not guaranteed to be set in happens-before order across separate operations.
- completion_time¶
Output only. Represents time when the execution was completed. It is not guaranteed to be set in happens-before order across separate operations.
- update_time¶
Output only. The last-modified time.
- delete_time¶
Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.
- expire_time¶
Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.
- launch_stage¶
The least stable launch stage needed to create this resource, as defined by Google Cloud Platform Launch Stages. Cloud Run supports
ALPHA
,BETA
, andGA
.Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are were, this field will be BETA.
- Type
google.api.launch_stage_pb2.LaunchStage
- parallelism¶
Output only. Specifies the maximum desired number of tasks the execution should run at any given time. Must be <= task_count. The actual number of tasks running in steady state will be less than this number when ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism.
- Type
- task_count¶
Output only. Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution.
- Type
- template¶
Output only. The template used to create tasks for this execution.
- reconciling¶
Output only. Indicates whether the resource’s reconciliation is still in progress. See comments in
Job.reconciling
for additional information on reconciliation process in Cloud Run.- Type
- conditions¶
Output only. The Condition of this Execution, containing its readiness status, and detailed error information in case it did not reach the desired state.
- Type
MutableSequence[google.cloud.run_v2.types.Condition]
- observed_generation¶
Output only. The generation of this Execution. See comments in
reconciling
for additional information on reconciliation process in Cloud Run.- Type
- etag¶
Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
- Type
- class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.run_v2.types.ExecutionEnvironment(value)[source]¶
Bases:
proto.enums.Enum
Alternatives for execution environments.
- Values:
- EXECUTION_ENVIRONMENT_UNSPECIFIED (0):
Unspecified
- EXECUTION_ENVIRONMENT_GEN1 (1):
Uses the First Generation environment.
- EXECUTION_ENVIRONMENT_GEN2 (2):
Uses Second Generation environment.
- class google.cloud.run_v2.types.ExecutionReference(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.
- create_time¶
Creation timestamp of the execution.
- completion_time¶
Creation timestamp of the execution.
- delete_time¶
The deletion time of the execution. It is only populated as a response to a Delete request.
- completion_status¶
Status for the execution completion.
- class CompletionStatus(value)[source]¶
Bases:
proto.enums.Enum
Possible execution completion status.
- Values:
- COMPLETION_STATUS_UNSPECIFIED (0):
The default value. This value is used if the state is omitted.
- EXECUTION_SUCCEEDED (1):
Job execution has succeeded.
- EXECUTION_FAILED (2):
Job execution has failed.
- EXECUTION_RUNNING (3):
Job execution is running normally.
- EXECUTION_PENDING (4):
Waiting for backing resources to be provisioned.
- EXECUTION_CANCELLED (5):
Job execution has been cancelled by the user.
- class google.cloud.run_v2.types.ExecutionTemplate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ExecutionTemplate describes the data an execution should have when created from a template.
- labels¶
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.
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 ExecutionTemplate.
- annotations¶
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.
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. All system annotations in v1 now have a corresponding field in v2 ExecutionTemplate.
This field follows Kubernetes annotations' namespacing, limits, and rules.
- parallelism¶
Specifies the maximum desired number of tasks the execution should run at given time. Must be <= task_count. When the job is run, if this field is 0 or unset, the maximum possible value will be used for that execution. The actual number of tasks running in steady state will be less than this number when there are fewer tasks waiting to be completed remaining, i.e. when the work left to do is less than max parallelism.
- Type
- task_count¶
Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution. Defaults to 1.
- Type
- template¶
Required. Describes the task(s) that will be created when executing an execution.
- class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.run_v2.types.GCSVolumeSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a volume backed by a Cloud Storage bucket using Cloud Storage FUSE.
- class google.cloud.run_v2.types.GRPCAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
GRPCAction describes an action involving a GRPC port.
- port¶
Optional. Port number of the gRPC service. Number must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort.
- Type
- service¶
Optional. Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this is not specified, the default behavior is defined by gRPC.
- Type
- class google.cloud.run_v2.types.GetExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for obtaining a Execution by its full name.
- class google.cloud.run_v2.types.GetJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for obtaining a Job by its full name.
- class google.cloud.run_v2.types.GetRevisionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for obtaining a Revision by its full name.
- class google.cloud.run_v2.types.GetServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for obtaining a Service by its full name.
- class google.cloud.run_v2.types.GetTaskRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for obtaining a Task by its full name.
- class google.cloud.run_v2.types.HTTPGetAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
HTTPGetAction describes an action based on HTTP Get requests.
- http_headers¶
Optional. Custom headers to set in the request. HTTP allows repeated headers.
- Type
MutableSequence[google.cloud.run_v2.types.HTTPHeader]
- class google.cloud.run_v2.types.HTTPHeader(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
HTTPHeader describes a custom header to be used in HTTP probes
- class google.cloud.run_v2.types.IngressTraffic(value)[source]¶
Bases:
proto.enums.Enum
Allowed ingress traffic for the Container.
- Values:
- INGRESS_TRAFFIC_UNSPECIFIED (0):
Unspecified
- INGRESS_TRAFFIC_ALL (1):
All inbound traffic is allowed.
- INGRESS_TRAFFIC_INTERNAL_ONLY (2):
Only internal traffic is allowed.
- INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER (3):
Both internal and Google Cloud Load Balancer traffic is allowed.
- INGRESS_TRAFFIC_NONE (4):
No ingress traffic is allowed.
- class google.cloud.run_v2.types.Job(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Job represents the configuration of a single job, which references a container image that is run to completion.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- name¶
The fully qualified name of this Job.
Format:
projects/{project}/locations/{location}/jobs/{job}
- Type
- uid¶
Output only. Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- Type
- generation¶
Output only. A number that monotonically increases every time the user modifies the desired state.
- Type
- labels¶
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.
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 Job.
- annotations¶
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.
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 on new resources. All system annotations in v1 now have a corresponding field in v2 Job.
This field follows Kubernetes annotations' namespacing, limits, and rules.
- create_time¶
Output only. The creation time.
- update_time¶
Output only. The last-modified time.
- delete_time¶
Output only. The deletion time. It is only populated as a response to a Delete request.
- expire_time¶
Output only. For a deleted resource, the time after which it will be permamently deleted.
- launch_stage¶
The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports
ALPHA
,BETA
, andGA
. 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.
- Type
google.api.launch_stage_pb2.LaunchStage
- binary_authorization¶
Settings for the Binary Authorization feature.
- template¶
Required. The template used to create executions for this Job.
- observed_generation¶
Output only. The generation of this Job. See comments in
reconciling
for additional information on reconciliation process in Cloud Run.- Type
- terminal_condition¶
Output only. The Condition of this Job, containing its readiness status, and detailed error information in case it did not reach the desired state.
- conditions¶
Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Job does not reach its desired state. See comments in
reconciling
for additional information on reconciliation process in Cloud Run.- Type
MutableSequence[google.cloud.run_v2.types.Condition]
- latest_created_execution¶
Output only. Name of the last created execution.
- reconciling¶
Output only. Returns true if the Job is currently being acted upon by the system to bring it into the desired state.
When a new Job is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Job to the desired state. This process is called reconciliation. While reconciliation is in process,
observed_generation
andlatest_succeeded_execution
, 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 state matches the Job, or there was an error, and reconciliation failed. This state can be found interminal_condition.state
.If reconciliation succeeded, the following fields will match:
observed_generation
andgeneration
,latest_succeeded_execution
andlatest_created_execution
.If reconciliation failed,
observed_generation
andlatest_succeeded_execution
will have the state of the last succeeded execution or empty for newly created Job. Additional information on the failure can be found interminal_condition
andconditions
.- Type
- start_execution_token¶
A unique string used as a suffix creating a new execution. The Job will become ready when the execution is successfully started. The sum of job name and token length must be fewer than 63 characters.
This field is a member of oneof
create_execution
.- Type
- run_execution_token¶
A unique string used as a suffix for creating a new execution. The Job will become ready when the execution is successfully completed. The sum of job name and token length must be fewer than 63 characters.
This field is a member of oneof
create_execution
.- Type
- etag¶
Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
- Type
- class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.run_v2.types.ListExecutionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for retrieving a list of Executions.
- parent¶
Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use “-” instead of Job name. Format:
projects/{project}/locations/{location}/jobs/{job}
, where{project}
can be project id or number.- Type
- page_token¶
A page token received from a previous call to ListExecutions. All other parameters must match.
- Type
- class google.cloud.run_v2.types.ListExecutionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message containing a list of Executions.
- executions¶
The resulting list of Executions.
- Type
MutableSequence[google.cloud.run_v2.types.Execution]
- class google.cloud.run_v2.types.ListJobsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for retrieving a list of Jobs.
- parent¶
Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number.
- Type
- page_token¶
A page token received from a previous call to ListJobs. All other parameters must match.
- Type
- class google.cloud.run_v2.types.ListJobsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message containing a list of Jobs.
- jobs¶
The resulting list of Jobs.
- Type
MutableSequence[google.cloud.run_v2.types.Job]
- class google.cloud.run_v2.types.ListRevisionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for retrieving a list of Revisions.
- parent¶
Required. The Service from which the Revisions should be listed. To list all Revisions across Services, use “-” instead of Service name. Format:
projects/{project}/locations/{location}/services/{service}
- Type
- page_token¶
A page token received from a previous call to ListRevisions. All other parameters must match.
- Type
- class google.cloud.run_v2.types.ListRevisionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message containing a list of Revisions.
- revisions¶
The resulting list of Revisions.
- Type
MutableSequence[google.cloud.run_v2.types.Revision]
- class google.cloud.run_v2.types.ListServicesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for retrieving a list of Services.
- parent¶
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.
- Type
- page_token¶
A page token received from a previous call to ListServices. All other parameters must match.
- Type
- class google.cloud.run_v2.types.ListServicesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message containing a list of Services.
- services¶
The resulting list of Services.
- Type
MutableSequence[google.cloud.run_v2.types.Service]
- class google.cloud.run_v2.types.ListTasksRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for retrieving a list of Tasks.
- parent¶
Required. The Execution from which the Tasks should be listed. To list all Tasks across Executions of a Job, use “-” instead of Execution name. To list all Tasks across Jobs, use “-” instead of Job name. Format:
projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
- Type
- page_token¶
A page token received from a previous call to ListTasks. All other parameters must match.
- Type
- class google.cloud.run_v2.types.ListTasksResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message containing a list of Tasks.
- tasks¶
The resulting list of Tasks.
- Type
MutableSequence[google.cloud.run_v2.types.Task]
- class google.cloud.run_v2.types.NFSVolumeSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents an NFS mount.
- class google.cloud.run_v2.types.NodeSelector(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Hardware constraints configuration.
- class google.cloud.run_v2.types.Probe(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- initial_delay_seconds¶
Optional. Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240.
- Type
- timeout_seconds¶
Optional. Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds.
- Type
- period_seconds¶
Optional. How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.
- Type
- failure_threshold¶
Optional. Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
- Type
- http_get¶
Optional. HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.
This field is a member of oneof
probe_type
.
- tcp_socket¶
Optional. TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.
This field is a member of oneof
probe_type
.
- class google.cloud.run_v2.types.ResourceRequirements(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ResourceRequirements describes the compute resource requirements.
- limits¶
Only
memory
andcpu
keys in the map are supported.Notes: * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu. * For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
- cpu_idle¶
Determines whether CPU is only allocated during requests (true by default). However, if ResourceRequirements is set, the caller must explicitly set this field to true to preserve the default behavior.
- Type
- startup_cpu_boost¶
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
- Type
- class LimitsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.run_v2.types.Revision(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A Revision is an immutable snapshot of code and configuration. A Revision references a container image. Revisions are only created by updates to its parent Service.
- uid¶
Output only. Server assigned unique identifier for the Revision. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- Type
- generation¶
Output only. A number that monotonically increases every time the user modifies the desired state.
- Type
- labels¶
Output only. 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.
- annotations¶
Output only. 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.
- create_time¶
Output only. The creation time.
- update_time¶
Output only. The last-modified time.
- delete_time¶
Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.
- expire_time¶
Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.
- launch_stage¶
The least stable launch stage needed to create this resource, as defined by Google Cloud Platform Launch Stages. Cloud Run supports
ALPHA
,BETA
, andGA
.Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are were, this field will be BETA.
- Type
google.api.launch_stage_pb2.LaunchStage
- scaling¶
Scaling settings for this revision.
- vpc_access¶
VPC Access configuration for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
- max_instance_request_concurrency¶
Sets the maximum number of requests that each serving instance can receive.
- Type
- timeout¶
Max allowed time for an instance to respond to a request.
- service_account¶
Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has.
- Type
- containers¶
Holds the single container that defines the unit of execution for this Revision.
- Type
MutableSequence[google.cloud.run_v2.types.Container]
- volumes¶
A list of Volumes to make available to containers.
- Type
MutableSequence[google.cloud.run_v2.types.Volume]
- execution_environment¶
The execution environment being used to host this Revision.
- encryption_key¶
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
- Type
- service_mesh¶
Enables service mesh connectivity.
- encryption_key_revocation_action¶
The action to take if the encryption key is revoked.
- encryption_key_shutdown_duration¶
If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.
- reconciling¶
Output only. Indicates whether the resource’s reconciliation is still in progress. See comments in
Service.reconciling
for additional information on reconciliation process in Cloud Run.- Type
- conditions¶
Output only. The Condition of this Revision, containing its readiness status, and detailed error information in case it did not reach a serving state.
- Type
MutableSequence[google.cloud.run_v2.types.Condition]
- observed_generation¶
Output only. The generation of this Revision currently serving traffic. See comments in
reconciling
for additional information on reconciliation process in Cloud Run.- Type
- scaling_status¶
Output only. The current effective scaling settings for the revision.
- node_selector¶
The node selector for the revision.
- etag¶
Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
- Type
- class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.run_v2.types.RevisionScaling(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Settings for revision-level scaling settings.
- min_instance_count¶
Optional. Minimum number of serving instances that this resource should have.
- Type
- max_instance_count¶
Optional. Maximum number of serving instances that this resource should have. When unspecified, the field is set to the server default value of 100. For more information see https://cloud.google.com/run/docs/configuring/max-instances
- Type
- class google.cloud.run_v2.types.RevisionScalingStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Effective settings for the current revision
- class google.cloud.run_v2.types.RevisionTemplate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
RevisionTemplate describes the data a revision should have when created from a template.
- revision¶
Optional. The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.
- Type
- labels¶
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.
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 RevisionTemplate.
- annotations¶
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.
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. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate.
This field follows Kubernetes annotations' namespacing, limits, and rules.
- scaling¶
Optional. Scaling settings for this Revision.
- vpc_access¶
Optional. VPC Access configuration to use for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
- timeout¶
Optional. Max allowed time for an instance to respond to a request.
- service_account¶
Optional. Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project’s default service account.
- Type
- containers¶
Holds the single container that defines the unit of execution for this Revision.
- Type
MutableSequence[google.cloud.run_v2.types.Container]
- volumes¶
Optional. A list of Volumes to make available to containers.
- Type
MutableSequence[google.cloud.run_v2.types.Volume]
- execution_environment¶
Optional. The sandbox environment to host this Revision.
- encryption_key¶
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
- Type
- max_instance_request_concurrency¶
Optional. Sets the maximum number of requests that each serving instance can receive. If not specified or 0, concurrency defaults to 80 when requested
CPU >= 1
and defaults to 1 when requestedCPU < 1
.- Type
- service_mesh¶
Optional. Enables service mesh connectivity.
- encryption_key_revocation_action¶
Optional. The action to take if the encryption key is revoked.
- encryption_key_shutdown_duration¶
Optional. If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.
- node_selector¶
Optional. The node selector for the revision template.
- class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.run_v2.types.RunJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message to create a new Execution of a Job.
- name¶
Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.
- Type
- validate_only¶
Indicates that the request should be validated without actually deleting any resources.
- Type
- etag¶
A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
- Type
- overrides¶
Overrides specification for a given execution of a job. If provided, overrides will be applied to update the execution or task spec.
- class Overrides(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
RunJob Overrides that contains Execution fields to be overridden.
- container_overrides¶
Per container override specification.
- Type
MutableSequence[google.cloud.run_v2.types.RunJobRequest.Overrides.ContainerOverride]
- task_count¶
Optional. The desired number of tasks the execution should run. Will replace existing task_count value.
- Type
- timeout¶
Duration in seconds the task may be active before the system will actively try to mark it failed and kill associated containers. Will replace existing timeout_seconds value.
- class ContainerOverride(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Per-container override specification.
- args¶
Optional. Arguments to the entrypoint. Will replace existing args for override.
- Type
MutableSequence[str]
- env¶
List of environment variables to set in the container. Will be merged with existing env for override.
- Type
MutableSequence[google.cloud.run_v2.types.EnvVar]
- class google.cloud.run_v2.types.SecretKeySelector(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
SecretEnvVarSource represents a source for the value of an EnvVar.
- secret¶
Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project.
- Type
- class google.cloud.run_v2.types.SecretVolumeSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The secret’s value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secret.
- secret¶
Required. The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project.
- Type
- items¶
If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version.
- Type
MutableSequence[google.cloud.run_v2.types.VersionToPath]
- default_mode¶
Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting.
Notes
Internally, a umask of 0222 will be applied to any non-zero value.
This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10).
This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
This might be in conflict with other options that affect the file mode, like fsGroup, and as a result, other mode bits could be set.
- Type
- class google.cloud.run_v2.types.Service(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- name¶
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}
- Type
- description¶
User-provided description of the Service. This field currently has a 512-character limit.
- Type
- uid¶
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.
- Type
- generation¶
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 aninteger
.- Type
- labels¶
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.
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.
- annotations¶
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.
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.
This field follows Kubernetes annotations' namespacing, limits, and rules.
- create_time¶
Output only. The creation time.
- update_time¶
Output only. The last-modified time.
- delete_time¶
Output only. The deletion time. It is only populated as a response to a Delete request.
- expire_time¶
Output only. For a deleted resource, the time after which it will be permamently deleted.
- ingress¶
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.
- launch_stage¶
Optional. The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports
ALPHA
,BETA
, andGA
. 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.
- Type
google.api.launch_stage_pb2.LaunchStage
- binary_authorization¶
Optional. Settings for the Binary Authorization feature.
- template¶
Required. The template used to create revisions for this Service.
- traffic¶
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.- Type
MutableSequence[google.cloud.run_v2.types.TrafficTarget]
- scaling¶
Optional. Specifies service-level scaling settings
- invoker_iam_disabled¶
Optional. Disables IAM permission check for run.routes.invoke for callers of this service. This feature is available by invitation only. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
- Type
- default_uri_disabled¶
Optional. Disables public resolution of the default URI of this service.
- Type
- custom_audiences¶
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.
- Type
MutableSequence[str]
- observed_generation¶
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 astring
instead of aninteger
.- Type
- terminal_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.
- conditions¶
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.- Type
MutableSequence[google.cloud.run_v2.types.Condition]
- latest_ready_revision¶
Output only. Name of the latest revision that is serving traffic. See comments in
reconciling
for additional information on reconciliation process in Cloud Run.- Type
- latest_created_revision¶
Output only. Name of the last created revision. See comments in
reconciling
for additional information on reconciliation process in Cloud Run.- Type
- traffic_statuses¶
Output only. Detailed status information for corresponding traffic targets. See comments in
reconciling
for additional information on reconciliation process in Cloud Run.- Type
MutableSequence[google.cloud.run_v2.types.TrafficTargetStatus]
- reconciling¶
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_revison
,traffic_statuses
, anduri
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 interminal_condition.state
.If reconciliation succeeded, the following fields will match:
traffic
andtraffic_statuses
,observed_generation
andgeneration
,latest_ready_revision
andlatest_created_revision
.If reconciliation failed,
traffic_statuses
,observed_generation
, andlatest_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 interminal_condition
andconditions
.- Type
- etag¶
Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
- Type
- class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.run_v2.types.ServiceMesh(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Settings for Cloud Service Mesh. For more information see https://cloud.google.com/service-mesh/docs/overview.
- class google.cloud.run_v2.types.ServiceScaling(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Scaling settings applied at the service level rather than at the revision level.
- min_instance_count¶
Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.
- Type
- scaling_mode¶
Optional. The scaling mode for the service.
- manual_instance_count¶
Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.
This field is a member of oneof
_manual_instance_count
.- Type
- class ScalingMode(value)[source]¶
Bases:
proto.enums.Enum
The scaling mode for the service. If not provided, it defaults to AUTOMATIC.
- Values:
- SCALING_MODE_UNSPECIFIED (0):
Unspecified.
- AUTOMATIC (1):
Scale based on traffic between min and max instances.
- MANUAL (2):
Scale to exactly min instances and ignore max instances.
- class google.cloud.run_v2.types.StorageSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Location of the source in an archive file in Google Cloud Storage.
- bucket¶
Required. Google Cloud Storage bucket containing the source (see Bucket Name Requirements).
- Type
- object_¶
Required. Google Cloud Storage object containing the source.
This object must be a gzipped archive file (
.tar.gz
) containing source to build.- Type
- class google.cloud.run_v2.types.SubmitBuildRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for submitting a Build.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- parent¶
Required. The project and location to build in. Location must be a region, e.g., ‘us-central1’ or ‘global’ if the global builder is to be used. Format:
projects/{project}/locations/{location}
- Type
- docker_build¶
Build the source using Docker. This means the source has a Dockerfile.
This field is a member of oneof
build_type
.
- service_account¶
Optional. The service account to use for the build. If not set, the default Cloud Build service account for the project will be used.
- Type
- worker_pool¶
Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is
projects/{project}/locations/{region}/workerPools/{workerPool}
where{project}
and{region}
are the project id and region respectively where the worker pool is defined and{workerPool}
is the short name of the worker pool.- Type
- class BuildpacksBuild(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Build the source using Buildpacks.
- function_target¶
Optional. Name of the function target if the source is a function source. Required for function builds.
- Type
- cache_image_uri¶
Optional. cache_image_uri is the GCR/AR URL where the cache image will be stored. cache_image_uri is optional and omitting it will disable caching. This URL must be stable across builds. It is used to derive a build-specific temporary URL by substituting the tag with the build ID. The build will clean up the temporary image on a best-effort basis.
- Type
- environment_variables¶
Optional. User-provided build-time environment variables.
- enable_automatic_updates¶
Optional. Whether or not the application container will be enrolled in automatic base image updates. When true, the application will be built on a scratch base image, so the base layers can be appended at run time.
- Type
- class EnvironmentVariablesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class DockerBuild(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Build the source using Docker. This means the source has a Dockerfile.
- class google.cloud.run_v2.types.SubmitBuildResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for submitting a Build.
- build_operation¶
Cloud Build operation to be polled via CloudBuild API.
- Type
google.longrunning.operations_pb2.Operation
- base_image_uri¶
URI of the base builder image in Artifact Registry being used in the build. Used to opt into automatic base image updates.
- Type
- class google.cloud.run_v2.types.TCPSocketAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
TCPSocketAction describes an action based on opening a socket
- class google.cloud.run_v2.types.Task(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Task represents a single run of a container to completion.
- uid¶
Output only. Server assigned unique identifier for the Task. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
- Type
- generation¶
Output only. A number that monotonically increases every time the user modifies the desired state.
- Type
- labels¶
Output only. 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
- annotations¶
Output only. 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.
- create_time¶
Output only. Represents time when the task was created by the system. It is not guaranteed to be set in happens-before order across separate operations.
- scheduled_time¶
Output only. Represents time when the task was scheduled to run by the system. It is not guaranteed to be set in happens-before order across separate operations.
- start_time¶
Output only. Represents time when the task started to run. It is not guaranteed to be set in happens-before order across separate operations.
- completion_time¶
Output only. Represents time when the Task was completed. It is not guaranteed to be set in happens-before order across separate operations.
- update_time¶
Output only. The last-modified time.
- delete_time¶
Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.
- expire_time¶
Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.
- containers¶
Holds the single container that defines the unit of execution for this task.
- Type
MutableSequence[google.cloud.run_v2.types.Container]
- volumes¶
A list of Volumes to make available to containers.
- Type
MutableSequence[google.cloud.run_v2.types.Volume]
- timeout¶
Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout.
- service_account¶
Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project’s default service account.
- Type
- execution_environment¶
The execution environment being used to host this Task.
- reconciling¶
Output only. Indicates whether the resource’s reconciliation is still in progress. See comments in
Job.reconciling
for additional information on reconciliation process in Cloud Run.- Type
- conditions¶
Output only. The Condition of this Task, containing its readiness status, and detailed error information in case it did not reach the desired state.
- Type
MutableSequence[google.cloud.run_v2.types.Condition]
- observed_generation¶
Output only. The generation of this Task. See comments in
Job.reconciling
for additional information on reconciliation process in Cloud Run.- Type
- retried¶
Output only. The number of times this Task was retried. Tasks are retried when they fail up to the maxRetries limit.
- Type
- last_attempt_result¶
Output only. Result of the last attempt of this Task.
- encryption_key¶
Output only. 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
- Type
- vpc_access¶
Output only. VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
- etag¶
Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
- Type
- class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.run_v2.types.TaskAttemptResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Result of a task attempt.
- status¶
Output only. The status of this attempt. If the status code is OK, then the attempt succeeded.
- Type
google.rpc.status_pb2.Status
- class google.cloud.run_v2.types.TaskTemplate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
TaskTemplate describes the data a task should have when created from a template.
- containers¶
Holds the single container that defines the unit of execution for this task.
- Type
MutableSequence[google.cloud.run_v2.types.Container]
- volumes¶
Optional. A list of Volumes to make available to containers.
- Type
MutableSequence[google.cloud.run_v2.types.Volume]
- max_retries¶
Number of retries allowed per Task, before marking this Task failed. Defaults to 3.
This field is a member of oneof
retries
.- Type
- timeout¶
Optional. Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. Defaults to 600 seconds.
- service_account¶
Optional. Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project’s default service account.
- Type
- execution_environment¶
Optional. The execution environment being used to host this Task.
- encryption_key¶
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
- Type
- vpc_access¶
Optional. VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
- class google.cloud.run_v2.types.TrafficTarget(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Holds a single traffic routing entry for the Service. Allocations can be done to a specific Revision name, or pointing to the latest Ready Revision.
- type_¶
The allocation type for this traffic target.
- revision¶
Revision to which to send this portion of traffic, if traffic allocation is by revision.
- Type
- percent¶
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
- Type
- class google.cloud.run_v2.types.TrafficTargetAllocationType(value)[source]¶
Bases:
proto.enums.Enum
The type of instance allocation.
- Values:
- TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED (0):
Unspecified instance allocation type.
- TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST (1):
Allocates instances to the Service’s latest ready Revision.
- TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION (2):
Allocates instances to a Revision by name.
- class google.cloud.run_v2.types.TrafficTargetStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the observed state of a single
TrafficTarget
entry.- type_¶
The allocation type for this traffic target.
- class google.cloud.run_v2.types.UpdateJobRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for updating a Job.
- job¶
Required. The Job to be updated.
- validate_only¶
Indicates that the request should be validated and default values populated, without persisting the request or updating any resources.
- Type
- class google.cloud.run_v2.types.UpdateServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for updating a service.
- update_mask¶
Optional. The list of fields to be updated.
- service¶
Required. The Service to be updated.
- validate_only¶
Indicates that the request should be validated and default values populated, without persisting the request or updating any resources.
- Type
- class google.cloud.run_v2.types.VersionToPath(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
VersionToPath maps a specific version of a secret to a relative file to mount to, relative to VolumeMount’s mount_path.
- version¶
The Cloud Secret Manager secret version. Can be ‘latest’ for the latest value, or an integer or a secret alias for a specific version.
- Type
- mode¶
Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume’s default mode will be used.
Notes
Internally, a umask of 0222 will be applied to any non-zero value.
This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10).
This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
- Type
- class google.cloud.run_v2.types.Volume(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Volume represents a named volume in a container.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- secret¶
Secret represents a secret that should populate this volume.
This field is a member of oneof
volume_type
.
- cloud_sql_instance¶
For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.
This field is a member of oneof
volume_type
.
- nfs¶
For NFS Voumes, contains the path to the nfs Volume
This field is a member of oneof
volume_type
.
- class google.cloud.run_v2.types.VolumeMount(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
VolumeMount describes a mounting of a Volume within a container.
- mount_path¶
Required. Path within the container at which the volume should be mounted. Must not contain ‘:’. For Cloud SQL volumes, it can be left empty, or must otherwise be
/cloudsql
. All instances defined in the Volume will be available as/cloudsql/[instance]
. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run- Type
- class google.cloud.run_v2.types.VpcAccess(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
VPC Access settings. For more information on sending traffic to a VPC network, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
- connector¶
VPC Access connector name. Format:
projects/{project}/locations/{location}/connectors/{connector}
, where{project}
can be project id or number. For more information on sending traffic to a VPC network via a connector, visit https://cloud.google.com/run/docs/configuring/vpc-connectors.- Type
- egress¶
Optional. Traffic VPC egress settings. If not provided, it defaults to PRIVATE_RANGES_ONLY.
- network_interfaces¶
Optional. Direct VPC egress settings. Currently only single network interface is supported.
- Type
MutableSequence[google.cloud.run_v2.types.VpcAccess.NetworkInterface]
- class NetworkInterface(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Direct VPC egress settings.
- network¶
Optional. The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork.
- Type
- subnetwork¶
Optional. The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used.
- Type
- class VpcEgress(value)[source]¶
Bases:
proto.enums.Enum
Egress options for VPC access.
- Values:
- VPC_EGRESS_UNSPECIFIED (0):
Unspecified
- ALL_TRAFFIC (1):
All outbound traffic is routed through the VPC connector.
- PRIVATE_RANGES_ONLY (2):
Only private IP ranges are routed through the VPC connector.