aws_sdk_eventbridge/client/
create_connection.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 [`CreateConnection`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::set_name):<br>required: **true**<br><p>The name for the connection to create.</p><br>
7    ///   - [`description(impl Into<String>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::set_description):<br>required: **false**<br><p>A description for the connection to create.</p><br>
8    ///   - [`authorization_type(ConnectionAuthorizationType)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::authorization_type) / [`set_authorization_type(Option<ConnectionAuthorizationType>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::set_authorization_type):<br>required: **true**<br><p>The type of authorization to use for the connection.</p><note>  <p>OAUTH tokens are refreshed when a 401 or 407 response is returned.</p> </note><br>
9    ///   - [`auth_parameters(CreateConnectionAuthRequestParameters)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::auth_parameters) / [`set_auth_parameters(Option<CreateConnectionAuthRequestParameters>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::set_auth_parameters):<br>required: **true**<br><p>The authorization parameters to use to authorize with the endpoint.</p> <p>You must include only authorization parameters for the <code>AuthorizationType</code> you specify.</p><br>
10    ///   - [`invocation_connectivity_parameters(ConnectivityResourceParameters)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::invocation_connectivity_parameters) / [`set_invocation_connectivity_parameters(Option<ConnectivityResourceParameters>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::set_invocation_connectivity_parameters):<br>required: **false**<br><p>For connections to private APIs, the parameters to use for invoking the API.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p><br>
11    ///   - [`kms_key_identifier(impl Into<String>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::kms_key_identifier) / [`set_kms_key_identifier(Option<String>)`](crate::operation::create_connection::builders::CreateConnectionFluentBuilder::set_kms_key_identifier):<br>required: **false**<br><p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p> <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>.</p><br>
12    /// - On success, responds with [`CreateConnectionOutput`](crate::operation::create_connection::CreateConnectionOutput) with field(s):
13    ///   - [`connection_arn(Option<String>)`](crate::operation::create_connection::CreateConnectionOutput::connection_arn): <p>The ARN of the connection that was created by the request.</p>
14    ///   - [`connection_state(Option<ConnectionState>)`](crate::operation::create_connection::CreateConnectionOutput::connection_state): <p>The state of the connection that was created by the request.</p>
15    ///   - [`creation_time(Option<DateTime>)`](crate::operation::create_connection::CreateConnectionOutput::creation_time): <p>A time stamp for the time that the connection was created.</p>
16    ///   - [`last_modified_time(Option<DateTime>)`](crate::operation::create_connection::CreateConnectionOutput::last_modified_time): <p>A time stamp for the time that the connection was last updated.</p>
17    /// - On failure, responds with [`SdkError<CreateConnectionError>`](crate::operation::create_connection::CreateConnectionError)
18    pub fn create_connection(&self) -> crate::operation::create_connection::builders::CreateConnectionFluentBuilder {
19        crate::operation::create_connection::builders::CreateConnectionFluentBuilder::new(self.handle.clone())
20    }
21}