Class CfnAgreement

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:35.906Z") @Stability(Stable) public class CfnAgreement extends CfnResource implements IInspectable
A CloudFormation AWS::Transfer::Agreement.

Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an AWS 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 .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.transfer.*;
 CfnAgreement cfnAgreement = CfnAgreement.Builder.create(this, "MyCfnAgreement")
         .accessRole("accessRole")
         .baseDirectory("baseDirectory")
         .localProfileId("localProfileId")
         .partnerProfileId("partnerProfileId")
         .serverId("serverId")
         // the properties below are optional
         .description("description")
         .status("status")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnAgreement

      protected CfnAgreement(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnAgreement

      protected CfnAgreement(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnAgreement

      @Stability(Stable) public CfnAgreement(@NotNull Construct scope, @NotNull String id, @NotNull CfnAgreementProps props)
      Create a new AWS::Transfer::Agreement.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrAgreementId

      @Stability(Stable) @NotNull public String getAttrAgreementId()
      The unique identifier for the AS2 agreement, returned after the API call succeeds.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Key-value pairs that can be used to group and search for agreements.
    • getAccessRole

      @Stability(Stable) @NotNull public String getAccessRole()
      With 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 .

    • setAccessRole

      @Stability(Stable) public void setAccessRole(@NotNull String value)
      With 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 .

    • getBaseDirectory

      @Stability(Stable) @NotNull public String getBaseDirectory()
      The landing directory (folder) for files that are transferred by using the AS2 protocol.
    • setBaseDirectory

      @Stability(Stable) public void setBaseDirectory(@NotNull String value)
      The landing directory (folder) for files that are transferred by using the AS2 protocol.
    • getLocalProfileId

      @Stability(Stable) @NotNull public String getLocalProfileId()
      A unique identifier for the AS2 local profile.
    • setLocalProfileId

      @Stability(Stable) public void setLocalProfileId(@NotNull String value)
      A unique identifier for the AS2 local profile.
    • getPartnerProfileId

      @Stability(Stable) @NotNull public String getPartnerProfileId()
      A unique identifier for the partner profile used in the agreement.
    • setPartnerProfileId

      @Stability(Stable) public void setPartnerProfileId(@NotNull String value)
      A unique identifier for the partner profile used in the agreement.
    • getServerId

      @Stability(Stable) @NotNull public String getServerId()
      A system-assigned unique identifier for a server instance.

      This identifier indicates the specific server that the agreement uses.

    • setServerId

      @Stability(Stable) public void setServerId(@NotNull String value)
      A system-assigned unique identifier for a server instance.

      This identifier indicates the specific server that the agreement uses.

    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The name or short description that's used to identify the agreement.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The name or short description that's used to identify the agreement.
    • getStatus

      @Stability(Stable) @Nullable public String getStatus()
      The current status of the agreement, either ACTIVE or INACTIVE .
    • setStatus

      @Stability(Stable) public void setStatus(@Nullable String value)
      The current status of the agreement, either ACTIVE or INACTIVE .