# CreateBucket

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.GoogleCloudStorage/tree/main/Frends.GoogleCloudStorage.CreateBucket>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ProjectId : `String`              | <p>Id of the project.</p><p><br>Default: <code>your - project - id</code><br>Example: <code>your - project - id</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| BucketName : `String`             | <p>Name for the bucket. If left empty NewGuid() method is used to create the bucket name.</p><p><br>Default: <code>your-unique-bucket-name</code><br>Example: <code>your-unique-bucket-name</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| AddGuidToBucketName : `Boolean`   | <p>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.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Location : `String`               | <p>Location</p><p><br>Default: <code>us-west1</code><br>Example: <code>us-west1</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| StorageClass : `StorageClassType` | <p>Storage class for the bucket.</p><p>Possible values:</p><ul><li><code>STANDARD</code>:</li></ul><p>Storage class for the bucket.</p><ul><li><code>NEARLINE</code>:</li></ul><p>Storage class for the bucket.</p><ul><li><code>COLDLINE</code>:</li></ul><p>Storage class for the bucket.</p><ul><li><code>ARCHIVE</code>:</li></ul><p>Storage class for the bucket.</p><p><br>Default: <code>0</code><br>Example: <code>StorageClassType.STANDARD</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                         |
| CredentialJson : `String`         | <p>Google Credentials in JSON format.</p><p><br>Default: <code>-</code><br>Example: <code>{ "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" }</code></p> |
| CredentialFilePath : `String`     | <p>Full path to the json file which has credentials for Google.</p><p><br>Default: <code>-</code><br>Example: <code>C:\folder\google\_credentials.json</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| {% endtab %}                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

{% tab title="Result: Result" %}

| Name                               | Description                                                                         |
| ---------------------------------- | ----------------------------------------------------------------------------------- |
| Success : `Boolean`                | <p>Result of the operation.<br>Example: <code>true</code></p>                       |
| BucketName : `String`              | Bucket name of the newly created bucket.                                            |
| Location : `String`                | <p>Location of the bucket.<br>Example: <code>US-CENTRAL1</code></p>                 |
| StorageClass : `String`            | <p>Storage class of the bucket.<br>Example: <code>STARNDARD</code></p>              |
| TimeCreated : `Nullable<DateTime>` | <p>DateTime of the created bucket.<br>Example: <code>26/05/2023 15.47.51</code></p> |
| {% endtab %}                       |                                                                                     |

{% tab title="Changelog" %}

## Changelog

### \[1.0.0] - 2023-05-30

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
