5.2.8 Uploading a file
Function
This plug-in uploads a file in the Amazon S3 environment.
The prerequisite server for this plug-in is as follows:
- AWS operating server (execution target server)
AWS Tools for Windows PowerShell (AWS Tools below) is installed on this server. This product transfers plug-ins to this server for execution.
Scripts in this plug-in execute the following AWS Tools commandlet:
Write-S3Object -BucketName "value-of-bucket-name(AWS.buketName-property)"
-Key "value-of-key-name(AWS.keyName-property)"
-File "value-of-upload-file-name(AWS.uploadFileName-property"
-ServerSideEncryption "None|AES256"
For details of the AWS Tools commandlets, see the AWS document AWS Tools for Windows PowerShell Cmdlet Reference.
Use situation
This plug-in can be used to upload a file in the Amazon S3 environment.
Prerequisites
For the latest support status of the following items, see the Release notes: Prerequisite products on the execution target server, and running OS for prerequisite products on the execution target server.
In addition, the following OS and products use abbreviations. For the abbreviations of OS and products, see the "Preface".
Prerequisite products on the execution target server:
- AWS Tools for Windows PowerShell
- Microsoft .Net Framework 3.5 or later
Running OS for prerequisite products on the execution target server:
- Windows Server
Cautions
(1) Do not use a character string containing a double quotation mark (") or single quotation mark (') in a plug-in property.
(2) For other cautions, see the descriptions about cautions in the AWS document AWS Tools for Windows PowerShell Cmdlet Reference.
Execution privilege
(1) A policy setting is required so that an IAM user who logs in to AWS can perform the following action:
- Uploading a file
Version
02.00.00
Plug-in tags
File Operations,AWS
Plug-in name displayed in the task log
awsUploadFile
Return code
0: Normal
12: Error (Mistake by user) Invalid property
23: Error (Invalid environment) The environment requirements are not met.
27: Error (Check with the task log about the error details.) Unidentified error
41: Error (An error was detected in the component.) Property not entered (An error was detected in the component script.)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
plugin.destinationHost |
Host name of the execution target server |
Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported. |
-- |
Input |
R |
AWS.accessKeyId |
Access key ID |
Specify the access key ID for connecting to AWS. |
-- |
Input |
R |
AWS.secretAccessKey |
Secret access key |
Specify the secret access key for connecting to AWS. |
-- |
Input |
R |
AWS.region |
Region |
Specify an AWS region that is a connection destination. |
-- |
Input |
R |
AWS.bucketName |
Bucket name |
Specify a bucket name. |
-- |
Input |
R |
AWS.keyName |
Key name |
Specify a key name to be set for the file after the file is uploaded. |
-- |
Input |
R |
AWS.uploadFileName |
Upload file name |
Specify a file name for the file to be uploaded by using a full path. |
-- |
Input |
R |
AWS.useReducedRedundancyStorage |
Use of reduced redundancy storage |
To use reduced redundancy storage for the file upload destination, specify "true". |
-- |
Input |
O |
AWS.useServerSideEncryption |
Use of server-side encryption |
To use server-side encryption when uploading files, specify "true". |
-- |
Input |
O |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |