PutGCSObject

Description:

Writes the contents of a FlowFile as an object in a Google Cloud Storage.

Tags:

google, google cloud, gcs, archive, put

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
GCP Credentials Provider ServiceGCP Credentials Provider ServiceController Service API:
GCPCredentialsService
Implementation: GCPCredentialsControllerService
The Controller Service used to obtain Google Cloud Platform credentials.
Project IDgcp-project-idGoogle Cloud Project ID
Supports Expression Language: true (will be evaluated using Environment variables only)
Bucketgcs-bucket${gcs.bucket}Bucket of the object.
Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
Keygcs-key${filename}Name of the object.
Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
Resource Transfer SourceResource Transfer SourceFlowFile Content
  • FlowFile Content The content of the incoming FlowFile provides the source for transfer
  • File Resource Service The File Resource Service provides the source for transfer
The source of the content to be transferred
File Resource ServiceFile Resource ServiceController Service API:
FileResourceService
Implementations: AzureBlobStorageFileResourceService
S3FileResourceService
GCSFileResourceService
AzureDataLakeStorageFileResourceService
StandardFileResourceService
File Resource Service providing access to the local resource to be transferred

This Property is only considered if the [Resource Transfer Source] Property has a value of "File Resource Service".
Content Typegcs-content-type${mime.type}Content Type for the file, i.e. text/plain
Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
CRC32C Checksumgcs-object-crc32cCRC32C Checksum (encoded in Base64, big-Endian order) of the file for server-side validation.
Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
Object ACLgcs-object-acl
  • All Authenticated Users Gives the bucket or object owner OWNER permission, and gives all authenticated Google account holders READER and WRITER permissions. All other permissions are removed.
  • Authenticated Read Gives the bucket or object owner OWNER permission, and gives all authenticated Google account holders READER permission. All other permissions are removed.
  • Bucket Owner Full Control Gives the object and bucket owners OWNER permission. All other permissions are removed.
  • Bucket Owner Read Only Gives the object owner OWNER permission, and gives the bucket owner READER permission. All other permissions are removed.
  • Private Gives the bucket or object owner OWNER permission for a bucket or object, and removes all other access permissions.
  • Project Private Gives permission to the project team based on their roles. Anyone who is part of the team has READER permission. Project owners and project editors have OWNER permission. This is the default ACL for newly created buckets. This is also the default ACL for newly created objects unless the default object ACL for that bucket has been changed.
  • Public Read Only Gives the bucket or object owner OWNER permission, and gives all users, both authenticated and anonymous, READER permission. When you apply this to an object, anyone on the Internet can read the object without authenticating.
Access Control to be attached to the object uploaded. Not providing this will revert to bucket defaults.
Server Side Encryption Keygcs-server-side-encryption-keyAn AES256 Encryption Key (encoded in base64) for server-side encryption of the object.
Sensitive Property: true
Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)
Overwrite Objectgcs-overwrite-objecttrue
  • true
  • false
If false, the upload to GCS will succeed only if the object does not exist.
Content Disposition Typegcs-content-disposition-type
  • Inline Indicates that the object should be loaded and rendered within the browser.
  • Attachment Indicates that the object should be saved (using a Save As... dialog) rather than opened directly within the browser
Type of RFC-6266 Content Disposition to be attached to the object
GZIP Compression Enabledgzip.content.enabledtrue
  • true
  • false
Signals to the GCS Blob Writer whether GZIP compression during transfer is desired. False means do not gzip and can boost performance in many cases.
Storage API URLstorage-api-urlOverrides the default storage URL. Configuring an alternative Storage API URL also overrides the HTTP Host header on requests as described in the Google documentation for Private Service Connections.
Supports Expression Language: true (will be evaluated using Environment variables only)
Number of retriesgcp-retry-count6How many retry attempts should be made before routing to the failure relationship.
Proxy Configuration Serviceproxy-configuration-serviceController Service API:
ProxyConfigurationService
Implementation: StandardProxyConfigurationService
Specifies the Proxy Configuration Controller Service to proxy network requests. Supported proxies: HTTP + AuthN

Dynamic Properties:

Supports Sensitive Dynamic Properties: No

Dynamic Properties allow the user to specify both the name and value of a property.

NameValueDescription
The name of a User-Defined Metadata field to add to the GCS ObjectThe value of a User-Defined Metadata field to add to the GCS ObjectAllows user-defined metadata to be added to the GCS object as key/value pairs
Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables)

Relationships:

NameDescription
failureFlowFiles are routed to this relationship if the Google Cloud Storage operation fails.
successFlowFiles are routed to this relationship after a successful Google Cloud Storage operation.

Reads Attributes:

NameDescription
filenameUses the FlowFile's filename as the filename for the GCS object
mime.typeUses the FlowFile's MIME type as the content-type for the GCS object

Writes Attributes:

NameDescription
gcs.bucketBucket of the object.
gcs.keyName of the object.
gcs.sizeSize of the object.
gcs.cache.controlData cache control of the object.
gcs.component.countThe number of components which make up the object.
gcs.content.dispositionThe data content disposition of the object.
gcs.content.encodingThe content encoding of the object.
gcs.content.languageThe content language of the object.
mime.typeThe MIME/Content-Type of the object
gcs.crc32cThe CRC32C checksum of object's data, encoded in base64 in big-endian order.
gcs.create.timeThe creation time of the object (milliseconds)
gcs.update.timeThe last modification time of the object (milliseconds)
gcs.encryption.algorithmThe algorithm used to encrypt the object.
gcs.encryption.sha256The SHA256 hash of the key used to encrypt the object
gcs.etagThe HTTP 1.1 Entity tag for the object.
gcs.generated.idThe service-generated for the object
gcs.generationThe data generation of the object.
gcs.md5The MD5 hash of the object's data encoded in base64.
gcs.media.linkThe media download link to the object.
gcs.metagenerationThe metageneration of the object.
gcs.ownerThe owner (uploader) of the object.
gcs.owner.typeThe ACL entity type of the uploader of the object.
gcs.uriThe URI of the object as a string.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.

See Also:

FetchGCSObject, DeleteGCSObject, ListGCSBucket