projects

Creates an Instance.

post/v2/{+parent}/instances

Request

  • Base URL: https://run.googleapis.com
  • URL: https://run.googleapis.com/v2/{+parent}/instances
  • Auth: one of:
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/cloud-platform) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/cloud-platform)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/run) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/run)

Path parameters

parentstring required

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

Query parameters

instanceIdstring

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

validateOnlyboolean

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

Request body

annotationsobject
clientstring

Arbitrary identifier for the API client.

clientVersionstring

Arbitrary version identifier for the API client.

createTimestring google-datetime

Output only. The creation time.

creatorstring

Output only. Email address of the authenticated creator.

defaultUriDisabledboolean

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

deleteTimestring google-datetime

Output only. The deletion time.

descriptionstring

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

encryptionKeystring

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

encryptionKeyRevocationAction'ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED' | 'PREVENT_NEW' | 'SHUTDOWN'

The action to take if the encryption key is revoked.

encryptionKeyShutdownDurationstring google-duration

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

etagstring

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

expireTimestring google-datetime

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

generationstring 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.

gpuZonalRedundancyDisabledboolean

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

iapEnabledboolean

Optional. IAP settings on the Instance.

ingress'INGRESS_TRAFFIC_UNSPECIFIED' | 'INGRESS_TRAFFIC_ALL' | 'INGRESS_TRAFFIC_INTERNAL_ONLY' | 'INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER' | 'INGRESS_TRAFFIC_NONE'

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

invokerIamDisabledboolean

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

labelsobject
lastModifierstring

Output only. Email address of the last authenticated modifier.

launchStage'LAUNCH_STAGE_UNSPECIFIED' | 'UNIMPLEMENTED' | 'PRELAUNCH' | 'EARLY_ACCESS' | 'ALPHA' | 'BETA' | 'GA' | 'DEPRECATED'

The launch stage as defined by Google Cloud Platform 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.

logUristring

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

namestring

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

observedGenerationstring int64

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

reconcilingboolean

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

restartPolicy'RESTART_POLICY_UNSPECIFIED' | 'ALWAYS' | 'ON_FAILURE' | 'NEVER'

Optional. Restart policy for the Instance.

satisfiesPzsboolean

Output only. Reserved for future use.

serviceAccountstring
sshEnabledboolean

Optional. Enables SSH access to the Instance.

uidstring

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.

updateTimestring google-datetime

Output only. The last-modified time.

urlsstring[]

Output only. All URLs serving traffic for this Instance.

Response

Successful response

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/run was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/run was removed from the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/run was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/run was removed from the endpoint's security scheme Oauth2c

    • info

      added the new optional request property

    • info

      added the new DELAYED_EXECUTION_EXCEEDING_DURATION_LIMIT enum value to the request property //

    • info

      added the new DELAYED_EXECUTION_EXCEEDING_DURATION_LIMIT enum value to the request property /