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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.transfer.agreements
WHERE
Identifier = '{{ agreement_id }}|{{ server_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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