Storage Transfer Service and its protos.
Transfers data between between Google Cloud Storage buckets or from a data source external to Google to a Cloud Storage bucket.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
StorageTransferServiceClient(StorageTransferServiceClient const &)
Copy and move support
| Parameter | |
|---|---|
| Name | Description |
|
StorageTransferServiceClient const &
|
StorageTransferServiceClient(StorageTransferServiceClient &&)
Copy and move support
| Parameter | |
|---|---|
| Name | Description |
|
StorageTransferServiceClient &&
|
StorageTransferServiceClient(std::shared_ptr< StorageTransferServiceConnection >, Options)
| Parameters | |
|---|---|
| Name | Description |
connection |
std::shared_ptr< StorageTransferServiceConnection >
|
opts |
Options
|
Operators
operator=(StorageTransferServiceClient const &)
Copy and move support
| Parameter | |
|---|---|
| Name | Description |
|
StorageTransferServiceClient const &
|
| Returns | |
|---|---|
| Type | Description |
StorageTransferServiceClient & |
|
operator=(StorageTransferServiceClient &&)
Copy and move support
| Parameter | |
|---|---|
| Name | Description |
|
StorageTransferServiceClient &&
|
| Returns | |
|---|---|
| Type | Description |
StorageTransferServiceClient & |
|
Functions
GetGoogleServiceAccount(google::storagetransfer::v1::GetGoogleServiceAccountRequest const &, Options)
Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects.
Each Google service account is associated with one Google Cloud project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::GetGoogleServiceAccountRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::GoogleServiceAccount > |
the result of the RPC. The response message type (google.storagetransfer.v1.GoogleServiceAccount) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateTransferJob(google::storagetransfer::v1::CreateTransferJobRequest const &, Options)
Creates a transfer job that runs periodically.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::CreateTransferJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::TransferJob > |
the result of the RPC. The response message type (google.storagetransfer.v1.TransferJob) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateTransferJob(google::storagetransfer::v1::UpdateTransferJobRequest const &, Options)
Updates a transfer job.
Updating a job's transfer spec does not affect transfer operations that are running already.
Note: The job's status field can be modified using this RPC (for example, to set a job's status to DELETED, DISABLED, or ENABLED).
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::UpdateTransferJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::TransferJob > |
the result of the RPC. The response message type (google.storagetransfer.v1.TransferJob) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetTransferJob(google::storagetransfer::v1::GetTransferJobRequest const &, Options)
Gets a transfer job.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::GetTransferJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::TransferJob > |
the result of the RPC. The response message type (google.storagetransfer.v1.TransferJob) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListTransferJobs(google::storagetransfer::v1::ListTransferJobsRequest, Options)
Lists transfer jobs.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::ListTransferJobsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StreamRange< google::storagetransfer::v1::TransferJob > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
PauseTransferOperation(google::storagetransfer::v1::PauseTransferOperationRequest const &, Options)
Pauses a transfer operation.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::PauseTransferOperationRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
Status |
a |
ResumeTransferOperation(google::storagetransfer::v1::ResumeTransferOperationRequest const &, Options)
Resumes a transfer operation that is paused.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::ResumeTransferOperationRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
Status |
a |
RunTransferJob(google::storagetransfer::v1::RunTransferJobRequest const &, Options)
Starts a new operation for the specified transfer job.
A TransferJob has a maximum of one active TransferOperation. If this method is called while a TransferOperation is active, an error is returned.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::RunTransferJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
future< StatusOr< google::storagetransfer::v1::TransferOperation > > |
A |
RunTransferJob(NoAwaitTag, google::storagetransfer::v1::RunTransferJobRequest const &, Options)
Starts a new operation for the specified transfer job.
Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
| Parameters | |
|---|---|
| Name | Description |
|
NoAwaitTag
|
request |
google::storagetransfer::v1::RunTransferJobRequest const &
|
opts |
Options
|
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::longrunning::Operation > |
|
RunTransferJob(google::longrunning::Operation const &, Options)
Starts a new operation for the specified transfer job.
This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
| Parameters | |
|---|---|
| Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
| Returns | |
|---|---|
| Type | Description |
future< StatusOr< google::storagetransfer::v1::TransferOperation > > |
|
DeleteTransferJob(google::storagetransfer::v1::DeleteTransferJobRequest const &, Options)
Deletes a transfer job.
Deleting a transfer job sets its status to DELETED.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::DeleteTransferJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
Status |
a |
CreateAgentPool(std::string const &, google::storagetransfer::v1::AgentPool const &, std::string const &, Options)
Creates an agent pool resource.
| Parameters | |
|---|---|
| Name | Description |
project_id |
std::string const &
Required. The ID of the Google Cloud project that owns the agent pool. |
agent_pool |
google::storagetransfer::v1::AgentPool const &
Required. The agent pool to create. |
agent_pool_id |
std::string const &
Required. The ID of the agent pool to create.
|
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::AgentPool > |
the result of the RPC. The response message type (google.storagetransfer.v1.AgentPool) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateAgentPool(google::storagetransfer::v1::CreateAgentPoolRequest const &, Options)
Creates an agent pool resource.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::CreateAgentPoolRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::AgentPool > |
the result of the RPC. The response message type (google.storagetransfer.v1.AgentPool) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateAgentPool(google::storagetransfer::v1::AgentPool const &, google::protobuf::FieldMask const &, Options)
Updates an existing agent pool resource.
| Parameters | |
|---|---|
| Name | Description |
agent_pool |
google::storagetransfer::v1::AgentPool const &
Required. The agent pool to update.
|
update_mask |
google::protobuf::FieldMask const &
The field mask of the fields in |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::AgentPool > |
the result of the RPC. The response message type (google.storagetransfer.v1.AgentPool) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateAgentPool(google::storagetransfer::v1::UpdateAgentPoolRequest const &, Options)
Updates an existing agent pool resource.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::UpdateAgentPoolRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::AgentPool > |
the result of the RPC. The response message type (google.storagetransfer.v1.AgentPool) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetAgentPool(std::string const &, Options)
Gets an agent pool.
| Parameters | |
|---|---|
| Name | Description |
name |
std::string const &
Required. The name of the agent pool to get. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::AgentPool > |
the result of the RPC. The response message type (google.storagetransfer.v1.AgentPool) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetAgentPool(google::storagetransfer::v1::GetAgentPoolRequest const &, Options)
Gets an agent pool.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::GetAgentPoolRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::storagetransfer::v1::AgentPool > |
the result of the RPC. The response message type (google.storagetransfer.v1.AgentPool) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListAgentPools(std::string const &, Options)
Lists agent pools.
| Parameters | |
|---|---|
| Name | Description |
project_id |
std::string const &
Required. The ID of the Google Cloud project that owns the job. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StreamRange< google::storagetransfer::v1::AgentPool > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListAgentPools(google::storagetransfer::v1::ListAgentPoolsRequest, Options)
Lists agent pools.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::ListAgentPoolsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StreamRange< google::storagetransfer::v1::AgentPool > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
DeleteAgentPool(std::string const &, Options)
Deletes an agent pool.
| Parameters | |
|---|---|
| Name | Description |
name |
std::string const &
Required. The name of the agent pool to delete. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
Status |
a |
DeleteAgentPool(google::storagetransfer::v1::DeleteAgentPoolRequest const &, Options)
Deletes an agent pool.
| Parameters | |
|---|---|
| Name | Description |
request |
google::storagetransfer::v1::DeleteAgentPoolRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
Status |
a |
ListOperations(std::string const &, std::string const &, Options)
Lists operations that match the specified filter in the request.
If the server doesn't support this method, it returns UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
name |
std::string const &
The name of the operation's parent resource. |
filter |
std::string const &
The standard list filter. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StreamRange< google::longrunning::Operation > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListOperations(google::longrunning::ListOperationsRequest, Options)
Lists operations that match the specified filter in the request.
If the server doesn't support this method, it returns UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request |
google::longrunning::ListOperationsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StreamRange< google::longrunning::Operation > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
GetOperation(std::string const &, Options)
Gets the latest state of a long-running operation.
Clients can use this method to poll the operation result at intervals as recommended by the API service.
| Parameters | |
|---|---|
| Name | Description |
name |
std::string const &
The name of the operation resource. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::longrunning::Operation > |
the result of the RPC. The response message type (google.longrunning.Operation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetOperation(google::longrunning::GetOperationRequest const &, Options)
Gets the latest state of a long-running operation.
Clients can use this method to poll the operation result at intervals as recommended by the API service.
| Parameters | |
|---|---|
| Name | Description |
request |
google::longrunning::GetOperationRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
StatusOr< google::longrunning::Operation > |
the result of the RPC. The response message type (google.longrunning.Operation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CancelOperation(std::string const &, Options)
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
| Parameters | |
|---|---|
| Name | Description |
name |
std::string const &
The name of the operation resource to be cancelled. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
Status |
a |
CancelOperation(google::longrunning::CancelOperationRequest const &, Options)
Starts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
| Parameters | |
|---|---|
| Name | Description |
request |
google::longrunning::CancelOperationRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
| Returns | |
|---|---|
| Type | Description |
Status |
a |