aws_sdk_datapipeline/operation/describe_pipelines/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_pipelines::_describe_pipelines_output::DescribePipelinesOutputBuilder;
3
4pub use crate::operation::describe_pipelines::_describe_pipelines_input::DescribePipelinesInputBuilder;
5
6impl crate::operation::describe_pipelines::builders::DescribePipelinesInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::describe_pipelines::DescribePipelinesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_pipelines::DescribePipelinesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_pipelines();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribePipelines`.
24///
25/// <p>Retrieves metadata about one or more pipelines. The information retrieved includes the name of the pipeline, the pipeline identifier, its current state, and the user account that owns the pipeline. Using account credentials, you can retrieve metadata about pipelines that you or your IAM users have created. If you are using an IAM user account, you can retrieve metadata about only those pipelines for which you have read permissions.</p>
26/// <p>To retrieve the full pipeline definition instead of metadata about the pipeline, call <code>GetPipelineDefinition</code>.</p><examples>
27/// <request>
28/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.DescribePipelines Content-Length: 70 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineIds": \["df-08785951KAKJEXAMPLE"\] }
29/// </request>
30/// <response>
31/// x-amzn-RequestId: 02870eb7-0736-11e2-af6f-6bc7a6be60d9 Content-Type: application/x-amz-json-1.1 Content-Length: 767 Date: Mon, 12 Nov 2012 17:50:53 GMT {"pipelineDescriptionList": \[ {"description": "This is my first pipeline", "fields": \[ {"key": "@pipelineState", "stringValue": "SCHEDULED"}, {"key": "description", "stringValue": "This is my first pipeline"}, {"key": "name", "stringValue": "myPipeline"}, {"key": "@creationTime", "stringValue": "2012-12-13T01:24:06"}, {"key": "@id", "stringValue": "df-0937003356ZJEXAMPLE"}, {"key": "@sphere", "stringValue": "PIPELINE"}, {"key": "@version", "stringValue": "1"}, {"key": "@userId", "stringValue": "924374875933"}, {"key": "@accountId", "stringValue": "924374875933"}, {"key": "uniqueId", "stringValue": "1234567890"} \], "name": "myPipeline", "pipelineId": "df-0937003356ZJEXAMPLE"} \] }
32/// </response>
33/// </examples>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct DescribePipelinesFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::describe_pipelines::builders::DescribePipelinesInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::describe_pipelines::DescribePipelinesOutput,
43        crate::operation::describe_pipelines::DescribePipelinesError,
44    > for DescribePipelinesFluentBuilder
45{
46    fn send(
47        self,
48        config_override: crate::config::Builder,
49    ) -> crate::client::customize::internal::BoxFuture<
50        crate::client::customize::internal::SendResult<
51            crate::operation::describe_pipelines::DescribePipelinesOutput,
52            crate::operation::describe_pipelines::DescribePipelinesError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl DescribePipelinesFluentBuilder {
59    /// Creates a new `DescribePipelinesFluentBuilder`.
60    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61        Self {
62            handle,
63            inner: ::std::default::Default::default(),
64            config_override: ::std::option::Option::None,
65        }
66    }
67    /// Access the DescribePipelines as a reference.
68    pub fn as_input(&self) -> &crate::operation::describe_pipelines::builders::DescribePipelinesInputBuilder {
69        &self.inner
70    }
71    /// Sends the request and returns the response.
72    ///
73    /// If an error occurs, an `SdkError` will be returned with additional details that
74    /// can be matched against.
75    ///
76    /// By default, any retryable failures will be retried twice. Retry behavior
77    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78    /// set when configuring the client.
79    pub async fn send(
80        self,
81    ) -> ::std::result::Result<
82        crate::operation::describe_pipelines::DescribePipelinesOutput,
83        ::aws_smithy_runtime_api::client::result::SdkError<
84            crate::operation::describe_pipelines::DescribePipelinesError,
85            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86        >,
87    > {
88        let input = self
89            .inner
90            .build()
91            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92        let runtime_plugins = crate::operation::describe_pipelines::DescribePipelines::operation_runtime_plugins(
93            self.handle.runtime_plugins.clone(),
94            &self.handle.conf,
95            self.config_override,
96        );
97        crate::operation::describe_pipelines::DescribePipelines::orchestrate(&runtime_plugins, input).await
98    }
99
100    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101    pub fn customize(
102        self,
103    ) -> crate::client::customize::CustomizableOperation<
104        crate::operation::describe_pipelines::DescribePipelinesOutput,
105        crate::operation::describe_pipelines::DescribePipelinesError,
106        Self,
107    > {
108        crate::client::customize::CustomizableOperation::new(self)
109    }
110    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111        self.set_config_override(::std::option::Option::Some(config_override.into()));
112        self
113    }
114
115    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116        self.config_override = config_override;
117        self
118    }
119    ///
120    /// Appends an item to `pipelineIds`.
121    ///
122    /// To override the contents of this collection use [`set_pipeline_ids`](Self::set_pipeline_ids).
123    ///
124    /// <p>The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call. To obtain pipeline IDs, call <code>ListPipelines</code>.</p>
125    pub fn pipeline_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.pipeline_ids(input.into());
127        self
128    }
129    /// <p>The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call. To obtain pipeline IDs, call <code>ListPipelines</code>.</p>
130    pub fn set_pipeline_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
131        self.inner = self.inner.set_pipeline_ids(input);
132        self
133    }
134    /// <p>The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call. To obtain pipeline IDs, call <code>ListPipelines</code>.</p>
135    pub fn get_pipeline_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
136        self.inner.get_pipeline_ids()
137    }
138}