1. Packages
  2. AWS Classic
  3. API Docs
  4. transfer
  5. Agreement

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi

aws.transfer.Agreement

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi

    Provides a AWS Transfer AS2 Agreement resource.

    Example Usage

    Basic

    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 = aws_iam_role.Test.Arn,
            BaseDirectory = "/DOC-EXAMPLE-BUCKET/home/mydirectory",
            Description = "example",
            LocalProfileId = aws_transfer_profile.Local.Profile_id,
            PartnerProfileId = aws_transfer_profile.Partner.Profile_id,
            ServerId = aws_transfer_server.Test.Id,
        });
    
    });
    
    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(aws_iam_role.Test.Arn),
    			BaseDirectory:    pulumi.String("/DOC-EXAMPLE-BUCKET/home/mydirectory"),
    			Description:      pulumi.String("example"),
    			LocalProfileId:   pulumi.Any(aws_transfer_profile.Local.Profile_id),
    			PartnerProfileId: pulumi.Any(aws_transfer_profile.Partner.Profile_id),
    			ServerId:         pulumi.Any(aws_transfer_server.Test.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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(aws_iam_role.test().arn())
                .baseDirectory("/DOC-EXAMPLE-BUCKET/home/mydirectory")
                .description("example")
                .localProfileId(aws_transfer_profile.local().profile_id())
                .partnerProfileId(aws_transfer_profile.partner().profile_id())
                .serverId(aws_transfer_server.test().id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.transfer.Agreement("example",
        access_role=aws_iam_role["test"]["arn"],
        base_directory="/DOC-EXAMPLE-BUCKET/home/mydirectory",
        description="example",
        local_profile_id=aws_transfer_profile["local"]["profile_id"],
        partner_profile_id=aws_transfer_profile["partner"]["profile_id"],
        server_id=aws_transfer_server["test"]["id"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.transfer.Agreement("example", {
        accessRole: aws_iam_role.test.arn,
        baseDirectory: "/DOC-EXAMPLE-BUCKET/home/mydirectory",
        description: "example",
        localProfileId: aws_transfer_profile.local.profile_id,
        partnerProfileId: aws_transfer_profile.partner.profile_id,
        serverId: aws_transfer_server.test.id,
    });
    
    resources:
      example:
        type: aws:transfer:Agreement
        properties:
          accessRole: ${aws_iam_role.test.arn}
          baseDirectory: /DOC-EXAMPLE-BUCKET/home/mydirectory
          description: example
          localProfileId: ${aws_transfer_profile.local.profile_id}
          partnerProfileId: ${aws_transfer_profile.partner.profile_id}
          serverId: ${aws_transfer_server.test.id}
    

    Create Agreement Resource

    new Agreement(name: string, args: AgreementArgs, opts?: CustomResourceOptions);
    @overload
    def Agreement(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  access_role: 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,
                  tags: Optional[Mapping[str, str]] = None)
    @overload
    def Agreement(resource_name: str,
                  args: AgreementArgs,
                  opts: Optional[ResourceOptions] = 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.
    
    
    name string
    The unique name of the resource.
    args AgreementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args AgreementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AgreementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AgreementArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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

    The Agreement resource accepts the following input properties:

    AccessRole string

    The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.

    BaseDirectory string

    The landing directory for the files transferred by using the AS2 protocol.

    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.

    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 string

    The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.

    BaseDirectory string

    The landing directory for the files transferred by using the AS2 protocol.

    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.

    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 String

    The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.

    baseDirectory String

    The landing directory for the files transferred by using the AS2 protocol.

    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.

    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 string

    The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.

    baseDirectory string

    The landing directory for the files transferred by using the AS2 protocol.

    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.

    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 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 str

    The landing directory for the files transferred by using the AS2 protocol.

    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.

    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 String

    The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.

    baseDirectory String

    The landing directory for the files transferred by using the AS2 protocol.

    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.

    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>
    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
    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>
    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}
    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]
    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>

    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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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>
    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
    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>
    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}
    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]
    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>

    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
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi