aws_sdk_sagemaker/operation/update_workteam/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_workteam::_update_workteam_output::UpdateWorkteamOutputBuilder;
3
4pub use crate::operation::update_workteam::_update_workteam_input::UpdateWorkteamInputBuilder;
5
6impl crate::operation::update_workteam::builders::UpdateWorkteamInputBuilder {
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::update_workteam::UpdateWorkteamOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_workteam::UpdateWorkteamError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_workteam();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateWorkteam`.
24///
25/// <p>Updates an existing work team with new member definitions or description.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateWorkteamFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_workteam::builders::UpdateWorkteamInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_workteam::UpdateWorkteamOutput,
35        crate::operation::update_workteam::UpdateWorkteamError,
36    > for UpdateWorkteamFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::update_workteam::UpdateWorkteamOutput,
44            crate::operation::update_workteam::UpdateWorkteamError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateWorkteamFluentBuilder {
51    /// Creates a new `UpdateWorkteamFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the UpdateWorkteam as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_workteam::builders::UpdateWorkteamInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::update_workteam::UpdateWorkteamOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_workteam::UpdateWorkteamError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::update_workteam::UpdateWorkteam::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_workteam::UpdateWorkteam::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::update_workteam::UpdateWorkteamOutput,
97        crate::operation::update_workteam::UpdateWorkteamError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The name of the work team to update.</p>
112    pub fn workteam_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.workteam_name(input.into());
114        self
115    }
116    /// <p>The name of the work team to update.</p>
117    pub fn set_workteam_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_workteam_name(input);
119        self
120    }
121    /// <p>The name of the work team to update.</p>
122    pub fn get_workteam_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_workteam_name()
124    }
125    ///
126    /// Appends an item to `MemberDefinitions`.
127    ///
128    /// To override the contents of this collection use [`set_member_definitions`](Self::set_member_definitions).
129    ///
130    /// <p>A list of <code>MemberDefinition</code> objects that contains objects that identify the workers that make up the work team.</p>
131    /// <p>Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use <code>CognitoMemberDefinition</code>. For workforces created using your own OIDC identity provider (IdP) use <code>OidcMemberDefinition</code>. You should not provide input for both of these parameters in a single request.</p>
132    /// <p>For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito <i>user groups</i> within the user pool used to create a workforce. All of the <code>CognitoMemberDefinition</code> objects that make up the member definition must have the same <code>ClientId</code> and <code>UserPool</code> values. To add a Amazon Cognito user group to an existing worker pool, see <code>Adding groups to a User Pool</code>. For more information about user pools, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html">Amazon Cognito User Pools</a>.</p>
133    /// <p>For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in <code>OidcMemberDefinition</code> by listing those groups in <code>Groups</code>. Be aware that user groups that are already in the work team must also be listed in <code>Groups</code> when you make this request to remain on the work team. If you do not include these user groups, they will no longer be associated with the work team you update.</p>
134    pub fn member_definitions(mut self, input: crate::types::MemberDefinition) -> Self {
135        self.inner = self.inner.member_definitions(input);
136        self
137    }
138    /// <p>A list of <code>MemberDefinition</code> objects that contains objects that identify the workers that make up the work team.</p>
139    /// <p>Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use <code>CognitoMemberDefinition</code>. For workforces created using your own OIDC identity provider (IdP) use <code>OidcMemberDefinition</code>. You should not provide input for both of these parameters in a single request.</p>
140    /// <p>For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito <i>user groups</i> within the user pool used to create a workforce. All of the <code>CognitoMemberDefinition</code> objects that make up the member definition must have the same <code>ClientId</code> and <code>UserPool</code> values. To add a Amazon Cognito user group to an existing worker pool, see <code>Adding groups to a User Pool</code>. For more information about user pools, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html">Amazon Cognito User Pools</a>.</p>
141    /// <p>For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in <code>OidcMemberDefinition</code> by listing those groups in <code>Groups</code>. Be aware that user groups that are already in the work team must also be listed in <code>Groups</code> when you make this request to remain on the work team. If you do not include these user groups, they will no longer be associated with the work team you update.</p>
142    pub fn set_member_definitions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MemberDefinition>>) -> Self {
143        self.inner = self.inner.set_member_definitions(input);
144        self
145    }
146    /// <p>A list of <code>MemberDefinition</code> objects that contains objects that identify the workers that make up the work team.</p>
147    /// <p>Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use <code>CognitoMemberDefinition</code>. For workforces created using your own OIDC identity provider (IdP) use <code>OidcMemberDefinition</code>. You should not provide input for both of these parameters in a single request.</p>
148    /// <p>For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito <i>user groups</i> within the user pool used to create a workforce. All of the <code>CognitoMemberDefinition</code> objects that make up the member definition must have the same <code>ClientId</code> and <code>UserPool</code> values. To add a Amazon Cognito user group to an existing worker pool, see <code>Adding groups to a User Pool</code>. For more information about user pools, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html">Amazon Cognito User Pools</a>.</p>
149    /// <p>For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in <code>OidcMemberDefinition</code> by listing those groups in <code>Groups</code>. Be aware that user groups that are already in the work team must also be listed in <code>Groups</code> when you make this request to remain on the work team. If you do not include these user groups, they will no longer be associated with the work team you update.</p>
150    pub fn get_member_definitions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MemberDefinition>> {
151        self.inner.get_member_definitions()
152    }
153    /// <p>An updated description for the work team.</p>
154    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.description(input.into());
156        self
157    }
158    /// <p>An updated description for the work team.</p>
159    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_description(input);
161        self
162    }
163    /// <p>An updated description for the work team.</p>
164    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_description()
166    }
167    /// <p>Configures SNS topic notifications for available or expiring work items</p>
168    pub fn notification_configuration(mut self, input: crate::types::NotificationConfiguration) -> Self {
169        self.inner = self.inner.notification_configuration(input);
170        self
171    }
172    /// <p>Configures SNS topic notifications for available or expiring work items</p>
173    pub fn set_notification_configuration(mut self, input: ::std::option::Option<crate::types::NotificationConfiguration>) -> Self {
174        self.inner = self.inner.set_notification_configuration(input);
175        self
176    }
177    /// <p>Configures SNS topic notifications for available or expiring work items</p>
178    pub fn get_notification_configuration(&self) -> &::std::option::Option<crate::types::NotificationConfiguration> {
179        self.inner.get_notification_configuration()
180    }
181    /// <p>Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL.</p>
182    pub fn worker_access_configuration(mut self, input: crate::types::WorkerAccessConfiguration) -> Self {
183        self.inner = self.inner.worker_access_configuration(input);
184        self
185    }
186    /// <p>Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL.</p>
187    pub fn set_worker_access_configuration(mut self, input: ::std::option::Option<crate::types::WorkerAccessConfiguration>) -> Self {
188        self.inner = self.inner.set_worker_access_configuration(input);
189        self
190    }
191    /// <p>Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL.</p>
192    pub fn get_worker_access_configuration(&self) -> &::std::option::Option<crate::types::WorkerAccessConfiguration> {
193        self.inner.get_worker_access_configuration()
194    }
195}