com.pulumi.cloudflare.kotlin.R2BucketArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-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.cloudflare.kotlin
import com.pulumi.cloudflare.R2BucketArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.R2Bucket("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "terraform-bucket",
* location: "enam",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.R2Bucket("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="terraform-bucket",
* location="enam")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.R2Bucket("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "terraform-bucket",
* Location = "enam",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.NewR2Bucket(ctx, "example", &cloudflare.R2BucketArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("terraform-bucket"),
* Location: pulumi.String("enam"),
* })
* 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.cloudflare.R2Bucket;
* import com.pulumi.cloudflare.R2BucketArgs;
* 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 example = new R2Bucket("example", R2BucketArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("terraform-bucket")
* .location("enam")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:R2Bucket
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: terraform-bucket
* location: enam
* ```
*
* > Available location values can be found in the [R2 documentation](https://developers.cloudflare.com/r2/reference/data-location/#available-hints).
* ## Import
* ```sh
* $ pulumi import cloudflare:index/r2Bucket:R2Bucket default /
* ```
* @property accountId The account identifier to target for the resource.
* @property location The location hint of the R2 bucket. Available values: `WNAM`, `ENAM`, `WEUR`, `EEUR`, `APAC`
* @property name The name of the R2 bucket.
*/
public data class R2BucketArgs(
public val accountId: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.R2BucketArgs =
com.pulumi.cloudflare.R2BucketArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [R2BucketArgs].
*/
@PulumiTagMarker
public class R2BucketArgsBuilder internal constructor() {
private var accountId: Output? = null
private var location: Output? = null
private var name: Output? = null
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("ndeigoxoikfqpjbo")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value The location hint of the R2 bucket. Available values: `WNAM`, `ENAM`, `WEUR`, `EEUR`, `APAC`
*/
@JvmName("lxjkdiswdspqfndh")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the R2 bucket.
*/
@JvmName("gecwkkdhmbcisxso")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("slhleeeriifxloak")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value The location hint of the R2 bucket. Available values: `WNAM`, `ENAM`, `WEUR`, `EEUR`, `APAC`
*/
@JvmName("yyoxkkmvchrtrujn")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the R2 bucket.
*/
@JvmName("byxxbolagxengfjq")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
internal fun build(): R2BucketArgs = R2BucketArgs(
accountId = accountId,
location = location,
name = name,
)
}