Close httplib2 connections.
Gets details of a single JobRun.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists JobRuns in a given project and location.
Retrieves the next page of results.
terminate(name, body=None, x__xgafv=None)
Terminates a Job Run in a given project and location.
close()
Close httplib2 connections.
get(name, x__xgafv=None)
Gets details of a single JobRun.
Args:
name: string, Required. Name of the `JobRun`. Format must be `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A `JobRun` resource in the Cloud Deploy API. A `JobRun` contains information of a single `Rollout` job evaluation.
"advanceChildRolloutJobRun": { # AdvanceChildRolloutJobRun contains information specific to a advanceChildRollout `JobRun`. # Output only. Information specific to an advanceChildRollout `JobRun`
"rollout": "A String", # Output only. Name of the `ChildRollout`. Format is `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
"rolloutPhaseId": "A String", # Output only. the ID of the ChildRollout's Phase.
},
"analysisJobRun": { # AnalysisJobRun contains information specific to an analysis `JobRun`. # Output only. Information specific to an analysis `JobRun`.
"alertPolicyAnalyses": [ # Output only. The status of the running alert policy checks configured for this analysis.
{ # AlertPolicyCheckStatus contains information specific to a single run of an alert policy check.
"alertPolicies": [ # Output only. The alert policies that this analysis monitors. Format is `projects/{project}/locations/{location}/alertPolicies/{alertPolicy}`.
"A String",
],
"failedAlertPolicies": [ # Output only. The alert policies that were found to be firing during this check. This will be empty if no incidents were found.
{ # FailedAlertPolicy contains information about an alert policy that was found to be firing during an alert policy check.
"alertPolicy": "A String", # Output only. The name of the alert policy that was found to be firing. Format is `projects/{project}/locations/{location}/alertPolicies/{alertPolicy}`.
"alerts": [ # Output only. Open alerts for the alerting policies that matched the alert policy check configuration.
"A String",
],
},
],
"failureMessage": "A String", # Output only. Additional information about the alert policy check failure, if available. This will be empty if the alert policy check succeeded.
"id": "A String", # Output only. The ID of this analysis.
"labels": { # Output only. The resolved labels used to filter for specific incidents.
"a_key": "A String",
},
},
],
"customCheckAnalyses": [ # Output only. The status of the running custom checks configured for this analysis.
{ # CustomCheckStatus contains information specific to a single iteration of a custom analysis job.
"failureCause": "A String", # Output only. The reason the analysis failed. This will always be unspecified while the analysis is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the analysis failure, if available.
"frequency": "A String", # Output only. The frequency in minutes at which the custom check is run.
"id": "A String", # Output only. The ID of the custom check.
"latestBuild": "A String", # Output only. The resource name of the Cloud Build `Build` object that was used to execute the latest run of this custom action check. Format is `projects/{project}/locations/{location}/builds/{build}`.
"metadata": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by the user-defined custom check operation. result.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
"task": { # A Task represents a unit of work that is executed as part of a Job. # Output only. The task that ran for this custom check.
"container": { # This task is represented by a container that is executed in the Cloud Build execution environment. # Optional. This task is represented by a container that is executed in the Cloud Build execution environment.
"args": [ # Optional. Args is the container arguments to use. This overrides the default arguments defined in the container image.
"A String",
],
"command": [ # Optional. Command is the container entrypoint to use. This overrides the default entrypoint defined in the container image.
"A String",
],
"env": { # Optional. Environment variables that are set in the container.
"a_key": "A String",
},
"image": "A String", # Required. Image is the container image to use.
},
},
},
],
"failedCheckId": "A String", # Output only. The ID of the configured check that failed. This will always be blank while the analysis is in progress or if it succeeded.
},
"createChildRolloutJobRun": { # CreateChildRolloutJobRun contains information specific to a createChildRollout `JobRun`. # Output only. Information specific to a createChildRollout `JobRun`.
"rollout": "A String", # Output only. Name of the `ChildRollout`. Format is `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
"rolloutPhaseId": "A String", # Output only. The ID of the childRollout Phase initiated by this JobRun.
},
"createTime": "A String", # Output only. Time at which the `JobRun` was created.
"deployJobRun": { # DeployJobRun contains information specific to a deploy `JobRun`. # Output only. Information specific to a deploy `JobRun`.
"artifact": { # The artifacts produced by a deploy operation. # Output only. The artifact of a deploy job run, if available.
"artifactUri": "A String", # Output only. URI of a directory containing the artifacts. All paths are relative to this location.
"manifestPaths": [ # Output only. File paths of the manifests applied during the deploy operation relative to the URI.
"A String",
],
},
"build": "A String", # Output only. The resource name of the Cloud Build `Build` object that is used to deploy. Format is `projects/{project}/locations/{location}/builds/{build}`.
"failureCause": "A String", # Output only. The reason the deploy failed. This will always be unspecified while the deploy is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the deploy failure, if available.
"metadata": { # DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to the user. # Output only. Metadata containing information about the deploy job run.
"cloudRun": { # CloudRunMetadata contains information from a Cloud Run deployment. # Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
"job": "A 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}`.
"previousRevision": "A 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}.
"revision": "A String", # Output only. The Cloud Run Revision id associated with a `Rollout`.
"service": "A 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": [ # Output only. The Cloud Run Service urls that are associated with a `Rollout`.
"A String",
],
"workerPool": "A String", # Output only. The Cloud Run worker pool associated with a `Rollout`. Format is `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
},
"custom": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by user-defined deploy operation.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
"customTarget": { # CustomTargetDeployMetadata contains information from a Custom Target deploy operation. # Output only. Custom Target metadata associated with a `DeployJobRun`.
"skipMessage": "A String", # Output only. Skip message provided in the results of a custom deploy operation.
},
},
},
"endTime": "A String", # Output only. Time at which the `JobRun` ended.
"etag": "A String", # Output only. 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.
"jobId": "A String", # Output only. ID of the `Rollout` job this `JobRun` corresponds to.
"name": "A String", # Output only. Name of the `JobRun`. Format is `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
"phaseId": "A String", # Output only. ID of the `Rollout` phase this `JobRun` belongs in.
"postdeployJobRun": { # PostdeployJobRun contains information specific to a postdeploy `JobRun`. # Output only. Information specific to a postdeploy `JobRun`.
"build": "A String", # Output only. The resource name of the Cloud Build `Build` object that is used to execute the custom actions associated with the postdeploy Job. Format is `projects/{project}/locations/{location}/builds/{build}`.
"failureCause": "A String", # Output only. The reason the postdeploy failed. This will always be unspecified while the postdeploy is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the postdeploy failure, if available.
"metadata": { # PostdeployJobRunMetadata contains metadata about the postdeploy `JobRun`. # Output only. Metadata containing information about the postdeploy `JobRun`.
"custom": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by user-defined postdeploy operation.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
},
},
"predeployJobRun": { # PredeployJobRun contains information specific to a predeploy `JobRun`. # Output only. Information specific to a predeploy `JobRun`.
"build": "A String", # Output only. The resource name of the Cloud Build `Build` object that is used to execute the custom actions associated with the predeploy Job. Format is `projects/{project}/locations/{location}/builds/{build}`.
"failureCause": "A String", # Output only. The reason the predeploy failed. This will always be unspecified while the predeploy is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the predeploy failure, if available.
"metadata": { # PredeployJobRunMetadata contains metadata about the predeploy `JobRun`. # Output only. Metadata containing information about the predeploy `JobRun`.
"custom": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by user-defined predeploy operation.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
},
},
"startTime": "A String", # Output only. Time at which the `JobRun` was started.
"state": "A String", # Output only. The current state of the `JobRun`.
"uid": "A String", # Output only. Unique identifier of the `JobRun`.
"verifyJobRun": { # VerifyJobRun contains information specific to a verify `JobRun`. # Output only. Information specific to a verify `JobRun`.
"artifactUri": "A String", # Output only. URI of a directory containing the verify artifacts. This contains the Skaffold event log.
"build": "A String", # Output only. The resource name of the Cloud Build `Build` object that is used to verify. Format is `projects/{project}/locations/{location}/builds/{build}`.
"eventLogPath": "A String", # Output only. File path of the Skaffold event log relative to the artifact URI.
"failureCause": "A String", # Output only. The reason the verify failed. This will always be unspecified while the verify is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the verify failure, if available.
"metadata": { # VerifyJobRunMetadata contains metadata about the verify `JobRun`. # Output only. Metadata containing information about the verify `JobRun`.
"custom": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by user-defined verify operation.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
},
},
}
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists JobRuns in a given project and location.
Args:
parent: string, Required. The `Rollout` which owns this collection of `JobRun` objects. (required)
filter: string, Optional. Filter results to be returned. See https://google.aip.dev/160 for more details.
orderBy: string, Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
pageSize: integer, Optional. The maximum number of `JobRun` objects to return. The service may return fewer than this value. If unspecified, at most 50 `JobRun` objects will be returned. The maximum value is 1000; values above 1000 will be set to 1000.
pageToken: string, Optional. A page token, received from a previous `ListJobRuns` call. Provide this to retrieve the subsequent page. When paginating, all other provided parameters match the call that provided the page token.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # ListJobRunsResponse is the response object returned by `ListJobRuns`.
"jobRuns": [ # The `JobRun` objects.
{ # A `JobRun` resource in the Cloud Deploy API. A `JobRun` contains information of a single `Rollout` job evaluation.
"advanceChildRolloutJobRun": { # AdvanceChildRolloutJobRun contains information specific to a advanceChildRollout `JobRun`. # Output only. Information specific to an advanceChildRollout `JobRun`
"rollout": "A String", # Output only. Name of the `ChildRollout`. Format is `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
"rolloutPhaseId": "A String", # Output only. the ID of the ChildRollout's Phase.
},
"analysisJobRun": { # AnalysisJobRun contains information specific to an analysis `JobRun`. # Output only. Information specific to an analysis `JobRun`.
"alertPolicyAnalyses": [ # Output only. The status of the running alert policy checks configured for this analysis.
{ # AlertPolicyCheckStatus contains information specific to a single run of an alert policy check.
"alertPolicies": [ # Output only. The alert policies that this analysis monitors. Format is `projects/{project}/locations/{location}/alertPolicies/{alertPolicy}`.
"A String",
],
"failedAlertPolicies": [ # Output only. The alert policies that were found to be firing during this check. This will be empty if no incidents were found.
{ # FailedAlertPolicy contains information about an alert policy that was found to be firing during an alert policy check.
"alertPolicy": "A String", # Output only. The name of the alert policy that was found to be firing. Format is `projects/{project}/locations/{location}/alertPolicies/{alertPolicy}`.
"alerts": [ # Output only. Open alerts for the alerting policies that matched the alert policy check configuration.
"A String",
],
},
],
"failureMessage": "A String", # Output only. Additional information about the alert policy check failure, if available. This will be empty if the alert policy check succeeded.
"id": "A String", # Output only. The ID of this analysis.
"labels": { # Output only. The resolved labels used to filter for specific incidents.
"a_key": "A String",
},
},
],
"customCheckAnalyses": [ # Output only. The status of the running custom checks configured for this analysis.
{ # CustomCheckStatus contains information specific to a single iteration of a custom analysis job.
"failureCause": "A String", # Output only. The reason the analysis failed. This will always be unspecified while the analysis is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the analysis failure, if available.
"frequency": "A String", # Output only. The frequency in minutes at which the custom check is run.
"id": "A String", # Output only. The ID of the custom check.
"latestBuild": "A String", # Output only. The resource name of the Cloud Build `Build` object that was used to execute the latest run of this custom action check. Format is `projects/{project}/locations/{location}/builds/{build}`.
"metadata": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by the user-defined custom check operation. result.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
"task": { # A Task represents a unit of work that is executed as part of a Job. # Output only. The task that ran for this custom check.
"container": { # This task is represented by a container that is executed in the Cloud Build execution environment. # Optional. This task is represented by a container that is executed in the Cloud Build execution environment.
"args": [ # Optional. Args is the container arguments to use. This overrides the default arguments defined in the container image.
"A String",
],
"command": [ # Optional. Command is the container entrypoint to use. This overrides the default entrypoint defined in the container image.
"A String",
],
"env": { # Optional. Environment variables that are set in the container.
"a_key": "A String",
},
"image": "A String", # Required. Image is the container image to use.
},
},
},
],
"failedCheckId": "A String", # Output only. The ID of the configured check that failed. This will always be blank while the analysis is in progress or if it succeeded.
},
"createChildRolloutJobRun": { # CreateChildRolloutJobRun contains information specific to a createChildRollout `JobRun`. # Output only. Information specific to a createChildRollout `JobRun`.
"rollout": "A String", # Output only. Name of the `ChildRollout`. Format is `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
"rolloutPhaseId": "A String", # Output only. The ID of the childRollout Phase initiated by this JobRun.
},
"createTime": "A String", # Output only. Time at which the `JobRun` was created.
"deployJobRun": { # DeployJobRun contains information specific to a deploy `JobRun`. # Output only. Information specific to a deploy `JobRun`.
"artifact": { # The artifacts produced by a deploy operation. # Output only. The artifact of a deploy job run, if available.
"artifactUri": "A String", # Output only. URI of a directory containing the artifacts. All paths are relative to this location.
"manifestPaths": [ # Output only. File paths of the manifests applied during the deploy operation relative to the URI.
"A String",
],
},
"build": "A String", # Output only. The resource name of the Cloud Build `Build` object that is used to deploy. Format is `projects/{project}/locations/{location}/builds/{build}`.
"failureCause": "A String", # Output only. The reason the deploy failed. This will always be unspecified while the deploy is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the deploy failure, if available.
"metadata": { # DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to the user. # Output only. Metadata containing information about the deploy job run.
"cloudRun": { # CloudRunMetadata contains information from a Cloud Run deployment. # Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
"job": "A 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}`.
"previousRevision": "A 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}.
"revision": "A String", # Output only. The Cloud Run Revision id associated with a `Rollout`.
"service": "A 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": [ # Output only. The Cloud Run Service urls that are associated with a `Rollout`.
"A String",
],
"workerPool": "A String", # Output only. The Cloud Run worker pool associated with a `Rollout`. Format is `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
},
"custom": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by user-defined deploy operation.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
"customTarget": { # CustomTargetDeployMetadata contains information from a Custom Target deploy operation. # Output only. Custom Target metadata associated with a `DeployJobRun`.
"skipMessage": "A String", # Output only. Skip message provided in the results of a custom deploy operation.
},
},
},
"endTime": "A String", # Output only. Time at which the `JobRun` ended.
"etag": "A String", # Output only. 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.
"jobId": "A String", # Output only. ID of the `Rollout` job this `JobRun` corresponds to.
"name": "A String", # Output only. Name of the `JobRun`. Format is `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
"phaseId": "A String", # Output only. ID of the `Rollout` phase this `JobRun` belongs in.
"postdeployJobRun": { # PostdeployJobRun contains information specific to a postdeploy `JobRun`. # Output only. Information specific to a postdeploy `JobRun`.
"build": "A String", # Output only. The resource name of the Cloud Build `Build` object that is used to execute the custom actions associated with the postdeploy Job. Format is `projects/{project}/locations/{location}/builds/{build}`.
"failureCause": "A String", # Output only. The reason the postdeploy failed. This will always be unspecified while the postdeploy is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the postdeploy failure, if available.
"metadata": { # PostdeployJobRunMetadata contains metadata about the postdeploy `JobRun`. # Output only. Metadata containing information about the postdeploy `JobRun`.
"custom": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by user-defined postdeploy operation.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
},
},
"predeployJobRun": { # PredeployJobRun contains information specific to a predeploy `JobRun`. # Output only. Information specific to a predeploy `JobRun`.
"build": "A String", # Output only. The resource name of the Cloud Build `Build` object that is used to execute the custom actions associated with the predeploy Job. Format is `projects/{project}/locations/{location}/builds/{build}`.
"failureCause": "A String", # Output only. The reason the predeploy failed. This will always be unspecified while the predeploy is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the predeploy failure, if available.
"metadata": { # PredeployJobRunMetadata contains metadata about the predeploy `JobRun`. # Output only. Metadata containing information about the predeploy `JobRun`.
"custom": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by user-defined predeploy operation.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
},
},
"startTime": "A String", # Output only. Time at which the `JobRun` was started.
"state": "A String", # Output only. The current state of the `JobRun`.
"uid": "A String", # Output only. Unique identifier of the `JobRun`.
"verifyJobRun": { # VerifyJobRun contains information specific to a verify `JobRun`. # Output only. Information specific to a verify `JobRun`.
"artifactUri": "A String", # Output only. URI of a directory containing the verify artifacts. This contains the Skaffold event log.
"build": "A String", # Output only. The resource name of the Cloud Build `Build` object that is used to verify. Format is `projects/{project}/locations/{location}/builds/{build}`.
"eventLogPath": "A String", # Output only. File path of the Skaffold event log relative to the artifact URI.
"failureCause": "A String", # Output only. The reason the verify failed. This will always be unspecified while the verify is in progress or if it succeeded.
"failureMessage": "A String", # Output only. Additional information about the verify failure, if available.
"metadata": { # VerifyJobRunMetadata contains metadata about the verify `JobRun`. # Output only. Metadata containing information about the verify `JobRun`.
"custom": { # CustomMetadata contains information from a user-defined operation. # Output only. Custom metadata provided by user-defined verify operation.
"values": { # Output only. Key-value pairs provided by the user-defined operation.
"a_key": "A String",
},
},
},
},
},
],
"nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
"unreachable": [ # Locations that could not be reached
"A String",
],
}
list_next()
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
terminate(name, body=None, x__xgafv=None)
Terminates a Job Run in a given project and location.
Args:
name: string, Required. Name of the `JobRun`. Format must be `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. (required)
body: object, The request body.
The object takes the form of:
{ # The request object used by `TerminateJobRun`.
"overrideDeployPolicy": [ # Optional. Deploy policies to override. Format is `projects/{project}/locations/{location}/deployPolicies/{deployPolicy}`.
"A String",
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The response object from `TerminateJobRun`.
}