Skip to content

Commit be33f93

Browse files
author
AWS
committed
AWS Transfer Family Update: Adding new API to support remote directory listing using SFTP connector
1 parent 66f7059 commit be33f93

File tree

2 files changed

+88
-4
lines changed

2 files changed

+88
-4
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS Transfer Family",
4+
"contributor": "",
5+
"description": "Adding new API to support remote directory listing using SFTP connector"
6+
}

services/transfer/src/main/resources/codegen-resources/service-2.json

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,23 @@
738738
],
739739
"documentation":"<p>Sends a callback for asynchronous custom steps.</p> <p> The <code>ExecutionId</code>, <code>WorkflowId</code>, and <code>Token</code> are passed to the target resource during execution of a custom step of a workflow. You must include those with their callback as well as providing a status. </p>"
740740
},
741+
"StartDirectoryListing":{
742+
"name":"StartDirectoryListing",
743+
"http":{
744+
"method":"POST",
745+
"requestUri":"/"
746+
},
747+
"input":{"shape":"StartDirectoryListingRequest"},
748+
"output":{"shape":"StartDirectoryListingResponse"},
749+
"errors":[
750+
{"shape":"ResourceNotFoundException"},
751+
{"shape":"InvalidRequestException"},
752+
{"shape":"ThrottlingException"},
753+
{"shape":"InternalServiceError"},
754+
{"shape":"ServiceUnavailableException"}
755+
],
756+
"documentation":"<p>Retrieves a list of the contents of a directory from a remote SFTP server. You specify the connector ID, the output path, and the remote directory path. You can also specify the optional <code>MaxItems</code> value to control the maximum number of items that are listed from the remote directory. This API returns a list of all files and directories in the remote directory (up to the maximum value), but does not return files or folders in sub-directories. That is, it only returns a list of files and directories one-level deep.</p> <p>After you receive the listing file, you can provide the files that you want to transfer to the <code>RetrieveFilePaths</code> parameter of the <code>StartFileTransfer</code> API call.</p> <p>The naming convention for the output file is <code> <i>connector-ID</i>-<i>listing-ID</i>.json</code>. The output file contains the following information:</p> <ul> <li> <p> <code>filePath</code>: the complete path of a remote file, relative to the directory of the listing request for your SFTP connector on the remote server.</p> </li> <li> <p> <code>modifiedTimestamp</code>: the last time the file was modified, in UTC time format. This field is optional. If the remote file attributes don't contain a timestamp, it is omitted from the file listing.</p> </li> <li> <p> <code>size</code>: the size of the file, in bytes. This field is optional. If the remote file attributes don't contain a file size, it is omitted from the file listing.</p> </li> <li> <p> <code>path</code>: the complete path of a remote directory, relative to the directory of the listing request for your SFTP connector on the remote server.</p> </li> <li> <p> <code>truncated</code>: a flag indicating whether the list output contains all of the items contained in the remote directory or not. If your <code>Truncated</code> output value is true, you can increase the value provided in the optional <code>max-items</code> input attribute to be able to list more items (up to the maximum allowed list size of 10,000 items).</p> </li> </ul>"
757+
},
741758
"StartFileTransfer":{
742759
"name":"StartFileTransfer",
743760
"http":{
@@ -753,7 +770,7 @@
753770
{"shape":"InternalServiceError"},
754771
{"shape":"ServiceUnavailableException"}
755772
],
756-
"documentation":"<p>Begins a file transfer between local Amazon Web Services storage and a remote AS2 or SFTP server.</p> <ul> <li> <p>For an AS2 connector, you specify the <code>ConnectorId</code> and one or more <code>SendFilePaths</code> to identify the files you want to transfer.</p> </li> <li> <p>For an SFTP connector, the file transfer can be either outbound or inbound. In both cases, you specify the <code>ConnectorId</code>. Depending on the direction of the transfer, you also specify the following items:</p> <ul> <li> <p>If you are transferring file from a partner's SFTP server to Amazon Web Services storage, you specify one or more <code>RetreiveFilePaths</code> to identify the files you want to transfer, and a <code>LocalDirectoryPath</code> to specify the destination folder.</p> </li> <li> <p>If you are transferring file to a partner's SFTP server from Amazon Web Services storage, you specify one or more <code>SendFilePaths</code> to identify the files you want to transfer, and a <code>RemoteDirectoryPath</code> to specify the destination folder.</p> </li> </ul> </li> </ul>"
773+
"documentation":"<p>Begins a file transfer between local Amazon Web Services storage and a remote AS2 or SFTP server.</p> <ul> <li> <p>For an AS2 connector, you specify the <code>ConnectorId</code> and one or more <code>SendFilePaths</code> to identify the files you want to transfer.</p> </li> <li> <p>For an SFTP connector, the file transfer can be either outbound or inbound. In both cases, you specify the <code>ConnectorId</code>. Depending on the direction of the transfer, you also specify the following items:</p> <ul> <li> <p>If you are transferring file from a partner's SFTP server to Amazon Web Services storage, you specify one or more <code>RetrieveFilePaths</code> to identify the files you want to transfer, and a <code>LocalDirectoryPath</code> to specify the destination folder.</p> </li> <li> <p>If you are transferring file to a partner's SFTP server from Amazon Web Services storage, you specify one or more <code>SendFilePaths</code> to identify the files you want to transfer, and a <code>RemoteDirectoryPath</code> to specify the destination folder.</p> </li> </ul> </li> </ul>"
757774
},
758775
"StartServer":{
759776
"name":"StartServer",
@@ -2171,7 +2188,7 @@
21712188
},
21722189
"Usage":{
21732190
"shape":"CertificateUsageType",
2174-
"documentation":"<p>Specifies how this certificate is used. It can be used in the following ways:</p> <ul> <li> <p> <code>SIGNING</code>: For signing AS2 messages</p> </li> <li> <p> <code>ENCRYPTION</code>: For encrypting AS2 messages</p> </li> <li> <p> <code>TLS</code>: For securing AS2 communications sent over HTTPS</p> </li> </ul>"
2191+
"documentation":"<p>Specifies whether this certificate is used for signing or encryption.</p>"
21752192
},
21762193
"Status":{
21772194
"shape":"CertificateStatusType",
@@ -2918,7 +2935,7 @@
29182935
"members":{
29192936
"Usage":{
29202937
"shape":"CertificateUsageType",
2921-
"documentation":"<p>Specifies how this certificate is used. It can be used in the following ways:</p> <ul> <li> <p> <code>SIGNING</code>: For signing AS2 messages</p> </li> <li> <p> <code>ENCRYPTION</code>: For encrypting AS2 messages</p> </li> <li> <p> <code>TLS</code>: For securing AS2 communications sent over HTTPS</p> </li> </ul>"
2938+
"documentation":"<p>Specifies whether this certificate is used for signing or encryption.</p>"
29222939
},
29232940
"Certificate":{
29242941
"shape":"CertificateBodyType",
@@ -3555,7 +3572,7 @@
35553572
},
35563573
"Usage":{
35573574
"shape":"CertificateUsageType",
3558-
"documentation":"<p>Specifies how this certificate is used. It can be used in the following ways:</p> <ul> <li> <p> <code>SIGNING</code>: For signing AS2 messages</p> </li> <li> <p> <code>ENCRYPTION</code>: For encrypting AS2 messages</p> </li> <li> <p> <code>TLS</code>: For securing AS2 communications sent over HTTPS</p> </li> </ul>"
3575+
"documentation":"<p>Specifies whether this certificate is used for signing or encryption.</p>"
35593576
},
35603577
"Status":{
35613578
"shape":"CertificateStatusType",
@@ -3793,6 +3810,12 @@
37933810
"type":"list",
37943811
"member":{"shape":"ListedWorkflow"}
37953812
},
3813+
"ListingId":{
3814+
"type":"string",
3815+
"max":512,
3816+
"min":1,
3817+
"pattern":"[0-9a-zA-Z./-]+"
3818+
},
37963819
"LogGroupName":{
37973820
"type":"string",
37983821
"max":512,
@@ -3832,6 +3855,12 @@
38323855
"DIRECTORY"
38333856
]
38343857
},
3858+
"MaxItems":{
3859+
"type":"integer",
3860+
"box":true,
3861+
"max":10000,
3862+
"min":1
3863+
},
38353864
"MaxResults":{
38363865
"type":"integer",
38373866
"box":true,
@@ -3886,6 +3915,12 @@
38863915
"max":1,
38873916
"min":0
38883917
},
3918+
"OutputFileName":{
3919+
"type":"string",
3920+
"max":537,
3921+
"min":26,
3922+
"pattern":"c-([0-9a-f]{17})-[0-9a-zA-Z./-]+.json"
3923+
},
38893924
"OverwriteExisting":{
38903925
"type":"string",
38913926
"enum":[
@@ -4386,6 +4421,49 @@
43864421
"max":5,
43874422
"min":0
43884423
},
4424+
"StartDirectoryListingRequest":{
4425+
"type":"structure",
4426+
"required":[
4427+
"ConnectorId",
4428+
"RemoteDirectoryPath",
4429+
"OutputDirectoryPath"
4430+
],
4431+
"members":{
4432+
"ConnectorId":{
4433+
"shape":"ConnectorId",
4434+
"documentation":"<p>The unique identifier for the connector.</p>"
4435+
},
4436+
"RemoteDirectoryPath":{
4437+
"shape":"FilePath",
4438+
"documentation":"<p>Specifies the directory on the remote SFTP server for which you want to list its contents.</p>"
4439+
},
4440+
"MaxItems":{
4441+
"shape":"MaxItems",
4442+
"documentation":"<p>An optional parameter where you can specify the maximum number of file/directory names to retrieve. The default value is 1,000.</p>"
4443+
},
4444+
"OutputDirectoryPath":{
4445+
"shape":"FilePath",
4446+
"documentation":"<p>Specifies the path (bucket and prefix) in Amazon S3 storage to store the results of the directory listing.</p>"
4447+
}
4448+
}
4449+
},
4450+
"StartDirectoryListingResponse":{
4451+
"type":"structure",
4452+
"required":[
4453+
"ListingId",
4454+
"OutputFileName"
4455+
],
4456+
"members":{
4457+
"ListingId":{
4458+
"shape":"ListingId",
4459+
"documentation":"<p>Returns a unique identifier for the directory listing call.</p>"
4460+
},
4461+
"OutputFileName":{
4462+
"shape":"OutputFileName",
4463+
"documentation":"<p>Returns the file name where the results are stored. This is a combination of the connector ID and the listing ID: <code>&lt;connector-id&gt;-&lt;listing-id&gt;.json</code>.</p>"
4464+
}
4465+
}
4466+
},
43894467
"StartFileTransferRequest":{
43904468
"type":"structure",
43914469
"required":["ConnectorId"],

0 commit comments

Comments
 (0)