Project Args
data class ProjectArgs(val comment: Output<String>? = null, val name: Output<String>? = null) : ConvertibleToJava<ProjectArgs>
The project is the basic unit of resource management in Datahub Service and is used to isolate and control resources. It contains a set of Topics. You can manage the datahub sources of an application by using projects. Refer to details.
NOTE: Available since v1.19.0. NOTE: Currently Datahub service only can be supported in the regions: cn-beijing, cn-hangzhou, cn-shanghai, cn-shenzhen, ap-southeast-1.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf_example";
const example = new alicloud.datahub.Project("example", {
name: name,
comment: "created by terraform",
});
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf_example"
example = alicloud.datahub.Project("example",
name=name,
comment="created by terraform")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf_example";
var example = new AliCloud.Datahub.Project("example", new()
{
Name = name,
Comment = "created by terraform",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/datahub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf_example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := datahub.NewProject(ctx, "example", &datahub.ProjectArgs{
Name: pulumi.String(name),
Comment: pulumi.String("created by terraform"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.datahub.Project;
import com.pulumi.alicloud.datahub.ProjectArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf_example");
var example = new Project("example", ProjectArgs.builder()
.name(name)
.comment("created by terraform")
.build());
}
}
Content copied to clipboard
configuration:
name:
type: string
default: tf_example
resources:
example:
type: alicloud:datahub:Project
properties:
name: ${name}
comment: created by terraform
Content copied to clipboard
Import
Datahub project can be imported using the name or ID, e.g.
$ pulumi import alicloud:datahub/project:Project example tf_datahub_project
Content copied to clipboard