1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CssLiveTranscodeRuleAttachment
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CssLiveTranscodeRuleAttachment

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a css live_transcode_rule_attachment

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const task = new tencentcloud.CssPullStreamTask("task", {
        sourceType: "%s",
        sourceUrls: ["%s"],
        domainName: "%s",
        appName: "%s",
        streamName: "%s",
        startTime: "%s",
        endTime: "%s",
        operator: "%s",
        comment: "This is a demo.",
    });
    const temp = new tencentcloud.CssLiveTranscodeTemplate("temp", {
        templateName: "xxx",
        acodec: "aac",
        videoBitrate: 100,
        vcodec: "origin",
        description: "This_is_a_tf_test_temp.",
        needVideo: 1,
        needAudio: 1,
    });
    const liveTranscodeRuleAttachment = new tencentcloud.CssLiveTranscodeRuleAttachment("liveTranscodeRuleAttachment", {
        domainName: task.domainName,
        appName: task.appName,
        streamName: task.streamName,
        templateId: temp.cssLiveTranscodeTemplateId,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    task = tencentcloud.CssPullStreamTask("task",
        source_type="%s",
        source_urls=["%s"],
        domain_name="%s",
        app_name="%s",
        stream_name="%s",
        start_time="%s",
        end_time="%s",
        operator="%s",
        comment="This is a demo.")
    temp = tencentcloud.CssLiveTranscodeTemplate("temp",
        template_name="xxx",
        acodec="aac",
        video_bitrate=100,
        vcodec="origin",
        description="This_is_a_tf_test_temp.",
        need_video=1,
        need_audio=1)
    live_transcode_rule_attachment = tencentcloud.CssLiveTranscodeRuleAttachment("liveTranscodeRuleAttachment",
        domain_name=task.domain_name,
        app_name=task.app_name,
        stream_name=task.stream_name,
        template_id=temp.css_live_transcode_template_id)
    
    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 {
    		task, err := tencentcloud.NewCssPullStreamTask(ctx, "task", &tencentcloud.CssPullStreamTaskArgs{
    			SourceType: pulumi.String("%s"),
    			SourceUrls: pulumi.StringArray{
    				pulumi.String("%s"),
    			},
    			DomainName: pulumi.String("%s"),
    			AppName:    pulumi.String("%s"),
    			StreamName: pulumi.String("%s"),
    			StartTime:  pulumi.String("%s"),
    			EndTime:    pulumi.String("%s"),
    			Operator:   pulumi.String("%s"),
    			Comment:    pulumi.String("This is a demo."),
    		})
    		if err != nil {
    			return err
    		}
    		temp, err := tencentcloud.NewCssLiveTranscodeTemplate(ctx, "temp", &tencentcloud.CssLiveTranscodeTemplateArgs{
    			TemplateName: pulumi.String("xxx"),
    			Acodec:       pulumi.String("aac"),
    			VideoBitrate: pulumi.Float64(100),
    			Vcodec:       pulumi.String("origin"),
    			Description:  pulumi.String("This_is_a_tf_test_temp."),
    			NeedVideo:    pulumi.Float64(1),
    			NeedAudio:    pulumi.Float64(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewCssLiveTranscodeRuleAttachment(ctx, "liveTranscodeRuleAttachment", &tencentcloud.CssLiveTranscodeRuleAttachmentArgs{
    			DomainName: task.DomainName,
    			AppName:    task.AppName,
    			StreamName: task.StreamName,
    			TemplateId: temp.CssLiveTranscodeTemplateId,
    		})
    		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 task = new Tencentcloud.CssPullStreamTask("task", new()
        {
            SourceType = "%s",
            SourceUrls = new[]
            {
                "%s",
            },
            DomainName = "%s",
            AppName = "%s",
            StreamName = "%s",
            StartTime = "%s",
            EndTime = "%s",
            Operator = "%s",
            Comment = "This is a demo.",
        });
    
        var temp = new Tencentcloud.CssLiveTranscodeTemplate("temp", new()
        {
            TemplateName = "xxx",
            Acodec = "aac",
            VideoBitrate = 100,
            Vcodec = "origin",
            Description = "This_is_a_tf_test_temp.",
            NeedVideo = 1,
            NeedAudio = 1,
        });
    
        var liveTranscodeRuleAttachment = new Tencentcloud.CssLiveTranscodeRuleAttachment("liveTranscodeRuleAttachment", new()
        {
            DomainName = task.DomainName,
            AppName = task.AppName,
            StreamName = task.StreamName,
            TemplateId = temp.CssLiveTranscodeTemplateId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CssPullStreamTask;
    import com.pulumi.tencentcloud.CssPullStreamTaskArgs;
    import com.pulumi.tencentcloud.CssLiveTranscodeTemplate;
    import com.pulumi.tencentcloud.CssLiveTranscodeTemplateArgs;
    import com.pulumi.tencentcloud.CssLiveTranscodeRuleAttachment;
    import com.pulumi.tencentcloud.CssLiveTranscodeRuleAttachmentArgs;
    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 task = new CssPullStreamTask("task", CssPullStreamTaskArgs.builder()
                .sourceType("%s")
                .sourceUrls("%s")
                .domainName("%s")
                .appName("%s")
                .streamName("%s")
                .startTime("%s")
                .endTime("%s")
                .operator("%s")
                .comment("This is a demo.")
                .build());
    
            var temp = new CssLiveTranscodeTemplate("temp", CssLiveTranscodeTemplateArgs.builder()
                .templateName("xxx")
                .acodec("aac")
                .videoBitrate(100)
                .vcodec("origin")
                .description("This_is_a_tf_test_temp.")
                .needVideo(1)
                .needAudio(1)
                .build());
    
            var liveTranscodeRuleAttachment = new CssLiveTranscodeRuleAttachment("liveTranscodeRuleAttachment", CssLiveTranscodeRuleAttachmentArgs.builder()
                .domainName(task.domainName())
                .appName(task.appName())
                .streamName(task.streamName())
                .templateId(temp.cssLiveTranscodeTemplateId())
                .build());
    
        }
    }
    
    resources:
      task:
        type: tencentcloud:CssPullStreamTask
        properties:
          sourceType: '%s'
          sourceUrls:
            - '%s'
          domainName: '%s'
          appName: '%s'
          streamName: '%s'
          startTime: '%s'
          endTime: '%s'
          operator: '%s'
          comment: This is a demo.
      temp:
        type: tencentcloud:CssLiveTranscodeTemplate
        properties:
          templateName: xxx
          acodec: aac
          videoBitrate: 100
          vcodec: origin
          description: This_is_a_tf_test_temp.
          needVideo: 1
          needAudio: 1
      liveTranscodeRuleAttachment:
        type: tencentcloud:CssLiveTranscodeRuleAttachment
        properties:
          domainName: ${task.domainName}
          appName: ${task.appName}
          streamName: ${task.streamName}
          templateId: ${temp.cssLiveTranscodeTemplateId}
    

    Create CssLiveTranscodeRuleAttachment Resource

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

    Constructor syntax

    new CssLiveTranscodeRuleAttachment(name: string, args: CssLiveTranscodeRuleAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def CssLiveTranscodeRuleAttachment(resource_name: str,
                                       args: CssLiveTranscodeRuleAttachmentArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CssLiveTranscodeRuleAttachment(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       app_name: Optional[str] = None,
                                       domain_name: Optional[str] = None,
                                       stream_name: Optional[str] = None,
                                       template_id: Optional[float] = None,
                                       css_live_transcode_rule_attachment_id: Optional[str] = None)
    func NewCssLiveTranscodeRuleAttachment(ctx *Context, name string, args CssLiveTranscodeRuleAttachmentArgs, opts ...ResourceOption) (*CssLiveTranscodeRuleAttachment, error)
    public CssLiveTranscodeRuleAttachment(string name, CssLiveTranscodeRuleAttachmentArgs args, CustomResourceOptions? opts = null)
    public CssLiveTranscodeRuleAttachment(String name, CssLiveTranscodeRuleAttachmentArgs args)
    public CssLiveTranscodeRuleAttachment(String name, CssLiveTranscodeRuleAttachmentArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CssLiveTranscodeRuleAttachment
    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 CssLiveTranscodeRuleAttachmentArgs
    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 CssLiveTranscodeRuleAttachmentArgs
    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 CssLiveTranscodeRuleAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CssLiveTranscodeRuleAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CssLiveTranscodeRuleAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    AppName string
    app name which you want to bind, can be empty string if not binding specific app name.
    DomainName string
    domain name hich you want to bind the transcode template.
    StreamName string
    stream name which you want to bind, can be empty string if not binding specific stream.
    TemplateId double
    template created by css_live_transcode_template.
    CssLiveTranscodeRuleAttachmentId string
    ID of the resource.
    AppName string
    app name which you want to bind, can be empty string if not binding specific app name.
    DomainName string
    domain name hich you want to bind the transcode template.
    StreamName string
    stream name which you want to bind, can be empty string if not binding specific stream.
    TemplateId float64
    template created by css_live_transcode_template.
    CssLiveTranscodeRuleAttachmentId string
    ID of the resource.
    appName String
    app name which you want to bind, can be empty string if not binding specific app name.
    domainName String
    domain name hich you want to bind the transcode template.
    streamName String
    stream name which you want to bind, can be empty string if not binding specific stream.
    templateId Double
    template created by css_live_transcode_template.
    cssLiveTranscodeRuleAttachmentId String
    ID of the resource.
    appName string
    app name which you want to bind, can be empty string if not binding specific app name.
    domainName string
    domain name hich you want to bind the transcode template.
    streamName string
    stream name which you want to bind, can be empty string if not binding specific stream.
    templateId number
    template created by css_live_transcode_template.
    cssLiveTranscodeRuleAttachmentId string
    ID of the resource.
    app_name str
    app name which you want to bind, can be empty string if not binding specific app name.
    domain_name str
    domain name hich you want to bind the transcode template.
    stream_name str
    stream name which you want to bind, can be empty string if not binding specific stream.
    template_id float
    template created by css_live_transcode_template.
    css_live_transcode_rule_attachment_id str
    ID of the resource.
    appName String
    app name which you want to bind, can be empty string if not binding specific app name.
    domainName String
    domain name hich you want to bind the transcode template.
    streamName String
    stream name which you want to bind, can be empty string if not binding specific stream.
    templateId Number
    template created by css_live_transcode_template.
    cssLiveTranscodeRuleAttachmentId String
    ID of the resource.

    Outputs

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

    CreateTime string
    create time.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdateTime string
    update time.
    CreateTime string
    create time.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdateTime string
    update time.
    createTime String
    create time.
    id String
    The provider-assigned unique ID for this managed resource.
    updateTime String
    update time.
    createTime string
    create time.
    id string
    The provider-assigned unique ID for this managed resource.
    updateTime string
    update time.
    create_time str
    create time.
    id str
    The provider-assigned unique ID for this managed resource.
    update_time str
    update time.
    createTime String
    create time.
    id String
    The provider-assigned unique ID for this managed resource.
    updateTime String
    update time.

    Look up Existing CssLiveTranscodeRuleAttachment Resource

    Get an existing CssLiveTranscodeRuleAttachment 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?: CssLiveTranscodeRuleAttachmentState, opts?: CustomResourceOptions): CssLiveTranscodeRuleAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_name: Optional[str] = None,
            create_time: Optional[str] = None,
            css_live_transcode_rule_attachment_id: Optional[str] = None,
            domain_name: Optional[str] = None,
            stream_name: Optional[str] = None,
            template_id: Optional[float] = None,
            update_time: Optional[str] = None) -> CssLiveTranscodeRuleAttachment
    func GetCssLiveTranscodeRuleAttachment(ctx *Context, name string, id IDInput, state *CssLiveTranscodeRuleAttachmentState, opts ...ResourceOption) (*CssLiveTranscodeRuleAttachment, error)
    public static CssLiveTranscodeRuleAttachment Get(string name, Input<string> id, CssLiveTranscodeRuleAttachmentState? state, CustomResourceOptions? opts = null)
    public static CssLiveTranscodeRuleAttachment get(String name, Output<String> id, CssLiveTranscodeRuleAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CssLiveTranscodeRuleAttachment    get:      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:
    AppName string
    app name which you want to bind, can be empty string if not binding specific app name.
    CreateTime string
    create time.
    CssLiveTranscodeRuleAttachmentId string
    ID of the resource.
    DomainName string
    domain name hich you want to bind the transcode template.
    StreamName string
    stream name which you want to bind, can be empty string if not binding specific stream.
    TemplateId double
    template created by css_live_transcode_template.
    UpdateTime string
    update time.
    AppName string
    app name which you want to bind, can be empty string if not binding specific app name.
    CreateTime string
    create time.
    CssLiveTranscodeRuleAttachmentId string
    ID of the resource.
    DomainName string
    domain name hich you want to bind the transcode template.
    StreamName string
    stream name which you want to bind, can be empty string if not binding specific stream.
    TemplateId float64
    template created by css_live_transcode_template.
    UpdateTime string
    update time.
    appName String
    app name which you want to bind, can be empty string if not binding specific app name.
    createTime String
    create time.
    cssLiveTranscodeRuleAttachmentId String
    ID of the resource.
    domainName String
    domain name hich you want to bind the transcode template.
    streamName String
    stream name which you want to bind, can be empty string if not binding specific stream.
    templateId Double
    template created by css_live_transcode_template.
    updateTime String
    update time.
    appName string
    app name which you want to bind, can be empty string if not binding specific app name.
    createTime string
    create time.
    cssLiveTranscodeRuleAttachmentId string
    ID of the resource.
    domainName string
    domain name hich you want to bind the transcode template.
    streamName string
    stream name which you want to bind, can be empty string if not binding specific stream.
    templateId number
    template created by css_live_transcode_template.
    updateTime string
    update time.
    app_name str
    app name which you want to bind, can be empty string if not binding specific app name.
    create_time str
    create time.
    css_live_transcode_rule_attachment_id str
    ID of the resource.
    domain_name str
    domain name hich you want to bind the transcode template.
    stream_name str
    stream name which you want to bind, can be empty string if not binding specific stream.
    template_id float
    template created by css_live_transcode_template.
    update_time str
    update time.
    appName String
    app name which you want to bind, can be empty string if not binding specific app name.
    createTime String
    create time.
    cssLiveTranscodeRuleAttachmentId String
    ID of the resource.
    domainName String
    domain name hich you want to bind the transcode template.
    streamName String
    stream name which you want to bind, can be empty string if not binding specific stream.
    templateId Number
    template created by css_live_transcode_template.
    updateTime String
    update time.

    Import

    css live_transcode_rule_attachment can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/cssLiveTranscodeRuleAttachment:CssLiveTranscodeRuleAttachment live_transcode_rule_attachment liveTranscodeRuleAttachment_id
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack