1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. EmrBootScript
Viewing docs for tencentcloud 1.82.93
published on Monday, May 11, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.82.93
published on Monday, May 11, 2026 by tencentcloudstack

    Provide a resource to create an EMR boot script.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.EmrBootScript("example", {
        instanceId: "emr-qe336v2e",
        bootType: "resourceAfter",
        preExecutedFileSettings: [{
            path: "demo.py",
            bucket: "tf-1309115522",
            cosFileName: "demo",
            region: "ap-guangzhou",
        }],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.EmrBootScript("example",
        instance_id="emr-qe336v2e",
        boot_type="resourceAfter",
        pre_executed_file_settings=[{
            "path": "demo.py",
            "bucket": "tf-1309115522",
            "cos_file_name": "demo",
            "region": "ap-guangzhou",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewEmrBootScript(ctx, "example", &tencentcloud.EmrBootScriptArgs{
    			InstanceId: pulumi.String("emr-qe336v2e"),
    			BootType:   pulumi.String("resourceAfter"),
    			PreExecutedFileSettings: tencentcloud.EmrBootScriptPreExecutedFileSettingArray{
    				&tencentcloud.EmrBootScriptPreExecutedFileSettingArgs{
    					Path:        pulumi.String("demo.py"),
    					Bucket:      pulumi.String("tf-1309115522"),
    					CosFileName: pulumi.String("demo"),
    					Region:      pulumi.String("ap-guangzhou"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.EmrBootScript("example", new()
        {
            InstanceId = "emr-qe336v2e",
            BootType = "resourceAfter",
            PreExecutedFileSettings = new[]
            {
                new Tencentcloud.Inputs.EmrBootScriptPreExecutedFileSettingArgs
                {
                    Path = "demo.py",
                    Bucket = "tf-1309115522",
                    CosFileName = "demo",
                    Region = "ap-guangzhou",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.EmrBootScript;
    import com.pulumi.tencentcloud.EmrBootScriptArgs;
    import com.pulumi.tencentcloud.inputs.EmrBootScriptPreExecutedFileSettingArgs;
    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 EmrBootScript("example", EmrBootScriptArgs.builder()
                .instanceId("emr-qe336v2e")
                .bootType("resourceAfter")
                .preExecutedFileSettings(EmrBootScriptPreExecutedFileSettingArgs.builder()
                    .path("demo.py")
                    .bucket("tf-1309115522")
                    .cosFileName("demo")
                    .region("ap-guangzhou")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:EmrBootScript
        properties:
          instanceId: emr-qe336v2e
          bootType: resourceAfter
          preExecutedFileSettings:
            - path: demo.py
              bucket: tf-1309115522
              cosFileName: demo
              region: ap-guangzhou
    
    Example coming soon!
    

    Create EmrBootScript Resource

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

    Constructor syntax

    new EmrBootScript(name: string, args: EmrBootScriptArgs, opts?: CustomResourceOptions);
    @overload
    def EmrBootScript(resource_name: str,
                      args: EmrBootScriptArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def EmrBootScript(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      boot_type: Optional[str] = None,
                      instance_id: Optional[str] = None,
                      emr_boot_script_id: Optional[str] = None,
                      pre_executed_file_settings: Optional[Sequence[EmrBootScriptPreExecutedFileSettingArgs]] = None)
    func NewEmrBootScript(ctx *Context, name string, args EmrBootScriptArgs, opts ...ResourceOption) (*EmrBootScript, error)
    public EmrBootScript(string name, EmrBootScriptArgs args, CustomResourceOptions? opts = null)
    public EmrBootScript(String name, EmrBootScriptArgs args)
    public EmrBootScript(String name, EmrBootScriptArgs args, CustomResourceOptions options)
    
    type: tencentcloud:EmrBootScript
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_emrbootscript" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args EmrBootScriptArgs
    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 EmrBootScriptArgs
    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 EmrBootScriptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EmrBootScriptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EmrBootScriptArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    EmrBootScript 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 EmrBootScript resource accepts the following input properties:

    BootType string
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    InstanceId string
    EMR instance ID.
    EmrBootScriptId string
    ID of the resource.
    PreExecutedFileSettings List<EmrBootScriptPreExecutedFileSetting>
    List of pre-execution script settings.
    BootType string
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    InstanceId string
    EMR instance ID.
    EmrBootScriptId string
    ID of the resource.
    PreExecutedFileSettings []EmrBootScriptPreExecutedFileSettingArgs
    List of pre-execution script settings.
    boot_type string
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    instance_id string
    EMR instance ID.
    emr_boot_script_id string
    ID of the resource.
    pre_executed_file_settings list(object)
    List of pre-execution script settings.
    bootType String
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    instanceId String
    EMR instance ID.
    emrBootScriptId String
    ID of the resource.
    preExecutedFileSettings List<EmrBootScriptPreExecutedFileSetting>
    List of pre-execution script settings.
    bootType string
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    instanceId string
    EMR instance ID.
    emrBootScriptId string
    ID of the resource.
    preExecutedFileSettings EmrBootScriptPreExecutedFileSetting[]
    List of pre-execution script settings.
    boot_type str
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    instance_id str
    EMR instance ID.
    emr_boot_script_id str
    ID of the resource.
    pre_executed_file_settings Sequence[EmrBootScriptPreExecutedFileSettingArgs]
    List of pre-execution script settings.
    bootType String
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    instanceId String
    EMR instance ID.
    emrBootScriptId String
    ID of the resource.
    preExecutedFileSettings List<Property Map>
    List of pre-execution script settings.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EmrBootScript Resource

    Get an existing EmrBootScript 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?: EmrBootScriptState, opts?: CustomResourceOptions): EmrBootScript
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            boot_type: Optional[str] = None,
            emr_boot_script_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            pre_executed_file_settings: Optional[Sequence[EmrBootScriptPreExecutedFileSettingArgs]] = None) -> EmrBootScript
    func GetEmrBootScript(ctx *Context, name string, id IDInput, state *EmrBootScriptState, opts ...ResourceOption) (*EmrBootScript, error)
    public static EmrBootScript Get(string name, Input<string> id, EmrBootScriptState? state, CustomResourceOptions? opts = null)
    public static EmrBootScript get(String name, Output<String> id, EmrBootScriptState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:EmrBootScript    get:      id: ${id}
    import {
      to = tencentcloud_emrbootscript.example
      id = "${id}"
    }
    
    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:
    BootType string
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    EmrBootScriptId string
    ID of the resource.
    InstanceId string
    EMR instance ID.
    PreExecutedFileSettings List<EmrBootScriptPreExecutedFileSetting>
    List of pre-execution script settings.
    BootType string
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    EmrBootScriptId string
    ID of the resource.
    InstanceId string
    EMR instance ID.
    PreExecutedFileSettings []EmrBootScriptPreExecutedFileSettingArgs
    List of pre-execution script settings.
    boot_type string
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    emr_boot_script_id string
    ID of the resource.
    instance_id string
    EMR instance ID.
    pre_executed_file_settings list(object)
    List of pre-execution script settings.
    bootType String
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    emrBootScriptId String
    ID of the resource.
    instanceId String
    EMR instance ID.
    preExecutedFileSettings List<EmrBootScriptPreExecutedFileSetting>
    List of pre-execution script settings.
    bootType string
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    emrBootScriptId string
    ID of the resource.
    instanceId string
    EMR instance ID.
    preExecutedFileSettings EmrBootScriptPreExecutedFileSetting[]
    List of pre-execution script settings.
    boot_type str
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    emr_boot_script_id str
    ID of the resource.
    instance_id str
    EMR instance ID.
    pre_executed_file_settings Sequence[EmrBootScriptPreExecutedFileSettingArgs]
    List of pre-execution script settings.
    bootType String
    Boot type. Valid values: resourceAfter, clusterAfter, clusterBefore.
    emrBootScriptId String
    ID of the resource.
    instanceId String
    EMR instance ID.
    preExecutedFileSettings List<Property Map>
    List of pre-execution script settings.

    Supporting Types

    EmrBootScriptPreExecutedFileSetting, EmrBootScriptPreExecutedFileSettingArgs

    AppId string
    COS AppId.
    Args string
    Script execution parameters.
    Bucket string
    COS bucket name.
    CosFileName string
    Script file name.
    CosFileUri string
    Script COS address.
    CosSecretId string
    COS SecretId.
    CosSecretKey string
    COS SecretKey.
    Domain string
    COS domain data.
    Path string
    Script path on COS.
    Region string
    COS region name.
    Remark string
    Remark.
    RunOrder double
    Execution order.
    WhenRun string
    Execution timing. Valid values: resourceAfter, clusterAfter.
    AppId string
    COS AppId.
    Args string
    Script execution parameters.
    Bucket string
    COS bucket name.
    CosFileName string
    Script file name.
    CosFileUri string
    Script COS address.
    CosSecretId string
    COS SecretId.
    CosSecretKey string
    COS SecretKey.
    Domain string
    COS domain data.
    Path string
    Script path on COS.
    Region string
    COS region name.
    Remark string
    Remark.
    RunOrder float64
    Execution order.
    WhenRun string
    Execution timing. Valid values: resourceAfter, clusterAfter.
    app_id string
    COS AppId.
    args string
    Script execution parameters.
    bucket string
    COS bucket name.
    cos_file_name string
    Script file name.
    cos_file_uri string
    Script COS address.
    cos_secret_id string
    COS SecretId.
    cos_secret_key string
    COS SecretKey.
    domain string
    COS domain data.
    path string
    Script path on COS.
    region string
    COS region name.
    remark string
    Remark.
    run_order number
    Execution order.
    when_run string
    Execution timing. Valid values: resourceAfter, clusterAfter.
    appId String
    COS AppId.
    args String
    Script execution parameters.
    bucket String
    COS bucket name.
    cosFileName String
    Script file name.
    cosFileUri String
    Script COS address.
    cosSecretId String
    COS SecretId.
    cosSecretKey String
    COS SecretKey.
    domain String
    COS domain data.
    path String
    Script path on COS.
    region String
    COS region name.
    remark String
    Remark.
    runOrder Double
    Execution order.
    whenRun String
    Execution timing. Valid values: resourceAfter, clusterAfter.
    appId string
    COS AppId.
    args string
    Script execution parameters.
    bucket string
    COS bucket name.
    cosFileName string
    Script file name.
    cosFileUri string
    Script COS address.
    cosSecretId string
    COS SecretId.
    cosSecretKey string
    COS SecretKey.
    domain string
    COS domain data.
    path string
    Script path on COS.
    region string
    COS region name.
    remark string
    Remark.
    runOrder number
    Execution order.
    whenRun string
    Execution timing. Valid values: resourceAfter, clusterAfter.
    app_id str
    COS AppId.
    args str
    Script execution parameters.
    bucket str
    COS bucket name.
    cos_file_name str
    Script file name.
    cos_file_uri str
    Script COS address.
    cos_secret_id str
    COS SecretId.
    cos_secret_key str
    COS SecretKey.
    domain str
    COS domain data.
    path str
    Script path on COS.
    region str
    COS region name.
    remark str
    Remark.
    run_order float
    Execution order.
    when_run str
    Execution timing. Valid values: resourceAfter, clusterAfter.
    appId String
    COS AppId.
    args String
    Script execution parameters.
    bucket String
    COS bucket name.
    cosFileName String
    Script file name.
    cosFileUri String
    Script COS address.
    cosSecretId String
    COS SecretId.
    cosSecretKey String
    COS SecretKey.
    domain String
    COS domain data.
    path String
    Script path on COS.
    region String
    COS region name.
    remark String
    Remark.
    runOrder Number
    Execution order.
    whenRun String
    Execution timing. Valid values: resourceAfter, clusterAfter.

    Import

    EMR boot script can be imported using the id ({instance_id}#{boot_type}), e.g.

    $ pulumi import tencentcloud:index/emrBootScript:EmrBootScript example emr-qe336v2e#resourceAfter
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.82.93
    published on Monday, May 11, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.