AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS Transfer for SFTP CreateAgreement API operation.

Syntax

New-TFRAgreement
-ServerId <String>
-AccessRole <String>
-BaseDirectory <String>
-Description <String>
-EnforceMessageSigning <EnforceMessageSigningType>
-CustomDirectories_FailedFilesDirectory <String>
-LocalProfileId <String>
-CustomDirectories_MdnFilesDirectory <String>
-PartnerProfileId <String>
-CustomDirectories_PayloadFilesDirectory <String>
-PreserveFilename <PreserveFilenameType>
-Status <AgreementStatusType>
-CustomDirectories_StatusFilesDirectory <String>
-Tag <Tag[]>
-CustomDirectories_TemporaryFilesDirectory <String>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonTransferConfig>

Description

Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an Transfer Family server and an AS2 process. The agreement defines the file and message transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family combines a server, local profile, partner profile, certificate, and other attributes. The partner is identified with the PartnerProfileId, and the AS2 process is identified with the LocalProfileId. Specify eitherBaseDirectory or CustomDirectories, but not both. Specifying both causes the command to fail.

Parameters

-AccessRole <String>
Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.For AS2 connectorsWith AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer.If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.For SFTP connectorsMake sure that the access role provides read and write access to the parent directory of the file location that's used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-BaseDirectory <String>
The landing directory (folder) for files transferred by using the AS2 protocol.A BaseDirectory example is /amzn-s3-demo-bucket/home/mydirectory.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientConfig <AmazonTransferConfig>
Amazon.PowerShell.Cmdlets.TFR.AmazonTransferClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CustomDirectories_FailedFilesDirectory <String>
Specifies a location to store failed AS2 message files.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CustomDirectories_MdnFilesDirectory <String>
Specifies a location to store MDN files.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CustomDirectories_PayloadFilesDirectory <String>
Specifies a location to store the payload for AS2 message files.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CustomDirectories_StatusFilesDirectory <String>
Specifies a location to store AS2 status messages.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CustomDirectories_TemporaryFilesDirectory <String>
Specifies a location to store temporary AS2 message files.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Description <String>
A name or short description to identify the agreement.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EnforceMessageSigning <EnforceMessageSigningType>
Determines whether or not unsigned messages from your trading partners will be accepted.
  • ENABLED: Transfer Family rejects unsigned messages from your trading partner.
  • DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LocalProfileId <String>
A unique identifier for the AS2 local profile.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-PartnerProfileId <String>
A unique identifier for the partner profile used in the agreement.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-PreserveFilename <PreserveFilenameType>
Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.
  • ENABLED: the filename provided by your trading parter is preserved when the file is saved.
  • DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'AgreementId'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Transfer.Model.CreateAgreementResponse). Specifying the name of a property of type Amazon.Transfer.Model.CreateAgreementResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ServerId <String>
A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
The status of the agreement. The agreement can be either ACTIVE or INACTIVE.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Tag <Tag[]>
Key-value pairs that can be used to group and search for agreements. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns a System.String object. The service call response (type Amazon.Transfer.Model.CreateAgreementResponse) can be returned by specifying '-Select *'.

Supported Version

AWS Tools for PowerShell: 2.x.y.z