Skip to main content

agreements

Creates, updates, deletes or gets an agreement resource or lists agreements in a region

Overview

Nameagreements
TypeResource
DescriptionResource Type definition for AWS::Transfer::Agreement
Idawscc.transfer.agreements

Fields

NameDatatypeDescription
descriptionstringA textual description for the agreement.
server_idstringA unique identifier for the server.
local_profile_idstringA unique identifier for the local profile.
partner_profile_idstringA unique identifier for the partner profile.
base_directorystringSpecifies the base directory for the agreement.
access_rolestringSpecifies the access role for the agreement.
statusstringSpecifies the status of the agreement.
tagsarrayKey-value pairs that can be used to group and search for agreements. Tags are metadata attached to agreements for any purpose.
agreement_idstringA unique identifier for the agreement.
arnstringSpecifies the unique Amazon Resource Name (ARN) for the agreement.
preserve_filenamestringSpecifies whether to preserve the filename received for this agreement.
enforce_message_signingstringSpecifies whether to enforce an AS2 message is signed for this agreement.
custom_directoriesobjectSpecifies a separate directory for each type of file to store for an AS2 message.
regionstringAWS region.

For more information, see AWS::Transfer::Agreement.

Methods

NameResourceAccessible byRequired Params
create_resourceagreementsINSERTServerId, LocalProfileId, PartnerProfileId, AccessRole, region
delete_resourceagreementsDELETEIdentifier, region
update_resourceagreementsUPDATEIdentifier, PatchDocument, region
list_resourcesagreements_list_onlySELECTregion
get_resourceagreementsSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new agreement resource, using stack-deploy.

/*+ 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
;

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:

ParameterDescription
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:

transfer:CreateAgreement,
transfer:TagResource,
iam:PassRole