aws_sdk_connect/client/
create_participant.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 [`CreateParticipant`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`instance_id(impl Into<String>)`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder::set_instance_id):<br>required: **true**<br><p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p><br>
7    ///   - [`contact_id(impl Into<String>)`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder::contact_id) / [`set_contact_id(Option<String>)`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder::set_contact_id):<br>required: **true**<br><p>The identifier of the contact in this instance of Amazon Connect. Supports contacts in the CHAT channel and VOICE (WebRTC) channels. For WebRTC calls, this should be the initial contact ID that was generated when the contact was first created (from the StartWebRTCContact API) in the VOICE channel</p><br>
8    ///   - [`client_token(impl Into<String>)`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p><br>
9    ///   - [`participant_details(ParticipantDetailsToAdd)`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder::participant_details) / [`set_participant_details(Option<ParticipantDetailsToAdd>)`](crate::operation::create_participant::builders::CreateParticipantFluentBuilder::set_participant_details):<br>required: **true**<br><p>Information identifying the participant.</p><important>  <p>The only valid value for <code>ParticipantRole</code> is <code>CUSTOM_BOT</code> for chat contact and <code>CUSTOMER</code> for voice contact.</p> </important><br>
10    /// - On success, responds with [`CreateParticipantOutput`](crate::operation::create_participant::CreateParticipantOutput) with field(s):
11    ///   - [`participant_credentials(Option<ParticipantTokenCredentials>)`](crate::operation::create_participant::CreateParticipantOutput::participant_credentials): <p>The token used by the chat participant to call <code>CreateParticipantConnection</code>. The participant token is valid for the lifetime of a chat participant.</p>
12    ///   - [`participant_id(Option<String>)`](crate::operation::create_participant::CreateParticipantOutput::participant_id): <p>The identifier for a chat participant. The participantId for a chat participant is the same throughout the chat lifecycle.</p>
13    /// - On failure, responds with [`SdkError<CreateParticipantError>`](crate::operation::create_participant::CreateParticipantError)
14    pub fn create_participant(&self) -> crate::operation::create_participant::builders::CreateParticipantFluentBuilder {
15        crate::operation::create_participant::builders::CreateParticipantFluentBuilder::new(self.handle.clone())
16    }
17}