tencentcloud.CssWatermarkRuleAttachment
Explore with Pulumi AI
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:
- App
Name string - rule app name.
- Domain
Name string - rule domain name.
- Stream
Name string - rule stream name.
- Template
Id double - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - Css
Watermark stringRule Attachment Id - ID of the resource.
- App
Name string - rule app name.
- Domain
Name string - rule domain name.
- Stream
Name string - rule stream name.
- Template
Id float64 - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - Css
Watermark stringRule Attachment Id - ID of the resource.
- app
Name String - rule app name.
- domain
Name String - rule domain name.
- stream
Name String - rule stream name.
- template
Id Double - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - css
Watermark StringRule Attachment Id - ID of the resource.
- app
Name string - rule app name.
- domain
Name string - rule domain name.
- stream
Name string - rule stream name.
- template
Id number - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - css
Watermark stringRule Attachment Id - 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_ strrule_ attachment_ id - ID of the resource.
- app
Name String - rule app name.
- domain
Name String - rule domain name.
- stream
Name String - rule stream name.
- template
Id Number - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - css
Watermark StringRule Attachment Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the CssWatermarkRuleAttachment resource produces the following output properties:
- Create
Time string - create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string - update time.
- Create
Time string - create time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string - update time.
- create
Time String - create time.
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time String - update time.
- create
Time string - create time.
- id string
- The provider-assigned unique ID for this managed resource.
- update
Time string - update time.
- create_
time str - create time.
- id str
- The provider-assigned unique ID for this managed resource.
- update_
time str - update time.
- create
Time String - create time.
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time 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.
- App
Name string - rule app name.
- Create
Time string - create time.
- Css
Watermark stringRule Attachment Id - ID of the resource.
- Domain
Name string - rule domain name.
- Stream
Name string - rule stream name.
- Template
Id double - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - Update
Time string - update time.
- App
Name string - rule app name.
- Create
Time string - create time.
- Css
Watermark stringRule Attachment Id - ID of the resource.
- Domain
Name string - rule domain name.
- Stream
Name string - rule stream name.
- Template
Id float64 - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - Update
Time string - update time.
- app
Name String - rule app name.
- create
Time String - create time.
- css
Watermark StringRule Attachment Id - ID of the resource.
- domain
Name String - rule domain name.
- stream
Name String - rule stream name.
- template
Id Double - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - update
Time String - update time.
- app
Name string - rule app name.
- create
Time string - create time.
- css
Watermark stringRule Attachment Id - ID of the resource.
- domain
Name string - rule domain name.
- stream
Name string - rule stream name.
- template
Id number - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - update
Time string - update time.
- app_
name str - rule app name.
- create_
time str - create time.
- css_
watermark_ strrule_ attachment_ id - 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.
- app
Name String - rule app name.
- create
Time String - create time.
- css
Watermark StringRule Attachment Id - ID of the resource.
- domain
Name String - rule domain name.
- stream
Name String - rule stream name.
- template
Id Number - The template Id can be acquired by the Id of
tencentcloud.CssWatermark
. - update
Time 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.