Skip to content

Commit 2db3a35

Browse files
author
awstools
committed
feat(client-transfer): Added CustomDirectories as a new directory option for storing inbound AS2 messages, MDN files and Status files.
1 parent 90f84e0 commit 2db3a35

File tree

6 files changed

+206
-6
lines changed

6 files changed

+206
-6
lines changed

clients/client-transfer/src/commands/CreateAgreementCommand.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export interface CreateAgreementCommandOutput extends CreateAgreementResponse, _
3434
* combines a server, local profile, partner profile, certificate, and other
3535
* attributes.</p>
3636
* <p>The partner is identified with the <code>PartnerProfileId</code>, and the AS2 process is identified with the <code>LocalProfileId</code>.</p>
37+
* <note>
38+
* <p>Specify <i>either</i>
39+
* <code>BaseDirectory</code> or <code>CustomDirectories</code>, but not both. Specifying both causes the command to fail.</p>
40+
* </note>
3741
* @example
3842
* Use a bare-bones client and the command you need to make an API call.
3943
* ```javascript
@@ -45,7 +49,7 @@ export interface CreateAgreementCommandOutput extends CreateAgreementResponse, _
4549
* ServerId: "STRING_VALUE", // required
4650
* LocalProfileId: "STRING_VALUE", // required
4751
* PartnerProfileId: "STRING_VALUE", // required
48-
* BaseDirectory: "STRING_VALUE", // required
52+
* BaseDirectory: "STRING_VALUE",
4953
* AccessRole: "STRING_VALUE", // required
5054
* Status: "ACTIVE" || "INACTIVE",
5155
* Tags: [ // Tags
@@ -56,6 +60,13 @@ export interface CreateAgreementCommandOutput extends CreateAgreementResponse, _
5660
* ],
5761
* PreserveFilename: "ENABLED" || "DISABLED",
5862
* EnforceMessageSigning: "ENABLED" || "DISABLED",
63+
* CustomDirectories: { // CustomDirectoriesType
64+
* FailedFilesDirectory: "STRING_VALUE", // required
65+
* MdnFilesDirectory: "STRING_VALUE", // required
66+
* PayloadFilesDirectory: "STRING_VALUE", // required
67+
* StatusFilesDirectory: "STRING_VALUE", // required
68+
* TemporaryFilesDirectory: "STRING_VALUE", // required
69+
* },
5970
* };
6071
* const command = new CreateAgreementCommand(input);
6172
* const response = await client.send(command);

clients/client-transfer/src/commands/DescribeAgreementCommand.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ export interface DescribeAgreementCommandOutput extends DescribeAgreementRespons
6060
* // ],
6161
* // PreserveFilename: "ENABLED" || "DISABLED",
6262
* // EnforceMessageSigning: "ENABLED" || "DISABLED",
63+
* // CustomDirectories: { // CustomDirectoriesType
64+
* // FailedFilesDirectory: "STRING_VALUE", // required
65+
* // MdnFilesDirectory: "STRING_VALUE", // required
66+
* // PayloadFilesDirectory: "STRING_VALUE", // required
67+
* // StatusFilesDirectory: "STRING_VALUE", // required
68+
* // TemporaryFilesDirectory: "STRING_VALUE", // required
69+
* // },
6370
* // },
6471
* // };
6572
*

clients/client-transfer/src/commands/UpdateAgreementCommand.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ export interface UpdateAgreementCommandOutput extends UpdateAgreementResponse, _
3131
* <p>Updates some of the parameters for an existing agreement. Provide the
3232
* <code>AgreementId</code> and the <code>ServerId</code> for the agreement that you want to
3333
* update, along with the new values for the parameters to update.</p>
34+
* <note>
35+
* <p>Specify <i>either</i>
36+
* <code>BaseDirectory</code> or <code>CustomDirectories</code>, but not both. Specifying both causes the command to fail.</p>
37+
* <p>If you update an agreement from using base directory to custom directories, the base directory is no longer used. Similarly, if you change from custom directories to a base directory, the custom directories are no longer used.</p>
38+
* </note>
3439
* @example
3540
* Use a bare-bones client and the command you need to make an API call.
3641
* ```javascript
@@ -48,6 +53,13 @@ export interface UpdateAgreementCommandOutput extends UpdateAgreementResponse, _
4853
* AccessRole: "STRING_VALUE",
4954
* PreserveFilename: "ENABLED" || "DISABLED",
5055
* EnforceMessageSigning: "ENABLED" || "DISABLED",
56+
* CustomDirectories: { // CustomDirectoriesType
57+
* FailedFilesDirectory: "STRING_VALUE", // required
58+
* MdnFilesDirectory: "STRING_VALUE", // required
59+
* PayloadFilesDirectory: "STRING_VALUE", // required
60+
* StatusFilesDirectory: "STRING_VALUE", // required
61+
* TemporaryFilesDirectory: "STRING_VALUE", // required
62+
* },
5163
* };
5264
* const command = new UpdateAgreementCommand(input);
5365
* const response = await client.send(command);

clients/client-transfer/src/models/models_0.ts

Lines changed: 106 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,42 @@ export class AccessDeniedException extends __BaseException {
2525
}
2626
}
2727

28+
/**
29+
* <p>Contains Amazon S3 locations for storing specific types of AS2 message files.</p>
30+
* @public
31+
*/
32+
export interface CustomDirectoriesType {
33+
/**
34+
* <p>Specifies a location to store failed AS2 message files.</p>
35+
* @public
36+
*/
37+
FailedFilesDirectory: string | undefined;
38+
39+
/**
40+
* <p>Specifies a location to store MDN files.</p>
41+
* @public
42+
*/
43+
MdnFilesDirectory: string | undefined;
44+
45+
/**
46+
* <p>Specifies a location to store the payload for AS2 message files.</p>
47+
* @public
48+
*/
49+
PayloadFilesDirectory: string | undefined;
50+
51+
/**
52+
* <p>Specifies a location to store AS2 status messages.</p>
53+
* @public
54+
*/
55+
StatusFilesDirectory: string | undefined;
56+
57+
/**
58+
* <p>Specifies a location to store temporary AS2 message files.</p>
59+
* @public
60+
*/
61+
TemporaryFilesDirectory: string | undefined;
62+
}
63+
2864
/**
2965
* @public
3066
* @enum
@@ -124,7 +160,7 @@ export interface CreateAgreementRequest {
124160
* <code>/<i>amzn-s3-demo-bucket</i>/home/mydirectory</code>.</p>
125161
* @public
126162
*/
127-
BaseDirectory: string | undefined;
163+
BaseDirectory?: string | undefined;
128164

129165
/**
130166
* <p>Connectors are used to send files using either the AS2 or SFTP protocol. For the access role,
@@ -208,6 +244,29 @@ export interface CreateAgreementRequest {
208244
* @public
209245
*/
210246
EnforceMessageSigning?: EnforceMessageSigningType | undefined;
247+
248+
/**
249+
* <p>A <code>CustomDirectoriesType</code> structure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.</p>
250+
* <ul>
251+
* <li>
252+
* <p>Failed files</p>
253+
* </li>
254+
* <li>
255+
* <p>MDN files</p>
256+
* </li>
257+
* <li>
258+
* <p>Payload files</p>
259+
* </li>
260+
* <li>
261+
* <p>Status files</p>
262+
* </li>
263+
* <li>
264+
* <p>Temporary files</p>
265+
* </li>
266+
* </ul>
267+
* @public
268+
*/
269+
CustomDirectories?: CustomDirectoriesType | undefined;
211270
}
212271

213272
/**
@@ -529,6 +588,29 @@ export interface DescribedAgreement {
529588
* @public
530589
*/
531590
EnforceMessageSigning?: EnforceMessageSigningType | undefined;
591+
592+
/**
593+
* <p>A <code>CustomDirectoriesType</code> structure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.</p>
594+
* <ul>
595+
* <li>
596+
* <p>Failed files</p>
597+
* </li>
598+
* <li>
599+
* <p>MDN files</p>
600+
* </li>
601+
* <li>
602+
* <p>Payload files</p>
603+
* </li>
604+
* <li>
605+
* <p>Status files</p>
606+
* </li>
607+
* <li>
608+
* <p>Temporary files</p>
609+
* </li>
610+
* </ul>
611+
* @public
612+
*/
613+
CustomDirectories?: CustomDirectoriesType | undefined;
532614
}
533615

534616
/**
@@ -780,6 +862,29 @@ export interface UpdateAgreementRequest {
780862
* @public
781863
*/
782864
EnforceMessageSigning?: EnforceMessageSigningType | undefined;
865+
866+
/**
867+
* <p>A <code>CustomDirectoriesType</code> structure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.</p>
868+
* <ul>
869+
* <li>
870+
* <p>Failed files</p>
871+
* </li>
872+
* <li>
873+
* <p>MDN files</p>
874+
* </li>
875+
* <li>
876+
* <p>Payload files</p>
877+
* </li>
878+
* <li>
879+
* <p>Status files</p>
880+
* </li>
881+
* <li>
882+
* <p>Temporary files</p>
883+
* </li>
884+
* </ul>
885+
* @public
886+
*/
887+
CustomDirectories?: CustomDirectoriesType | undefined;
783888
}
784889

785890
/**

clients/client-transfer/src/protocols/Aws_json1_1.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ import {
135135
CreateUserRequest,
136136
CreateWebAppRequest,
137137
CreateWorkflowRequest,
138+
CustomDirectoriesType,
138139
CustomStepDetails,
139140
DecryptStepDetails,
140141
DeleteAccessRequest,
@@ -2684,6 +2685,8 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont
26842685

26852686
// se_CreateWorkflowRequest omitted.
26862687

2688+
// se_CustomDirectoriesType omitted.
2689+
26872690
// se_CustomStepDetails omitted.
26882691

26892692
// se_DecryptStepDetails omitted.
@@ -2950,6 +2953,8 @@ const se_UpdateWebAppCustomizationRequest = (input: UpdateWebAppCustomizationReq
29502953

29512954
// de_CreateWorkflowResponse omitted.
29522955

2956+
// de_CustomDirectoriesType omitted.
2957+
29532958
// de_CustomStepDetails omitted.
29542959

29552960
// de_DecryptStepDetails omitted.

codegen/sdk-codegen/aws-models/transfer.json

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@
705705
"aws.iam#iamAction": {
706706
"requiredActions": ["transfer:TagResource", "iam:PassRole"]
707707
},
708-
"smithy.api#documentation": "<p>Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership,\n between an Transfer Family server and an AS2 process. The agreement defines the file and message\n transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family\n combines a server, local profile, partner profile, certificate, and other\n attributes.</p>\n <p>The partner is identified with the <code>PartnerProfileId</code>, and the AS2 process is identified with the <code>LocalProfileId</code>.</p>"
708+
"smithy.api#documentation": "<p>Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership,\n between an Transfer Family server and an AS2 process. The agreement defines the file and message\n transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family\n combines a server, local profile, partner profile, certificate, and other\n attributes.</p>\n <p>The partner is identified with the <code>PartnerProfileId</code>, and the AS2 process is identified with the <code>LocalProfileId</code>.</p>\n <note>\n <p>Specify <i>either</i>\n <code>BaseDirectory</code> or <code>CustomDirectories</code>, but not both. Specifying both causes the command to fail.</p>\n </note>"
709709
}
710710
},
711711
"com.amazonaws.transfer#CreateAgreementRequest": {
@@ -741,8 +741,7 @@
741741
"BaseDirectory": {
742742
"target": "com.amazonaws.transfer#HomeDirectory",
743743
"traits": {
744-
"smithy.api#documentation": "<p>The landing directory (folder) for files transferred by using the AS2 protocol.</p>\n <p>A <code>BaseDirectory</code> example is\n <code>/<i>amzn-s3-demo-bucket</i>/home/mydirectory</code>.</p>",
745-
"smithy.api#required": {}
744+
"smithy.api#documentation": "<p>The landing directory (folder) for files transferred by using the AS2 protocol.</p>\n <p>A <code>BaseDirectory</code> example is\n <code>/<i>amzn-s3-demo-bucket</i>/home/mydirectory</code>.</p>"
746745
}
747746
},
748747
"AccessRole": {
@@ -775,6 +774,12 @@
775774
"traits": {
776775
"smithy.api#documentation": "<p>\n Determines whether or not unsigned messages from your trading partners will be accepted.\n </p>\n <ul>\n <li>\n <p>\n <code>ENABLED</code>: Transfer Family rejects unsigned messages from your trading partner.</p>\n </li>\n <li>\n <p>\n <code>DISABLED</code> (default value): Transfer Family accepts unsigned messages from your trading partner.</p>\n </li>\n </ul>"
777776
}
777+
},
778+
"CustomDirectories": {
779+
"target": "com.amazonaws.transfer#CustomDirectoriesType",
780+
"traits": {
781+
"smithy.api#documentation": "<p>A <code>CustomDirectoriesType</code> structure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.</p>\n <ul>\n <li>\n <p>Failed files</p>\n </li>\n <li>\n <p>MDN files</p>\n </li>\n <li>\n <p>Payload files</p>\n </li>\n <li>\n <p>Status files</p>\n </li>\n <li>\n <p>Temporary files</p>\n </li>\n </ul>"
782+
}
778783
}
779784
},
780785
"traits": {
@@ -1467,6 +1472,49 @@
14671472
"smithy.api#output": {}
14681473
}
14691474
},
1475+
"com.amazonaws.transfer#CustomDirectoriesType": {
1476+
"type": "structure",
1477+
"members": {
1478+
"FailedFilesDirectory": {
1479+
"target": "com.amazonaws.transfer#HomeDirectory",
1480+
"traits": {
1481+
"smithy.api#documentation": "<p>Specifies a location to store failed AS2 message files.</p>",
1482+
"smithy.api#required": {}
1483+
}
1484+
},
1485+
"MdnFilesDirectory": {
1486+
"target": "com.amazonaws.transfer#HomeDirectory",
1487+
"traits": {
1488+
"smithy.api#documentation": "<p>Specifies a location to store MDN files.</p>",
1489+
"smithy.api#required": {}
1490+
}
1491+
},
1492+
"PayloadFilesDirectory": {
1493+
"target": "com.amazonaws.transfer#HomeDirectory",
1494+
"traits": {
1495+
"smithy.api#documentation": "<p>Specifies a location to store the payload for AS2 message files.</p>",
1496+
"smithy.api#required": {}
1497+
}
1498+
},
1499+
"StatusFilesDirectory": {
1500+
"target": "com.amazonaws.transfer#HomeDirectory",
1501+
"traits": {
1502+
"smithy.api#documentation": "<p>Specifies a location to store AS2 status messages.</p>",
1503+
"smithy.api#required": {}
1504+
}
1505+
},
1506+
"TemporaryFilesDirectory": {
1507+
"target": "com.amazonaws.transfer#HomeDirectory",
1508+
"traits": {
1509+
"smithy.api#documentation": "<p>Specifies a location to store temporary AS2 message files.</p>",
1510+
"smithy.api#required": {}
1511+
}
1512+
}
1513+
},
1514+
"traits": {
1515+
"smithy.api#documentation": "<p>Contains Amazon S3 locations for storing specific types of AS2 message files.</p>"
1516+
}
1517+
},
14701518
"com.amazonaws.transfer#CustomStepDetails": {
14711519
"type": "structure",
14721520
"members": {
@@ -3213,6 +3261,12 @@
32133261
"traits": {
32143262
"smithy.api#documentation": "<p>\n Determines whether or not unsigned messages from your trading partners will be accepted.\n </p>\n <ul>\n <li>\n <p>\n <code>ENABLED</code>: Transfer Family rejects unsigned messages from your trading partner.</p>\n </li>\n <li>\n <p>\n <code>DISABLED</code> (default value): Transfer Family accepts unsigned messages from your trading partner.</p>\n </li>\n </ul>"
32153263
}
3264+
},
3265+
"CustomDirectories": {
3266+
"target": "com.amazonaws.transfer#CustomDirectoriesType",
3267+
"traits": {
3268+
"smithy.api#documentation": "<p>A <code>CustomDirectoriesType</code> structure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.</p>\n <ul>\n <li>\n <p>Failed files</p>\n </li>\n <li>\n <p>MDN files</p>\n </li>\n <li>\n <p>Payload files</p>\n </li>\n <li>\n <p>Status files</p>\n </li>\n <li>\n <p>Temporary files</p>\n </li>\n </ul>"
3269+
}
32163270
}
32173271
},
32183272
"traits": {
@@ -9963,7 +10017,7 @@
996310017
"aws.iam#iamAction": {
996410018
"requiredActions": ["transfer:TagResource", "transfer:UnTagResource", "iam:PassRole"]
996510019
},
9966-
"smithy.api#documentation": "<p>Updates some of the parameters for an existing agreement. Provide the\n <code>AgreementId</code> and the <code>ServerId</code> for the agreement that you want to\n update, along with the new values for the parameters to update.</p>"
10020+
"smithy.api#documentation": "<p>Updates some of the parameters for an existing agreement. Provide the\n <code>AgreementId</code> and the <code>ServerId</code> for the agreement that you want to\n update, along with the new values for the parameters to update.</p>\n <note>\n <p>Specify <i>either</i>\n <code>BaseDirectory</code> or <code>CustomDirectories</code>, but not both. Specifying both causes the command to fail.</p>\n <p>If you update an agreement from using base directory to custom directories, the base directory is no longer used. Similarly, if you change from custom directories to a base directory, the custom directories are no longer used.</p>\n </note>"
996710021
}
996810022
},
996910023
"com.amazonaws.transfer#UpdateAgreementRequest": {
@@ -10030,6 +10084,12 @@
1003010084
"traits": {
1003110085
"smithy.api#documentation": "<p>\n Determines whether or not unsigned messages from your trading partners will be accepted.\n </p>\n <ul>\n <li>\n <p>\n <code>ENABLED</code>: Transfer Family rejects unsigned messages from your trading partner.</p>\n </li>\n <li>\n <p>\n <code>DISABLED</code> (default value): Transfer Family accepts unsigned messages from your trading partner.</p>\n </li>\n </ul>"
1003210086
}
10087+
},
10088+
"CustomDirectories": {
10089+
"target": "com.amazonaws.transfer#CustomDirectoriesType",
10090+
"traits": {
10091+
"smithy.api#documentation": "<p>A <code>CustomDirectoriesType</code> structure. This structure specifies custom directories for storing various AS2 message files. You can specify directories for the following types of files.</p>\n <ul>\n <li>\n <p>Failed files</p>\n </li>\n <li>\n <p>MDN files</p>\n </li>\n <li>\n <p>Payload files</p>\n </li>\n <li>\n <p>Status files</p>\n </li>\n <li>\n <p>Temporary files</p>\n </li>\n </ul>"
10092+
}
1003310093
}
1003410094
},
1003510095
"traits": {

0 commit comments

Comments
 (0)