Google Cloud Storage

Frends.GoogleCloudStorage.CreateBucket / 2.0.0

Summary

Creates a bucket with a chosen location and storage class, and can append a generated suffix to keep the globally unique name from colliding.

Typical use — provisioning per-run buckets, where the generated suffix removes the naming problem

Details

Frends version
5.7 and newer
Agent
Crossplatform
Target framework
net8.0

Input parameters.

Name Type Default Example Description
ProjectId String your - project - id your - project - id

Id of the project.

BucketName String your-unique-bucket-name your-unique-bucket-name

Name for the bucket. If left empty NewGuid() method is used to create the bucket name.

AddGuidToBucketName Boolean False true

When enabled the Task will add guid to the end of the bucket name with NewGuid() method. This will make sure that the bucket name is unique.

Location String us-west1 us-west1

Location

StorageClass StorageClassType STANDARD StorageClassType.STANDARD

Storage class for the bucket.

Possible values:

  • STANDARD: Standard storage is best for data that is frequently accessed ("hot" data) and/or stored for only brief periods of time.

  • NEARLINE: Nearline storage is a low-cost, highly durable storage service for storing infrequently accessed data.

  • COLDLINE: Coldline storage is a very-low-cost, highly durable storage service for storing infrequently accessed data.

  • ARCHIVE: Archive storage is the lowest-cost, highly durable storage service for data archiving, online backup, and disaster recovery.

CredentialsType CredentialType Json CredentialType.Json

Selects how Google credentials are provided.

Possible values:

  • Json: Credentials provided as JSON content.

  • FilePath: Credentials provided as a path to a JSON file.

CredentialJson String – { "type": "service_account", "project_id": "instant-test-stone-387712", "private_key_id": "17d0g1b5a6e255c0ed67ef7213j8466c336edc55", "private_key": "-----BEGIN PRIVATE KEY-----\jnejbUHBVudhcebuheuwhv....\n-----END PRIVATE KEY-----\n", "client_email": "cloudstorage-testuser@instant-stone-387712.iam.gserviceaccount.com", "client_id": "vjkornijvnerijvneri", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/cloudstorage-testuser%40instant-stone-387712.iam.gserviceaccount.com", "universe_domain": "googleapis.com" }

Google Credentials in JSON format.

CredentialFilePath String – C:\folder\google_credentials.json

Full path to the json file which has credentials for Google.

An unhandled error has occurred. Reload 🗙