Skip to main content

aws_sdk_networksecuritymanager/client/
create_template.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 [`CreateTemplate`](crate::operation::create_template::builders::CreateTemplateFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`client_token(impl Into<String>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.</p><br>
7    ///   - [`template_name(impl Into<String>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::template_name) / [`set_template_name(Option<String>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::set_template_name):<br>required: **true**<br><p>The name of the template.</p><br>
8    ///   - [`template_description(impl Into<String>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::template_description) / [`set_template_description(Option<String>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::set_template_description):<br>required: **false**<br><p>A description of the template.</p><br>
9    ///   - [`associated_rule_list(RuleReference)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::associated_rule_list) / [`set_associated_rule_list(Option<Vec::<RuleReference>>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::set_associated_rule_list):<br>required: **true**<br><p>The rules associated with the template.</p><br>
10    ///   - [`firewall_type(TemplateFirewallType)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::firewall_type) / [`set_firewall_type(Option<TemplateFirewallType>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::set_firewall_type):<br>required: **true**<br><p>The firewall type associated with the resource.</p><br>
11    ///   - [`is_published(bool)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::is_published) / [`set_is_published(Option<bool>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::set_is_published):<br>required: **false**<br><p>Specifies whether to publish the resource. When <code>true</code>, the resource is saved in published (<code>ACTIVE</code>) state. When <code>false</code>, it is saved as a draft (<code>DRAFT</code>). Default: <code>true</code>.</p><br>
12    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_template::builders::CreateTemplateFluentBuilder::set_tags):<br>required: **false**<br><p>The tags to add to the resource when it is created.</p><br>
13    /// - On success, responds with [`CreateTemplateOutput`](crate::operation::create_template::CreateTemplateOutput) with field(s):
14    ///   - [`template_id(String)`](crate::operation::create_template::CreateTemplateOutput::template_id): <p>The service-generated id of the template.</p>
15    ///   - [`template_arn(String)`](crate::operation::create_template::CreateTemplateOutput::template_arn): <p>The Amazon Resource Name (ARN) of the template.</p>
16    ///   - [`template_name(String)`](crate::operation::create_template::CreateTemplateOutput::template_name): <p>The name of the template.</p>
17    ///   - [`template_description(Option<String>)`](crate::operation::create_template::CreateTemplateOutput::template_description): <p>A description of the template.</p>
18    ///   - [`status(EntityStatus)`](crate::operation::create_template::CreateTemplateOutput::status): <p>The current status of the resource: <code>DRAFT</code> (unpublished, editable) or <code>ACTIVE</code> (published, in use).</p>
19    ///   - [`version(String)`](crate::operation::create_template::CreateTemplateOutput::version): <p>The version of the resource.</p>
20    ///   - [`associated_rule_list(Vec::<AssociatedRule>)`](crate::operation::create_template::CreateTemplateOutput::associated_rule_list): <p>The rules associated with the template.</p>
21    ///   - [`update_token(Option<String>)`](crate::operation::create_template::CreateTemplateOutput::update_token): <p>A token used for optimistic concurrency control. Each read and write returns an <code>updateToken</code>. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications.</p>
22    ///   - [`is_snapshot(Option<bool>)`](crate::operation::create_template::CreateTemplateOutput::is_snapshot): <p>Specifies whether the resource is a snapshot of a published version.</p>
23    ///   - [`has_published_version(Option<bool>)`](crate::operation::create_template::CreateTemplateOutput::has_published_version): <p>Specifies whether a published version of the resource exists.</p>
24    ///   - [`firewall_type(TemplateFirewallType)`](crate::operation::create_template::CreateTemplateOutput::firewall_type): <p>The firewall type associated with the resource.</p>
25    ///   - [`updated_at(Option<DateTime>)`](crate::operation::create_template::CreateTemplateOutput::updated_at): <p>The time when the resource was last updated.</p>
26    /// - On failure, responds with [`SdkError<CreateTemplateError>`](crate::operation::create_template::CreateTemplateError)
27    pub fn create_template(&self) -> crate::operation::create_template::builders::CreateTemplateFluentBuilder {
28        crate::operation::create_template::builders::CreateTemplateFluentBuilder::new(self.handle.clone())
29    }
30}