agreements
Creates, updates, deletes or gets an agreement resource or lists agreements in a region
Overview
| Name | agreements |
| Type | Resource |
| Description | Resource Type definition for AWS::Transfer::Agreement |
| Id | awscc.transfer.agreements |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
description | string | A textual description for the agreement. |
server_id | string | A unique identifier for the server. |
local_profile_id | string | A unique identifier for the local profile. |
partner_profile_id | string | A unique identifier for the partner profile. |
base_directory | string | Specifies the base directory for the agreement. |
access_role | string | Specifies the access role for the agreement. |
status | string | Specifies the status of the agreement. |
tags | array | Key-value pairs that can be used to group and search for agreements. Tags are metadata attached to agreements for any purpose. |
agreement_id | string | A unique identifier for the agreement. |
arn | string | Specifies the unique Amazon Resource Name (ARN) for the agreement. |
preserve_filename | string | Specifies whether to preserve the filename received for this agreement. |
enforce_message_signing | string | Specifies whether to enforce an AS2 message is signed for this agreement. |
custom_directories | object | Specifies a separate directory for each type of file to store for an AS2 message. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
server_id | string | A unique identifier for the server. |
agreement_id | string | A unique identifier for the agreement. |
region | string | AWS region. |
For more information, see AWS::Transfer::Agreement.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | agreements | INSERT | ServerId, LocalProfileId, PartnerProfileId, AccessRole, region |
delete_resource | agreements | DELETE | Identifier, region |
update_resource | agreements | UPDATE | Identifier, PatchDocument, region |
list_resources | agreements_list_only | SELECT | region |
get_resource | agreements | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual agreement.
SELECT
region,
description,
server_id,
local_profile_id,
partner_profile_id,
base_directory,
access_role,
status,
tags,
agreement_id,
arn,
preserve_filename,
enforce_message_signing,
custom_directories
FROM awscc.transfer.agreements
WHERE
region = 'us-east-1' AND
Identifier = '{{ agreement_id }}|{{ server_id }}';
Lists all agreements in a region.
SELECT
region,
agreement_id,
server_id
FROM awscc.transfer.agreements_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new agreement resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.transfer.agreements (
ServerId,
LocalProfileId,
PartnerProfileId,
AccessRole,
region
)
SELECT
'{{ server_id }}',
'{{ local_profile_id }}',
'{{ partner_profile_id }}',
'{{ access_role }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.transfer.agreements (
Description,
ServerId,
LocalProfileId,
PartnerProfileId,
BaseDirectory,
AccessRole,
Status,
Tags,
PreserveFilename,
EnforceMessageSigning,
CustomDirectories,
region
)
SELECT
'{{ description }}',
'{{ server_id }}',
'{{ local_profile_id }}',
'{{ partner_profile_id }}',
'{{ base_directory }}',
'{{ access_role }}',
'{{ status }}',
'{{ tags }}',
'{{ preserve_filename }}',
'{{ enforce_message_signing }}',
'{{ custom_directories }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: agreement
props:
- name: description
value: '{{ description }}'
- name: server_id
value: '{{ server_id }}'
- name: local_profile_id
value: '{{ local_profile_id }}'
- name: partner_profile_id
value: '{{ partner_profile_id }}'
- name: base_directory
value: '{{ base_directory }}'
- name: access_role
value: '{{ access_role }}'
- name: status
value: '{{ status }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: preserve_filename
value: '{{ preserve_filename }}'
- name: enforce_message_signing
value: '{{ enforce_message_signing }}'
- name: custom_directories
value:
failed_files_directory: '{{ failed_files_directory }}'
mdn_files_directory: '{{ mdn_files_directory }}'
payload_files_directory: '{{ payload_files_directory }}'
status_files_directory: '{{ status_files_directory }}'
temporary_files_directory: '{{ temporary_files_directory }}'
UPDATE example
Use the following StackQL query and manifest file to update a agreement resource, using stack-deploy.
/*+ update */
UPDATE awscc.transfer.agreements
SET PatchDocument = string('{{ {
"Description": description,
"LocalProfileId": local_profile_id,
"PartnerProfileId": partner_profile_id,
"BaseDirectory": base_directory,
"AccessRole": access_role,
"Status": status,
"Tags": tags,
"PreserveFilename": preserve_filename,
"EnforceMessageSigning": enforce_message_signing,
"CustomDirectories": custom_directories
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ agreement_id }}|{{ server_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.transfer.agreements
WHERE
Identifier = '{{ agreement_id }}|{{ server_id }}' AND
region = 'us-east-1';
Permissions
To operate on the agreements resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
transfer:CreateAgreement,
transfer:TagResource,
iam:PassRole
transfer:DescribeAgreement
transfer:UpdateAgreement,
transfer:UnTagResource,
transfer:TagResource,
iam:PassRole
transfer:DeleteAgreement
transfer:ListAgreements