Struct google_api_proto::google::devtools::cloudbuild::v1::cloud_build_client::CloudBuildClient
source · pub struct CloudBuildClient<T> { /* private fields */ }
Expand description
Creates and manages builds on Google Cloud Platform.
The main concept used by this API is a Build
, which describes the location
of the source to build, how to build the source, and where to store the
built artifacts, if any.
A user can list previously-requested builds or get builds by their ID to determine the status of the build.
Implementations§
source§impl<T> CloudBuildClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> CloudBuildClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CloudBuildClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn create_build(
&mut self,
request: impl IntoRequest<CreateBuildRequest>,
) -> Result<Response<Operation>, Status>
pub async fn create_build( &mut self, request: impl IntoRequest<CreateBuildRequest>, ) -> Result<Response<Operation>, Status>
Starts a build with the specified configuration.
This method returns a long-running Operation
, which includes the build
ID. Pass the build ID to GetBuild
to determine the build status (such as
SUCCESS
or FAILURE
).
sourcepub async fn get_build(
&mut self,
request: impl IntoRequest<GetBuildRequest>,
) -> Result<Response<Build>, Status>
pub async fn get_build( &mut self, request: impl IntoRequest<GetBuildRequest>, ) -> Result<Response<Build>, Status>
Returns information about a previously requested build.
The Build
that is returned includes its status (such as SUCCESS
,
FAILURE
, or WORKING
), and timing information.
sourcepub async fn list_builds(
&mut self,
request: impl IntoRequest<ListBuildsRequest>,
) -> Result<Response<ListBuildsResponse>, Status>
pub async fn list_builds( &mut self, request: impl IntoRequest<ListBuildsRequest>, ) -> Result<Response<ListBuildsResponse>, Status>
Lists previously requested builds.
Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
sourcepub async fn cancel_build(
&mut self,
request: impl IntoRequest<CancelBuildRequest>,
) -> Result<Response<Build>, Status>
pub async fn cancel_build( &mut self, request: impl IntoRequest<CancelBuildRequest>, ) -> Result<Response<Build>, Status>
Cancels a build in progress.
sourcepub async fn retry_build(
&mut self,
request: impl IntoRequest<RetryBuildRequest>,
) -> Result<Response<Operation>, Status>
pub async fn retry_build( &mut self, request: impl IntoRequest<RetryBuildRequest>, ) -> Result<Response<Operation>, Status>
Creates a new build based on the specified build.
This method creates a new build using the original build request, which may or may not result in an identical build.
For triggered builds:
- Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision.
For non-triggered builds that specify RepoSource
:
- If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build.
- If the original build specified a commit sha or revision ID, the retried build will use the identical source.
For builds that specify StorageSource
:
- If the original build pulled source from Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source.
- If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket’s lifecycle management settings.
sourcepub async fn approve_build(
&mut self,
request: impl IntoRequest<ApproveBuildRequest>,
) -> Result<Response<Operation>, Status>
pub async fn approve_build( &mut self, request: impl IntoRequest<ApproveBuildRequest>, ) -> Result<Response<Operation>, Status>
Approves or rejects a pending build.
If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call.
If rejected, the returned LRO will be immediately done.
sourcepub async fn create_build_trigger(
&mut self,
request: impl IntoRequest<CreateBuildTriggerRequest>,
) -> Result<Response<BuildTrigger>, Status>
pub async fn create_build_trigger( &mut self, request: impl IntoRequest<CreateBuildTriggerRequest>, ) -> Result<Response<BuildTrigger>, Status>
Creates a new BuildTrigger
.
This API is experimental.
sourcepub async fn get_build_trigger(
&mut self,
request: impl IntoRequest<GetBuildTriggerRequest>,
) -> Result<Response<BuildTrigger>, Status>
pub async fn get_build_trigger( &mut self, request: impl IntoRequest<GetBuildTriggerRequest>, ) -> Result<Response<BuildTrigger>, Status>
Returns information about a BuildTrigger
.
This API is experimental.
sourcepub async fn list_build_triggers(
&mut self,
request: impl IntoRequest<ListBuildTriggersRequest>,
) -> Result<Response<ListBuildTriggersResponse>, Status>
pub async fn list_build_triggers( &mut self, request: impl IntoRequest<ListBuildTriggersRequest>, ) -> Result<Response<ListBuildTriggersResponse>, Status>
Lists existing BuildTrigger
s.
This API is experimental.
sourcepub async fn delete_build_trigger(
&mut self,
request: impl IntoRequest<DeleteBuildTriggerRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_build_trigger( &mut self, request: impl IntoRequest<DeleteBuildTriggerRequest>, ) -> Result<Response<()>, Status>
Deletes a BuildTrigger
by its project ID and trigger ID.
This API is experimental.
sourcepub async fn update_build_trigger(
&mut self,
request: impl IntoRequest<UpdateBuildTriggerRequest>,
) -> Result<Response<BuildTrigger>, Status>
pub async fn update_build_trigger( &mut self, request: impl IntoRequest<UpdateBuildTriggerRequest>, ) -> Result<Response<BuildTrigger>, Status>
Updates a BuildTrigger
by its project ID and trigger ID.
This API is experimental.
sourcepub async fn run_build_trigger(
&mut self,
request: impl IntoRequest<RunBuildTriggerRequest>,
) -> Result<Response<Operation>, Status>
pub async fn run_build_trigger( &mut self, request: impl IntoRequest<RunBuildTriggerRequest>, ) -> Result<Response<Operation>, Status>
Runs a BuildTrigger
at a particular source revision.
To run a regional or global trigger, use the POST request that includes the location endpoint in the path (ex. v1/projects/{projectId}/locations/{region}/triggers/{triggerId}:run). The POST request that does not include the location endpoint in the path can only be used when running global triggers.
sourcepub async fn receive_trigger_webhook(
&mut self,
request: impl IntoRequest<ReceiveTriggerWebhookRequest>,
) -> Result<Response<ReceiveTriggerWebhookResponse>, Status>
pub async fn receive_trigger_webhook( &mut self, request: impl IntoRequest<ReceiveTriggerWebhookRequest>, ) -> Result<Response<ReceiveTriggerWebhookResponse>, Status>
ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.
sourcepub async fn create_worker_pool(
&mut self,
request: impl IntoRequest<CreateWorkerPoolRequest>,
) -> Result<Response<Operation>, Status>
pub async fn create_worker_pool( &mut self, request: impl IntoRequest<CreateWorkerPoolRequest>, ) -> Result<Response<Operation>, Status>
Creates a WorkerPool
.
sourcepub async fn get_worker_pool(
&mut self,
request: impl IntoRequest<GetWorkerPoolRequest>,
) -> Result<Response<WorkerPool>, Status>
pub async fn get_worker_pool( &mut self, request: impl IntoRequest<GetWorkerPoolRequest>, ) -> Result<Response<WorkerPool>, Status>
Returns details of a WorkerPool
.
sourcepub async fn delete_worker_pool(
&mut self,
request: impl IntoRequest<DeleteWorkerPoolRequest>,
) -> Result<Response<Operation>, Status>
pub async fn delete_worker_pool( &mut self, request: impl IntoRequest<DeleteWorkerPoolRequest>, ) -> Result<Response<Operation>, Status>
Deletes a WorkerPool
.
sourcepub async fn update_worker_pool(
&mut self,
request: impl IntoRequest<UpdateWorkerPoolRequest>,
) -> Result<Response<Operation>, Status>
pub async fn update_worker_pool( &mut self, request: impl IntoRequest<UpdateWorkerPoolRequest>, ) -> Result<Response<Operation>, Status>
Updates a WorkerPool
.
sourcepub async fn list_worker_pools(
&mut self,
request: impl IntoRequest<ListWorkerPoolsRequest>,
) -> Result<Response<ListWorkerPoolsResponse>, Status>
pub async fn list_worker_pools( &mut self, request: impl IntoRequest<ListWorkerPoolsRequest>, ) -> Result<Response<ListWorkerPoolsResponse>, Status>
Lists WorkerPool
s.
Trait Implementations§
source§impl<T: Clone> Clone for CloudBuildClient<T>
impl<T: Clone> Clone for CloudBuildClient<T>
source§fn clone(&self) -> CloudBuildClient<T>
fn clone(&self) -> CloudBuildClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for CloudBuildClient<T>
impl<T> RefUnwindSafe for CloudBuildClient<T>where
T: RefUnwindSafe,
impl<T> Send for CloudBuildClient<T>where
T: Send,
impl<T> Sync for CloudBuildClient<T>where
T: Sync,
impl<T> Unpin for CloudBuildClient<T>where
T: Unpin,
impl<T> UnwindSafe for CloudBuildClient<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request