aws_sdk_amplify/client/
start_job.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`StartJob`](crate::operation::start_job::builders::StartJobFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`app_id(impl Into<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::app_id) / [`set_app_id(Option<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::set_app_id):<br>required: **true**<br><p>The unique ID for an Amplify app.</p><br>
7    ///   - [`branch_name(impl Into<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::branch_name) / [`set_branch_name(Option<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::set_branch_name):<br>required: **true**<br><p>The name of the branch to use for the job.</p><br>
8    ///   - [`job_id(impl Into<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::job_id) / [`set_job_id(Option<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::set_job_id):<br>required: **false**<br><p>The unique ID for an existing job. This is required if the value of <code>jobType</code> is <code>RETRY</code>.</p><br>
9    ///   - [`job_type(JobType)`](crate::operation::start_job::builders::StartJobFluentBuilder::job_type) / [`set_job_type(Option<JobType>)`](crate::operation::start_job::builders::StartJobFluentBuilder::set_job_type):<br>required: **true**<br><p>Describes the type for the job. The job type <code>RELEASE</code> starts a new job with the latest change from the specified branch. This value is available only for apps that are connected to a repository.</p> <p>The job type <code>RETRY</code> retries an existing job. If the job type value is <code>RETRY</code>, the <code>jobId</code> is also required.</p><br>
10    ///   - [`job_reason(impl Into<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::job_reason) / [`set_job_reason(Option<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::set_job_reason):<br>required: **false**<br><p>A descriptive reason for starting the job.</p><br>
11    ///   - [`commit_id(impl Into<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::commit_id) / [`set_commit_id(Option<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::set_commit_id):<br>required: **false**<br><p>The commit ID from a third-party repository provider for the job.</p><br>
12    ///   - [`commit_message(impl Into<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::commit_message) / [`set_commit_message(Option<String>)`](crate::operation::start_job::builders::StartJobFluentBuilder::set_commit_message):<br>required: **false**<br><p>The commit message from a third-party repository provider for the job.</p><br>
13    ///   - [`commit_time(DateTime)`](crate::operation::start_job::builders::StartJobFluentBuilder::commit_time) / [`set_commit_time(Option<DateTime>)`](crate::operation::start_job::builders::StartJobFluentBuilder::set_commit_time):<br>required: **false**<br><p>The commit date and time for the job.</p><br>
14    /// - On success, responds with [`StartJobOutput`](crate::operation::start_job::StartJobOutput) with field(s):
15    ///   - [`job_summary(Option<JobSummary>)`](crate::operation::start_job::StartJobOutput::job_summary): <p>The summary for the job.</p>
16    /// - On failure, responds with [`SdkError<StartJobError>`](crate::operation::start_job::StartJobError)
17    pub fn start_job(&self) -> crate::operation::start_job::builders::StartJobFluentBuilder {
18        crate::operation::start_job::builders::StartJobFluentBuilder::new(self.handle.clone())
19    }
20}