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 | aws.transfer.agreements |
Fields
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. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ServerId, LocalProfileId, PartnerProfileId, BaseDirectory, AccessRole, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.transfer.agreements (
ServerId,
LocalProfileId,
PartnerProfileId,
BaseDirectory,
AccessRole,
region
)
SELECT
'{{ ServerId }}',
'{{ LocalProfileId }}',
'{{ PartnerProfileId }}',
'{{ BaseDirectory }}',
'{{ AccessRole }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.transfer.agreements (
Description,
ServerId,
LocalProfileId,
PartnerProfileId,
BaseDirectory,
AccessRole,
Status,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ ServerId }}',
'{{ LocalProfileId }}',
'{{ PartnerProfileId }}',
'{{ BaseDirectory }}',
'{{ AccessRole }}',
'{{ Status }}',
'{{ Tags }}',
'{{ 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: ServerId
value: '{{ ServerId }}'
- name: LocalProfileId
value: '{{ LocalProfileId }}'
- name: PartnerProfileId
value: '{{ PartnerProfileId }}'
- name: BaseDirectory
value: '{{ BaseDirectory }}'
- name: AccessRole
value: '{{ AccessRole }}'
- name: Status
value: '{{ Status }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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