aws_sdk_osis/operation/create_pipeline/_create_pipeline_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreatePipelineInput {
6 /// <p>The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region.</p>
7 pub pipeline_name: ::std::option::Option<::std::string::String>,
8 /// <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
9 pub min_units: ::std::option::Option<i32>,
10 /// <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
11 pub max_units: ::std::option::Option<i32>,
12 /// <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
13 pub pipeline_configuration_body: ::std::option::Option<::std::string::String>,
14 /// <p>Key-value pairs to configure log publishing.</p>
15 pub log_publishing_options: ::std::option::Option<crate::types::LogPublishingOptions>,
16 /// <p>Container for the values required to configure VPC access for the pipeline. If you don't specify these values, OpenSearch Ingestion creates the pipeline with a public endpoint.</p>
17 pub vpc_options: ::std::option::Option<crate::types::VpcOptions>,
18 /// <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
19 pub buffer_options: ::std::option::Option<crate::types::BufferOptions>,
20 /// <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
21 pub encryption_at_rest_options: ::std::option::Option<crate::types::EncryptionAtRestOptions>,
22 /// <p>List of tags to add to the pipeline upon creation.</p>
23 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
24 /// <p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>
25 pub pipeline_role_arn: ::std::option::Option<::std::string::String>,
26}
27impl CreatePipelineInput {
28 /// <p>The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region.</p>
29 pub fn pipeline_name(&self) -> ::std::option::Option<&str> {
30 self.pipeline_name.as_deref()
31 }
32 /// <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
33 pub fn min_units(&self) -> ::std::option::Option<i32> {
34 self.min_units
35 }
36 /// <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
37 pub fn max_units(&self) -> ::std::option::Option<i32> {
38 self.max_units
39 }
40 /// <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
41 pub fn pipeline_configuration_body(&self) -> ::std::option::Option<&str> {
42 self.pipeline_configuration_body.as_deref()
43 }
44 /// <p>Key-value pairs to configure log publishing.</p>
45 pub fn log_publishing_options(&self) -> ::std::option::Option<&crate::types::LogPublishingOptions> {
46 self.log_publishing_options.as_ref()
47 }
48 /// <p>Container for the values required to configure VPC access for the pipeline. If you don't specify these values, OpenSearch Ingestion creates the pipeline with a public endpoint.</p>
49 pub fn vpc_options(&self) -> ::std::option::Option<&crate::types::VpcOptions> {
50 self.vpc_options.as_ref()
51 }
52 /// <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
53 pub fn buffer_options(&self) -> ::std::option::Option<&crate::types::BufferOptions> {
54 self.buffer_options.as_ref()
55 }
56 /// <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
57 pub fn encryption_at_rest_options(&self) -> ::std::option::Option<&crate::types::EncryptionAtRestOptions> {
58 self.encryption_at_rest_options.as_ref()
59 }
60 /// <p>List of tags to add to the pipeline upon creation.</p>
61 ///
62 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
63 pub fn tags(&self) -> &[crate::types::Tag] {
64 self.tags.as_deref().unwrap_or_default()
65 }
66 /// <p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>
67 pub fn pipeline_role_arn(&self) -> ::std::option::Option<&str> {
68 self.pipeline_role_arn.as_deref()
69 }
70}
71impl CreatePipelineInput {
72 /// Creates a new builder-style object to manufacture [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
73 pub fn builder() -> crate::operation::create_pipeline::builders::CreatePipelineInputBuilder {
74 crate::operation::create_pipeline::builders::CreatePipelineInputBuilder::default()
75 }
76}
77
78/// A builder for [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct CreatePipelineInputBuilder {
82 pub(crate) pipeline_name: ::std::option::Option<::std::string::String>,
83 pub(crate) min_units: ::std::option::Option<i32>,
84 pub(crate) max_units: ::std::option::Option<i32>,
85 pub(crate) pipeline_configuration_body: ::std::option::Option<::std::string::String>,
86 pub(crate) log_publishing_options: ::std::option::Option<crate::types::LogPublishingOptions>,
87 pub(crate) vpc_options: ::std::option::Option<crate::types::VpcOptions>,
88 pub(crate) buffer_options: ::std::option::Option<crate::types::BufferOptions>,
89 pub(crate) encryption_at_rest_options: ::std::option::Option<crate::types::EncryptionAtRestOptions>,
90 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
91 pub(crate) pipeline_role_arn: ::std::option::Option<::std::string::String>,
92}
93impl CreatePipelineInputBuilder {
94 /// <p>The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region.</p>
95 /// This field is required.
96 pub fn pipeline_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.pipeline_name = ::std::option::Option::Some(input.into());
98 self
99 }
100 /// <p>The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region.</p>
101 pub fn set_pipeline_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.pipeline_name = input;
103 self
104 }
105 /// <p>The name of the OpenSearch Ingestion pipeline to create. Pipeline names are unique across the pipelines owned by an account within an Amazon Web Services Region.</p>
106 pub fn get_pipeline_name(&self) -> &::std::option::Option<::std::string::String> {
107 &self.pipeline_name
108 }
109 /// <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
110 /// This field is required.
111 pub fn min_units(mut self, input: i32) -> Self {
112 self.min_units = ::std::option::Option::Some(input);
113 self
114 }
115 /// <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
116 pub fn set_min_units(mut self, input: ::std::option::Option<i32>) -> Self {
117 self.min_units = input;
118 self
119 }
120 /// <p>The minimum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
121 pub fn get_min_units(&self) -> &::std::option::Option<i32> {
122 &self.min_units
123 }
124 /// <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
125 /// This field is required.
126 pub fn max_units(mut self, input: i32) -> Self {
127 self.max_units = ::std::option::Option::Some(input);
128 self
129 }
130 /// <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
131 pub fn set_max_units(mut self, input: ::std::option::Option<i32>) -> Self {
132 self.max_units = input;
133 self
134 }
135 /// <p>The maximum pipeline capacity, in Ingestion Compute Units (ICUs).</p>
136 pub fn get_max_units(&self) -> &::std::option::Option<i32> {
137 &self.max_units
138 }
139 /// <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
140 /// This field is required.
141 pub fn pipeline_configuration_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.pipeline_configuration_body = ::std::option::Option::Some(input.into());
143 self
144 }
145 /// <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
146 pub fn set_pipeline_configuration_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.pipeline_configuration_body = input;
148 self
149 }
150 /// <p>The pipeline configuration in YAML format. The command accepts the pipeline configuration as a string or within a .yaml file. If you provide the configuration as a string, each new line must be escaped with <code>\n</code>.</p>
151 pub fn get_pipeline_configuration_body(&self) -> &::std::option::Option<::std::string::String> {
152 &self.pipeline_configuration_body
153 }
154 /// <p>Key-value pairs to configure log publishing.</p>
155 pub fn log_publishing_options(mut self, input: crate::types::LogPublishingOptions) -> Self {
156 self.log_publishing_options = ::std::option::Option::Some(input);
157 self
158 }
159 /// <p>Key-value pairs to configure log publishing.</p>
160 pub fn set_log_publishing_options(mut self, input: ::std::option::Option<crate::types::LogPublishingOptions>) -> Self {
161 self.log_publishing_options = input;
162 self
163 }
164 /// <p>Key-value pairs to configure log publishing.</p>
165 pub fn get_log_publishing_options(&self) -> &::std::option::Option<crate::types::LogPublishingOptions> {
166 &self.log_publishing_options
167 }
168 /// <p>Container for the values required to configure VPC access for the pipeline. If you don't specify these values, OpenSearch Ingestion creates the pipeline with a public endpoint.</p>
169 pub fn vpc_options(mut self, input: crate::types::VpcOptions) -> Self {
170 self.vpc_options = ::std::option::Option::Some(input);
171 self
172 }
173 /// <p>Container for the values required to configure VPC access for the pipeline. If you don't specify these values, OpenSearch Ingestion creates the pipeline with a public endpoint.</p>
174 pub fn set_vpc_options(mut self, input: ::std::option::Option<crate::types::VpcOptions>) -> Self {
175 self.vpc_options = input;
176 self
177 }
178 /// <p>Container for the values required to configure VPC access for the pipeline. If you don't specify these values, OpenSearch Ingestion creates the pipeline with a public endpoint.</p>
179 pub fn get_vpc_options(&self) -> &::std::option::Option<crate::types::VpcOptions> {
180 &self.vpc_options
181 }
182 /// <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
183 pub fn buffer_options(mut self, input: crate::types::BufferOptions) -> Self {
184 self.buffer_options = ::std::option::Option::Some(input);
185 self
186 }
187 /// <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
188 pub fn set_buffer_options(mut self, input: ::std::option::Option<crate::types::BufferOptions>) -> Self {
189 self.buffer_options = input;
190 self
191 }
192 /// <p>Key-value pairs to configure persistent buffering for the pipeline.</p>
193 pub fn get_buffer_options(&self) -> &::std::option::Option<crate::types::BufferOptions> {
194 &self.buffer_options
195 }
196 /// <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
197 pub fn encryption_at_rest_options(mut self, input: crate::types::EncryptionAtRestOptions) -> Self {
198 self.encryption_at_rest_options = ::std::option::Option::Some(input);
199 self
200 }
201 /// <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
202 pub fn set_encryption_at_rest_options(mut self, input: ::std::option::Option<crate::types::EncryptionAtRestOptions>) -> Self {
203 self.encryption_at_rest_options = input;
204 self
205 }
206 /// <p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>
207 pub fn get_encryption_at_rest_options(&self) -> &::std::option::Option<crate::types::EncryptionAtRestOptions> {
208 &self.encryption_at_rest_options
209 }
210 /// Appends an item to `tags`.
211 ///
212 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
213 ///
214 /// <p>List of tags to add to the pipeline upon creation.</p>
215 pub fn tags(mut self, input: crate::types::Tag) -> Self {
216 let mut v = self.tags.unwrap_or_default();
217 v.push(input);
218 self.tags = ::std::option::Option::Some(v);
219 self
220 }
221 /// <p>List of tags to add to the pipeline upon creation.</p>
222 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
223 self.tags = input;
224 self
225 }
226 /// <p>List of tags to add to the pipeline upon creation.</p>
227 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
228 &self.tags
229 }
230 /// <p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>
231 pub fn pipeline_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
232 self.pipeline_role_arn = ::std::option::Option::Some(input.into());
233 self
234 }
235 /// <p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>
236 pub fn set_pipeline_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237 self.pipeline_role_arn = input;
238 self
239 }
240 /// <p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>
241 pub fn get_pipeline_role_arn(&self) -> &::std::option::Option<::std::string::String> {
242 &self.pipeline_role_arn
243 }
244 /// Consumes the builder and constructs a [`CreatePipelineInput`](crate::operation::create_pipeline::CreatePipelineInput).
245 pub fn build(
246 self,
247 ) -> ::std::result::Result<crate::operation::create_pipeline::CreatePipelineInput, ::aws_smithy_types::error::operation::BuildError> {
248 ::std::result::Result::Ok(crate::operation::create_pipeline::CreatePipelineInput {
249 pipeline_name: self.pipeline_name,
250 min_units: self.min_units,
251 max_units: self.max_units,
252 pipeline_configuration_body: self.pipeline_configuration_body,
253 log_publishing_options: self.log_publishing_options,
254 vpc_options: self.vpc_options,
255 buffer_options: self.buffer_options,
256 encryption_at_rest_options: self.encryption_at_rest_options,
257 tags: self.tags,
258 pipeline_role_arn: self.pipeline_role_arn,
259 })
260 }
261}