com.pulumi.gcp.firebase.kotlin.StorageBucketArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.firebase.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.firebase.StorageBucketArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* ## Example Usage
* ### Firebasestorage Bucket Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.storage.Bucket("default", {
* name: "test_bucket",
* location: "US",
* uniformBucketLevelAccess: true,
* });
* const defaultStorageBucket = new gcp.firebase.StorageBucket("default", {
* project: "my-project-name",
* bucketId: _default.id,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.storage.Bucket("default",
* name="test_bucket",
* location="US",
* uniform_bucket_level_access=True)
* default_storage_bucket = gcp.firebase.StorageBucket("default",
* project="my-project-name",
* bucket_id=default.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.Storage.Bucket("default", new()
* {
* Name = "test_bucket",
* Location = "US",
* UniformBucketLevelAccess = true,
* });
* var defaultStorageBucket = new Gcp.Firebase.StorageBucket("default", new()
* {
* Project = "my-project-name",
* BucketId = @default.Id,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := storage.NewBucket(ctx, "default", &storage.BucketArgs{
* Name: pulumi.String("test_bucket"),
* Location: pulumi.String("US"),
* UniformBucketLevelAccess: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = firebase.NewStorageBucket(ctx, "default", &firebase.StorageBucketArgs{
* Project: pulumi.String("my-project-name"),
* BucketId: _default.ID(),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.storage.Bucket;
* import com.pulumi.gcp.storage.BucketArgs;
* import com.pulumi.gcp.firebase.StorageBucket;
* import com.pulumi.gcp.firebase.StorageBucketArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var default_ = new Bucket("default", BucketArgs.builder()
* .name("test_bucket")
* .location("US")
* .uniformBucketLevelAccess(true)
* .build());
* var defaultStorageBucket = new StorageBucket("defaultStorageBucket", StorageBucketArgs.builder()
* .project("my-project-name")
* .bucketId(default_.id())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:storage:Bucket
* properties:
* name: test_bucket
* location: US
* uniformBucketLevelAccess: true
* defaultStorageBucket:
* type: gcp:firebase:StorageBucket
* name: default
* properties:
* project: my-project-name
* bucketId: ${default.id}
* ```
*
* ## Import
* Bucket can be imported using any of these accepted formats:
* * `projects/{{project}}/buckets/{{bucket_id}}`
* * `{{project}}/{{bucket_id}}`
* * `{{bucket_id}}`
* When using the `pulumi import` command, Bucket can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:firebase/storageBucket:StorageBucket default projects/{{project}}/buckets/{{bucket_id}}
* ```
* ```sh
* $ pulumi import gcp:firebase/storageBucket:StorageBucket default {{project}}/{{bucket_id}}
* ```
* ```sh
* $ pulumi import gcp:firebase/storageBucket:StorageBucket default {{bucket_id}}
* ```
* @property bucketId Required. Immutable. The ID of the underlying Google Cloud Storage bucket
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public data class StorageBucketArgs(
public val bucketId: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.firebase.StorageBucketArgs =
com.pulumi.gcp.firebase.StorageBucketArgs.builder()
.bucketId(bucketId?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [StorageBucketArgs].
*/
@PulumiTagMarker
public class StorageBucketArgsBuilder internal constructor() {
private var bucketId: Output? = null
private var project: Output? = null
/**
* @param value Required. Immutable. The ID of the underlying Google Cloud Storage bucket
*/
@JvmName("tiwjhsoomwphfmuj")
public suspend fun bucketId(`value`: Output) {
this.bucketId = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("wcawwayfndkrctsp")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Required. Immutable. The ID of the underlying Google Cloud Storage bucket
*/
@JvmName("umerlnpnuwwayrrr")
public suspend fun bucketId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.bucketId = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("fackmsvxegvnxgip")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): StorageBucketArgs = StorageBucketArgs(
bucketId = bucketId,
project = project,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy