1. Packages
  2. AWS
  3. API Docs
  4. transfer
  5. Agreement
AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

aws.transfer.Agreement

Explore with Pulumi AI

Provides a AWS Transfer AS2 Agreement resource.

Example Usage

Basic

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.transfer.Agreement("example", {
    accessRole: test.arn,
    baseDirectory: "/DOC-EXAMPLE-BUCKET/home/mydirectory",
    description: "example",
    localProfileId: local.profileId,
    partnerProfileId: partner.profileId,
    serverId: testAwsTransferServer.id,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.transfer.Agreement("example",
    access_role=test["arn"],
    base_directory="/DOC-EXAMPLE-BUCKET/home/mydirectory",
    description="example",
    local_profile_id=local["profileId"],
    partner_profile_id=partner["profileId"],
    server_id=test_aws_transfer_server["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transfer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := transfer.NewAgreement(ctx, "example", &transfer.AgreementArgs{
			AccessRole:       pulumi.Any(test.Arn),
			BaseDirectory:    pulumi.String("/DOC-EXAMPLE-BUCKET/home/mydirectory"),
			Description:      pulumi.String("example"),
			LocalProfileId:   pulumi.Any(local.ProfileId),
			PartnerProfileId: pulumi.Any(partner.ProfileId),
			ServerId:         pulumi.Any(testAwsTransferServer.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Transfer.Agreement("example", new()
    {
        AccessRole = test.Arn,
        BaseDirectory = "/DOC-EXAMPLE-BUCKET/home/mydirectory",
        Description = "example",
        LocalProfileId = local.ProfileId,
        PartnerProfileId = partner.ProfileId,
        ServerId = testAwsTransferServer.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.transfer.Agreement;
import com.pulumi.aws.transfer.AgreementArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Agreement("example", AgreementArgs.builder()
            .accessRole(test.arn())
            .baseDirectory("/DOC-EXAMPLE-BUCKET/home/mydirectory")
            .description("example")
            .localProfileId(local.profileId())
            .partnerProfileId(partner.profileId())
            .serverId(testAwsTransferServer.id())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:transfer:Agreement
    properties:
      accessRole: ${test.arn}
      baseDirectory: /DOC-EXAMPLE-BUCKET/home/mydirectory
      description: example
      localProfileId: ${local.profileId}
      partnerProfileId: ${partner.profileId}
      serverId: ${testAwsTransferServer.id}
Copy

Create Agreement Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Agreement(name: string, args: AgreementArgs, opts?: CustomResourceOptions);
@overload
def Agreement(resource_name: str,
              args: AgreementArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def Agreement(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              access_role: Optional[str] = None,
              base_directory: Optional[str] = None,
              local_profile_id: Optional[str] = None,
              partner_profile_id: Optional[str] = None,
              server_id: Optional[str] = None,
              description: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None)
func NewAgreement(ctx *Context, name string, args AgreementArgs, opts ...ResourceOption) (*Agreement, error)
public Agreement(string name, AgreementArgs args, CustomResourceOptions? opts = null)
public Agreement(String name, AgreementArgs args)
public Agreement(String name, AgreementArgs args, CustomResourceOptions options)
type: aws:transfer:Agreement
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AgreementArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AgreementArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AgreementArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AgreementArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AgreementArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var agreementResource = new Aws.Transfer.Agreement("agreementResource", new()
{
    AccessRole = "string",
    BaseDirectory = "string",
    LocalProfileId = "string",
    PartnerProfileId = "string",
    ServerId = "string",
    Description = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := transfer.NewAgreement(ctx, "agreementResource", &transfer.AgreementArgs{
	AccessRole:       pulumi.String("string"),
	BaseDirectory:    pulumi.String("string"),
	LocalProfileId:   pulumi.String("string"),
	PartnerProfileId: pulumi.String("string"),
	ServerId:         pulumi.String("string"),
	Description:      pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var agreementResource = new Agreement("agreementResource", AgreementArgs.builder()
    .accessRole("string")
    .baseDirectory("string")
    .localProfileId("string")
    .partnerProfileId("string")
    .serverId("string")
    .description("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
agreement_resource = aws.transfer.Agreement("agreementResource",
    access_role="string",
    base_directory="string",
    local_profile_id="string",
    partner_profile_id="string",
    server_id="string",
    description="string",
    tags={
        "string": "string",
    })
Copy
const agreementResource = new aws.transfer.Agreement("agreementResource", {
    accessRole: "string",
    baseDirectory: "string",
    localProfileId: "string",
    partnerProfileId: "string",
    serverId: "string",
    description: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:transfer:Agreement
properties:
    accessRole: string
    baseDirectory: string
    description: string
    localProfileId: string
    partnerProfileId: string
    serverId: string
    tags:
        string: string
Copy

Agreement Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Agreement resource accepts the following input properties:

AccessRole This property is required. string
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
BaseDirectory This property is required. string
The landing directory for the files transferred by using the AS2 protocol.
LocalProfileId This property is required. string
The unique identifier for the AS2 local profile.
PartnerProfileId This property is required. string
The unique identifier for the AS2 partner profile.
ServerId This property is required. string
The unique server identifier for the server instance. This is the specific server the agreement uses.
Description string
The Optional description of the transdfer.
Tags Dictionary<string, string>
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
AccessRole This property is required. string
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
BaseDirectory This property is required. string
The landing directory for the files transferred by using the AS2 protocol.
LocalProfileId This property is required. string
The unique identifier for the AS2 local profile.
PartnerProfileId This property is required. string
The unique identifier for the AS2 partner profile.
ServerId This property is required. string
The unique server identifier for the server instance. This is the specific server the agreement uses.
Description string
The Optional description of the transdfer.
Tags map[string]string
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
accessRole This property is required. String
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
baseDirectory This property is required. String
The landing directory for the files transferred by using the AS2 protocol.
localProfileId This property is required. String
The unique identifier for the AS2 local profile.
partnerProfileId This property is required. String
The unique identifier for the AS2 partner profile.
serverId This property is required. String
The unique server identifier for the server instance. This is the specific server the agreement uses.
description String
The Optional description of the transdfer.
tags Map<String,String>
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
accessRole This property is required. string
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
baseDirectory This property is required. string
The landing directory for the files transferred by using the AS2 protocol.
localProfileId This property is required. string
The unique identifier for the AS2 local profile.
partnerProfileId This property is required. string
The unique identifier for the AS2 partner profile.
serverId This property is required. string
The unique server identifier for the server instance. This is the specific server the agreement uses.
description string
The Optional description of the transdfer.
tags {[key: string]: string}
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
access_role This property is required. str
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
base_directory This property is required. str
The landing directory for the files transferred by using the AS2 protocol.
local_profile_id This property is required. str
The unique identifier for the AS2 local profile.
partner_profile_id This property is required. str
The unique identifier for the AS2 partner profile.
server_id This property is required. str
The unique server identifier for the server instance. This is the specific server the agreement uses.
description str
The Optional description of the transdfer.
tags Mapping[str, str]
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
accessRole This property is required. String
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
baseDirectory This property is required. String
The landing directory for the files transferred by using the AS2 protocol.
localProfileId This property is required. String
The unique identifier for the AS2 local profile.
partnerProfileId This property is required. String
The unique identifier for the AS2 partner profile.
serverId This property is required. String
The unique server identifier for the server instance. This is the specific server the agreement uses.
description String
The Optional description of the transdfer.
tags Map<String>
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

All input properties are implicitly available as output properties. Additionally, the Agreement resource produces the following output properties:

AgreementId string
The unique identifier for the AS2 agreement.
Arn string
The ARN of the agreement.
Id string
The provider-assigned unique ID for this managed resource.
Status string
TagsAll Dictionary<string, string>

Deprecated: Please use tags instead.

AgreementId string
The unique identifier for the AS2 agreement.
Arn string
The ARN of the agreement.
Id string
The provider-assigned unique ID for this managed resource.
Status string
TagsAll map[string]string

Deprecated: Please use tags instead.

agreementId String
The unique identifier for the AS2 agreement.
arn String
The ARN of the agreement.
id String
The provider-assigned unique ID for this managed resource.
status String
tagsAll Map<String,String>

Deprecated: Please use tags instead.

agreementId string
The unique identifier for the AS2 agreement.
arn string
The ARN of the agreement.
id string
The provider-assigned unique ID for this managed resource.
status string
tagsAll {[key: string]: string}

Deprecated: Please use tags instead.

agreement_id str
The unique identifier for the AS2 agreement.
arn str
The ARN of the agreement.
id str
The provider-assigned unique ID for this managed resource.
status str
tags_all Mapping[str, str]

Deprecated: Please use tags instead.

agreementId String
The unique identifier for the AS2 agreement.
arn String
The ARN of the agreement.
id String
The provider-assigned unique ID for this managed resource.
status String
tagsAll Map<String>

Deprecated: Please use tags instead.

Look up Existing Agreement Resource

Get an existing Agreement resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AgreementState, opts?: CustomResourceOptions): Agreement
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_role: Optional[str] = None,
        agreement_id: Optional[str] = None,
        arn: Optional[str] = None,
        base_directory: Optional[str] = None,
        description: Optional[str] = None,
        local_profile_id: Optional[str] = None,
        partner_profile_id: Optional[str] = None,
        server_id: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> Agreement
func GetAgreement(ctx *Context, name string, id IDInput, state *AgreementState, opts ...ResourceOption) (*Agreement, error)
public static Agreement Get(string name, Input<string> id, AgreementState? state, CustomResourceOptions? opts = null)
public static Agreement get(String name, Output<String> id, AgreementState state, CustomResourceOptions options)
resources:  _:    type: aws:transfer:Agreement    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessRole string
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
AgreementId string
The unique identifier for the AS2 agreement.
Arn string
The ARN of the agreement.
BaseDirectory string
The landing directory for the files transferred by using the AS2 protocol.
Description string
The Optional description of the transdfer.
LocalProfileId string
The unique identifier for the AS2 local profile.
PartnerProfileId string
The unique identifier for the AS2 partner profile.
ServerId string
The unique server identifier for the server instance. This is the specific server the agreement uses.
Status string
Tags Dictionary<string, string>
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>

Deprecated: Please use tags instead.

AccessRole string
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
AgreementId string
The unique identifier for the AS2 agreement.
Arn string
The ARN of the agreement.
BaseDirectory string
The landing directory for the files transferred by using the AS2 protocol.
Description string
The Optional description of the transdfer.
LocalProfileId string
The unique identifier for the AS2 local profile.
PartnerProfileId string
The unique identifier for the AS2 partner profile.
ServerId string
The unique server identifier for the server instance. This is the specific server the agreement uses.
Status string
Tags map[string]string
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string

Deprecated: Please use tags instead.

accessRole String
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
agreementId String
The unique identifier for the AS2 agreement.
arn String
The ARN of the agreement.
baseDirectory String
The landing directory for the files transferred by using the AS2 protocol.
description String
The Optional description of the transdfer.
localProfileId String
The unique identifier for the AS2 local profile.
partnerProfileId String
The unique identifier for the AS2 partner profile.
serverId String
The unique server identifier for the server instance. This is the specific server the agreement uses.
status String
tags Map<String,String>
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>

Deprecated: Please use tags instead.

accessRole string
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
agreementId string
The unique identifier for the AS2 agreement.
arn string
The ARN of the agreement.
baseDirectory string
The landing directory for the files transferred by using the AS2 protocol.
description string
The Optional description of the transdfer.
localProfileId string
The unique identifier for the AS2 local profile.
partnerProfileId string
The unique identifier for the AS2 partner profile.
serverId string
The unique server identifier for the server instance. This is the specific server the agreement uses.
status string
tags {[key: string]: string}
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}

Deprecated: Please use tags instead.

access_role str
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
agreement_id str
The unique identifier for the AS2 agreement.
arn str
The ARN of the agreement.
base_directory str
The landing directory for the files transferred by using the AS2 protocol.
description str
The Optional description of the transdfer.
local_profile_id str
The unique identifier for the AS2 local profile.
partner_profile_id str
The unique identifier for the AS2 partner profile.
server_id str
The unique server identifier for the server instance. This is the specific server the agreement uses.
status str
tags Mapping[str, str]
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]

Deprecated: Please use tags instead.

accessRole String
The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
agreementId String
The unique identifier for the AS2 agreement.
arn String
The ARN of the agreement.
baseDirectory String
The landing directory for the files transferred by using the AS2 protocol.
description String
The Optional description of the transdfer.
localProfileId String
The unique identifier for the AS2 local profile.
partnerProfileId String
The unique identifier for the AS2 partner profile.
serverId String
The unique server identifier for the server instance. This is the specific server the agreement uses.
status String
tags Map<String>
A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>

Deprecated: Please use tags instead.

Import

Using pulumi import, import Transfer AS2 Agreement using the server_id/agreement_id. For example:

$ pulumi import aws:transfer/agreement:Agreement example s-4221a88afd5f4362a/a-4221a88afd5f4362a
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.