Skip to main content

agreements

Creates, updates, deletes, gets or lists an agreements resource.

Overview

Nameagreements
TypeResource
Idaws.transfer.agreements

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
access_rolestringConnectors 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. For AS2 connectors With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) 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 AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer. If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue 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 kms:Decrypt permission for that key. For SFTP connectors Make sure that the access role provides read and write access to the parent directory of the file location that's used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager. (pattern: <code>arn:.*role/\S+</code>)
agreement_idstringA unique identifier for the agreement. This identifier is returned when you create an agreement. (pattern: <code>a-([0-9a-f]{17})</code>)
arnstringThe unique Amazon Resource Name (ARN) for the agreement. (pattern: <code>arn:\S+</code>)
base_directorystringThe landing directory (folder) for files that are transferred by using the AS2 protocol. (pattern: <code>(|/.*)</code>)
custom_directoriesobjectA CustomDirectoriesType structure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files. Failed files MDN files Payload files Status files Temporary files
descriptionstringThe name or short description that's used to identify the agreement. (pattern: <code>[\u0021-\u007E]+</code>)
enforce_message_signingstringDetermines whether or not unsigned messages from your trading partners will be accepted. ENABLED: Transfer Family rejects unsigned messages from your trading partner. DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner. (ENABLED, DISABLED)
local_profile_idstringA unique identifier for the AS2 local profile. (pattern: <code>p-([0-9a-f]{17})</code>)
partner_profile_idstringA unique identifier for the partner profile used in the agreement. (pattern: <code>p-([0-9a-f]{17})</code>)
preserve_filenamestringDetermines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it. ENABLED: the filename provided by your trading parter is preserved when the file is saved. DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations. (ENABLED, DISABLED)
server_idstringA system-assigned unique identifier for a server instance. This identifier indicates the specific server that the agreement uses. (pattern: <code>s-([0-9a-f]{17})</code>)
statusstringThe current status of the agreement, either ACTIVE or INACTIVE. (ACTIVE, INACTIVE)
tagsarrayKey-value pairs that can be used to group and search for agreements.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_agreementselectregionDescribes the agreement that's identified by the AgreementId.
list_agreementsselectregionReturns a list of the agreements for the server that's identified by the ServerId that you supply. If you want to limit the results to a certain number, supply a value for the MaxResults parameter. If you ran the command previously and received a value for NextToken, you can supply that value to continue listing agreements from where you left off.
create_agreementinsertregion, ServerId, LocalProfileId, PartnerProfileId, AccessRoleCreates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an Transfer Family server and an AS2 process. The agreement defines the file and message transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family combines a server, local profile, partner profile, certificate, and other attributes. The partner is identified with the PartnerProfileId, and the AS2 process is identified with the LocalProfileId. Specify either BaseDirectory or CustomDirectories, but not both. Specifying both causes the command to fail.
update_agreementupdateregion, AgreementId, ServerIdUpdates some of the parameters for an existing agreement. Provide the AgreementId and the ServerId for the agreement that you want to update, along with the new values for the parameters to update. Specify either BaseDirectory or CustomDirectories, but not both. Specifying both causes the command to fail. If you update an agreement from using base directory to custom directories, the base directory is no longer used. Similarly, if you change from custom directories to a base directory, the custom directories are no longer used.
delete_agreementdeleteregionDelete the agreement that's specified in the provided AgreementId.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the agreement that's identified by the AgreementId.

SELECT
access_role,
agreement_id,
arn,
base_directory,
custom_directories,
description,
enforce_message_signing,
local_profile_id,
partner_profile_id,
preserve_filename,
server_id,
status,
tags
FROM aws.transfer.agreements
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an Transfer Family server and an AS2 process. The agreement defines the file and message transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family combines a server, local profile, partner profile, certificate, and other attributes. The partner is identified with the PartnerProfileId, and the AS2 process is identified with the LocalProfileId. Specify either BaseDirectory or CustomDirectories, but not both. Specifying both causes the command to fail.

INSERT INTO aws.transfer.agreements (
Description,
ServerId,
LocalProfileId,
PartnerProfileId,
BaseDirectory,
AccessRole,
Status,
Tags,
PreserveFilename,
EnforceMessageSigning,
CustomDirectories,
region
)
SELECT
'{{ Description }}',
'{{ ServerId }}' /* required */,
'{{ LocalProfileId }}' /* required */,
'{{ PartnerProfileId }}' /* required */,
'{{ BaseDirectory }}',
'{{ AccessRole }}' /* required */,
'{{ Status }}',
'{{ Tags }}',
'{{ PreserveFilename }}',
'{{ EnforceMessageSigning }}',
'{{ CustomDirectories }}',
'{{ region }}'
RETURNING
agreement_id
;

UPDATE examples

Updates some of the parameters for an existing agreement. Provide the AgreementId and the ServerId for the agreement that you want to update, along with the new values for the parameters to update. Specify either BaseDirectory or CustomDirectories, but not both. Specifying both causes the command to fail. If you update an agreement from using base directory to custom directories, the base directory is no longer used. Similarly, if you change from custom directories to a base directory, the custom directories are no longer used.

UPDATE aws.transfer.agreements
SET
AgreementId = '{{ AgreementId }}',
ServerId = '{{ ServerId }}',
Description = '{{ Description }}',
Status = '{{ Status }}',
LocalProfileId = '{{ LocalProfileId }}',
PartnerProfileId = '{{ PartnerProfileId }}',
BaseDirectory = '{{ BaseDirectory }}',
AccessRole = '{{ AccessRole }}',
PreserveFilename = '{{ PreserveFilename }}',
EnforceMessageSigning = '{{ EnforceMessageSigning }}',
CustomDirectories = '{{ CustomDirectories }}'
WHERE
region = '{{ region }}' --required
AND AgreementId = '{{ AgreementId }}' --required
AND ServerId = '{{ ServerId }}' --required
RETURNING
agreement_id;

DELETE examples

Delete the agreement that's specified in the provided AgreementId.

DELETE FROM aws.transfer.agreements
WHERE region = '{{ region }}' --required
;