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
Idaws.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.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTServerId, LocalProfileId, PartnerProfileId, BaseDirectory, AccessRole, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all agreements in a region.

SELECT
region,
description,
server_id,
local_profile_id,
partner_profile_id,
base_directory,
access_role,
status,
tags,
agreement_id,
arn
FROM aws.transfer.agreements
WHERE region = 'us-east-1';

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
FROM aws.transfer.agreements
WHERE region = 'us-east-1' AND data__Identifier = '<AgreementId>|<ServerId>';

INSERT example

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

/*+ create */
INSERT INTO aws.transfer.agreements (
ServerId,
LocalProfileId,
PartnerProfileId,
BaseDirectory,
AccessRole,
region
)
SELECT
'{{ ServerId }}',
'{{ LocalProfileId }}',
'{{ PartnerProfileId }}',
'{{ BaseDirectory }}',
'{{ AccessRole }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.transfer.agreements
WHERE data__Identifier = '<AgreementId|ServerId>'
AND region = 'us-east-1';

Permissions

To operate on the agreements resource, the following permissions are required:

Create

transfer:CreateAgreement,
transfer:TagResource,
iam:PassRole

Read

transfer:DescribeAgreement

Update

transfer:UpdateAgreement,
transfer:UnTagResource,
transfer:TagResource,
iam:PassRole

Delete

transfer:DeleteAgreement

List

transfer:ListAgreements