aws_sdk_transfer/client/create_connector.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateConnector`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`url(impl Into<String>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::url) / [`set_url(Option<String>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::set_url):<br>required: **true**<br><p>The URL of the partner's AS2 or SFTP endpoint.</p><br>
/// - [`as2_config(As2ConnectorConfig)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::as2_config) / [`set_as2_config(Option<As2ConnectorConfig>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::set_as2_config):<br>required: **false**<br><p>A structure that contains the parameters for an AS2 connector object.</p><br>
/// - [`access_role(impl Into<String>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::access_role) / [`set_access_role(Option<String>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::set_access_role):<br>required: **true**<br><p>Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.</p> <p><b>For AS2 connectors</b></p> <p>With AS2, you can send files by calling <code>StartFileTransfer</code> and specifying the file paths in the request parameter, <code>SendFilePaths</code>. We use the file’s parent directory (for example, for <code>--send-file-paths /bucket/dir/file.txt</code>, parent directory is <code>/bucket/dir/</code>) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the <code>AccessRole</code> needs to provide read and write access to the parent directory of the file location used in the <code>StartFileTransfer</code> request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with <code>StartFileTransfer</code>.</p> <p>If you are using Basic authentication for your AS2 connector, the access role requires the <code>secretsmanager:GetSecretValue</code> permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the <code>kms:Decrypt</code> permission for that key.</p> <p><b>For SFTP connectors</b></p> <p>Make sure that the access role provides read and write access to the parent directory of the file location that's used in the <code>StartFileTransfer</code> request. Additionally, make sure that the role provides <code>secretsmanager:GetSecretValue</code> permission to Secrets Manager.</p><br>
/// - [`logging_role(impl Into<String>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::logging_role) / [`set_logging_role(Option<String>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::set_logging_role):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.</p><br>
/// - [`tags(Tag)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::set_tags):<br>required: **false**<br><p>Key-value pairs that can be used to group and search for connectors. Tags are metadata attached to connectors for any purpose.</p><br>
/// - [`sftp_config(SftpConnectorConfig)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::sftp_config) / [`set_sftp_config(Option<SftpConnectorConfig>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::set_sftp_config):<br>required: **false**<br><p>A structure that contains the parameters for an SFTP connector object.</p><br>
/// - [`security_policy_name(impl Into<String>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::security_policy_name) / [`set_security_policy_name(Option<String>)`](crate::operation::create_connector::builders::CreateConnectorFluentBuilder::set_security_policy_name):<br>required: **false**<br><p>Specifies the name of the security policy for the connector.</p><br>
/// - On success, responds with [`CreateConnectorOutput`](crate::operation::create_connector::CreateConnectorOutput) with field(s):
/// - [`connector_id(String)`](crate::operation::create_connector::CreateConnectorOutput::connector_id): <p>The unique identifier for the connector, returned after the API call succeeds.</p>
/// - On failure, responds with [`SdkError<CreateConnectorError>`](crate::operation::create_connector::CreateConnectorError)
pub fn create_connector(&self) -> crate::operation::create_connector::builders::CreateConnectorFluentBuilder {
crate::operation::create_connector::builders::CreateConnectorFluentBuilder::new(self.handle.clone())
}
}