agreements
Creates, updates, deletes, gets or lists an agreements resource.
Overview
| Name | agreements |
| Type | Resource |
| Id | aws.transfer.agreements |
Fields
The following fields are returned by SELECT queries:
- describe_agreement
- list_agreements
| Name | Datatype | Description |
|---|---|---|
access_role | string | 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. 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_id | string | A unique identifier for the agreement. This identifier is returned when you create an agreement. (pattern: <code>a-([0-9a-f]{17})</code>) |
arn | string | The unique Amazon Resource Name (ARN) for the agreement. (pattern: <code>arn:\S+</code>) |
base_directory | string | The landing directory (folder) for files that are transferred by using the AS2 protocol. (pattern: <code>(|/.*)</code>) |
custom_directories | object | A 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 |
description | string | The name or short description that's used to identify the agreement. (pattern: <code>[\u0021-\u007E]+</code>) |
enforce_message_signing | string | Determines 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_id | string | A unique identifier for the AS2 local profile. (pattern: <code>p-([0-9a-f]{17})</code>) |
partner_profile_id | string | A unique identifier for the partner profile used in the agreement. (pattern: <code>p-([0-9a-f]{17})</code>) |
preserve_filename | string | Determines 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_id | string | A 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>) |
status | string | The current status of the agreement, either ACTIVE or INACTIVE. (ACTIVE, INACTIVE) |
tags | array | Key-value pairs that can be used to group and search for agreements. |
| Name | Datatype | Description |
|---|---|---|
agreement_id | string | A unique identifier for the agreement. This identifier is returned when you create an agreement. (pattern: <code>a-([0-9a-f]{17})</code>) |
arn | string | The Amazon Resource Name (ARN) of the specified agreement. (pattern: <code>arn:\S+</code>) |
description | string | The current description for the agreement. You can change it by calling the UpdateAgreement operation and providing a new description. (pattern: <code>[\u0021-\u007E]+</code>) |
local_profile_id | string | A unique identifier for the AS2 local profile. (pattern: <code>p-([0-9a-f]{17})</code>) |
partner_profile_id | string | A unique identifier for the partner profile. (pattern: <code>p-([0-9a-f]{17})</code>) |
server_id | string | The unique identifier for the agreement. (pattern: <code>s-([0-9a-f]{17})</code>) |
status | string | The agreement can be either ACTIVE or INACTIVE. (ACTIVE, INACTIVE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_agreement | select | region | Describes the agreement that's identified by the AgreementId. | |
list_agreements | select | region | Returns 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_agreement | insert | region, ServerId, LocalProfileId, PartnerProfileId, AccessRole | 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. | |
update_agreement | update | region, AgreementId, ServerId | 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. | |
delete_agreement | delete | region | Delete 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_agreement
- list_agreements
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
;
Returns 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.
SELECT
agreement_id,
arn,
description,
local_profile_id,
partner_profile_id,
server_id,
status
FROM aws.transfer.agreements
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_agreement
- Manifest
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
;
# Description fields are for documentation purposes
- name: agreements
props:
- name: region
value: "{{ region }}"
description: Required parameter for the agreements resource.
- name: Description
value: "{{ Description }}"
description: |
A name or short description to identify the agreement.
- name: ServerId
value: "{{ ServerId }}"
description: |
A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.
- name: LocalProfileId
value: "{{ LocalProfileId }}"
description: |
A unique identifier for the AS2 local profile.
- name: PartnerProfileId
value: "{{ PartnerProfileId }}"
description: |
A unique identifier for the partner profile used in the agreement.
- name: BaseDirectory
value: "{{ BaseDirectory }}"
description: |
The landing directory (folder) for files transferred by using the AS2 protocol. A BaseDirectory example is /amzn-s3-demo-bucket/home/mydirectory.
- name: AccessRole
value: "{{ AccessRole }}"
description: |
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. 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.
- name: Status
value: "{{ Status }}"
description: |
The status of the agreement. The agreement can be either ACTIVE or INACTIVE.
valid_values: ['ACTIVE', 'INACTIVE']
- name: Tags
description: |
Key-value pairs that can be used to group and search for agreements.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: PreserveFilename
value: "{{ PreserveFilename }}"
description: |
Determines 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.
valid_values: ['ENABLED', 'DISABLED']
- name: EnforceMessageSigning
value: "{{ EnforceMessageSigning }}"
description: |
Determines 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.
valid_values: ['ENABLED', 'DISABLED']
- name: CustomDirectories
description: |
A 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
value:
FailedFilesDirectory: "{{ FailedFilesDirectory }}"
MdnFilesDirectory: "{{ MdnFilesDirectory }}"
PayloadFilesDirectory: "{{ PayloadFilesDirectory }}"
StatusFilesDirectory: "{{ StatusFilesDirectory }}"
TemporaryFilesDirectory: "{{ TemporaryFilesDirectory }}"
UPDATE examples
- update_agreement
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_agreement
Delete the agreement that's specified in the provided AgreementId.
DELETE FROM aws.transfer.agreements
WHERE region = '{{ region }}' --required
;