Resource: TransferJob
This resource represents the configuration of a transfer job that runs periodically.
JSON representation |
---|
{ "name" : string , "description" : string , "projectId" : string , "serviceAccount" : string , "transferSpec" : { object ( |
Fields | |
---|---|
name
|
A unique name (within the transfer project) assigned when the job is created. If this field is empty in a CreateTransferJobRequest, Storage Transfer Service assigns a unique name. Otherwise, the specified name is used as the unique name for this job. If the specified name is in use by a job, the creation request fails with an This name must start with Non-PosixFilesystem example: PosixFilesystem example: Applications must not rely on the enforcement of naming requirements involving OPI. Invalid job names fail with an |
description
|
A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded. |
projectId
|
The ID of the Google Cloud project that owns the job. |
serviceAccount
|
Optional. The user-managed service account to which to delegate service agent permissions. You can grant Cloud Storage bucket permissions to this service account instead of to the Transfer Service service agent. Format is Either the service account email ( See https://cloud.google.com//storage-transfer/docs/delegate-service-agent-permissions for required permissions. |
transferSpec
|
Transfer specification. |
replicationSpec
|
Replication specification. |
notificationConfig
|
Notification configuration. |
loggingConfig
|
Logging configuration. |
schedule
|
Specifies schedule for the transfer job. This is an optional field. When the field is not set, the job never executes a transfer, unless you invoke transferJobs.run or update the job to have a non-empty schedule. |
eventStream
|
Specifies the event stream for the transfer job for event-driven transfers. When EventStream is specified, the Schedule fields are ignored. |
status
|
Status of the job. This value MUST be specified for Note:The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from |
creationTime
|
Output only. The time that the transfer job was created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
lastModificationTime
|
Output only. The time that the transfer job was last modified. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
deletionTime
|
Output only. The time that the transfer job was deleted. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
latestOperationName
|
The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig. |
ReplicationSpec
Specifies the configuration for a cross-bucket replication job. Cross-bucket replication copies new or updated objects from a source Cloud Storage bucket to a destination Cloud Storage bucket. Existing objects in the source bucket are not copied by a new cross-bucket replication job.
JSON representation |
---|
{ "objectConditions" : { object ( |
objectConditions
object (
ObjectConditions
)
Object conditions that determine which objects are transferred. For replication jobs, only includePrefixes
and excludePrefixes
are supported.
data_source
. The data source to be replicated. data_source
can be only one of the following:gcsDataSource
object (
GcsData
)
The Cloud Storage bucket from which to replicate objects.
data_sink
. The destination for replicated objects. data_sink
can be only one of the following:gcsDataSink
object (
GcsData
)
The Cloud Storage bucket to which to replicate objects.
Schedule
Transfers can be scheduled to recur or to run just once.
JSON representation |
---|
{ "scheduleStartDate" : { object ( |
scheduleStartDate
object (
Date
)
Required. The start date of a transfer. Date boundaries are determined relative to UTC time. If scheduleStartDate
and startTimeOfDay
are in the past relative to the job's creation time, the transfer starts the day after you schedule the transfer request.
Note:When starting jobs at or near midnight UTC it is possible that a job starts later than expected. For example, if you send an outbound request on June 1 one millisecond prior to midnight UTC and the Storage Transfer Service server receives the request on June 2, then it creates a TransferJob with scheduleStartDate
set to June 2 and a startTimeOfDay
set to midnight UTC. The first scheduled TransferOperation
takes place on June 3 at midnight UTC.
scheduleEndDate
object (
Date
)
The last day a transfer runs. Date boundaries are determined relative to UTC time. A job runs once per 24 hours within the following guidelines:
- If
scheduleEndDate
andscheduleStartDate
are the same and in the future relative to UTC, the transfer is executed only one time. - If
scheduleEndDate
is later thanscheduleStartDate
andscheduleEndDate
is in the future relative to UTC, the job runs each day atstartTimeOfDay
throughscheduleEndDate
.
startTimeOfDay
object (
TimeOfDay
)
The time in UTC that a transfer job is scheduled to run. Transfers may start later than this time.
If startTimeOfDay
is not specified:
- One-time transfers run immediately.
- Recurring transfers run immediately, and each day at midnight UTC, through
scheduleEndDate
.
If startTimeOfDay
is specified:
- One-time transfers run at the specified time.
- Recurring transfers run at the specified time each day, through
scheduleEndDate
.
endTimeOfDay
object (
TimeOfDay
)
The time in UTC that no further transfer operations are scheduled. Combined with scheduleEndDate
, endTimeOfDay
specifies the end date and time for starting new transfer operations. This field must be greater than or equal to the timestamp corresponding to the combination of scheduleStartDate
and startTimeOfDay
, and is subject to the following:
-
If
endTimeOfDay
is not set andscheduleEndDate
is set, then a default value of23:59:59
is used forendTimeOfDay
. -
If
endTimeOfDay
is set andscheduleEndDate
is not set, thenINVALID_ARGUMENT
is returned.
repeatInterval
string (
Duration
format)
Interval between the start of each scheduled TransferOperation. If unspecified, the default value is 24 hours. This value may not be less than 1 hour.
A duration in seconds with up to nine fractional digits, ending with ' s
'. Example: "3.5s"
.
Date
Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:
- A full date, with non-zero year, month, and day values.
- A month and day, with a zero year (for example, an anniversary).
- A year on its own, with a zero month and a zero day.
- A year and month, with a zero day (for example, a credit card expiration date).
Related types:
-
google.type.TimeOfDay
-
google.type.DateTime
-
google.protobuf.Timestamp
JSON representation |
---|
{ "year" : integer , "month" : integer , "day" : integer } |
Fields | |
---|---|
year
|
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
month
|
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
day
|
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. |
TimeOfDay
Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date
and google.protobuf.Timestamp
.
JSON representation |
---|
{ "hours" : integer , "minutes" : integer , "seconds" : integer , "nanos" : integer } |
Fields | |
---|---|
hours
|
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
minutes
|
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59. |
seconds
|
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds. |
nanos
|
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. |
EventStream
Specifies the Event-driven transfer options. Event-driven transfers listen to an event stream to transfer updated files.
JSON representation |
---|
{ "name" : string , "eventStreamStartTime" : string , "eventStreamExpirationTime" : string } |
Fields | |
---|---|
name
|
Required. Specifies a unique name of the resource such as AWS SQS ARN in the form 'arn:aws:sqs:region:account_id:queue_name', or Pub/Sub subscription resource name in the form 'projects/{project}/subscriptions/{sub}'. |
eventStreamStartTime
|
Specifies the date and time that Storage Transfer Service starts listening for events from this stream. If no start time is specified or start time is in the past, Storage Transfer Service starts listening immediately. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
eventStreamExpirationTime
|
Specifies the data and time at which Storage Transfer Service stops listening for events from this stream. After this time, any transfers in progress will complete, but no new transfers are initiated. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Status
The status of the transfer job.
Enums | |
---|---|
STATUS_UNSPECIFIED
|
Zero is an illegal value. |
ENABLED
|
New transfers are performed based on the schedule. |
DISABLED
|
New transfers are not scheduled. |
DELETED
|
This is a soft delete state. After a transfer job is set to this state, the job and all the transfer executions are subject to garbage collection. Transfer jobs become eligible for garbage collection 30 days after their status is set to DELETED
. |
Methods |
|
---|---|
|
Creates a transfer job that runs periodically. |
|
Deletes a transfer job. |
|
Gets a transfer job. |
|
Lists transfer jobs. |
|
Updates a transfer job. |
|
Starts a new operation for the specified transfer job. |