Class: Google::Apis::StoragetransferV1::TransferJob

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/storagetransfer_v1/classes.rb,
lib/google/apis/storagetransfer_v1/representations.rb,
lib/google/apis/storagetransfer_v1/representations.rb

Overview

This resource represents the configuration of a transfer job that runs periodically.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TransferJob

Returns a new instance of TransferJob.



1705
1706
1707
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1705

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#creation_timeString

Output only. The time that the transfer job was created. Corresponds to the JSON property creationTime

Returns:

  • (String)


1595
1596
1597
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1595

def creation_time
  @creation_time
end

#deletion_timeString

Output only. The time that the transfer job was deleted. Corresponds to the JSON property deletionTime

Returns:

  • (String)


1600
1601
1602
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1600

def deletion_time
  @deletion_time
end

#descriptionString

A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded. Corresponds to the JSON property description

Returns:

  • (String)


1606
1607
1608
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1606

def description
  @description
end

#event_streamGoogle::Apis::StoragetransferV1::EventStream

Specifies the Event-driven transfer options. Event-driven transfers listen to an event stream to transfer updated files. Corresponds to the JSON property eventStream



1612
1613
1614
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1612

def event_stream
  @event_stream
end

#last_modification_timeString

Output only. The time that the transfer job was last modified. Corresponds to the JSON property lastModificationTime

Returns:

  • (String)


1617
1618
1619
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1617

def last_modification_time
  @last_modification_time
end

#latest_operation_nameString

The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig. Corresponds to the JSON property latestOperationName

Returns:

  • (String)


1623
1624
1625
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1623

def latest_operation_name
  @latest_operation_name
end

#logging_configGoogle::Apis::StoragetransferV1::LoggingConfig

Specifies the logging behavior for transfer operations. Logs can be sent to Cloud Logging for all transfer types. See Read transfer logs for details. Corresponds to the JSON property loggingConfig



1630
1631
1632
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1630

def logging_config
  @logging_config
end

#nameString

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 ALREADY_EXISTS error. This name must start with " transferJobs/" prefix and end with a letter or a number, and should be no more than 128 characters. For transfers involving PosixFilesystem, this name must start with transferJobs/OPI specifically. For all other transfer types, this name must not start with transferJobs/OPI. Non-PosixFilesystem example: "transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$" PosixFilesystem example: "transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$" Applications must not rely on the enforcement of naming requirements involving OPI. Invalid job names fail with an INVALID_ARGUMENT error. Corresponds to the JSON property name

Returns:

  • (String)


1647
1648
1649
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1647

def name
  @name
end

#notification_configGoogle::Apis::StoragetransferV1::NotificationConfig

Specification to configure notifications published to Pub/Sub. Notifications are published to the customer-provided topic using the following PubsubMessage.attributes: * "eventType": one of the EventType values * " payloadFormat": one of the PayloadFormat values * "projectId": the project_id of the TransferOperation * "transferJobName": the transfer_job_name of the TransferOperation * "transferOperationName": the name of the TransferOperation The PubsubMessage.data contains a TransferOperation resource formatted according to the specified PayloadFormat . Corresponds to the JSON property notificationConfig



1660
1661
1662
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1660

def notification_config
  @notification_config
end

#project_idString

The ID of the Google Cloud project that owns the job. Corresponds to the JSON property projectId

Returns:

  • (String)


1665
1666
1667
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1665

def project_id
  @project_id
end

#replication_specGoogle::Apis::StoragetransferV1::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. Corresponds to the JSON property replicationSpec



1673
1674
1675
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1673

def replication_spec
  @replication_spec
end

#scheduleGoogle::Apis::StoragetransferV1::Schedule

Transfers can be scheduled to recur or to run just once. Corresponds to the JSON property schedule



1678
1679
1680
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1678

def schedule
  @schedule
end

#service_accountString

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. Either the service account email (SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com) or the unique ID (123456789012345678901) are accepted. See https://docs.cloud. google.com/storage-transfer/docs/delegate-service-agent-permissions for required permissions. Corresponds to the JSON property serviceAccount

Returns:

  • (String)


1689
1690
1691
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1689

def 
  @service_account
end

#statusString

Status of the job. This value MUST be specified for CreateTransferJobRequests . Note: The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from ENABLED to DISABLED, and an operation spawned by the transfer is running, the status change would not affect the current operation. Corresponds to the JSON property status

Returns:

  • (String)


1698
1699
1700
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1698

def status
  @status
end

#transfer_specGoogle::Apis::StoragetransferV1::TransferSpec

Configuration for running a transfer. Corresponds to the JSON property transferSpec



1703
1704
1705
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1703

def transfer_spec
  @transfer_spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
# File 'lib/google/apis/storagetransfer_v1/classes.rb', line 1710

def update!(**args)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @deletion_time = args[:deletion_time] if args.key?(:deletion_time)
  @description = args[:description] if args.key?(:description)
  @event_stream = args[:event_stream] if args.key?(:event_stream)
  @last_modification_time = args[:last_modification_time] if args.key?(:last_modification_time)
  @latest_operation_name = args[:latest_operation_name] if args.key?(:latest_operation_name)
  @logging_config = args[:logging_config] if args.key?(:logging_config)
  @name = args[:name] if args.key?(:name)
  @notification_config = args[:notification_config] if args.key?(:notification_config)
  @project_id = args[:project_id] if args.key?(:project_id)
  @replication_spec = args[:replication_spec] if args.key?(:replication_spec)
  @schedule = args[:schedule] if args.key?(:schedule)
  @service_account = args[:service_account] if args.key?(:service_account)
  @status = args[:status] if args.key?(:status)
  @transfer_spec = args[:transfer_spec] if args.key?(:transfer_spec)
end