---
title: "POST /v1/{+name}:rollbackTarget"
method: POST
path: "/v1/{+name}:rollbackTarget"
tags: ["projects"]
---

# POST /v1/{+name}:rollbackTarget

`POST /v1/{+name}:rollbackTarget`

Creates a `Rollout` to roll back the specified target.

## Path parameters

- `name` string, required

## Request body

- RollbackTargetRequest — The request object for `RollbackTarget`.
  - `rolloutToRollBack` string — Optional. If provided, this must be the latest `Rollout` that is on the `Target`.
  - `rollbackConfig` RollbackTargetConfig — Configs for the Rollback rollout.
    - `rollout` Rollout — A `Rollout` resource in the Cloud Deploy API. A `Rollout` contains information around a specific deployment to a `Target`.
      - `state` 'STATE_UNSPECIFIED' | 'SUCCEEDED' | 'FAILED' | 'IN_PROGRESS' | 'PENDING_APPROVAL' | 'APPROVAL_REJECTED' | 'PENDING' | 'PENDING_RELEASE' | 'CANCELLING' | 'CANCELLED' | 'HALTED' — Output only. Current state of the `Rollout`.
      - `etag` string — This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
      - `activeRepairAutomationRun` string — Output only. The AutomationRun actively repairing the rollout.
      - `metadata` Metadata — Metadata includes information associated with a `Rollout`.
        - `automation` AutomationRolloutMetadata — AutomationRolloutMetadata contains Automation-related actions that were performed on a rollout.
          - `promoteAutomationRun` string — Output only. The name of the AutomationRun initiated by a promote release rule.
          - `repairAutomationRuns` string[] — Output only. The names of the AutomationRuns initiated by a repair rollout rule.
          - `advanceAutomationRuns` string[] — Output only. The names of the AutomationRuns initiated by an advance rollout rule.
        - `cloudRun` CloudRunMetadata — CloudRunMetadata contains information from a Cloud Run deployment.
          - `revision` string — Output only. The Cloud Run Revision id associated with a `Rollout`.
          - `previousRevision` string — Output only. The previous Cloud Run Revision name associated with a `Rollout`. Only set when a canary deployment strategy is configured. Format for service is projects/{project}/locations/{location}/services/{service}/revisions/{revision}. Format for worker pool is projects/{project}/locations/{location}/workerPools/{workerpool}/revisions/{revision}.
          - `workerPool` string — Output only. The Cloud Run worker pool associated with a `Rollout`. Format is `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
          - `service` string — Output only. The name of the Cloud Run Service that is associated with a `Rollout`. Format is `projects/{project}/locations/{location}/services/{service}`.
          - `serviceUrls` string[] — Output only. The Cloud Run Service urls that are associated with a `Rollout`.
          - `job` string — Output only. The name of the Cloud Run job that is associated with a `Rollout`. Format is `projects/{project}/locations/{location}/jobs/{job_name}`.
        - `custom` CustomMetadata — CustomMetadata contains information from a user-defined operation.
          - `values` object — Output only. Key-value pairs provided by the user-defined operation.
      - `uid` string — Output only. Unique identifier of the `Rollout`.
      - `labels` object — Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
      - `deployEndTime` string, google-datetime — Output only. Time at which the `Rollout` finished deploying.
      - `deployFailureCause` 'FAILURE_CAUSE_UNSPECIFIED' | 'CLOUD_BUILD_UNAVAILABLE' | 'EXECUTION_FAILED' | 'DEADLINE_EXCEEDED' | 'RELEASE_FAILED' | 'RELEASE_ABANDONED' | 'VERIFICATION_CONFIG_NOT_FOUND' | 'CLOUD_BUILD_REQUEST_FAILED' | 'OPERATION_FEATURE_NOT_SUPPORTED' — Output only. The reason this rollout failed. This will always be unspecified while the rollout is in progress.
      - `failureReason` string — Output only. Additional information about the rollout failure, if available.
      - `controllerRollout` string — Output only. Name of the `ControllerRollout`. Format is `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      - `name` string — Identifier. Name of the `Rollout`. Format is `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. The `rollout` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`
      - `annotations` object — Optional. User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
      - `createTime` string, google-datetime — Output only. Time at which the `Rollout` was created.
      - `rolledBackByRollouts` string[] — Output only. Names of `Rollouts` that rolled back this `Rollout`.
      - `approvalState` 'APPROVAL_STATE_UNSPECIFIED' | 'NEEDS_APPROVAL' | 'DOES_NOT_NEED_APPROVAL' | 'APPROVED' | 'REJECTED' — Output only. Approval state of the `Rollout`.
      - `deployingBuild` string — Output only. The resource name of the Cloud Build `Build` object that is used to deploy the Rollout. Format is `projects/{project}/locations/{location}/builds/{build}`.
      - `enqueueTime` string, google-datetime — Output only. Time at which the `Rollout` was enqueued.
      - `deployStartTime` string, google-datetime — Output only. Time at which the `Rollout` started deploying.
      - `targetId` string — Required. The ID of Target to which this `Rollout` is deploying.
      - `phases` Phase[] — Output only. The phases that represent the workflows of this `Rollout`.
        - `childRolloutJobs` ChildRolloutJobs — ChildRollouts job composition
          - `createRolloutJobs` Job[] — Output only. List of CreateChildRolloutJobs
            - `id` string — Output only. The ID of the Job.
            - `postdeployJob` PostdeployJob — A postdeploy Job.
              - …
            - `createChildRolloutJob` CreateChildRolloutJob — A createChildRollout Job.
            - `advanceChildRolloutJob` AdvanceChildRolloutJob — An advanceChildRollout Job.
            - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'DISABLED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'SKIPPED' | 'IGNORED' — Output only. The current state of the Job.
            - `jobRun` string — Output only. The name of the `JobRun` responsible for the most recent invocation of this Job.
            - `verifyJob` VerifyJob — A verify Job.
              - …
            - `skipMessage` string — Output only. Additional information on why the Job was skipped, if available.
            - `deployJob` DeployJob — A deploy Job.
            - `analysisJob` AnalysisJob — An analysis Job.
              - …
            - `predeployJob` PredeployJob — A predeploy Job.
              - …
          - `advanceRolloutJobs` Job[] — Output only. List of AdvanceChildRolloutJobs
            - `id` string — Output only. The ID of the Job.
            - `postdeployJob` PostdeployJob — A postdeploy Job.
              - …
            - `createChildRolloutJob` CreateChildRolloutJob — A createChildRollout Job.
            - `advanceChildRolloutJob` AdvanceChildRolloutJob — An advanceChildRollout Job.
            - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'DISABLED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'SKIPPED' | 'IGNORED' — Output only. The current state of the Job.
            - `jobRun` string — Output only. The name of the `JobRun` responsible for the most recent invocation of this Job.
            - `verifyJob` VerifyJob — A verify Job.
              - …
            - `skipMessage` string — Output only. Additional information on why the Job was skipped, if available.
            - `deployJob` DeployJob — A deploy Job.
            - `analysisJob` AnalysisJob — An analysis Job.
              - …
            - `predeployJob` PredeployJob — A predeploy Job.
              - …
        - `skipMessage` string — Output only. Additional information on why the Phase was skipped, if available.
        - `id` string — Output only. The ID of the Phase.
        - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'SKIPPED' — Output only. Current state of the Phase.
        - `deploymentJobs` DeploymentJobs — Deployment job composition.
          - `predeployJob` Job — Job represents an operation for a `Rollout`.
            - `id` string — Output only. The ID of the Job.
            - `postdeployJob` PostdeployJob — A postdeploy Job.
              - …
            - `createChildRolloutJob` CreateChildRolloutJob — A createChildRollout Job.
            - `advanceChildRolloutJob` AdvanceChildRolloutJob — An advanceChildRollout Job.
            - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'DISABLED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'SKIPPED' | 'IGNORED' — Output only. The current state of the Job.
            - `jobRun` string — Output only. The name of the `JobRun` responsible for the most recent invocation of this Job.
            - `verifyJob` VerifyJob — A verify Job.
              - …
            - `skipMessage` string — Output only. Additional information on why the Job was skipped, if available.
            - `deployJob` DeployJob — A deploy Job.
            - `analysisJob` AnalysisJob — An analysis Job.
              - …
            - `predeployJob` PredeployJob — A predeploy Job.
              - …
          - `analysisJob` Job — Job represents an operation for a `Rollout`.
            - `id` string — Output only. The ID of the Job.
            - `postdeployJob` PostdeployJob — A postdeploy Job.
              - …
            - `createChildRolloutJob` CreateChildRolloutJob — A createChildRollout Job.
            - `advanceChildRolloutJob` AdvanceChildRolloutJob — An advanceChildRollout Job.
            - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'DISABLED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'SKIPPED' | 'IGNORED' — Output only. The current state of the Job.
            - `jobRun` string — Output only. The name of the `JobRun` responsible for the most recent invocation of this Job.
            - `verifyJob` VerifyJob — A verify Job.
              - …
            - `skipMessage` string — Output only. Additional information on why the Job was skipped, if available.
            - `deployJob` DeployJob — A deploy Job.
            - `analysisJob` AnalysisJob — An analysis Job.
              - …
            - `predeployJob` PredeployJob — A predeploy Job.
              - …
          - `deployJob` Job — Job represents an operation for a `Rollout`.
            - `id` string — Output only. The ID of the Job.
            - `postdeployJob` PostdeployJob — A postdeploy Job.
              - …
            - `createChildRolloutJob` CreateChildRolloutJob — A createChildRollout Job.
            - `advanceChildRolloutJob` AdvanceChildRolloutJob — An advanceChildRollout Job.
            - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'DISABLED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'SKIPPED' | 'IGNORED' — Output only. The current state of the Job.
            - `jobRun` string — Output only. The name of the `JobRun` responsible for the most recent invocation of this Job.
            - `verifyJob` VerifyJob — A verify Job.
              - …
            - `skipMessage` string — Output only. Additional information on why the Job was skipped, if available.
            - `deployJob` DeployJob — A deploy Job.
            - `analysisJob` AnalysisJob — An analysis Job.
              - …
            - `predeployJob` PredeployJob — A predeploy Job.
              - …
          - `verifyJob` Job — Job represents an operation for a `Rollout`.
            - `id` string — Output only. The ID of the Job.
            - `postdeployJob` PostdeployJob — A postdeploy Job.
              - …
            - `createChildRolloutJob` CreateChildRolloutJob — A createChildRollout Job.
            - `advanceChildRolloutJob` AdvanceChildRolloutJob — An advanceChildRollout Job.
            - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'DISABLED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'SKIPPED' | 'IGNORED' — Output only. The current state of the Job.
            - `jobRun` string — Output only. The name of the `JobRun` responsible for the most recent invocation of this Job.
            - `verifyJob` VerifyJob — A verify Job.
              - …
            - `skipMessage` string — Output only. Additional information on why the Job was skipped, if available.
            - `deployJob` DeployJob — A deploy Job.
            - `analysisJob` AnalysisJob — An analysis Job.
              - …
            - `predeployJob` PredeployJob — A predeploy Job.
              - …
          - `postdeployJob` Job — Job represents an operation for a `Rollout`.
            - `id` string — Output only. The ID of the Job.
            - `postdeployJob` PostdeployJob — A postdeploy Job.
              - …
            - `createChildRolloutJob` CreateChildRolloutJob — A createChildRollout Job.
            - `advanceChildRolloutJob` AdvanceChildRolloutJob — An advanceChildRollout Job.
            - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'DISABLED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'ABORTED' | 'SKIPPED' | 'IGNORED' — Output only. The current state of the Job.
            - `jobRun` string — Output only. The name of the `JobRun` responsible for the most recent invocation of this Job.
            - `verifyJob` VerifyJob — A verify Job.
              - …
            - `skipMessage` string — Output only. Additional information on why the Job was skipped, if available.
            - `deployJob` DeployJob — A deploy Job.
            - `analysisJob` AnalysisJob — An analysis Job.
              - …
            - `predeployJob` PredeployJob — A predeploy Job.
              - …
      - `description` string — Optional. Description of the `Rollout` for user purposes. Max length is 255 characters.
      - `rollbackOfRollout` string — Output only. Name of the `Rollout` that is rolled back by this `Rollout`. Empty if this `Rollout` wasn't created as a rollback.
      - `approveTime` string, google-datetime — Output only. Time at which the `Rollout` was approved.
    - `startingPhaseId` string — Optional. The starting phase ID for the `Rollout`. If unspecified, the `Rollout` will start in the stable phase.
  - `rolloutId` string — Required. ID of the rollback `Rollout` to create.
  - `overrideDeployPolicy` string[] — Optional. Deploy policies to override. Format is `projects/{project}/locations/{location}/deployPolicies/{deploy_policy}`.
  - `targetId` string — Required. ID of the `Target` that is being rolled back.
  - `releaseId` string — Optional. ID of the `Release` to roll back to. If this isn't specified, the previous successful `Rollout` to the specified target will be used to determine the `Release`.
  - `validateOnly` boolean — Optional. If set to true, the request is validated and the user is provided with a `RollbackTargetResponse`.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/clouddeploy.md) · [All operations](https://skmtc.net/google/apis/clouddeploy/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/clouddeploy/versions/a8819765974a/schema)
