aws_sdk_iotfleetwise/client/
update_campaign.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`UpdateCampaign`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::set_name):<br>required: **true**<br><p>The name of the campaign to update.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::set_description):<br>required: **false**<br><p>The description of the campaign.</p><br>
    ///   - [`data_extra_dimensions(impl Into<String>)`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::data_extra_dimensions) / [`set_data_extra_dimensions(Option<Vec::<String>>)`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::set_data_extra_dimensions):<br>required: **false**<br><p>A list of vehicle attributes to associate with a signal.</p> <p>Default: An empty array</p><br>
    ///   - [`action(UpdateCampaignAction)`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::action) / [`set_action(Option<UpdateCampaignAction>)`](crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::set_action):<br>required: **true**<br><p>Specifies how to update a campaign. The action can be one of the following:</p> <ul>  <li>   <p><code>APPROVE</code> - To approve delivering a data collection scheme to vehicles.</p></li>  <li>   <p><code>SUSPEND</code> - To suspend collecting signal data. The campaign is deleted from vehicles and all vehicles in the suspended campaign will stop sending data.</p></li>  <li>   <p><code>RESUME</code> - To reactivate the <code>SUSPEND</code> campaign. The campaign is redeployed to all vehicles and the vehicles will resume sending data.</p></li>  <li>   <p><code>UPDATE</code> - To update a campaign.</p></li> </ul><br>
    /// - On success, responds with [`UpdateCampaignOutput`](crate::operation::update_campaign::UpdateCampaignOutput) with field(s):
    ///   - [`arn(Option<String>)`](crate::operation::update_campaign::UpdateCampaignOutput::arn): <p>The Amazon Resource Name (ARN) of the campaign.</p>
    ///   - [`name(Option<String>)`](crate::operation::update_campaign::UpdateCampaignOutput::name): <p>The name of the updated campaign.</p>
    ///   - [`status(Option<CampaignStatus>)`](crate::operation::update_campaign::UpdateCampaignOutput::status): <p>The state of a campaign. The status can be one of:</p> <ul>  <li>   <p><code>CREATING</code> - Amazon Web Services IoT FleetWise is processing your request to create the campaign.</p></li>  <li>   <p><code>WAITING_FOR_APPROVAL</code> - After a campaign is created, it enters the <code>WAITING_FOR_APPROVAL</code> state. To allow Amazon Web Services IoT FleetWise to deploy the campaign to the target vehicle or fleet, use the API operation to approve the campaign.</p></li>  <li>   <p><code>RUNNING</code> - The campaign is active.</p></li>  <li>   <p><code>SUSPENDED</code> - The campaign is suspended. To resume the campaign, use the API operation.</p></li> </ul>
    /// - On failure, responds with [`SdkError<UpdateCampaignError>`](crate::operation::update_campaign::UpdateCampaignError)
    pub fn update_campaign(&self) -> crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder {
        crate::operation::update_campaign::builders::UpdateCampaignFluentBuilder::new(self.handle.clone())
    }
}