Additional Info
Requires Mule Enterprise License |
Yes |
Requires Entitlement |
No |
Mule Version |
3.8.0 or higher |
Configs
JSON Service Account
<google-cloud-storage:config-json-service-account>
Connection Management
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
name |
The name of this configuration. With this name can be later referenced. |
x |
||
jsonServiceAccountFileLocation |
The location of the JSON file for the Service Account authentication. This file will be first looked for in the classpath and then in the file system. |
x |
||
projectId |
The Id of the Project |
x |
Processors
Create acl
<google-cloud-storage:create-acl>
Create an ACL on a particular object(Blob, Bucket or Default) Access Control List Grant (ACL) read or write access to users for individual buckets or objects.
XML Sample
<google-cloud-storage:create-acl config-ref="Google-cloud-storage" itemId-ref="myItemId" acl-ref="#[flowVars.acl]" aclSelector="Blob" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
itemId |
The id of the object; BlobId if AclSelector is Blob, otherwise String containing bucket name. |
#[payload] |
|
|
acl |
Acl |
The ACL with the particular Role to be granted. Example: Acl.of(User.ofAllAuthenticatedUsers(), Role.OWNER); Valid Roles: OWNER, READER, WRITER |
x |
|
aclSelector |
The the type of object onto which the ACL is created. Valid values: Blob, Bucket, Default |
x |
Returns
Return Java Type | Description |
---|---|
Acl |
ACL of the Object containing the read/write access privileges |
Get acl
<google-cloud-storage:get-acl>
Get an ACL for a particular object(Blob, Bucket or Default) Access Control List (ACL) grant read or write access to users for individual buckets or objects.
XML Sample
<google-cloud-storage:get-acl config-ref="Google-cloud-storage" itemId-ref="myItemId" aclSelector="Bucket" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
itemId |
The id of the object; BlobId if AclSelector is Blob, otherwise String containing bucket name. |
#[payload] |
|
|
aclSelector |
The the type of object onto which the ACL is created. Valid values: Blob, Bucket, Default |
x |
Update acl
<google-cloud-storage:update-acl>
Update an ACL for a particular object(Blob, Bucket or Default) Access Control List (ACL) grant read or write access to users for individual buckets or objects.
XML Sample
<google-cloud-storage:update-acl config-ref="Google-cloud-storage" itemId-ref="myItemId" acl-ref="#[flowVars.acl]" aclSelector="Blob" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
itemId |
The id of the object; BlobId if AclSelector is Blob, otherwise String containing bucket name. |
#[payload] |
|
|
acl |
Acl |
The ACL with the particular Role to be granted. Example: Acl.of(User.ofAllAuthenticatedUsers(), Role.OWNER); Valid Roles: OWNER, READER, WRITER |
x |
|
aclSelector |
The the type of object onto which the ACL is created. Valid values: Blob, Bucket, Default |
x |
Returns
Return Java Type | Description |
---|---|
Acl |
ACL of the Object |
Delete acl
<google-cloud-storage:delete-acl>
Delete an ACL for a particular object(Blob, Bucket or Default) Access Control List Grant (ACL) read or write access to users for individual buckets or objects.
XML Sample
<google-cloud-storage:delete-acl config-ref="Google-cloud-storage" itemId-ref="myItemId" entity-ref="myEntity" aclSelector="Blob" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
itemId |
The id of the object; BlobId if AclSelector is Blob, otherwise String containing bucket name. |
#[payload] |
|
|
entity |
Entity |
The entity to be deleted |
x |
|
aclSelector |
The the type of object onto which the ACL is created. Valid values: Blob, Bucket, Default |
x |
Create bucket
<google-cloud-storage:create-bucket>
Creates a bucket on Google Cloud Storage
XML Sample
<google-cloud-storage:create-bucket config-ref="Google-cloud-storage" bucketInfo-ref="#[payload]" bucketTargetOptions-ref="#[flowVars.buketTargetOptions]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
bucketInfo |
BucketInfoPojo |
#[payload] |
|
|
bucketTargetOptions |
The bucket targeting options. |
|
Returns
Return Java Type | Description |
---|---|
Bucket |
The Bucket created. |
Delete bucket
<google-cloud-storage:delete-bucket>
Deletes a bucket on Google Cloud Storage
XML Sample
<google-cloud-storage:delete-bucket config-ref="Google-cloud-storage" bucketName="myBucket" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
bucketName |
The name of the bucket to be deleted. |
#[payload] |
|
|
bucketSourceOptions |
The bucket sourcing options for deleting buckets. Example: BucketSourceOption.metagenerationMatch(long metageneration) |
|
Get bucket
<google-cloud-storage:get-bucket>
Retrieves a Bucket from Google Cloud Storage
XML Sample
<google-cloud-storage:get-bucket config-ref="Google-cloud-storage" bucketName="myBucket" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
bucketName |
The name of the bucket |
#[payload] |
|
|
bucketGetOptions |
The blob get options. Example: BucketGetOption.metagenerationMatch(long metageneration) |
|
Returns
Return Java Type | Description |
---|---|
Bucket |
The bucket that matches the criteria within the parameters |
List buckets
<google-cloud-storage:list-buckets>
Lists Buckets available on Google Cloud Storage
XML Sample
<google-cloud-storage:list-buckets config-ref="Google-cloud-storage" bucketListOptions-ref="#[flowVars.myListOptions]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
bucketListOptions |
The bucket list options. Example: BucketListOption.pageSize(long pagesize) returns an option to specify the maximum number of buckets returned per page. |
|
Update bucket
<google-cloud-storage:update-bucket>
Updates a bucket on Google Cloud Storage
XML Sample
<google-cloud-storage:update-bucket config-ref="Google-cloud-storage" bucketInfo-ref="#[payload]" bucketTargetOptions-ref="#[flowVars.buketTargetOptions]/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
bucketInfo |
BucketInfoPojo |
#[payload] |
|
|
bucketTargetOptions |
The bucket target options. Example: BucketTargetOption.predefinedAcl(Acl acl) Returns an option for specifying bucket's predefined ACL configuration. |
|
Returns
Return Java Type | Description |
---|---|
Bucket |
The updated bucket |
Create blob
<google-cloud-storage:create-blob>
Creates a Blob in a Bucket on Google Cloud Storage
XML Sample
<google-cloud-storage:create-blob config-ref="Google-cloud-storage" blobInfo-ref="#[flowVars.blobInfo]" data-ref="#[payload]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
blobInfo |
BlobInfoPojo |
x |
||
blobTargetOption |
The blob target options. Example: BlobTargetOption.doesNotExist() returns an option that causes an operation to succeed only if the target blob does not exist. |
|
||
data |
the data to be stored to the blob |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
Blob |
The created blob |
Delete blob
<google-cloud-storage:delete-blob>
Deletes a Blob from a Bucket on Google Cloud Storage
XML Sample
<google-cloud-storage:delete-blob config-ref="Google-cloud-storage" blobId-ref="#[flowVars.myBlobId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
blobId |
BlobIdPojo |
#[payload] |
|
Get blob
<google-cloud-storage:get-blob>
Retrieves Blob information from Google Cloud Storage
XML Sample
<google-cloud-storage:get-blob config-ref="Google-cloud-storage" blodId-ref="#[payload]" blobGetOptions-ref="#[flowVars.myGetOptions]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
blobId |
BlobIdPojo |
#[payload] |
|
|
blobGetOptions |
The blob get options. Example: BlobGetOption.fields(BlobField... fields) returns an option to specify the blob's fields to be returned |
|
Returns
Return Java Type | Description |
---|---|
Blob |
The blob retrieved |
Sign blob
<google-cloud-storage:sign-blob>
Generates a signed URL for a blob. If you have a blob that you want to allow access to for a fixed amount of time, you can use this method to generate a URL that is only valid within a certain time period. This is particularly useful if you don't want publicly accessible blobs, but also don't want to require users to explicitly log in. Signing a URL requires a service account signer.
XML Sample
<google-cloud-storage:sign-blob config-ref="Google-cloud-storage" timeUnit="#[flowVars.timeUnit]" timeAmount="5" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
blob |
Blob |
the blob to be signed |
#[payload] |
|
timeUnit |
the time unit of the time amount |
x |
||
timeAmount |
the time amount |
x |
||
keyPath |
the path to the Key containing the service account info .json that will be used for signing the blob |
|
Relocate blob
<google-cloud-storage:relocate-blob>
Relocate a blob from one bucket to another or/and one path to another
XML Sample
<google-cloud-storage:relocate-blob config-ref="Google-cloud-storage" targetBucket="bucketName" targetBlob="blobName" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
blobId |
BlobIdPojo |
#[payload] |
|
|
targetBucket |
the name of the target bucket |
x |
||
targetBlob |
the name of the target blob |
x |
Returns
Return Java Type | Description |
---|---|
Blob |
The relocated blob |
Update blob
<google-cloud-storage:update-blob>
Update/add blob Metadata
XML Sample
<google-cloud-storage:update-blob config-ref="Google-cloud-storage">
<google-cloud-storage:update-data ref="#[flowVars.UpdateDataRef]"/>
</google-cloud-storage:update-blob>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
blob |
Blob |
The blob to be updated |
#[payload] |
|
updateData |
The metadata to be updated |
x |
Returns
Return Java Type | Description |
---|---|
Blob |
The updated blob |
List blobs
<google-cloud-storage:list-blobs>
List all blobs in a bucket
XML Sample
<google-cloud-storage:list-blobs config-ref="Google-cloud-storage" bucket-ref="#[payload]" blobListOptions-ref="#[flowVars.myListOptions]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
bucket |
The name of the bucket |
#[payload] |
|
|
blobListOptions |
The blob list options. Example: BlobListOption.pageSize(long pageSize) Returns an option to specify the maximum number of blobs returned per page. |
|
Download blob
<google-cloud-storage:download-blob>
Download a particular blob
XML Sample
<google-cloud-storage:download-blob config-ref="Google-cloud-storage" bucket="myBucket" blob="myBlob" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
bucket |
the name of the bucket which will be downloaded |
x |
||
blob |
the name of the blob which will be downloaded |
#[payload] |
|
|
options |
The blob source options. Example: BlobSourceOption.generationMatch() Returns an option for blob's data generation match. If this option is used the request will fail if blob's generation does not match. The generation value to compare with the actual blob's generation is taken from a source BlobId |
|
Open read channel
<google-cloud-storage:open-read-channel>
Open a read channel
XML Sample
<google-cloud-storage:open-read-channel config-ref="Google-cloud-storage" blobId-ref="#[payload]" blobSourceOption-ref="#[flowVars.blobSourceOptions]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
blobId |
BlobIdPojo |
#[payload] |
|
|
blobSourceOption |
The blob source option Example: BlobSourceOption.generationMatch() Returns an option for blob's data generation match. If this option is used the request will fail if blob's generation does not match. The generation value to compare with the actual blob's generation is taken from a source BlobId |
|
Returns
Return Java Type | Description |
---|---|
ReadChannel |
The created read channel |
Create read restorable state
<google-cloud-storage:create-read-restorable-state>
Create a restorable state for a read channel
XML Sample
<google-cloud-storage:create-read-restorable-state config-ref="Google-cloud-storage" readChannel-ref="#[flowVars.readChannel]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
readChannel |
ReadChannel |
The read channel for which the Restorable State will be created |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
RestorableState |
The created restorable state |
Read data from read channel
<google-cloud-storage:read-data-from-read-channel>
Read data from a Read Channel
XML Sample
<google-cloud-storage:read-data-from-read-channel config-ref="Google-cloud-storage" readChannel-ref="#[flowVars.readChannel]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
readChannel |
ReadChannel |
The read channel from which data would be read |
#[payload] |
|
Close read channel
<google-cloud-storage:close-read-channel>
Close a read channel
XML Sample
<google-cloud-storage:close-read-channel config-ref="Google-cloud-storage" readChannel-ref="#[flowVars.readChannel]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
readChannel |
ReadChannel |
The ReadChannel to be closed. |
#[payload] |
|
Restore read channel
<google-cloud-storage:restore-read-channel>
Restore a Read channel to a restorable state.
XML Sample
<google-cloud-storage:restore-read-channel config-ref="Google-cloud-storage" restorableState-ref="#[flowVars.restorableState]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
restorableState |
RestorableState |
The state into which to restore the read channel. |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
ReadChannel |
The restored ReadChannel |
Open write channel
<google-cloud-storage:open-write-channel>
Open a write channel
XML Sample
<google-cloud-storage:open-write-channel config-ref="Google-cloud-storage" blobInfo-ref="#[payload]" options-ref="#[flowVars.options]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
blobInfo |
BlobInfoPojo |
#[payload] |
|
|
options |
BlobWriteOptionWrapper BlobWriteOptionWrapper allows Anypoint Studio to use datasense for this BlobWriteOption. Example: new BlobWriteOptionWrapper(BlobWriteOption.doesNotExist()) returns an option that causes an operation to succeed only if the target blob does not exist. |
|
Returns
Return Java Type | Description |
---|---|
WriteChannel |
The created write channel |
Create write restorable state
<google-cloud-storage:create-write-restorable-state>
Create a Write Restorable state
XML Sample
<google-cloud-storage:create-write-restorable-state config-ref="Google-cloud-storage" writeChannel-ref="#[payload]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
writeChannel |
WriteChannel |
The write channel for which the restorable state should be created for. |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
RestorableState |
The restorable state that can later be used to restore the blob into. |
Write to channel
<google-cloud-storage:write-to-channel>
Write to a Write Channel
XML Sample
<google-cloud-storage:write-to-channel config-ref="Google-cloud-storage" writeChannel-ref="#[flowVars.writeChannel]" data-ref="#[payload]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
writeChannel |
WriteChannel |
The write channel that data will be written into. |
x |
|
data |
The data to be written as an InputStream. |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
int |
The number of bytes written |
Close write channel
<google-cloud-storage:close-write-channel>
Close a write channel
XML Sample
<google-cloud-storage:close-write-channel config-ref="Google-cloud-storage" writeChannel-ref="#[payload]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
writeChannel |
WriteChannel |
The write channel to be closed. |
#[payload] |
|
Restore write channel
<google-cloud-storage:restore-write-channel>
Restore a write channel to a restorable state
XML Sample
<google-cloud-storage:restore-write-channel config-ref="Google-cloud-storage" restorableState-ref="#[payload]" />
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
restorableState |
RestorableState |
The restorable state created before |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
WriteChannel |
The write channel restored to the restorable state |