aws_sdk_transfer/client/
update_agreement.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`UpdateAgreement`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`agreement_id(impl Into<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::agreement_id) / [`set_agreement_id(Option<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_agreement_id):<br>required: **true**<br><p>A unique identifier for the agreement. This identifier is returned when you create an agreement.</p><br>
    ///   - [`server_id(impl Into<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::server_id) / [`set_server_id(Option<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::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>
    ///   - [`description(impl Into<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_description):<br>required: **false**<br><p>To replace the existing description, provide a short description for the agreement.</p><br>
    ///   - [`status(AgreementStatusType)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::status) / [`set_status(Option<AgreementStatusType>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_status):<br>required: **false**<br><p>You can update the status for the agreement, either activating an inactive agreement or the reverse.</p><br>
    ///   - [`local_profile_id(impl Into<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::local_profile_id) / [`set_local_profile_id(Option<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_local_profile_id):<br>required: **false**<br><p>A unique identifier for the AS2 local profile.</p> <p>To change the local profile identifier, provide a new value here.</p><br>
    ///   - [`partner_profile_id(impl Into<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::partner_profile_id) / [`set_partner_profile_id(Option<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_partner_profile_id):<br>required: **false**<br><p>A unique identifier for the partner profile. To change the partner profile identifier, provide a new value here.</p><br>
    ///   - [`base_directory(impl Into<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::base_directory) / [`set_base_directory(Option<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_base_directory):<br>required: **false**<br><p>To change the landing directory (folder) for files that are transferred, provide the bucket folder that you want to use; for example, <code>/<i>amzn-s3-demo-bucket</i>/<i>home</i>/<i>mydirectory</i> </code>.</p><br>
    ///   - [`access_role(impl Into<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::access_role) / [`set_access_role(Option<String>)`](crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::set_access_role):<br>required: **false**<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>
    /// - On success, responds with [`UpdateAgreementOutput`](crate::operation::update_agreement::UpdateAgreementOutput) with field(s):
    ///   - [`agreement_id(String)`](crate::operation::update_agreement::UpdateAgreementOutput::agreement_id): <p>A unique identifier for the agreement. This identifier is returned when you create an agreement.</p>
    /// - On failure, responds with [`SdkError<UpdateAgreementError>`](crate::operation::update_agreement::UpdateAgreementError)
    pub fn update_agreement(&self) -> crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder {
        crate::operation::update_agreement::builders::UpdateAgreementFluentBuilder::new(self.handle.clone())
    }
}