aws_sdk_transfer/client/create_agreement.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateAgreement`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`description(impl Into<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_description):<br>required: **false**<br><p>A name or short description to identify the agreement.</p><br>
/// - [`server_id(impl Into<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::server_id) / [`set_server_id(Option<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_server_id):<br>required: **true**<br><p>A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.</p><br>
/// - [`local_profile_id(impl Into<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::local_profile_id) / [`set_local_profile_id(Option<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_local_profile_id):<br>required: **true**<br><p>A unique identifier for the AS2 local profile.</p><br>
/// - [`partner_profile_id(impl Into<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::partner_profile_id) / [`set_partner_profile_id(Option<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_partner_profile_id):<br>required: **true**<br><p>A unique identifier for the partner profile used in the agreement.</p><br>
/// - [`base_directory(impl Into<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::base_directory) / [`set_base_directory(Option<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_base_directory):<br>required: **true**<br><p>The landing directory (folder) for files transferred by using the AS2 protocol.</p> <p>A <code>BaseDirectory</code> example is <code>/<i>amzn-s3-demo-bucket</i>/home/mydirectory</code>.</p><br>
/// - [`access_role(impl Into<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::access_role) / [`set_access_role(Option<String>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::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>
/// - [`status(AgreementStatusType)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::status) / [`set_status(Option<AgreementStatusType>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_status):<br>required: **false**<br><p>The status of the agreement. The agreement can be either <code>ACTIVE</code> or <code>INACTIVE</code>.</p><br>
/// - [`tags(Tag)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::set_tags):<br>required: **false**<br><p>Key-value pairs that can be used to group and search for agreements.</p><br>
/// - On success, responds with [`CreateAgreementOutput`](crate::operation::create_agreement::CreateAgreementOutput) with field(s):
/// - [`agreement_id(String)`](crate::operation::create_agreement::CreateAgreementOutput::agreement_id): <p>The unique identifier for the agreement. Use this ID for deleting, or updating an agreement, as well as in any other API calls that require that you specify the agreement ID.</p>
/// - On failure, responds with [`SdkError<CreateAgreementError>`](crate::operation::create_agreement::CreateAgreementError)
pub fn create_agreement(&self) -> crate::operation::create_agreement::builders::CreateAgreementFluentBuilder {
crate::operation::create_agreement::builders::CreateAgreementFluentBuilder::new(self.handle.clone())
}
}