Setting S3 Job Properties Through Scripts
Attributes defined for an object affect how the object is processed. Script statements allow you to dynamically change those object attributes and assign new values when the task is generated. The new values are only valid for the current generation and are not permanently stored in the object.
You can define the values of any of the settings of all S3 Jobs using scripts. You do this by using :PUT_ATT commands on the Pre-Process object page.
For more information, see the Automic Automation product documentation:
This page includes the following:
S3 Copy File Job Attributes
The attributes available for S3 Copy File Jobs are the following:
-
connection
Sets the S3 Connection object.
Value: text
-
region
Sets the relevant Region.
Defining the region in the job is optional and only relevant for AWS. If you choose not to define it, the job takes the URL defined in the Connection object.
However, if you decide to define the region in the job, make sure that the definition matches the one defined in the Connection object that you have selected for the job. If both region definitions do not match, the job execution fails and an error message is logged in both, the Agent (PLOG) and the Job (REP) reports (see Monitoring S3 Jobs).
Value: text
-
sourcebucket
Sets the name of the source bucket that you want to use.
Value: text
-
sourcefilepath
Sets the source file name or the path of where the source file is located.
Value: text
-
destinationbucket
Sets the destination bucket name that you want to use.
Value: text
-
destinationfilepath
Sets the destination file name or the path to where the file should be copied in the bucket.
Value: text
S3 Delete File Job Attributes
The attributes available for S3 Delete File Jobs are the following:
-
connection
Sets the S3 Connection object.
Value: text
-
region
Sets the relevant Region.
Defining the region in the job is optional and only relevant for AWS. If you choose not to define it, the job takes the URL defined in the Connection object.
However, if you decide to define the region in the job, make sure that the definition matches the one defined in the Connection object that you have selected for the job. If both region definitions do not match, the job execution fails and an error message is logged in both, the Agent (PLOG) and the Job (REP) reports (see Monitoring S3 Jobs).
Value: text
-
bucketname
Sets the name of the bucket that you want to use.
Value: text
-
filename
Sets the name of the relevant file.
Value: text
S3 Download File Job Attributes
The attributes available for S3 Download File Jobs are the following:
-
connection
Sets the S3 Connection object.
Value: text
-
region
Sets the relevant Region.
Defining the region in the job is optional and only relevant for AWS. If you choose not to define it, the job takes the URL defined in the Connection object.
However, if you decide to define the region in the job, make sure that the definition matches the one defined in the Connection object that you have selected for the job. If both region definitions do not match, the job execution fails and an error message is logged in both, the Agent (PLOG) and the Job (REP) reports (see Monitoring S3 Jobs).
Value: text
-
sourceBucket
Sets the name of the source bucket that you want to use.
Value: text
-
sourcefilepath
Sets the source file name or the path of where the source file is located.
Value: text
-
destinationfilepath
Sets the destination file name or the path to where the file should be downloaded in the bucket.
Value: text
You can also define file permissions for downloaded files using the following attributes:
-
filePermission
Sets the file permission definition.
Value: text
-
fileOwner
Sets the owner of the downloaded file who will have the specified permissions.
Value: text
-
fileOwnerGroup
Unix only. Sets the owner group as specified on your Unix environment. This group will have the specified permissions.
Value: text
-
onInvalidPermissionSettings
Allows you to define if the job should fail or succeed when the permission settings are either left empty or incorrect.
-
Fail (default)
Select this option if the job should fail when the permission settings are either left empty or incorrect.
-
Succeed
Select this option if the job should succeed when the permission settings are either left empty or incorrect.
-
S3 Exist File Job Attributes
The attributes available for S3 Exist File Jobs are the following:
-
connection
Sets the S3 Connection object.
Value: text
-
region
Sets the relevant Region.
Defining the region in the job is optional and only relevant for AWS. If you choose not to define it, the job takes the URL defined in the Connection object.
However, if you decide to define the region in the job, make sure that the definition matches the one defined in the Connection object that you have selected for the job. If both region definitions do not match, the job execution fails and an error message is logged in both, the Agent (PLOG) and the Job (REP) reports (see Monitoring S3 Jobs).
Value: text
-
bucketname
Sets the name of the bucket that you want to use.
Value: text
-
filename
Sets the name of the relevant file.
Value: text
-
useregex
Defines if you want to use a regex or not.
Values: 0 (do not use regex), 1 (use regex)
-
queryparam
Allows you to filter the query and therefore the query response.
Value: text
S3 Monitor File Job Attributes
The attributes available for S3 Monitor File Jobs are the following:
-
connection
Sets the S3 Connection object.
Value: text
-
monitorjobtype
Sets the type of job that you want to monitor in the specified bucket.
Value: text
-
region
Sets the relevant Region.
Defining the region in the job is optional and only relevant for AWS. If you choose not to define it, the job takes the URL defined in the Connection object.
However, if you decide to define the region in the job, make sure that the definition matches the one defined in the Connection object that you have selected for the job. If both region definitions do not match, the job execution fails and an error message is logged in both, the Agent (PLOG) and the Job (REP) reports (see Monitoring S3 Jobs).
Value: text
-
bucketname
Sets the name of the bucket that you want to use.
Value: text
-
filename
Sets the name of the relevant file.
Value: text
-
sortingStrategy
Sets the sorting strategy that you want to use when using a regex.
Values: native_order, alpha_asc, alpha_desc, time_asc, time_desc, size_asc, size_desc
-
useregex
Defines if you want to use a regex or not.
Values: 0 (do not use regex), 1 (use regex)
-
steadystate
Sets the amount of time in seconds (s), minutes (m), or hours (h) the file should remain in a steady state before being ready for further use.
Value: text
-
sleepinterval
Sets the amount of time in seconds before resubmitting the monitor status request.
Value: text
-
queryparam
Allows you to filter the query and therefore the query response.
Value: text
-
returnfileuri
Sets if you want the execution details to include the full URI of the file name.
Values: 0 (do not return file URI), 1 (return file URI)
S3 Upload File Job Attributes
The attributes available for S3 Upload File Jobs are the following:
-
connection
Sets the S3 Connection object.
Value: text
-
region
Sets the relevant Region.
Defining the region in the job is optional and only relevant for AWS. If you choose not to define it, the job takes the URL defined in the Connection object.
However, if you decide to define the region in the job, make sure that the definition matches the one defined in the Connection object that you have selected for the job. If both region definitions do not match, the job execution fails and an error message is logged in both, the Agent (PLOG) and the Job (REP) reports (see Monitoring S3 Jobs).
Value: text
-
sourcefilepath
Sets the source file name or the path of where the source file is located.
Value: text
-
bucketname
Sets the name of the bucket that you want to use.
Value: text
-
destinationfilepath
Sets the destination file name or the path to where the file should be uploaded in the bucket.
Value: text
See also: