Class: AWSCDK::Transfer::CfnAgreementProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
transfer/cfn_agreement_props.rb

Overview

Properties for defining a CfnAgreement.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_role:, local_profile_id:, partner_profile_id:, server_id:, base_directory: nil, custom_directories: nil, description: nil, enforce_message_signing: nil, preserve_filename: nil, status: nil, tags: nil) ⇒ CfnAgreementProps

Returns a new instance of CfnAgreementProps.

Parameters:

  • access_role (String)

    Connectors are used to send files using either the AS2 or SFTP protocol.

  • local_profile_id (String)

    A unique identifier for the AS2 local profile.

  • partner_profile_id (String)

    A unique identifier for the partner profile used in the agreement.

  • server_id (String)

    A system-assigned unique identifier for a server instance.

  • base_directory (String, nil) (defaults to: nil)

    The landing directory (folder) for files that are transferred by using the AS2 protocol.

  • custom_directories (AWSCDK::IResolvable, AWSCDK::Transfer::CfnAgreement::CustomDirectoriesProperty, nil) (defaults to: nil)

    A CustomDirectoriesType structure.

  • description (String, nil) (defaults to: nil)

    The name or short description that's used to identify the agreement.

  • enforce_message_signing (String, nil) (defaults to: nil)

    Determines whether or not unsigned messages from your trading partners will be accepted.

  • preserve_filename (String, nil) (defaults to: nil)

    Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it.

  • status (String, nil) (defaults to: nil)

    The current status of the agreement, either ACTIVE or INACTIVE .

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Key-value pairs that can be used to group and search for agreements.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'transfer/cfn_agreement_props.rb', line 20

def initialize(access_role:, local_profile_id:, partner_profile_id:, server_id:, base_directory: nil, custom_directories: nil, description: nil, enforce_message_signing: nil, preserve_filename: nil, status: nil, tags: nil)
  @access_role = access_role
  Jsii::Type.check_type(@access_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessRole")
  @local_profile_id = local_profile_id
  Jsii::Type.check_type(@local_profile_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "localProfileId")
  @partner_profile_id = partner_profile_id
  Jsii::Type.check_type(@partner_profile_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "partnerProfileId")
  @server_id = server_id
  Jsii::Type.check_type(@server_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverId")
  @base_directory = base_directory
  Jsii::Type.check_type(@base_directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "baseDirectory") unless @base_directory.nil?
  @custom_directories = custom_directories.is_a?(Hash) ? ::AWSCDK::Transfer::CfnAgreement::CustomDirectoriesProperty.new(**custom_directories.transform_keys(&:to_sym)) : custom_directories
  Jsii::Type.check_type(@custom_directories, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c190cmFuc2Zlci5DZm5BZ3JlZW1lbnQuQ3VzdG9tRGlyZWN0b3JpZXNQcm9wZXJ0eSJ9XX19")), "customDirectories") unless @custom_directories.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @enforce_message_signing = enforce_message_signing
  Jsii::Type.check_type(@enforce_message_signing, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "enforceMessageSigning") unless @enforce_message_signing.nil?
  @preserve_filename = preserve_filename
  Jsii::Type.check_type(@preserve_filename, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preserveFilename") unless @preserve_filename.nil?
  @status = status
  Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") unless @status.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#access_roleString (readonly)

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 AWS Identity and Access Management role to use.

For AS2 connectors

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 .

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 AWS managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.

For SFTP connectors

Make 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 AWS Secrets Manager .



61
62
63
# File 'transfer/cfn_agreement_props.rb', line 61

def access_role
  @access_role
end

#base_directoryString? (readonly)

The landing directory (folder) for files that are transferred by using the AS2 protocol.



83
84
85
# File 'transfer/cfn_agreement_props.rb', line 83

def base_directory
  @base_directory
end

#custom_directoriesAWSCDK::IResolvable, ... (readonly)

A CustomDirectoriesType structure.

This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.

  • Failed files
  • MDN files
  • Payload files
  • Status files
  • Temporary files


96
97
98
# File 'transfer/cfn_agreement_props.rb', line 96

def custom_directories
  @custom_directories
end

#descriptionString? (readonly)

The name or short description that's used to identify the agreement.



101
102
103
# File 'transfer/cfn_agreement_props.rb', line 101

def description
  @description
end

#enforce_message_signingString? (readonly)

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.


109
110
111
# File 'transfer/cfn_agreement_props.rb', line 109

def enforce_message_signing
  @enforce_message_signing
end

#local_profile_idString (readonly)

A unique identifier for the AS2 local profile.



66
67
68
# File 'transfer/cfn_agreement_props.rb', line 66

def local_profile_id
  @local_profile_id
end

#partner_profile_idString (readonly)

A unique identifier for the partner profile used in the agreement.



71
72
73
# File 'transfer/cfn_agreement_props.rb', line 71

def partner_profile_id
  @partner_profile_id
end

#preserve_filenameString? (readonly)

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 .


117
118
119
# File 'transfer/cfn_agreement_props.rb', line 117

def preserve_filename
  @preserve_filename
end

#server_idString (readonly)

A system-assigned unique identifier for a server instance.

This identifier indicates the specific server that the agreement uses.



78
79
80
# File 'transfer/cfn_agreement_props.rb', line 78

def server_id
  @server_id
end

#statusString? (readonly)

The current status of the agreement, either ACTIVE or INACTIVE .



122
123
124
# File 'transfer/cfn_agreement_props.rb', line 122

def status
  @status
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Key-value pairs that can be used to group and search for agreements.



127
128
129
# File 'transfer/cfn_agreement_props.rb', line 127

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'transfer/cfn_agreement_props.rb', line 129

def self.jsii_properties
  {
    :access_role => "accessRole",
    :local_profile_id => "localProfileId",
    :partner_profile_id => "partnerProfileId",
    :server_id => "serverId",
    :base_directory => "baseDirectory",
    :custom_directories => "customDirectories",
    :description => "description",
    :enforce_message_signing => "enforceMessageSigning",
    :preserve_filename => "preserveFilename",
    :status => "status",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'transfer/cfn_agreement_props.rb', line 145

def to_jsii
  result = {}
  result.merge!({
    "accessRole" => @access_role,
    "localProfileId" => @local_profile_id,
    "partnerProfileId" => @partner_profile_id,
    "serverId" => @server_id,
    "baseDirectory" => @base_directory,
    "customDirectories" => @custom_directories,
    "description" => @description,
    "enforceMessageSigning" => @enforce_message_signing,
    "preserveFilename" => @preserve_filename,
    "status" => @status,
    "tags" => @tags,
  })
  result.compact
end