CfnAgreementProps Struct
Properties for defining a CfnAgreement.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_transfer as transfer } from 'aws-cdk-lib';
const cfnAgreementProps: transfer.CfnAgreementProps = {
accessRole: 'accessRole',
localProfileId: 'localProfileId',
partnerProfileId: 'partnerProfileId',
serverId: 'serverId',
// the properties below are optional
baseDirectory: 'baseDirectory',
customDirectories: {
failedFilesDirectory: 'failedFilesDirectory',
mdnFilesDirectory: 'mdnFilesDirectory',
payloadFilesDirectory: 'payloadFilesDirectory',
statusFilesDirectory: 'statusFilesDirectory',
temporaryFilesDirectory: 'temporaryFilesDirectory',
},
description: 'description',
enforceMessageSigning: 'enforceMessageSigning',
preserveFilename: 'preserveFilename',
status: 'status',
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
notes
For the access role, provide the Amazon Resource Name (ARN) of the AWS 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 AWS 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 AWS Secrets Manager .
customDirectoriesIResolvable | CfnAgreement.CustomDirectoriesPropertycustom_directoriestyping.Union[IResolvable, CustomDirectoriesProperty]customDirectoriesIResolvableCustomDirectoriesIResolvableCustomDirectoriesinterface{}#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
enforceMessageSigningstringenforce_message_signingstrenforceMessageSigningStringEnforceMessageSigningstringEnforceMessageSigning*string#ENABLED: Transfer Family rejects unsigned messages from your trading partner.DISABLED(default value): Transfer Family accepts unsigned messages from your trading partner.
localProfileIdstringlocal_profile_idstrlocalProfileIdStringLocalProfileIdstringLocalProfileId*stringrequired#partnerProfileIdstringpartner_profile_idstrpartnerProfileIdStringPartnerProfileIdstringPartnerProfileId*stringrequired#preserveFilenamestringpreserve_filenamestrpreserveFilenameStringPreserveFilenamestringPreserveFilename*string#notes
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 .
This identifier indicates the specific server that the agreement uses.