1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dataworks
  5. Project
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.dataworks.Project

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a Data Works Project resource.

    For information about Data Works Project and how to use it, see What is Project.

    NOTE: Available since v1.229.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf_example";
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultProject = new alicloud.dataworks.Project("default", {
        projectName: `${name}_${_default.result}`,
        projectMode: 2,
        description: `${name}_${_default.result}`,
        displayName: `${name}_${_default.result}`,
        status: "0",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf_example"
    default = random.index.Integer("default",
        min=10000,
        max=99999)
    default_project = alicloud.dataworks.Project("default",
        project_name=f"{name}_{default['result']}",
        project_mode=2,
        description=f"{name}_{default['result']}",
        display_name=f"{name}_{default['result']}",
        status="0")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dataworks"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"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 := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dataworks.NewProject(ctx, "default", &dataworks.ProjectArgs{
    			ProjectName: pulumi.Sprintf("%v_%v", name, _default.Result),
    			ProjectMode: pulumi.Int(2),
    			Description: pulumi.Sprintf("%v_%v", name, _default.Result),
    			DisplayName: pulumi.Sprintf("%v_%v", name, _default.Result),
    			Status:      pulumi.String("0"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf_example";
        var @default = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultProject = new AliCloud.DataWorks.Project("default", new()
        {
            ProjectName = $"{name}_{@default.Result}",
            ProjectMode = 2,
            Description = $"{name}_{@default.Result}",
            DisplayName = $"{name}_{@default.Result}",
            Status = "0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.dataworks.Project;
    import com.pulumi.alicloud.dataworks.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 default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultProject = new Project("defaultProject", ProjectArgs.builder()
                .projectName(String.format("%s_%s", name,default_.result()))
                .projectMode("2")
                .description(String.format("%s_%s", name,default_.result()))
                .displayName(String.format("%s_%s", name,default_.result()))
                .status("0")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf_example
    resources:
      default:
        type: random:integer
        properties:
          min: 10000
          max: 99999
      defaultProject:
        type: alicloud:dataworks:Project
        name: default
        properties:
          projectName: ${name}_${default.result}
          projectMode: '2'
          description: ${name}_${default.result}
          displayName: ${name}_${default.result}
          status: '0'
    

    Create Project Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Project(name: string, args: ProjectArgs, opts?: CustomResourceOptions);
    @overload
    def Project(resource_name: str,
                args: ProjectArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Project(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                display_name: Optional[str] = None,
                project_name: Optional[str] = None,
                project_mode: Optional[int] = None,
                status: Optional[str] = None)
    func NewProject(ctx *Context, name string, args ProjectArgs, opts ...ResourceOption) (*Project, error)
    public Project(string name, ProjectArgs args, CustomResourceOptions? opts = null)
    public Project(String name, ProjectArgs args)
    public Project(String name, ProjectArgs args, CustomResourceOptions options)
    
    type: alicloud:dataworks:Project
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var alicloudProjectResource = new AliCloud.DataWorks.Project("alicloudProjectResource", new()
    {
        Description = "string",
        DisplayName = "string",
        ProjectName = "string",
        ProjectMode = 0,
        Status = "string",
    });
    
    example, err := dataworks.NewProject(ctx, "alicloudProjectResource", &dataworks.ProjectArgs{
    	Description: pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	ProjectName: pulumi.String("string"),
    	ProjectMode: pulumi.Int(0),
    	Status:      pulumi.String("string"),
    })
    
    var alicloudProjectResource = new Project("alicloudProjectResource", ProjectArgs.builder()
        .description("string")
        .displayName("string")
        .projectName("string")
        .projectMode(0)
        .status("string")
        .build());
    
    alicloud_project_resource = alicloud.dataworks.Project("alicloudProjectResource",
        description="string",
        display_name="string",
        project_name="string",
        project_mode=0,
        status="string")
    
    const alicloudProjectResource = new alicloud.dataworks.Project("alicloudProjectResource", {
        description: "string",
        displayName: "string",
        projectName: "string",
        projectMode: 0,
        status: "string",
    });
    
    type: alicloud:dataworks:Project
    properties:
        description: string
        displayName: string
        projectMode: 0
        projectName: string
        status: string
    

    Project Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Project resource accepts the following input properties:

    Description string
    Description of the workspace
    DisplayName string
    The display name of the workspace.
    ProjectName string
    Immutable Name of the workspace.
    ProjectMode int
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    Status string
    The status of the resource
    Description string
    Description of the workspace
    DisplayName string
    The display name of the workspace.
    ProjectName string
    Immutable Name of the workspace.
    ProjectMode int
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    Status string
    The status of the resource
    description String
    Description of the workspace
    displayName String
    The display name of the workspace.
    projectName String
    Immutable Name of the workspace.
    projectMode Integer
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    status String
    The status of the resource
    description string
    Description of the workspace
    displayName string
    The display name of the workspace.
    projectName string
    Immutable Name of the workspace.
    projectMode number
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    status string
    The status of the resource
    description str
    Description of the workspace
    display_name str
    The display name of the workspace.
    project_name str
    Immutable Name of the workspace.
    project_mode int
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    status str
    The status of the resource
    description String
    Description of the workspace
    displayName String
    The display name of the workspace.
    projectName String
    Immutable Name of the workspace.
    projectMode Number
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    status String
    The status of the resource

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:

    CreateTime string
    The creation time of the resource
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    The creation time of the resource
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    The creation time of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    The creation time of the resource
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    The creation time of the resource
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    The creation time of the resource
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Project Resource

    Get an existing Project resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ProjectState, opts?: CustomResourceOptions): Project
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            project_mode: Optional[int] = None,
            project_name: Optional[str] = None,
            status: Optional[str] = None) -> Project
    func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
    public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
    public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreateTime string
    The creation time of the resource
    Description string
    Description of the workspace
    DisplayName string
    The display name of the workspace.
    ProjectMode int
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    ProjectName string
    Immutable Name of the workspace.
    Status string
    The status of the resource
    CreateTime string
    The creation time of the resource
    Description string
    Description of the workspace
    DisplayName string
    The display name of the workspace.
    ProjectMode int
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    ProjectName string
    Immutable Name of the workspace.
    Status string
    The status of the resource
    createTime String
    The creation time of the resource
    description String
    Description of the workspace
    displayName String
    The display name of the workspace.
    projectMode Integer
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    projectName String
    Immutable Name of the workspace.
    status String
    The status of the resource
    createTime string
    The creation time of the resource
    description string
    Description of the workspace
    displayName string
    The display name of the workspace.
    projectMode number
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    projectName string
    Immutable Name of the workspace.
    status string
    The status of the resource
    create_time str
    The creation time of the resource
    description str
    Description of the workspace
    display_name str
    The display name of the workspace.
    project_mode int
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    project_name str
    Immutable Name of the workspace.
    status str
    The status of the resource
    createTime String
    The creation time of the resource
    description String
    Description of the workspace
    displayName String
    The display name of the workspace.
    projectMode Number
    The mode of the workspace, with the following values:

    • 2, indicates the simple workspace mode.
    • 3, indicating the standard workspace mode.
    projectName String
    Immutable Name of the workspace.
    status String
    The status of the resource

    Import

    Data Works Project can be imported using the id, e.g.

    $ pulumi import alicloud:dataworks/project:Project example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi