Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

StorageTransfer

import { StorageTransfer } from "https://googleapis.deno.dev/v1/storagetransfer:v1.ts";

Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.

class StorageTransfer {
constructor(client?: CredentialsClient, baseUrl?: string);
async googleServiceAccountsGet(projectId: string): Promise<GoogleServiceAccount>;
async projectsAgentPoolsCreate(
projectId: string,
req: AgentPool,
): Promise<AgentPool>;
async projectsAgentPoolsDelete(name: string): Promise<Empty>;
async projectsAgentPoolsGet(name: string): Promise<AgentPool>;
async projectsAgentPoolsList(projectId: string, opts?: ProjectsAgentPoolsListOptions): Promise<ListAgentPoolsResponse>;
async projectsAgentPoolsPatch(
name: string,
req: AgentPool,
): Promise<AgentPool>;
async transferJobsCreate(req: TransferJob): Promise<TransferJob>;
async transferJobsDelete(jobName: string, opts?: TransferJobsDeleteOptions): Promise<Empty>;
async transferJobsGet(jobName: string, opts?: TransferJobsGetOptions): Promise<TransferJob>;
async transferJobsList(opts?: TransferJobsListOptions): Promise<ListTransferJobsResponse>;
async transferJobsPatch(jobName: string, req: UpdateTransferJobRequest): Promise<TransferJob>;
async transferJobsRun(jobName: string, req: RunTransferJobRequest): Promise<Operation>;
async transferOperationsCancel(name: string, req: CancelOperationRequest): Promise<Empty>;
async transferOperationsGet(name: string): Promise<Operation>;
async transferOperationsList(name: string, opts?: TransferOperationsListOptions): Promise<ListOperationsResponse>;
async transferOperationsPause(name: string, req: PauseTransferOperationRequest): Promise<Empty>;
async transferOperationsResume(name: string, req: ResumeTransferOperationRequest): Promise<Empty>;
}

§Constructors

§
new StorageTransfer(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
googleServiceAccountsGet(projectId: string): Promise<GoogleServiceAccount>
[src]

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.

@param projectId

Required. The ID of the Google Cloud project that the Google service account is associated with.

§
projectsAgentPoolsCreate(projectId: string, req: AgentPool, opts?: ProjectsAgentPoolsCreateOptions): Promise<AgentPool>
[src]

Creates an agent pool resource.

@param projectId

Required. The ID of the Google Cloud project that owns the agent pool.

§
projectsAgentPoolsDelete(name: string): Promise<Empty>
[src]

Deletes an agent pool.

@param name

Required. The name of the agent pool to delete.

§
projectsAgentPoolsGet(name: string): Promise<AgentPool>
[src]

Gets an agent pool.

@param name

Required. The name of the agent pool to get.

§
projectsAgentPoolsList(projectId: string, opts?: ProjectsAgentPoolsListOptions): Promise<ListAgentPoolsResponse>
[src]

Lists agent pools.

@param projectId

Required. The ID of the Google Cloud project that owns the job.

§
projectsAgentPoolsPatch(name: string, req: AgentPool, opts?: ProjectsAgentPoolsPatchOptions): Promise<AgentPool>
[src]

Updates an existing agent pool resource.

@param name

Required. Specifies a unique string that identifies the agent pool. Format: projects/{project_id}/agentPools/{agent_pool_id}

§
transferJobsCreate(req: TransferJob): Promise<TransferJob>
[src]

Creates a transfer job that runs periodically.

§
transferJobsDelete(jobName: string, opts?: TransferJobsDeleteOptions): Promise<Empty>
[src]

Deletes a transfer job. Deleting a transfer job sets its status to DELETED.

@param jobName

Required. The job to delete.

§
transferJobsGet(jobName: string, opts?: TransferJobsGetOptions): Promise<TransferJob>
[src]

Gets a transfer job.

@param jobName

Required. The job to get.

§
transferJobsList(opts?: TransferJobsListOptions): Promise<ListTransferJobsResponse>
[src]

Lists transfer jobs.

§
transferJobsPatch(jobName: string, req: UpdateTransferJobRequest): Promise<TransferJob>
[src]

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).

@param jobName

Required. The name of job to update.

§
transferJobsRun(jobName: string, req: RunTransferJobRequest): Promise<Operation>
[src]

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.

@param jobName

Required. The name of the transfer job.

§
transferOperationsCancel(name: string, req: CancelOperationRequest): Promise<Empty>
[src]

Cancels a transfer. Use the transferOperations.get method to check if the cancellation succeeded or if the operation completed despite the cancel request. When you cancel an operation, the currently running transfer is interrupted. For recurring transfer jobs, the next instance of the transfer job will still run. For example, if your job is configured to run every day at 1pm and you cancel Monday's operation at 1:05pm, Monday's transfer will stop. However, a transfer job will still be attempted on Tuesday. This applies only to currently running operations. If an operation is not currently running, cancel does nothing. Caution: Canceling a transfer job can leave your data in an unknown state. We recommend that you restore the state at both the destination and the source after the cancel request completes so that your data is in a consistent state. When you cancel a job, the next job computes a delta of files and may repair any inconsistent state. For instance, if you run a job every day, and today's job found 10 new files and transferred five files before you canceled the job, tomorrow's transfer operation will compute a new delta with the five files that were not copied today plus any new files discovered tomorrow.

@param name

The name of the operation resource to be cancelled.

§
transferOperationsGet(name: string): Promise<Operation>
[src]

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.

@param name

The name of the operation resource.

§
transferOperationsList(name: string, opts?: TransferOperationsListOptions): Promise<ListOperationsResponse>
[src]

Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.

@param name

Required. The name of the type being listed; must be transferOperations.

§
transferOperationsPause(name: string, req: PauseTransferOperationRequest): Promise<Empty>
[src]

Pauses a transfer operation.

@param name

Required. The name of the transfer operation.

§
transferOperationsResume(name: string, req: ResumeTransferOperationRequest): Promise<Empty>
[src]

Resumes a transfer operation that is paused.

@param name

Required. The name of the transfer operation.