Skip to content

Commit

Permalink
feat(client-transfer): Added CustomDirectories as a new directory opt…
Browse files Browse the repository at this point in the history
…ion for storing inbound AS2 messages, MDN files and Status files.
  • Loading branch information
awstools committed Jan 24, 2025
1 parent 90f84e0 commit 2db3a35
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 6 deletions.
13 changes: 12 additions & 1 deletion clients/client-transfer/src/commands/CreateAgreementCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export interface CreateAgreementCommandOutput extends CreateAgreementResponse, _
* combines a server, local profile, partner profile, certificate, and other
* attributes.</p>
* <p>The partner is identified with the <code>PartnerProfileId</code>, and the AS2 process is identified with the <code>LocalProfileId</code>.</p>
* <note>
* <p>Specify <i>either</i>
* <code>BaseDirectory</code> or <code>CustomDirectories</code>, but not both. Specifying both causes the command to fail.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -45,7 +49,7 @@ export interface CreateAgreementCommandOutput extends CreateAgreementResponse, _
* ServerId: "STRING_VALUE", // required
* LocalProfileId: "STRING_VALUE", // required
* PartnerProfileId: "STRING_VALUE", // required
* BaseDirectory: "STRING_VALUE", // required
* BaseDirectory: "STRING_VALUE",
* AccessRole: "STRING_VALUE", // required
* Status: "ACTIVE" || "INACTIVE",
* Tags: [ // Tags
Expand All @@ -56,6 +60,13 @@ export interface CreateAgreementCommandOutput extends CreateAgreementResponse, _
* ],
* PreserveFilename: "ENABLED" || "DISABLED",
* EnforceMessageSigning: "ENABLED" || "DISABLED",
* CustomDirectories: { // CustomDirectoriesType
* FailedFilesDirectory: "STRING_VALUE", // required
* MdnFilesDirectory: "STRING_VALUE", // required
* PayloadFilesDirectory: "STRING_VALUE", // required
* StatusFilesDirectory: "STRING_VALUE", // required
* TemporaryFilesDirectory: "STRING_VALUE", // required
* },
* };
* const command = new CreateAgreementCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ export interface DescribeAgreementCommandOutput extends DescribeAgreementRespons
* // ],
* // PreserveFilename: "ENABLED" || "DISABLED",
* // EnforceMessageSigning: "ENABLED" || "DISABLED",
* // CustomDirectories: { // CustomDirectoriesType
* // FailedFilesDirectory: "STRING_VALUE", // required
* // MdnFilesDirectory: "STRING_VALUE", // required
* // PayloadFilesDirectory: "STRING_VALUE", // required
* // StatusFilesDirectory: "STRING_VALUE", // required
* // TemporaryFilesDirectory: "STRING_VALUE", // required
* // },
* // },
* // };
*
Expand Down
12 changes: 12 additions & 0 deletions clients/client-transfer/src/commands/UpdateAgreementCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export interface UpdateAgreementCommandOutput extends UpdateAgreementResponse, _
* <p>Updates some of the parameters for an existing agreement. Provide the
* <code>AgreementId</code> and the <code>ServerId</code> for the agreement that you want to
* update, along with the new values for the parameters to update.</p>
* <note>
* <p>Specify <i>either</i>
* <code>BaseDirectory</code> or <code>CustomDirectories</code>, but not both. Specifying both causes the command to fail.</p>
* <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>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -48,6 +53,13 @@ export interface UpdateAgreementCommandOutput extends UpdateAgreementResponse, _
* AccessRole: "STRING_VALUE",
* PreserveFilename: "ENABLED" || "DISABLED",
* EnforceMessageSigning: "ENABLED" || "DISABLED",
* CustomDirectories: { // CustomDirectoriesType
* FailedFilesDirectory: "STRING_VALUE", // required
* MdnFilesDirectory: "STRING_VALUE", // required
* PayloadFilesDirectory: "STRING_VALUE", // required
* StatusFilesDirectory: "STRING_VALUE", // required
* TemporaryFilesDirectory: "STRING_VALUE", // required
* },
* };
* const command = new UpdateAgreementCommand(input);
* const response = await client.send(command);
Expand Down
107 changes: 106 additions & 1 deletion clients/client-transfer/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,42 @@ export class AccessDeniedException extends __BaseException {
}
}

/**
* <p>Contains Amazon S3 locations for storing specific types of AS2 message files.</p>
* @public
*/
export interface CustomDirectoriesType {
/**
* <p>Specifies a location to store failed AS2 message files.</p>
* @public
*/
FailedFilesDirectory: string | undefined;

/**
* <p>Specifies a location to store MDN files.</p>
* @public
*/
MdnFilesDirectory: string | undefined;

/**
* <p>Specifies a location to store the payload for AS2 message files.</p>
* @public
*/
PayloadFilesDirectory: string | undefined;

/**
* <p>Specifies a location to store AS2 status messages.</p>
* @public
*/
StatusFilesDirectory: string | undefined;

/**
* <p>Specifies a location to store temporary AS2 message files.</p>
* @public
*/
TemporaryFilesDirectory: string | undefined;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -124,7 +160,7 @@ export interface CreateAgreementRequest {
* <code>/<i>amzn-s3-demo-bucket</i>/home/mydirectory</code>.</p>
* @public
*/
BaseDirectory: string | undefined;
BaseDirectory?: string | undefined;

/**
* <p>Connectors are used to send files using either the AS2 or SFTP protocol. For the access role,
Expand Down Expand Up @@ -208,6 +244,29 @@ export interface CreateAgreementRequest {
* @public
*/
EnforceMessageSigning?: EnforceMessageSigningType | undefined;

/**
* <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>
* <ul>
* <li>
* <p>Failed files</p>
* </li>
* <li>
* <p>MDN files</p>
* </li>
* <li>
* <p>Payload files</p>
* </li>
* <li>
* <p>Status files</p>
* </li>
* <li>
* <p>Temporary files</p>
* </li>
* </ul>
* @public
*/
CustomDirectories?: CustomDirectoriesType | undefined;
}

/**
Expand Down Expand Up @@ -529,6 +588,29 @@ export interface DescribedAgreement {
* @public
*/
EnforceMessageSigning?: EnforceMessageSigningType | undefined;

/**
* <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>
* <ul>
* <li>
* <p>Failed files</p>
* </li>
* <li>
* <p>MDN files</p>
* </li>
* <li>
* <p>Payload files</p>
* </li>
* <li>
* <p>Status files</p>
* </li>
* <li>
* <p>Temporary files</p>
* </li>
* </ul>
* @public
*/
CustomDirectories?: CustomDirectoriesType | undefined;
}

/**
Expand Down Expand Up @@ -780,6 +862,29 @@ export interface UpdateAgreementRequest {
* @public
*/
EnforceMessageSigning?: EnforceMessageSigningType | undefined;

/**
* <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>
* <ul>
* <li>
* <p>Failed files</p>
* </li>
* <li>
* <p>MDN files</p>
* </li>
* <li>
* <p>Payload files</p>
* </li>
* <li>
* <p>Status files</p>
* </li>
* <li>
* <p>Temporary files</p>
* </li>
* </ul>
* @public
*/
CustomDirectories?: CustomDirectoriesType | undefined;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions clients/client-transfer/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ import {
CreateUserRequest,
CreateWebAppRequest,
CreateWorkflowRequest,
CustomDirectoriesType,
CustomStepDetails,
DecryptStepDetails,
DeleteAccessRequest,
Expand Down Expand Up @@ -2684,6 +2685,8 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont

// se_CreateWorkflowRequest omitted.

// se_CustomDirectoriesType omitted.

// se_CustomStepDetails omitted.

// se_DecryptStepDetails omitted.
Expand Down Expand Up @@ -2950,6 +2953,8 @@ const se_UpdateWebAppCustomizationRequest = (input: UpdateWebAppCustomizationReq

// de_CreateWorkflowResponse omitted.

// de_CustomDirectoriesType omitted.

// de_CustomStepDetails omitted.

// de_DecryptStepDetails omitted.
Expand Down
68 changes: 64 additions & 4 deletions codegen/sdk-codegen/aws-models/transfer.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@
"aws.iam#iamAction": {
"requiredActions": ["transfer:TagResource", "iam:PassRole"]
},
"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>"
"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>"
}
},
"com.amazonaws.transfer#CreateAgreementRequest": {
Expand Down Expand Up @@ -741,8 +741,7 @@
"BaseDirectory": {
"target": "com.amazonaws.transfer#HomeDirectory",
"traits": {
"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>",
"smithy.api#required": {}
"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>"
}
},
"AccessRole": {
Expand Down Expand Up @@ -775,6 +774,12 @@
"traits": {
"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>"
}
},
"CustomDirectories": {
"target": "com.amazonaws.transfer#CustomDirectoriesType",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -1467,6 +1472,49 @@
"smithy.api#output": {}
}
},
"com.amazonaws.transfer#CustomDirectoriesType": {
"type": "structure",
"members": {
"FailedFilesDirectory": {
"target": "com.amazonaws.transfer#HomeDirectory",
"traits": {
"smithy.api#documentation": "<p>Specifies a location to store failed AS2 message files.</p>",
"smithy.api#required": {}
}
},
"MdnFilesDirectory": {
"target": "com.amazonaws.transfer#HomeDirectory",
"traits": {
"smithy.api#documentation": "<p>Specifies a location to store MDN files.</p>",
"smithy.api#required": {}
}
},
"PayloadFilesDirectory": {
"target": "com.amazonaws.transfer#HomeDirectory",
"traits": {
"smithy.api#documentation": "<p>Specifies a location to store the payload for AS2 message files.</p>",
"smithy.api#required": {}
}
},
"StatusFilesDirectory": {
"target": "com.amazonaws.transfer#HomeDirectory",
"traits": {
"smithy.api#documentation": "<p>Specifies a location to store AS2 status messages.</p>",
"smithy.api#required": {}
}
},
"TemporaryFilesDirectory": {
"target": "com.amazonaws.transfer#HomeDirectory",
"traits": {
"smithy.api#documentation": "<p>Specifies a location to store temporary AS2 message files.</p>",
"smithy.api#required": {}
}
}
},
"traits": {
"smithy.api#documentation": "<p>Contains Amazon S3 locations for storing specific types of AS2 message files.</p>"
}
},
"com.amazonaws.transfer#CustomStepDetails": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -3213,6 +3261,12 @@
"traits": {
"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>"
}
},
"CustomDirectories": {
"target": "com.amazonaws.transfer#CustomDirectoriesType",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -9963,7 +10017,7 @@
"aws.iam#iamAction": {
"requiredActions": ["transfer:TagResource", "transfer:UnTagResource", "iam:PassRole"]
},
"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>"
"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>"
}
},
"com.amazonaws.transfer#UpdateAgreementRequest": {
Expand Down Expand Up @@ -10030,6 +10084,12 @@
"traits": {
"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>"
}
},
"CustomDirectories": {
"target": "com.amazonaws.transfer#CustomDirectoriesType",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down

0 comments on commit 2db3a35

Please sign in to comment.