Skip to content

Commit

Permalink
feat(storagetransfer): update the API
Browse files Browse the repository at this point in the history
#### storagetransfer:v1

The following keys were added:
- schemas.LoggingConfig.description
- schemas.LoggingConfig.id
- schemas.LoggingConfig.properties.enableOnpremGcsTransferLogs.description
- schemas.LoggingConfig.properties.enableOnpremGcsTransferLogs.type
- schemas.LoggingConfig.type
- schemas.PosixFilesystem.description
- schemas.PosixFilesystem.id
- schemas.PosixFilesystem.properties.rootDirectory.description
- schemas.PosixFilesystem.properties.rootDirectory.type
- schemas.PosixFilesystem.type
- schemas.TransferCounters.properties.directoriesFailedToListFromSource.description
- schemas.TransferCounters.properties.directoriesFailedToListFromSource.format
- schemas.TransferCounters.properties.directoriesFailedToListFromSource.type
- schemas.TransferCounters.properties.directoriesFoundFromSource.description
- schemas.TransferCounters.properties.directoriesFoundFromSource.format
- schemas.TransferCounters.properties.directoriesFoundFromSource.type
- schemas.TransferCounters.properties.directoriesSuccessfullyListedFromSource.description
- schemas.TransferCounters.properties.directoriesSuccessfullyListedFromSource.format
- schemas.TransferCounters.properties.directoriesSuccessfullyListedFromSource.type
- schemas.TransferJob.properties.loggingConfig.$ref
- schemas.TransferJob.properties.loggingConfig.description
- schemas.TransferSpec.properties.posixDataSource.$ref
- schemas.TransferSpec.properties.posixDataSource.description

The following keys were changed:
- resources.transferJobs.methods.get.parameters.jobName.description
- schemas.AwsS3Data.properties.roleArn.description
  • Loading branch information
yoshi-automation authored and bcoe committed Aug 6, 2021
1 parent a428580 commit 128e339
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 6 deletions.
51 changes: 48 additions & 3 deletions discovery/storagetransfer-v1.json
Expand Up @@ -163,7 +163,7 @@
],
"parameters": {
"jobName": {
"description": "Required. \" The job to get.",
"description": "Required. The job to get.",
"location": "path",
"pattern": "^transferJobs/.*$",
"required": true,
Expand Down Expand Up @@ -434,7 +434,7 @@
}
}
},
"revision": "20210715",
"revision": "20210729",
"rootUrl": "https://storagetransfer.googleapis.com/",
"schemas": {
"AwsAccessKey": {
Expand Down Expand Up @@ -469,7 +469,7 @@
"type": "string"
},
"roleArn": {
"description": "Input only. The Amazon Resource Name (ARN) of the role to support temporary credentials via `AssumeRoleWithWebIdentity`. For more information about ARNs, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). When a role ARN is provided, Transfer Service fetches temporary credentials for the session using a `AssumeRoleWithWebIdentity` call for the provided role using the GoogleServiceAccount for this project.",
"description": "The Amazon Resource Name (ARN) of the role to support temporary credentials via `AssumeRoleWithWebIdentity`. For more information about ARNs, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). When a role ARN is provided, Transfer Service fetches temporary credentials for the session using a `AssumeRoleWithWebIdentity` call for the provided role using the GoogleServiceAccount for this project.",
"type": "string"
}
},
Expand Down Expand Up @@ -699,6 +699,17 @@
},
"type": "object"
},
"LoggingConfig": {
"description": "Logging configure.",
"id": "LoggingConfig",
"properties": {
"enableOnpremGcsTransferLogs": {
"description": "Enables the Cloud Storage transfer logs for this transfer. This is only supported for transfer jobs with PosixFilesystem sources. The default is that logs are not generated for this transfer.",
"type": "boolean"
}
},
"type": "object"
},
"NotificationConfig": {
"description": "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`.",
"id": "NotificationConfig",
Expand Down Expand Up @@ -825,6 +836,17 @@
"properties": {},
"type": "object"
},
"PosixFilesystem": {
"description": "A POSIX filesystem data source or sink.",
"id": "PosixFilesystem",
"properties": {
"rootDirectory": {
"description": "Root directory path to the filesystem.",
"type": "string"
}
},
"type": "object"
},
"ResumeTransferOperationRequest": {
"description": "Request passed to ResumeTransferOperation.",
"id": "ResumeTransferOperationRequest",
Expand Down Expand Up @@ -968,6 +990,21 @@
"format": "int64",
"type": "string"
},
"directoriesFailedToListFromSource": {
"description": "For transfers involving PosixFilesystem only. Number of listing failures for each directory found at the source. Potential failures when listing a directory include permission failure or block failure. If listing a directory fails, no files in the directory are transferred.",
"format": "int64",
"type": "string"
},
"directoriesFoundFromSource": {
"description": "For transfers involving PosixFilesystem only. Number of directories found while listing. For example, if the root directory of the transfer is `base/` and there are two other directories, `a/` and `b/` under this directory, the count after listing `base/`, `base/a/` and `base/b/` is 3.",
"format": "int64",
"type": "string"
},
"directoriesSuccessfullyListedFromSource": {
"description": "For transfers involving PosixFilesystem only. Number of successful listings for each directory found at the source.",
"format": "int64",
"type": "string"
},
"objectsCopiedToSink": {
"description": "Objects that are copied to the data sink.",
"format": "int64",
Expand Down Expand Up @@ -1041,6 +1078,10 @@
"description": "The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig.",
"type": "string"
},
"loggingConfig": {
"$ref": "LoggingConfig",
"description": "Logging configuration."
},
"name": {
"description": "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'. 'transferJobs/OPI' is a reserved prefix for PosixFilesystem transfers. 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.",
"type": "string"
Expand Down Expand Up @@ -1197,6 +1238,10 @@
"$ref": "ObjectConditions",
"description": "Only objects that satisfy these object conditions are included in the set of data source and data sink objects. Object conditions based on objects' \"last modification time\" do not exclude objects in a data sink."
},
"posixDataSource": {
"$ref": "PosixFilesystem",
"description": "A POSIX Filesystem data source."
},
"transferOptions": {
"$ref": "TransferOptions",
"description": "If the option delete_objects_unique_in_sink is `true` and time-based object conditions such as 'last modification time' are specified, the request fails with an INVALID_ARGUMENT error."
Expand Down
9 changes: 9 additions & 0 deletions src/apis/storagetransfer/README.md
Expand Up @@ -4,6 +4,15 @@

> Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.
## Support status
**Note**: Google provides multiple libraries for this service. This library is in
maintenance mode, and will continue to be made available for users who have
existing applications. If you're building a new application, or modernizing a
legacy application, please use [@google-cloud/storage-transfer](https://www.npmjs.com/package/@google-cloud/storage-transfer) instead.
The [@google-cloud/storage-transfer](https://www.npmjs.com/package/@google-cloud/storage-transfer) library is faster, easier to use, and better maintained.

To learn more, see [Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained).

## Installation

```sh
Expand Down
48 changes: 45 additions & 3 deletions src/apis/storagetransfer/v1.ts
Expand Up @@ -161,7 +161,7 @@ export namespace storagetransfer_v1 {
*/
path?: string | null;
/**
* Input only. The Amazon Resource Name (ARN) of the role to support temporary credentials via `AssumeRoleWithWebIdentity`. For more information about ARNs, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). When a role ARN is provided, Transfer Service fetches temporary credentials for the session using a `AssumeRoleWithWebIdentity` call for the provided role using the GoogleServiceAccount for this project.
* The Amazon Resource Name (ARN) of the role to support temporary credentials via `AssumeRoleWithWebIdentity`. For more information about ARNs, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). When a role ARN is provided, Transfer Service fetches temporary credentials for the session using a `AssumeRoleWithWebIdentity` call for the provided role using the GoogleServiceAccount for this project.
*/
roleArn?: string | null;
}
Expand Down Expand Up @@ -311,6 +311,15 @@ export namespace storagetransfer_v1 {
*/
transferJobs?: Schema$TransferJob[];
}
/**
* Logging configure.
*/
export interface Schema$LoggingConfig {
/**
* Enables the Cloud Storage transfer logs for this transfer. This is only supported for transfer jobs with PosixFilesystem sources. The default is that logs are not generated for this transfer.
*/
enableOnpremGcsTransferLogs?: boolean | null;
}
/**
* 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`.
*/
Expand Down Expand Up @@ -386,6 +395,15 @@ export namespace storagetransfer_v1 {
* Request passed to PauseTransferOperation.
*/
export interface Schema$PauseTransferOperationRequest {}
/**
* A POSIX filesystem data source or sink.
*/
export interface Schema$PosixFilesystem {
/**
* Root directory path to the filesystem.
*/
rootDirectory?: string | null;
}
/**
* Request passed to ResumeTransferOperation.
*/
Expand Down Expand Up @@ -498,6 +516,18 @@ export namespace storagetransfer_v1 {
* Bytes in the data source that are not transferred because they already exist in the data sink.
*/
bytesFromSourceSkippedBySync?: string | null;
/**
* For transfers involving PosixFilesystem only. Number of listing failures for each directory found at the source. Potential failures when listing a directory include permission failure or block failure. If listing a directory fails, no files in the directory are transferred.
*/
directoriesFailedToListFromSource?: string | null;
/**
* For transfers involving PosixFilesystem only. Number of directories found while listing. For example, if the root directory of the transfer is `base/` and there are two other directories, `a/` and `b/` under this directory, the count after listing `base/`, `base/a/` and `base/b/` is 3.
*/
directoriesFoundFromSource?: string | null;
/**
* For transfers involving PosixFilesystem only. Number of successful listings for each directory found at the source.
*/
directoriesSuccessfullyListedFromSource?: string | null;
/**
* Objects that are copied to the data sink.
*/
Expand Down Expand Up @@ -555,6 +585,10 @@ export namespace storagetransfer_v1 {
* The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig.
*/
latestOperationName?: string | null;
/**
* Logging configuration.
*/
loggingConfig?: Schema$LoggingConfig;
/**
* 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'. 'transferJobs/OPI' is a reserved prefix for PosixFilesystem transfers. 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.
*/
Expand Down Expand Up @@ -670,6 +704,10 @@ export namespace storagetransfer_v1 {
* Only objects that satisfy these object conditions are included in the set of data source and data sink objects. Object conditions based on objects' "last modification time" do not exclude objects in a data sink.
*/
objectConditions?: Schema$ObjectConditions;
/**
* A POSIX Filesystem data source.
*/
posixDataSource?: Schema$PosixFilesystem;
/**
* If the option delete_objects_unique_in_sink is `true` and time-based object conditions such as 'last modification time' are specified, the request fails with an INVALID_ARGUMENT error.
*/
Expand Down Expand Up @@ -886,6 +924,7 @@ export namespace storagetransfer_v1 {
* // "description": "my_description",
* // "lastModificationTime": "my_lastModificationTime",
* // "latestOperationName": "my_latestOperationName",
* // "loggingConfig": {},
* // "name": "my_name",
* // "notificationConfig": {},
* // "projectId": "my_projectId",
Expand All @@ -904,6 +943,7 @@ export namespace storagetransfer_v1 {
* // "description": "my_description",
* // "lastModificationTime": "my_lastModificationTime",
* // "latestOperationName": "my_latestOperationName",
* // "loggingConfig": {},
* // "name": "my_name",
* // "notificationConfig": {},
* // "projectId": "my_projectId",
Expand Down Expand Up @@ -1029,7 +1069,7 @@ export namespace storagetransfer_v1 {
*
* // Do the magic
* const res = await storagetransfer.transferJobs.get({
* // Required. " The job to get.
* // Required. The job to get.
* jobName: 'transferJobs/.*',
* // Required. The ID of the Google Cloud Platform Console project that owns the job.
* projectId: 'placeholder-value',
Expand All @@ -1043,6 +1083,7 @@ export namespace storagetransfer_v1 {
* // "description": "my_description",
* // "lastModificationTime": "my_lastModificationTime",
* // "latestOperationName": "my_latestOperationName",
* // "loggingConfig": {},
* // "name": "my_name",
* // "notificationConfig": {},
* // "projectId": "my_projectId",
Expand Down Expand Up @@ -1326,6 +1367,7 @@ export namespace storagetransfer_v1 {
* // "description": "my_description",
* // "lastModificationTime": "my_lastModificationTime",
* // "latestOperationName": "my_latestOperationName",
* // "loggingConfig": {},
* // "name": "my_name",
* // "notificationConfig": {},
* // "projectId": "my_projectId",
Expand Down Expand Up @@ -1572,7 +1614,7 @@ export namespace storagetransfer_v1 {
}
export interface Params$Resource$Transferjobs$Get extends StandardParameters {
/**
* Required. " The job to get.
* Required. The job to get.
*/
jobName?: string;
/**
Expand Down

0 comments on commit 128e339

Please sign in to comment.