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:
- resources.transferJobs.methods.run.description
- resources.transferJobs.methods.run.flatPath
- resources.transferJobs.methods.run.httpMethod
- resources.transferJobs.methods.run.id
- resources.transferJobs.methods.run.parameterOrder
- resources.transferJobs.methods.run.parameters.jobName.description
- resources.transferJobs.methods.run.parameters.jobName.location
- resources.transferJobs.methods.run.parameters.jobName.pattern
- resources.transferJobs.methods.run.parameters.jobName.required
- resources.transferJobs.methods.run.parameters.jobName.type
- resources.transferJobs.methods.run.path
- resources.transferJobs.methods.run.request.$ref
- resources.transferJobs.methods.run.response.$ref
- resources.transferJobs.methods.run.scopes
- schemas.AwsS3Data.properties.path.description
- schemas.AwsS3Data.properties.path.type
- schemas.AzureBlobStorageData.properties.path.description
- schemas.AzureBlobStorageData.properties.path.type
- schemas.GcsData.properties.path.description
- schemas.GcsData.properties.path.type
- schemas.RunTransferJobRequest.description
- schemas.RunTransferJobRequest.id
- schemas.RunTransferJobRequest.properties.projectId.description
- schemas.RunTransferJobRequest.properties.projectId.type
- schemas.RunTransferJobRequest.type

The following keys were changed:
- resources.transferOperations.methods.list.description
- resources.transferOperations.methods.list.parameters.name.description
- schemas.AwsAccessKey.description
- schemas.AwsS3Data.properties.awsAccessKey.description
- schemas.AzureBlobStorageData.properties.azureCredentials.description
- schemas.AzureCredentials.description
- schemas.ObjectConditions.properties.excludePrefixes.description
- schemas.ObjectConditions.properties.includePrefixes.description
- schemas.Operation.properties.name.description
- schemas.TransferJob.properties.schedule.description
- schemas.UpdateTransferJobRequest.properties.transferJob.description
- schemas.UpdateTransferJobRequest.properties.updateTransferJobFieldMask.description
  • Loading branch information
yoshi-automation authored and sofisl committed Mar 10, 2021
1 parent 201e3fc commit cfb0a1c
Show file tree
Hide file tree
Showing 2 changed files with 247 additions and 26 deletions.
77 changes: 64 additions & 13 deletions discovery/storagetransfer-v1.json
Expand Up @@ -246,6 +246,34 @@
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"run": {
"description": "Attempts to start a new TransferOperation for the current TransferJob. A TransferJob has a maximum of one active TransferOperation. If this method is called while a TransferOperation is active, an error wil be returned.",
"flatPath": "v1/transferJobs/{transferJobsId}:run",
"httpMethod": "POST",
"id": "storagetransfer.transferJobs.run",
"parameterOrder": [
"jobName"
],
"parameters": {
"jobName": {
"description": "Required. The name of the transfer job.",
"location": "path",
"pattern": "^transferJobs/.*$",
"required": true,
"type": "string"
}
},
"path": "v1/{+jobName}:run",
"request": {
"$ref": "RunTransferJobRequest"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
},
Expand Down Expand Up @@ -305,7 +333,7 @@
]
},
"list": {
"description": "Lists transfer operations.",
"description": "Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.",
"flatPath": "v1/transferOperations",
"httpMethod": "GET",
"id": "storagetransfer.transferOperations.list",
Expand All @@ -321,7 +349,7 @@
"type": "string"
},
"name": {
"description": "Required. The value `transferOperations`.",
"description": "Not used.",
"location": "path",
"pattern": "^transferOperations$",
"required": true,
Expand Down Expand Up @@ -406,11 +434,11 @@
}
}
},
"revision": "20201126",
"revision": "20210227",
"rootUrl": "https://storagetransfer.googleapis.com/",
"schemas": {
"AwsAccessKey": {
"description": "AWS access key (see [AWS Security Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)). For information on our data retention policy for user credentials, see [User credentials](data-retention#user-credentials).",
"description": "AWS access key (see [AWS Security Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)). For information on our data retention policy for user credentials, see [User credentials](/storage-transfer/docs/data-retention#user-credentials).",
"id": "AwsAccessKey",
"properties": {
"accessKeyId": {
Expand All @@ -430,11 +458,15 @@
"properties": {
"awsAccessKey": {
"$ref": "AwsAccessKey",
"description": "Required. Input only. AWS access key used to sign the API requests to the AWS S3 bucket. Permissions on the bucket must be granted to the access ID of the AWS access key. For information on our data retention policy for user credentials, see [User credentials](data-retention#user-credentials)."
"description": "Required. Input only. AWS access key used to sign the API requests to the AWS S3 bucket. Permissions on the bucket must be granted to the access ID of the AWS access key. For information on our data retention policy for user credentials, see [User credentials](/storage-transfer/docs/data-retention#user-credentials)."
},
"bucketName": {
"description": "Required. S3 Bucket name (see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).",
"type": "string"
},
"path": {
"description": "Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.",
"type": "string"
}
},
"type": "object"
Expand All @@ -445,12 +477,16 @@
"properties": {
"azureCredentials": {
"$ref": "AzureCredentials",
"description": "Required. Input only. Credentials used to authenticate API requests to Azure. For information on our data retention policy for user credentials, see [User credentials](data-retention#user-credentials)."
"description": "Required. Input only. Credentials used to authenticate API requests to Azure. For information on our data retention policy for user credentials, see [User credentials](/storage-transfer/docs/data-retention#user-credentials)."
},
"container": {
"description": "Required. The container to transfer from the Azure Storage account.",
"type": "string"
},
"path": {
"description": "Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.",
"type": "string"
},
"storageAccount": {
"description": "Required. The name of the Azure Storage account.",
"type": "string"
Expand All @@ -459,7 +495,7 @@
"type": "object"
},
"AzureCredentials": {
"description": "Azure credentials For information on our data retention policy for user credentials, see [User credentials](data-retention#user-credentials).",
"description": "Azure credentials For information on our data retention policy for user credentials, see [User credentials](/storage-transfer/docs/data-retention#user-credentials).",
"id": "AzureCredentials",
"properties": {
"sasToken": {
Expand Down Expand Up @@ -589,6 +625,10 @@
"bucketName": {
"description": "Required. Cloud Storage bucket name (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/naming#requirements)).",
"type": "string"
},
"path": {
"description": "Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'. (must meet Object Name Requirements](https://cloud.google.com/storage/docs/naming#objectnames)).",
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -700,14 +740,14 @@
"id": "ObjectConditions",
"properties": {
"excludePrefixes": {
"description": "`exclude_prefixes` must follow the requirements described for include_prefixes. The max size of `exclude_prefixes` is 1000.",
"description": "If you specify `exclude_prefixes`, Storage Transfer Service uses the items in the `exclude_prefixes` array to determine which objects to exclude from a transfer. Objects must not start with one of the matching `exclude_prefixes` for inclusion in a transfer. The following are requirements of `exclude_prefixes`: * Each exclude-prefix can contain any sequence of Unicode characters, to a max length of 1024 bytes when UTF8-encoded, and must not contain Carriage Return or Line Feed characters. Wildcard matching and regular expression matching are not supported. * Each exclude-prefix must omit the leading slash. For example, to exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the exclude-prefix as `logs/y=2015/requests.gz`. * None of the exclude-prefix values can be empty, if specified. * Each exclude-prefix must exclude a distinct portion of the object namespace. No exclude-prefix may be a prefix of another exclude-prefix. * If include_prefixes is specified, then each exclude-prefix must start with the value of a path explicitly included by `include_prefixes`. The max size of `exclude_prefixes` is 1000. For more information, see [Filtering objects from transfers](/storage-transfer/docs/filtering-objects-from-transfers).",
"items": {
"type": "string"
},
"type": "array"
},
"includePrefixes": {
"description": "If `include_prefixes` is specified, objects that satisfy the object conditions must have names that start with one of the `include_prefixes` and that do not start with any of the exclude_prefixes. If `include_prefixes` is not specified, all objects except those that have names starting with one of the `exclude_prefixes` must satisfy the object conditions. Requirements: * Each include-prefix and exclude-prefix can contain any sequence of Unicode characters, to a max length of 1024 bytes when UTF8-encoded, and must not contain Carriage Return or Line Feed characters. Wildcard matching and regular expression matching are not supported. * Each include-prefix and exclude-prefix must omit the leading slash. For example, to include the `requests.gz` object in a transfer from `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include prefix as `logs/y=2015/requests.gz`. * None of the include-prefix or the exclude-prefix values can be empty, if specified. * Each include-prefix must include a distinct portion of the object namespace. No include-prefix may be a prefix of another include-prefix. * Each exclude-prefix must exclude a distinct portion of the object namespace. No exclude-prefix may be a prefix of another exclude-prefix. * If `include_prefixes` is specified, then each exclude-prefix must start with the value of a path explicitly included by `include_prefixes`. The max size of `include_prefixes` is 1000.",
"description": "If you specify `include_prefixes`, Storage Transfer Service uses the items in the `include_prefixes` array to determine which objects to include in a transfer. Objects must start with one of the matching `include_prefixes` for inclusion in the transfer. If exclude_prefixes is specified, objects must not start with any of the `exclude_prefixes` specified for inclusion in the transfer. The following are requirements of `include_prefixes`: * Each include-prefix can contain any sequence of Unicode characters, to a max length of 1024 bytes when UTF8-encoded, and must not contain Carriage Return or Line Feed characters. Wildcard matching and regular expression matching are not supported. * Each include-prefix must omit the leading slash. For example, to include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include-prefix as `logs/y=2015/requests.gz`. * None of the include-prefix values can be empty, if specified. * Each include-prefix must include a distinct portion of the object namespace. No include-prefix may be a prefix of another include-prefix. The max size of `include_prefixes` is 1000. For more information, see [Filtering objects from transfers](/storage-transfer/docs/filtering-objects-from-transfers).",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -757,7 +797,7 @@
"type": "object"
},
"name": {
"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `transferOperations/some/unique/name`.",
"description": "The server-assigned unique name. The format of `name` is `transferOperations/some/unique/name`.",
"type": "string"
},
"response": {
Expand All @@ -783,6 +823,17 @@
"properties": {},
"type": "object"
},
"RunTransferJobRequest": {
"description": "Request passed to RunTransferJob.",
"id": "RunTransferJobRequest",
"properties": {
"projectId": {
"description": "Required. The ID of the Google Cloud Platform Console project that owns the transfer job.",
"type": "string"
}
},
"type": "object"
},
"Schedule": {
"description": "Transfers can be scheduled to recur or to run just once.",
"id": "Schedule",
Expand Down Expand Up @@ -996,7 +1047,7 @@
},
"schedule": {
"$ref": "Schedule",
"description": "Schedule specification."
"description": "Specifies schedule for the transfer job. This is an optional field. When the field is not set, the job will never execute a transfer, unless you invoke RunTransferJob or update the job to have a non-empty schedule."
},
"status": {
"description": "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.",
Expand Down Expand Up @@ -1155,10 +1206,10 @@
},
"transferJob": {
"$ref": "TransferJob",
"description": "Required. The job to update. `transferJob` is expected to specify only four fields: description, transfer_spec, notification_config, and status. An `UpdateTransferJobRequest` that specifies other fields will be rejected with the error INVALID_ARGUMENT. Updating a job satus to DELETED requires `storagetransfer.jobs.delete` permissions."
"description": "Required. The job to update. `transferJob` is expected to specify only four fields: description, transfer_spec, notification_config, and status. An `UpdateTransferJobRequest` that specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job satus to DELETED requires `storagetransfer.jobs.delete` permissions."
},
"updateTransferJobFieldMask": {
"description": "The field mask of the fields in `transferJob` that are to be updated in this request. Fields in `transferJob` that can be updated are: description, transfer_spec, notification_config, and status. To update the `transfer_spec` of the job, a complete transfer specification must be provided. An incomplete specification missing any required fields will be rejected with the error INVALID_ARGUMENT.",
"description": "The field mask of the fields in `transferJob` that are to be updated in this request. Fields in `transferJob` that can be updated are: description, transfer_spec, notification_config, and status. To update the `transfer_spec` of the job, a complete transfer specification must be provided. An incomplete specification missing any required fields is rejected with the error INVALID_ARGUMENT.",
"format": "google-fieldmask",
"type": "string"
}
Expand Down

0 comments on commit cfb0a1c

Please sign in to comment.