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

tencentcloud.CssWatermarkRuleAttachment

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 watermark_rule

    Example Usage

    Binding watermark rule with a css stream

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleCssPullStreamTask = new tencentcloud.CssPullStreamTask("exampleCssPullStreamTask", {
        streamName: "tf_example_stream_name",
        sourceType: "PullLivePushLive",
        sourceUrls: ["rtmp://xxx.com/live/stream"],
        domainName: "test.domain.com",
        appName: "live",
        startTime: "2023-09-27T10:28:21Z",
        endTime: "2023-09-27T17:28:21Z",
        operator: "tf_admin",
        comment: "This is a e2e test case.",
    });
    const exampleCssWatermark = new tencentcloud.CssWatermark("exampleCssWatermark", {
        pictureUrl: "picture_url",
        watermarkName: "watermark_name",
        xPosition: 0,
        yPosition: 0,
        width: 0,
        height: 0,
    });
    const watermarkRuleAttachment = new tencentcloud.CssWatermarkRuleAttachment("watermarkRuleAttachment", {
        domainName: exampleCssPullStreamTask.domainName,
        appName: exampleCssPullStreamTask.appName,
        streamName: exampleCssPullStreamTask.streamName,
        templateId: exampleCssWatermark.cssWatermarkId,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example_css_pull_stream_task = tencentcloud.CssPullStreamTask("exampleCssPullStreamTask",
        stream_name="tf_example_stream_name",
        source_type="PullLivePushLive",
        source_urls=["rtmp://xxx.com/live/stream"],
        domain_name="test.domain.com",
        app_name="live",
        start_time="2023-09-27T10:28:21Z",
        end_time="2023-09-27T17:28:21Z",
        operator="tf_admin",
        comment="This is a e2e test case.")
    example_css_watermark = tencentcloud.CssWatermark("exampleCssWatermark",
        picture_url="picture_url",
        watermark_name="watermark_name",
        x_position=0,
        y_position=0,
        width=0,
        height=0)
    watermark_rule_attachment = tencentcloud.CssWatermarkRuleAttachment("watermarkRuleAttachment",
        domain_name=example_css_pull_stream_task.domain_name,
        app_name=example_css_pull_stream_task.app_name,
        stream_name=example_css_pull_stream_task.stream_name,
        template_id=example_css_watermark.css_watermark_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 {
    		exampleCssPullStreamTask, err := tencentcloud.NewCssPullStreamTask(ctx, "exampleCssPullStreamTask", &tencentcloud.CssPullStreamTaskArgs{
    			StreamName: pulumi.String("tf_example_stream_name"),
    			SourceType: pulumi.String("PullLivePushLive"),
    			SourceUrls: pulumi.StringArray{
    				pulumi.String("rtmp://xxx.com/live/stream"),
    			},
    			DomainName: pulumi.String("test.domain.com"),
    			AppName:    pulumi.String("live"),
    			StartTime:  pulumi.String("2023-09-27T10:28:21Z"),
    			EndTime:    pulumi.String("2023-09-27T17:28:21Z"),
    			Operator:   pulumi.String("tf_admin"),
    			Comment:    pulumi.String("This is a e2e test case."),
    		})
    		if err != nil {
    			return err
    		}
    		exampleCssWatermark, err := tencentcloud.NewCssWatermark(ctx, "exampleCssWatermark", &tencentcloud.CssWatermarkArgs{
    			PictureUrl:    pulumi.String("picture_url"),
    			WatermarkName: pulumi.String("watermark_name"),
    			XPosition:     pulumi.Float64(0),
    			YPosition:     pulumi.Float64(0),
    			Width:         pulumi.Float64(0),
    			Height:        pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewCssWatermarkRuleAttachment(ctx, "watermarkRuleAttachment", &tencentcloud.CssWatermarkRuleAttachmentArgs{
    			DomainName: exampleCssPullStreamTask.DomainName,
    			AppName:    exampleCssPullStreamTask.AppName,
    			StreamName: exampleCssPullStreamTask.StreamName,
    			TemplateId: exampleCssWatermark.CssWatermarkId,
    		})
    		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 exampleCssPullStreamTask = new Tencentcloud.CssPullStreamTask("exampleCssPullStreamTask", new()
        {
            StreamName = "tf_example_stream_name",
            SourceType = "PullLivePushLive",
            SourceUrls = new[]
            {
                "rtmp://xxx.com/live/stream",
            },
            DomainName = "test.domain.com",
            AppName = "live",
            StartTime = "2023-09-27T10:28:21Z",
            EndTime = "2023-09-27T17:28:21Z",
            Operator = "tf_admin",
            Comment = "This is a e2e test case.",
        });
    
        var exampleCssWatermark = new Tencentcloud.CssWatermark("exampleCssWatermark", new()
        {
            PictureUrl = "picture_url",
            WatermarkName = "watermark_name",
            XPosition = 0,
            YPosition = 0,
            Width = 0,
            Height = 0,
        });
    
        var watermarkRuleAttachment = new Tencentcloud.CssWatermarkRuleAttachment("watermarkRuleAttachment", new()
        {
            DomainName = exampleCssPullStreamTask.DomainName,
            AppName = exampleCssPullStreamTask.AppName,
            StreamName = exampleCssPullStreamTask.StreamName,
            TemplateId = exampleCssWatermark.CssWatermarkId,
        });
    
    });
    
    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.CssWatermark;
    import com.pulumi.tencentcloud.CssWatermarkArgs;
    import com.pulumi.tencentcloud.CssWatermarkRuleAttachment;
    import com.pulumi.tencentcloud.CssWatermarkRuleAttachmentArgs;
    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 exampleCssPullStreamTask = new CssPullStreamTask("exampleCssPullStreamTask", CssPullStreamTaskArgs.builder()
                .streamName("tf_example_stream_name")
                .sourceType("PullLivePushLive")
                .sourceUrls("rtmp://xxx.com/live/stream")
                .domainName("test.domain.com")
                .appName("live")
                .startTime("2023-09-27T10:28:21Z")
                .endTime("2023-09-27T17:28:21Z")
                .operator("tf_admin")
                .comment("This is a e2e test case.")
                .build());
    
            var exampleCssWatermark = new CssWatermark("exampleCssWatermark", CssWatermarkArgs.builder()
                .pictureUrl("picture_url")
                .watermarkName("watermark_name")
                .xPosition(0)
                .yPosition(0)
                .width(0)
                .height(0)
                .build());
    
            var watermarkRuleAttachment = new CssWatermarkRuleAttachment("watermarkRuleAttachment", CssWatermarkRuleAttachmentArgs.builder()
                .domainName(exampleCssPullStreamTask.domainName())
                .appName(exampleCssPullStreamTask.appName())
                .streamName(exampleCssPullStreamTask.streamName())
                .templateId(exampleCssWatermark.cssWatermarkId())
                .build());
    
        }
    }
    
    resources:
      exampleCssPullStreamTask:
        type: tencentcloud:CssPullStreamTask
        properties:
          streamName: tf_example_stream_name
          sourceType: PullLivePushLive
          sourceUrls:
            - rtmp://xxx.com/live/stream
          domainName: test.domain.com
          appName: live
          startTime: 2023-09-27T10:28:21Z
          endTime: 2023-09-27T17:28:21Z
          operator: tf_admin
          comment: This is a e2e test case.
      exampleCssWatermark:
        type: tencentcloud:CssWatermark
        properties:
          pictureUrl: picture_url
          watermarkName: watermark_name
          xPosition: 0
          yPosition: 0
          width: 0
          height: 0
      watermarkRuleAttachment:
        type: tencentcloud:CssWatermarkRuleAttachment
        properties:
          domainName: ${exampleCssPullStreamTask.domainName}
          appName: ${exampleCssPullStreamTask.appName}
          streamName: ${exampleCssPullStreamTask.streamName}
          templateId: ${exampleCssWatermark.cssWatermarkId}
    

    Create CssWatermarkRuleAttachment Resource

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

    Constructor syntax

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

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

    AppName string
    rule app name.
    DomainName string
    rule domain name.
    StreamName string
    rule stream name.
    TemplateId double
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    CssWatermarkRuleAttachmentId string
    ID of the resource.
    AppName string
    rule app name.
    DomainName string
    rule domain name.
    StreamName string
    rule stream name.
    TemplateId float64
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    CssWatermarkRuleAttachmentId string
    ID of the resource.
    appName String
    rule app name.
    domainName String
    rule domain name.
    streamName String
    rule stream name.
    templateId Double
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    cssWatermarkRuleAttachmentId String
    ID of the resource.
    appName string
    rule app name.
    domainName string
    rule domain name.
    streamName string
    rule stream name.
    templateId number
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    cssWatermarkRuleAttachmentId string
    ID of the resource.
    app_name str
    rule app name.
    domain_name str
    rule domain name.
    stream_name str
    rule stream name.
    template_id float
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    css_watermark_rule_attachment_id str
    ID of the resource.
    appName String
    rule app name.
    domainName String
    rule domain name.
    streamName String
    rule stream name.
    templateId Number
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    cssWatermarkRuleAttachmentId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CssWatermarkRuleAttachment 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 CssWatermarkRuleAttachment Resource

    Get an existing CssWatermarkRuleAttachment 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?: CssWatermarkRuleAttachmentState, opts?: CustomResourceOptions): CssWatermarkRuleAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_name: Optional[str] = None,
            create_time: Optional[str] = None,
            css_watermark_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) -> CssWatermarkRuleAttachment
    func GetCssWatermarkRuleAttachment(ctx *Context, name string, id IDInput, state *CssWatermarkRuleAttachmentState, opts ...ResourceOption) (*CssWatermarkRuleAttachment, error)
    public static CssWatermarkRuleAttachment Get(string name, Input<string> id, CssWatermarkRuleAttachmentState? state, CustomResourceOptions? opts = null)
    public static CssWatermarkRuleAttachment get(String name, Output<String> id, CssWatermarkRuleAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CssWatermarkRuleAttachment    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
    rule app name.
    CreateTime string
    create time.
    CssWatermarkRuleAttachmentId string
    ID of the resource.
    DomainName string
    rule domain name.
    StreamName string
    rule stream name.
    TemplateId double
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    UpdateTime string
    update time.
    AppName string
    rule app name.
    CreateTime string
    create time.
    CssWatermarkRuleAttachmentId string
    ID of the resource.
    DomainName string
    rule domain name.
    StreamName string
    rule stream name.
    TemplateId float64
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    UpdateTime string
    update time.
    appName String
    rule app name.
    createTime String
    create time.
    cssWatermarkRuleAttachmentId String
    ID of the resource.
    domainName String
    rule domain name.
    streamName String
    rule stream name.
    templateId Double
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    updateTime String
    update time.
    appName string
    rule app name.
    createTime string
    create time.
    cssWatermarkRuleAttachmentId string
    ID of the resource.
    domainName string
    rule domain name.
    streamName string
    rule stream name.
    templateId number
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    updateTime string
    update time.
    app_name str
    rule app name.
    create_time str
    create time.
    css_watermark_rule_attachment_id str
    ID of the resource.
    domain_name str
    rule domain name.
    stream_name str
    rule stream name.
    template_id float
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    update_time str
    update time.
    appName String
    rule app name.
    createTime String
    create time.
    cssWatermarkRuleAttachmentId String
    ID of the resource.
    domainName String
    rule domain name.
    streamName String
    rule stream name.
    templateId Number
    The template Id can be acquired by the Id of tencentcloud.CssWatermark.
    updateTime String
    update time.

    Import

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

    $ pulumi import tencentcloud:index/cssWatermarkRuleAttachment:CssWatermarkRuleAttachment watermark_rule domain_name#app_name#stream_name#template_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