StorageTransferJob
Property | Value |
---|---|
Google Cloud Service Name | Storage Transfer |
Google Cloud Service Documentation | /storage-transfer/docs/ |
Google Cloud REST Resource Name | v1.transferJobs |
Google Cloud REST Resource Documentation | /storage-transfer/docs/reference/rest/v1/transferJobs |
Config Connector Resource Short Names | gcpstoragetransferjob gcpstoragetransferjobs storagetransferjob |
Config Connector Service Name | storagetransfer.googleapis.com |
Config Connector Resource Fully Qualified Name | storagetransferjobs.storagetransfer.cnrm.cloud.google.com |
Can Be Referenced by IAMPolicy/IAMPolicyMember | No |
Config Connector Default Average Reconcile Interval In Seconds | 600 |
Custom Resource Definition Properties
Annotations
Fields | |
---|---|
cnrm.cloud.google.com/project-id |
Spec
Schema
description: string
notificationConfig:
eventTypes:
- string
payloadFormat: string
topicRef:
external: string
name: string
namespace: string
resourceID: string
schedule:
repeatInterval: string
scheduleEndDate:
day: integer
month: integer
year: integer
scheduleStartDate:
day: integer
month: integer
year: integer
startTimeOfDay:
hours: integer
minutes: integer
nanos: integer
seconds: integer
status: string
transferSpec:
awsS3DataSource:
awsAccessKey:
accessKeyId:
value: string
valueFrom:
secretKeyRef:
key: string
name: string
secretAccessKey:
value: string
valueFrom:
secretKeyRef:
key: string
name: string
bucketName: string
path: string
roleArn: string
azureBlobStorageDataSource:
azureCredentials:
sasToken:
value: string
valueFrom:
secretKeyRef:
key: string
name: string
container: string
path: string
storageAccount: string
gcsDataSink:
bucketRef:
external: string
name: string
namespace: string
path: string
gcsDataSource:
bucketRef:
external: string
name: string
namespace: string
path: string
httpDataSource:
listUrl: string
objectConditions:
excludePrefixes:
- string
includePrefixes:
- string
lastModifiedBefore: string
lastModifiedSince: string
maxTimeElapsedSinceLastModification: string
minTimeElapsedSinceLastModification: string
posixDataSink:
rootDirectory: string
posixDataSource:
rootDirectory: string
sinkAgentPoolName: string
sourceAgentPoolName: string
transferOptions:
deleteObjectsFromSourceAfterTransfer: boolean
deleteObjectsUniqueInSink: boolean
overwriteObjectsAlreadyExistingInSink: boolean
overwriteWhen: string
Fields | |
---|---|
Required |
Unique description to identify the Transfer Job. |
Optional |
Notification configuration. |
Optional |
Event types for which a notification is desired. If empty, send notifications for all event types. The valid types are "TRANSFER_OPERATION_SUCCESS", "TRANSFER_OPERATION_FAILED", "TRANSFER_OPERATION_ABORTED". |
Optional |
|
Required* |
The desired format of the notification message payloads. One of "NONE" or "JSON". |
Required* |
The PubSubTopic to which to publish notifications. |
Optional |
Allowed value: string of the format `projects/{{project}}/topics/{{value}}`, where {{value}} is the `name` field of a `PubSubTopic` resource. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Immutable. Optional. The service-generated name of the resource. Used for acquisition only. Leave unset to create a new resource. |
Optional |
Schedule specification defining when the Transfer Job should be scheduled to start, end and what time to run. |
Optional |
Interval between the start of each scheduled transfer. If unspecified, the default value is 24 hours. This value may not be less than 1 hour. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
Optional |
The last day the recurring transfer will be run. If schedule_end_date is the same as schedule_start_date, the transfer will be executed only once. |
Required* |
Day of month. Must be from 1 to 31 and valid for the year and month. |
Required* |
Month of year. Must be from 1 to 12. |
Required* |
Year of date. Must be from 1 to 9999. |
Required* |
The first day the recurring transfer is scheduled to run. If schedule_start_date is in the past, the transfer will run for the first time on the following day. |
Required* |
Day of month. Must be from 1 to 31 and valid for the year and month. |
Required* |
Month of year. Must be from 1 to 12. |
Required* |
Year of date. Must be from 1 to 9999. |
Optional |
The time in UTC at which the transfer will be scheduled to start in a day. Transfers may start later than this time. If not specified, recurring and one-time transfers that are scheduled to run today will run immediately; recurring transfers that are scheduled to run on a future date will start at approximately midnight UTC on that date. Note that when configuring a transfer with the Cloud Platform Console, the transfer's start time in a day is specified in your local timezone. |
Required* |
Hours of day in 24 hour format. Should be from 0 to 23. |
Required* |
Minutes of hour of day. Must be from 0 to 59. |
Required* |
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
Required* |
Seconds of minutes of the time. Must normally be from 0 to 59. |
Optional |
Status of the job. Default: ENABLED. 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. |
Required |
Transfer specification. |
Optional |
An AWS S3 data source. |
Optional |
AWS credentials block. |
Required* |
AWS Key ID. |
Optional |
Value of the field. Cannot be used if 'valueFrom' is specified. |
Optional |
Source for the field's value. Cannot be used if 'value' is specified. |
Optional |
Reference to a value with the given key in the given Secret in the resource's namespace. |
Required* |
Key that identifies the value to be extracted. |
Required* |
Name of the Secret to extract a value from. |
Required* |
AWS Secret Access Key. |
Optional |
Value of the field. Cannot be used if 'valueFrom' is specified. |
Optional |
Source for the field's value. Cannot be used if 'value' is specified. |
Optional |
Reference to a value with the given key in the given Secret in the resource's namespace. |
Required* |
Key that identifies the value to be extracted. |
Required* |
Name of the Secret to extract a value from. |
Required* |
S3 Bucket name. |
Optional |
S3 Bucket path in bucket to transfer. |
Optional |
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. |
Optional |
An Azure Blob Storage data source. |
Required* |
Credentials used to authenticate API requests to Azure. |
Required* |
Azure shared access signature. |
Optional |
Value of the field. Cannot be used if 'valueFrom' is specified. |
Optional |
Source for the field's value. Cannot be used if 'value' is specified. |
Optional |
Reference to a value with the given key in the given Secret in the resource's namespace. |
Required* |
Key that identifies the value to be extracted. |
Required* |
Name of the Secret to extract a value from. |
Required* |
The container to transfer from the Azure Storage account. |
Optional |
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 '/'. |
Required* |
The name of the Azure Storage account. |
Optional |
A Google Cloud Storage data sink. |
Required* |
|
Optional |
Allowed value: The `name` field of a `StorageBucket` resource. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Google Cloud Storage path in bucket to transfer. |
Optional |
A Google Cloud Storage data source. |
Required* |
|
Optional |
Allowed value: The `name` field of a `StorageBucket` resource. |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Google Cloud Storage path in bucket to transfer. |
Optional |
A HTTP URL data source. |
Required* |
The URL that points to the file that stores the object list entries. This file must allow public access. Currently, only URLs with HTTP and HTTPS schemes are supported. |
Optional |
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. |
Optional |
exclude_prefixes must follow the requirements described for include_prefixes. |
Optional |
|
Optional |
If include_refixes 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. |
Optional |
|
Optional |
If specified, only objects with a "last modification time" before this timestamp and objects that don't have a "last modification time" are transferred. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". |
Optional |
If specified, only objects with a "last modification time" on or after this timestamp and objects that don't have a "last modification time" are transferred. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". |
Optional |
A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
Optional |
A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
Optional |
A POSIX filesystem data sink. |
Required* |
Root directory path to the filesystem. |
Optional |
A POSIX filesystem data source. |
Required* |
Root directory path to the filesystem. |
Optional |
Immutable. Specifies the agent pool name associated with the posix data source. When unspecified, the default name is used. |
Optional |
Immutable. Specifies the agent pool name associated with the posix data source. When unspecified, the default name is used. |
Optional |
Characteristics of how to treat files from datasource and sink during job. If the option delete_objects_unique_in_sink is true, object conditions based on objects' last_modification_time are ignored and do not exclude objects in a data source or a data sink. |
Optional |
Whether objects should be deleted from the source after they are transferred to the sink. Note that this option and delete_objects_unique_in_sink are mutually exclusive. |
Optional |
Whether objects that exist only in the sink should be deleted. Note that this option and delete_objects_from_source_after_transfer are mutually exclusive. |
Optional |
Whether overwriting objects that already exist in the sink is allowed. |
Optional |
When to overwrite objects that already exist in the sink. If not set, overwrite behavior is determined by overwriteObjectsAlreadyExistingInSink. |
* Field is required when parent field is specified
Status
Schema
conditions:
- lastTransitionTime: string
message: string
reason: string
status: string
type: string
creationTime: string
deletionTime: string
lastModificationTime: string
name: string
observedGeneration: integer
Fields | |
---|---|
conditions |
Conditions represent the latest available observation of the resource's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
creationTime |
When the Transfer Job was created. |
deletionTime |
When the Transfer Job was deleted. |
lastModificationTime |
When the Transfer Job was last modified. |
name |
The name of the Transfer Job. |
observedGeneration |
ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. |
Sample YAML(s)
Typical Use Case
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: storagetransfer.cnrm.cloud.google.com/v1beta1
kind: StorageTransferJob
metadata:
name: storagetransferjob-sample
spec:
description: "Sample storage transfer job"
schedule:
startTimeOfDay:
seconds: 0
hours: 0
minutes: 0
nanos: 0
scheduleEndDate:
day: 31
month: 12
year: 9999
scheduleStartDate:
day: 28
month: 1
year: 2020
status: ENABLED
transferSpec:
gcsDataSink:
bucketRef:
name: ${PROJECT_ID?}-storagetransferjob-dep1
gcsDataSource:
bucketRef:
name: ${PROJECT_ID?}-storagetransferjob-dep2
objectConditions:
maxTimeElapsedSinceLastModification: 5s
minTimeElapsedSinceLastModification: 2s
transferOptions:
deleteObjectsUniqueInSink: false
overwriteObjectsAlreadyExistingInSink: true
---
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicyMember
metadata:
name: storagetransferjob-dep1
spec:
# replace ${PROJECT_NUMBER?} with your project number
member: serviceAccount:project-${PROJECT_NUMBER?}@storage-transfer-service.iam.gserviceaccount.com
role: roles/storage.admin
resourceRef:
kind: StorageBucket
name: ${PROJECT_ID?}-storagetransferjob-dep1
---
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMPolicyMember
metadata:
name: storagetransferjob-dep2
spec:
# replace ${PROJECT_NUMBER?} with your project number
member: serviceAccount:project-${PROJECT_NUMBER?}@storage-transfer-service.iam.gserviceaccount.com
role: roles/storage.admin
resourceRef:
kind: StorageBucket
name: ${PROJECT_ID?}-storagetransferjob-dep2
---
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
metadata:
# StorageBucket names must be globally unique. Replace ${PROJECT_ID?} with your project ID.
name: ${PROJECT_ID?}-storagetransferjob-dep1
---
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
metadata:
# StorageBucket names must be globally unique. Replace ${PROJECT_ID?} with your project ID.
name: ${PROJECT_ID?}-storagetransferjob-dep2