Skip to content

Commit

Permalink
feat(client-transfer): Added AS2 agreement configurations to control …
Browse files Browse the repository at this point in the history
…filename preservation and message signing enforcement. Added AS2 connector configuration to preserve content type from S3 objects.
  • Loading branch information
awstools committed Dec 18, 2024
1 parent 16bb7db commit c7611a4
Show file tree
Hide file tree
Showing 8 changed files with 268 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export interface CreateAgreementCommandOutput extends CreateAgreementResponse, _
* Value: "STRING_VALUE", // required
* },
* ],
* PreserveFilename: "ENABLED" || "DISABLED",
* EnforceMessageSigning: "ENABLED" || "DISABLED",
* };
* 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 @@ -52,6 +52,7 @@ export interface CreateConnectorCommandOutput extends CreateConnectorResponse, _
* MdnSigningAlgorithm: "SHA256" || "SHA384" || "SHA512" || "SHA1" || "NONE" || "DEFAULT",
* MdnResponse: "SYNC" || "NONE",
* BasicAuthSecretId: "STRING_VALUE",
* PreserveContentType: "ENABLED" || "DISABLED",
* },
* AccessRole: "STRING_VALUE", // required
* LoggingRole: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export interface DescribeAgreementCommandOutput extends DescribeAgreementRespons
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // PreserveFilename: "ENABLED" || "DISABLED",
* // EnforceMessageSigning: "ENABLED" || "DISABLED",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface DescribeConnectorCommandOutput extends DescribeConnectorRespons
* // MdnSigningAlgorithm: "SHA256" || "SHA384" || "SHA512" || "SHA1" || "NONE" || "DEFAULT",
* // MdnResponse: "SYNC" || "NONE",
* // BasicAuthSecretId: "STRING_VALUE",
* // PreserveContentType: "ENABLED" || "DISABLED",
* // },
* // AccessRole: "STRING_VALUE",
* // LoggingRole: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export interface UpdateAgreementCommandOutput extends UpdateAgreementResponse, _
* PartnerProfileId: "STRING_VALUE",
* BaseDirectory: "STRING_VALUE",
* AccessRole: "STRING_VALUE",
* PreserveFilename: "ENABLED" || "DISABLED",
* EnforceMessageSigning: "ENABLED" || "DISABLED",
* };
* const command = new UpdateAgreementCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export interface UpdateConnectorCommandOutput extends UpdateConnectorResponse, _
* MdnSigningAlgorithm: "SHA256" || "SHA384" || "SHA512" || "SHA1" || "NONE" || "DEFAULT",
* MdnResponse: "SYNC" || "NONE",
* BasicAuthSecretId: "STRING_VALUE",
* PreserveContentType: "ENABLED" || "DISABLED",
* },
* AccessRole: "STRING_VALUE",
* LoggingRole: "STRING_VALUE",
Expand Down
168 changes: 165 additions & 3 deletions clients/client-transfer/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,34 @@ export class AccessDeniedException extends __BaseException {
}
}

/**
* @public
* @enum
*/
export const EnforceMessageSigningType = {
DISABLED: "DISABLED",
ENABLED: "ENABLED",
} as const;

/**
* @public
*/
export type EnforceMessageSigningType = (typeof EnforceMessageSigningType)[keyof typeof EnforceMessageSigningType];

/**
* @public
* @enum
*/
export const PreserveFilenameType = {
DISABLED: "DISABLED",
ENABLED: "ENABLED",
} as const;

/**
* @public
*/
export type PreserveFilenameType = (typeof PreserveFilenameType)[keyof typeof PreserveFilenameType];

/**
* @public
* @enum
Expand Down Expand Up @@ -142,6 +170,44 @@ export interface CreateAgreementRequest {
* @public
*/
Tags?: Tag[] | undefined;

/**
* <p>
* Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload
* filename when saving it.
* </p>
* <ul>
* <li>
* <p>
* <code>ENABLED</code>: the filename provided by your trading parter is preserved when the file is saved.</p>
* </li>
* <li>
* <p>
* <code>DISABLED</code> (default value): when Transfer Family saves the file, the filename is adjusted, as
* described in <a href="https://docs.aws.amazon.com/transfer/latest/userguide/send-as2-messages.html#file-names-as2">File names and locations</a>.</p>
* </li>
* </ul>
* @public
*/
PreserveFilename?: PreserveFilenameType | undefined;

/**
* <p>
* Determines whether or not unsigned messages from your trading partners will be accepted.
* </p>
* <ul>
* <li>
* <p>
* <code>ENABLED</code>: Transfer Family rejects unsigned messages from your trading partner.</p>
* </li>
* <li>
* <p>
* <code>DISABLED</code> (default value): Transfer Family accepts unsigned messages from your trading partner.</p>
* </li>
* </ul>
* @public
*/
EnforceMessageSigning?: EnforceMessageSigningType | undefined;
}

/**
Expand Down Expand Up @@ -425,6 +491,44 @@ export interface DescribedAgreement {
* @public
*/
Tags?: Tag[] | undefined;

/**
* <p>
* Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload
* filename when saving it.
* </p>
* <ul>
* <li>
* <p>
* <code>ENABLED</code>: the filename provided by your trading parter is preserved when the file is saved.</p>
* </li>
* <li>
* <p>
* <code>DISABLED</code> (default value): when Transfer Family saves the file, the filename is adjusted, as
* described in <a href="https://docs.aws.amazon.com/transfer/latest/userguide/send-as2-messages.html#file-names-as2">File names and locations</a>.</p>
* </li>
* </ul>
* @public
*/
PreserveFilename?: PreserveFilenameType | undefined;

/**
* <p>
* Determines whether or not unsigned messages from your trading partners will be accepted.
* </p>
* <ul>
* <li>
* <p>
* <code>ENABLED</code>: Transfer Family rejects unsigned messages from your trading partner.</p>
* </li>
* <li>
* <p>
* <code>DISABLED</code> (default value): Transfer Family accepts unsigned messages from your trading partner.</p>
* </li>
* </ul>
* @public
*/
EnforceMessageSigning?: EnforceMessageSigningType | undefined;
}

/**
Expand Down Expand Up @@ -638,6 +742,44 @@ export interface UpdateAgreementRequest {
* @public
*/
AccessRole?: string | undefined;

/**
* <p>
* Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload
* filename when saving it.
* </p>
* <ul>
* <li>
* <p>
* <code>ENABLED</code>: the filename provided by your trading parter is preserved when the file is saved.</p>
* </li>
* <li>
* <p>
* <code>DISABLED</code> (default value): when Transfer Family saves the file, the filename is adjusted, as
* described in <a href="https://docs.aws.amazon.com/transfer/latest/userguide/send-as2-messages.html#file-names-as2">File names and locations</a>.</p>
* </li>
* </ul>
* @public
*/
PreserveFilename?: PreserveFilenameType | undefined;

/**
* <p>
* Determines whether or not unsigned messages from your trading partners will be accepted.
* </p>
* <ul>
* <li>
* <p>
* <code>ENABLED</code>: Transfer Family rejects unsigned messages from your trading partner.</p>
* </li>
* <li>
* <p>
* <code>DISABLED</code> (default value): Transfer Family accepts unsigned messages from your trading partner.</p>
* </li>
* </ul>
* @public
*/
EnforceMessageSigning?: EnforceMessageSigningType | undefined;
}

/**
Expand Down Expand Up @@ -714,6 +856,20 @@ export const MdnSigningAlg = {
*/
export type MdnSigningAlg = (typeof MdnSigningAlg)[keyof typeof MdnSigningAlg];

/**
* @public
* @enum
*/
export const PreserveContentType = {
DISABLED: "DISABLED",
ENABLED: "ENABLED",
} as const;

/**
* @public
*/
export type PreserveContentType = (typeof PreserveContentType)[keyof typeof PreserveContentType];

/**
* @public
* @enum
Expand Down Expand Up @@ -838,6 +994,14 @@ export interface As2ConnectorConfig {
* @public
*/
BasicAuthSecretId?: string | undefined;

/**
* <p>Allows you to use the Amazon S3 <code>Content-Type</code> that is associated with objects in S3 instead of
* having the content type mapped based on the file extension. This parameter is enabled by default when you create an AS2 connector
* from the console, but disabled by default when you create an AS2 connector by calling the API directly.</p>
* @public
*/
PreserveContentType?: PreserveContentType | undefined;
}

/**
Expand Down Expand Up @@ -957,9 +1121,7 @@ export interface DescribedCertificate {
Usage?: CertificateUsageType | undefined;

/**
* <p>The certificate can be either <code>ACTIVE</code>, <code>PENDING_ROTATION</code>, or
* <code>INACTIVE</code>. <code>PENDING_ROTATION</code> means that this certificate will
* replace the current certificate when it expires.</p>
* <p>Currently, the only available status is <code>ACTIVE</code>: all other values are reserved for future use.</p>
* @public
*/
Status?: CertificateStatusType | undefined;
Expand Down
Loading

0 comments on commit c7611a4

Please sign in to comment.