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,
});
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"])
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
})
}
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,
});
});
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());
}
}
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}
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 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.
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" },
},
});
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"),
},
})
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());
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",
})
const agreementResource = new aws.transfer.Agreement("agreementResource", {
accessRole: "string",
baseDirectory: "string",
localProfileId: "string",
partnerProfileId: "string",
serverId: "string",
description: "string",
tags: {
string: "string",
},
});
type: aws:transfer:Agreement
properties:
accessRole: string
baseDirectory: string
description: string
localProfileId: string
partnerProfileId: string
serverId: string
tags:
string: string
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:
- Access
Role string - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- Base
Directory string - The landing directory for the files transferred by using the AS2 protocol.
- Local
Profile stringId - The unique identifier for the AS2 local profile.
- Partner
Profile stringId - The unique identifier for the AS2 partner profile.
- Server
Id 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.
- 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.
- Access
Role string - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- Base
Directory string - The landing directory for the files transferred by using the AS2 protocol.
- Local
Profile stringId - The unique identifier for the AS2 local profile.
- Partner
Profile stringId - The unique identifier for the AS2 partner profile.
- Server
Id 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.
- 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.
- access
Role String - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- base
Directory String - The landing directory for the files transferred by using the AS2 protocol.
- local
Profile StringId - The unique identifier for the AS2 local profile.
- partner
Profile StringId - The unique identifier for the AS2 partner profile.
- server
Id 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.
- 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.
- access
Role string - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- base
Directory string - The landing directory for the files transferred by using the AS2 protocol.
- local
Profile stringId - The unique identifier for the AS2 local profile.
- partner
Profile stringId - The unique identifier for the AS2 partner profile.
- server
Id 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.
- {[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_ strid - The unique identifier for the AS2 local profile.
- partner_
profile_ strid - 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.
- 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.
- access
Role String - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- base
Directory String - The landing directory for the files transferred by using the AS2 protocol.
- local
Profile StringId - The unique identifier for the AS2 local profile.
- partner
Profile StringId - The unique identifier for the AS2 partner profile.
- server
Id 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.
- 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:
- Agreement
Id 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
- Dictionary<string, string>
- Agreement
Id 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
- map[string]string
- agreement
Id 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
- Map<String,String>
- agreement
Id 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
- {[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
- Mapping[str, str]
- agreement
Id 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
- 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.
- Access
Role string - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- Agreement
Id string - The unique identifier for the AS2 agreement.
- Arn string
- The ARN of the agreement.
- Base
Directory string - The landing directory for the files transferred by using the AS2 protocol.
- Description string
- The Optional description of the transdfer.
- Local
Profile stringId - The unique identifier for the AS2 local profile.
- Partner
Profile stringId - The unique identifier for the AS2 partner profile.
- Server
Id string - The unique server identifier for the server instance. This is the specific server the agreement uses.
- Status string
- 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. - Dictionary<string, string>
- Access
Role string - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- Agreement
Id string - The unique identifier for the AS2 agreement.
- Arn string
- The ARN of the agreement.
- Base
Directory string - The landing directory for the files transferred by using the AS2 protocol.
- Description string
- The Optional description of the transdfer.
- Local
Profile stringId - The unique identifier for the AS2 local profile.
- Partner
Profile stringId - The unique identifier for the AS2 partner profile.
- Server
Id string - The unique server identifier for the server instance. This is the specific server the agreement uses.
- Status string
- 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. - map[string]string
- access
Role String - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- agreement
Id String - The unique identifier for the AS2 agreement.
- arn String
- The ARN of the agreement.
- base
Directory String - The landing directory for the files transferred by using the AS2 protocol.
- description String
- The Optional description of the transdfer.
- local
Profile StringId - The unique identifier for the AS2 local profile.
- partner
Profile StringId - The unique identifier for the AS2 partner profile.
- server
Id String - The unique server identifier for the server instance. This is the specific server the agreement uses.
- status String
- 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. - Map<String,String>
- access
Role string - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- agreement
Id string - The unique identifier for the AS2 agreement.
- arn string
- The ARN of the agreement.
- base
Directory string - The landing directory for the files transferred by using the AS2 protocol.
- description string
- The Optional description of the transdfer.
- local
Profile stringId - The unique identifier for the AS2 local profile.
- partner
Profile stringId - The unique identifier for the AS2 partner profile.
- server
Id string - The unique server identifier for the server instance. This is the specific server the agreement uses.
- status string
- {[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. - {[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_ strid - The unique identifier for the AS2 local profile.
- partner_
profile_ strid - 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
- 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. - Mapping[str, str]
- access
Role String - The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
- agreement
Id String - The unique identifier for the AS2 agreement.
- arn String
- The ARN of the agreement.
- base
Directory String - The landing directory for the files transferred by using the AS2 protocol.
- description String
- The Optional description of the transdfer.
- local
Profile StringId - The unique identifier for the AS2 local profile.
- partner
Profile StringId - The unique identifier for the AS2 partner profile.
- server
Id String - The unique server identifier for the server instance. This is the specific server the agreement uses.
- status String
- 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. - 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
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.