CreateBucket​Create​Bucket

yaml
type: "io.kestra.plugin.gcp.gcs.CreateBucket"

Create a bucket or update if it already exists.

Examples

Create a new bucket with some options

yaml
id: gcp_gcs_create_bucket
namespace: company.team

tasks:
  - id: create_bucket
    type: io.kestra.plugin.gcp.gcs.CreateBucket
    name: "my-bucket"
    versioningEnabled: true
    labels:
      my-label: my-value

Properties

name

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Bucket's unique name

acl

The bucket's access control configuration

cors

  • Type: array
  • SubType: Cors
  • Dynamic:
  • Required:

The bucket's Cross-Origin Resource Sharing (CORS) configuration

defaultAcl

The default access control configuration

The access control configuration to apply to bucket's blobs when no other configuration is specified. See About Access Control Lists

defaultEventBasedHold

  • Type: boolean
  • Dynamic:
  • Required:

The default event-based hold for this bucket

defaultKmsKeyName

  • Type: string
  • Dynamic:
  • Required:

The default Cloud KMS key name for this bucket

iamConfiguration

The Bucket's IAM Configuration

ifExists

  • Type: string
  • Dynamic:
  • Required:
  • Default: ERROR
  • Possible Values:
    • ERROR
    • UPDATE
    • SKIP

Policy to apply if a bucket already exists.

impersonatedServiceAccount

  • Type: string
  • Dynamic: ✔️
  • Required:

The GCP service account to impersonate.

indexPage

  • Type: string
  • Dynamic:
  • Required:

The bucket's website index page

Behaves as the bucket's directory index where missing blobs are treated as potential directories.

labels

  • Type: object
  • SubType: string
  • Dynamic: ✔️
  • Required:

The labels of this bucket

lifecycleRules

The bucket's lifecycle configuration

This configuration is expressed as a number of lifecycle rules, consisting of an action and a condition. See Object Lifecycle Management Only the age condition is supported. Only the delete and SetStorageClass actions are supported

location

  • Type: string
  • Dynamic: ✔️
  • Required:

The bucket's location

Data for blobs in the bucket resides in physical storage within this region. A list of supported values is available here.

logging

  • Type: Logging
  • Dynamic:
  • Required:

The bucket's logging configuration

This configuration defines the destination bucket and optional name prefix for the current bucket's logs.

notFoundPage

  • Type: string
  • Dynamic:
  • Required:

The custom object to return when a requested resource is not found

projectId

  • Type: string
  • Dynamic: ✔️
  • Required:

The GCP project ID.

requesterPays

  • Type: boolean
  • Dynamic:
  • Required:

Whether the requester pays or not.

Whether a user accessing the bucket or an object it contains should assume the transit costs related to the access.

retentionPeriod

  • Type: integer
  • Dynamic:
  • Required:

Retention period

If policy is not locked this value can be cleared, increased, and decreased. If policy is locked the retention period can only be increased.

scopes

  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:
  • Default: [ "https://www.googleapis.com/auth/cloud-platform" ]

The GCP scopes to be used.

serviceAccount

  • Type: string
  • Dynamic: ✔️
  • Required:

The GCP service account.

storageClass

  • Type: string
  • Dynamic:
  • Required:
  • Possible Values:
    • REGIONAL
    • MULTI_REGIONAL
    • NEARLINE
    • COLDLINE
    • STANDARD
    • ARCHIVE
    • DURABLE_REDUCED_AVAILABILITY

The bucket's storage class

This defines how blobs in the bucket are stored and determines the SLA and the cost of storage. A list of supported values is available here.

versioningEnabled

  • Type: boolean
  • Dynamic:
  • Required:

Whether versioning should be enabled for this bucket

When set to true, versioning is fully enabled.

Outputs

bucket

created

  • Type: boolean
  • Required:
  • Default: false

updated

  • Type: boolean
  • Required:
  • Default: false

Definitions

io.kestra.plugin.gcp.gcs.models.BucketLifecycleRule-Condition

  • age
    • Type: integer
    • Dynamic: ✔️
    • Required: ✔️

io.kestra.plugin.gcp.gcs.models.IamConfiguration

  • publicAccessPrevention
    • Type: string
    • Dynamic:
    • Required:
    • Possible Values:
      • ENFORCED
      • UNSPECIFIED
      • UNKNOWN
      • INHERITED
  • uniformBucketLevelAccessEnabled
    • Type: boolean
    • Dynamic:
    • Required:

io.kestra.plugin.gcp.gcs.models.Entity

  • value
    • Type: string
    • Dynamic: ✔️
    • Required: ✔️

com.google.cloud.storage.Cors-Origin

  • value
    • Type: string
    • Dynamic:
    • Required:

io.kestra.plugin.gcp.gcs.models.Cors

  • maxAgeSeconds
    • Type: integer
    • Dynamic:
    • Required:
  • methods
    • Type: array
    • SubType: string
    • Dynamic:
    • Required:
  • origins
    • Type: array
    • SubType: Cors-Origin
    • Dynamic:
    • Required:
  • responseHeaders
    • Type: array
    • SubType: string
    • Dynamic:
    • Required:

io.kestra.plugin.gcp.gcs.models.AccessControl

  • entity
    • Type: Entity
    • Dynamic: ✔️
    • Required: ✔️
  • role
    • Type: string
    • Dynamic: ✔️
    • Required: ✔️
    • Possible Values:
      • READER
      • WRITER
      • OWNER

io.kestra.plugin.gcp.gcs.models.BucketLifecycleRule

io.kestra.plugin.gcp.gcs.models.BucketLifecycleRule-Action

  • value
    • Type: string
    • Dynamic: ✔️
    • Required:

io.kestra.plugin.gcp.gcs.models.Logging

  • logBucket
    • Type: string
    • Dynamic:
    • Required:
  • logObjectPrefix
    • Type: string
    • Dynamic:
    • Required:

io.kestra.plugin.gcp.gcs.models.Bucket

  • indexPage
    • Type: string
    • Dynamic:
    • Required:
  • location
    • Type: string
    • Dynamic:
    • Required:
  • name
    • Type: string
    • Dynamic:
    • Required:
  • notFoundPage
    • Type: string
    • Dynamic:
    • Required:
  • uri
    • Type: string
    • Dynamic:
    • Required:
    • Format: uri