From 34808ad5ec81eb356e7c961ed15db6b2f8016e46 Mon Sep 17 00:00:00 2001 From: nickyinluo Date: Thu, 28 Sep 2023 14:13:33 +0800 Subject: [PATCH] adjust the uint64 to int64 since the mps sdk updating the type --- .changelog/2163.txt | 3 + tencentcloud/provider.go | 2 + ...mps_adaptive_dynamic_streaming_template.go | 12 +-- .../resource_tc_mps_transcode_template.go | 16 +-- ...ce_tc_mps_withdraws_watermark_operation.go | 70 +++++------- ..._mps_withdraws_watermark_operation_test.go | 18 ++-- tencentcloud/resource_tc_mps_workflow.go | 32 +++--- ...ithdraws_watermark_operation.html.markdown | 102 ++++++++++++++++++ website/tencentcloud.erb | 3 + 9 files changed, 170 insertions(+), 88 deletions(-) create mode 100644 .changelog/2163.txt create mode 100644 website/docs/r/mps_withdraws_watermark_operation.html.markdown diff --git a/.changelog/2163.txt b/.changelog/2163.txt new file mode 100644 index 0000000000..a0a71848a1 --- /dev/null +++ b/.changelog/2163.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +tencentcloud_mps_withdraws_watermark_operation +``` \ No newline at end of file diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index 409431964f..7721a80e3f 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -1567,6 +1567,7 @@ Media Processing Service(MPS) tencentcloud_mps_ai_analysis_template tencentcloud_mps_adaptive_dynamic_streaming_template tencentcloud_mps_person_sample + tencentcloud_mps_withdraws_watermark_operation Cloud HDFS(CHDFS) Data Source @@ -3029,6 +3030,7 @@ func Provider() *schema.Provider { "tencentcloud_mps_ai_analysis_template": resourceTencentCloudMpsAiAnalysisTemplate(), "tencentcloud_mps_adaptive_dynamic_streaming_template": resourceTencentCloudMpsAdaptiveDynamicStreamingTemplate(), "tencentcloud_mps_person_sample": resourceTencentCloudMpsPersonSample(), + "tencentcloud_mps_withdraws_watermark_operation": resourceTencentCloudMpsWithdrawsWatermarkOperation(), "tencentcloud_cbs_disk_backup": resourceTencentCloudCbsDiskBackup(), "tencentcloud_cbs_snapshot_share_permission": resourceTencentCloudCbsSnapshotSharePermission(), "tencentcloud_cbs_disk_backup_rollback_operation": resourceTencentCloudCbsDiskBackupRollbackOperation(), diff --git a/tencentcloud/resource_tc_mps_adaptive_dynamic_streaming_template.go b/tencentcloud/resource_tc_mps_adaptive_dynamic_streaming_template.go index b0ae2e7d7b..1ffbd040d4 100644 --- a/tencentcloud/resource_tc_mps_adaptive_dynamic_streaming_template.go +++ b/tencentcloud/resource_tc_mps_adaptive_dynamic_streaming_template.go @@ -254,10 +254,10 @@ func resourceTencentCloudMpsAdaptiveDynamicStreamingTemplateCreate(d *schema.Res videoTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := videoMap["fps"]; ok { - videoTemplateInfo.Fps = helper.IntUint64(v.(int)) + videoTemplateInfo.Fps = helper.IntInt64(v.(int)) } if v, ok := videoMap["bitrate"]; ok { - videoTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + videoTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := videoMap["resolution_adaptive"]; ok { videoTemplateInfo.ResolutionAdaptive = helper.String(v.(string)) @@ -285,7 +285,7 @@ func resourceTencentCloudMpsAdaptiveDynamicStreamingTemplateCreate(d *schema.Res audioTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := audioMap["bitrate"]; ok { - audioTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + audioTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := audioMap["sample_rate"]; ok { audioTemplateInfo.SampleRate = helper.IntUint64(v.(int)) @@ -511,10 +511,10 @@ func resourceTencentCloudMpsAdaptiveDynamicStreamingTemplateUpdate(d *schema.Res videoTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := videoMap["fps"]; ok { - videoTemplateInfo.Fps = helper.IntUint64(v.(int)) + videoTemplateInfo.Fps = helper.IntInt64(v.(int)) } if v, ok := videoMap["bitrate"]; ok { - videoTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + videoTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := videoMap["resolution_adaptive"]; ok { videoTemplateInfo.ResolutionAdaptive = helper.String(v.(string)) @@ -542,7 +542,7 @@ func resourceTencentCloudMpsAdaptiveDynamicStreamingTemplateUpdate(d *schema.Res audioTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := audioMap["bitrate"]; ok { - audioTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + audioTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := audioMap["sample_rate"]; ok { audioTemplateInfo.SampleRate = helper.IntUint64(v.(int)) diff --git a/tencentcloud/resource_tc_mps_transcode_template.go b/tencentcloud/resource_tc_mps_transcode_template.go index e065263982..3b0e49088b 100644 --- a/tencentcloud/resource_tc_mps_transcode_template.go +++ b/tencentcloud/resource_tc_mps_transcode_template.go @@ -485,10 +485,10 @@ func resourceTencentCloudMpsTranscodeTemplateCreate(d *schema.ResourceData, meta videoTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := dMap["fps"]; ok { - videoTemplateInfo.Fps = helper.IntUint64(v.(int)) + videoTemplateInfo.Fps = helper.IntInt64(v.(int)) } if v, ok := dMap["bitrate"]; ok { - videoTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + videoTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := dMap["resolution_adaptive"]; ok { videoTemplateInfo.ResolutionAdaptive = helper.String(v.(string)) @@ -517,7 +517,7 @@ func resourceTencentCloudMpsTranscodeTemplateCreate(d *schema.ResourceData, meta audioTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := dMap["bitrate"]; ok { - audioTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + audioTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := dMap["sample_rate"]; ok { audioTemplateInfo.SampleRate = helper.IntUint64(v.(int)) @@ -534,7 +534,7 @@ func resourceTencentCloudMpsTranscodeTemplateCreate(d *schema.ResourceData, meta tEHDConfig.Type = helper.String(v.(string)) } if v, ok := dMap["max_video_bitrate"]; ok { - tEHDConfig.MaxVideoBitrate = helper.IntUint64(v.(int)) + tEHDConfig.MaxVideoBitrate = helper.IntInt64(v.(int)) } request.TEHDConfig = &tEHDConfig } @@ -1025,10 +1025,10 @@ func resourceTencentCloudMpsTranscodeTemplateUpdate(d *schema.ResourceData, meta videoTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := dMap["fps"]; ok { - videoTemplateInfo.Fps = helper.IntUint64(v.(int)) + videoTemplateInfo.Fps = helper.IntInt64(v.(int)) } if v, ok := dMap["bitrate"]; ok { - videoTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + videoTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := dMap["resolution_adaptive"]; ok { videoTemplateInfo.ResolutionAdaptive = helper.String(v.(string)) @@ -1059,7 +1059,7 @@ func resourceTencentCloudMpsTranscodeTemplateUpdate(d *schema.ResourceData, meta audioTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := dMap["bitrate"]; ok { - audioTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + audioTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := dMap["sample_rate"]; ok { audioTemplateInfo.SampleRate = helper.IntUint64(v.(int)) @@ -1078,7 +1078,7 @@ func resourceTencentCloudMpsTranscodeTemplateUpdate(d *schema.ResourceData, meta tEHDConfig.Type = helper.String(v.(string)) } if v, ok := dMap["max_video_bitrate"]; ok { - tEHDConfig.MaxVideoBitrate = helper.IntUint64(v.(int)) + tEHDConfig.MaxVideoBitrate = helper.IntInt64(v.(int)) } request.TEHDConfig = &tEHDConfig } diff --git a/tencentcloud/resource_tc_mps_withdraws_watermark_operation.go b/tencentcloud/resource_tc_mps_withdraws_watermark_operation.go index d26c2ce3ee..23099710c9 100644 --- a/tencentcloud/resource_tc_mps_withdraws_watermark_operation.go +++ b/tencentcloud/resource_tc_mps_withdraws_watermark_operation.go @@ -3,54 +3,35 @@ Provides a resource to create a mps withdraws_watermark_operation Example Usage -```hcl -resource "tencentcloud_mps_withdraws_watermark_operation" "withdraws_watermark_operation" { - input_info { - type = "" - cos_input_info { - bucket = "" - region = "" - object = "" - } - url_input_info { - url = "" - } - s3_input_info { - s3_bucket = "" - s3_region = "" - s3_object = "" - s3_secret_id = "" - s3_secret_key = "" - } +Withdraw the watermark from COS - } - task_notify_config { - cmq_model = "" - cmq_region = "" - topic_name = "" - queue_name = "" - notify_mode = "" - notify_type = "" - notify_url = "" - aws_sqs { - sqs_region = "" - sqs_queue_name = "" - s3_secret_id = "" - s3_secret_key = "" - } +```hcl +resource "tencentcloud_cos_bucket" "example" { + bucket = "tf-test-mps-wm-${local.app_id}" + acl = "public-read" +} - } - session_context = "" +resource "tencentcloud_cos_bucket_object" "example" { + bucket = tencentcloud_cos_bucket.example.bucket + key = "/test-file/test.mov" + source = "/Users/luoyin/Downloads/file_example_MOV_480_700kB.mov" } -``` -Import -mps withdraws_watermark_operation can be imported using the id, e.g. +resource "tencentcloud_mps_withdraws_watermark_operation" "operation" { + input_info { + type = "COS" + cos_input_info { + bucket = tencentcloud_cos_bucket_object.example.bucket + region = "%s" + object = tencentcloud_cos_bucket_object.example.key + } + } + session_context = "this is a example session context" +} ``` -terraform import tencentcloud_mps_withdraws_watermark_operation.withdraws_watermark_operation withdraws_watermark_operation_id -``` + */ package tencentcloud @@ -68,9 +49,6 @@ func resourceTencentCloudMpsWithdrawsWatermarkOperation() *schema.Resource { Create: resourceTencentCloudMpsWithdrawsWatermarkOperationCreate, Read: resourceTencentCloudMpsWithdrawsWatermarkOperationRead, Delete: resourceTencentCloudMpsWithdrawsWatermarkOperationDelete, - Importer: &schema.ResourceImporter{ - State: schema.ImportStatePassthrough, - }, Schema: map[string]*schema.Schema{ "input_info": { Required: true, @@ -83,7 +61,7 @@ func resourceTencentCloudMpsWithdrawsWatermarkOperation() *schema.Resource { "type": { Type: schema.TypeString, Required: true, - Description: "The input type. Valid values:<li>`COS`: A COS bucket address.</li><li> `URL`: A URL.</li><li> `AWS-S3`: An AWS S3 bucket address. Currently, this type is only supported for transcoding tasks.</li>.", + Description: "The input type. Valid values: `COS`: A COS bucket address. `URL`: A URL. `AWS-S3`: An AWS S3 bucket address. Currently, this type is only supported for transcoding tasks..", }, "cos_input_info": { Type: schema.TypeList, @@ -200,7 +178,7 @@ func resourceTencentCloudMpsWithdrawsWatermarkOperation() *schema.Resource { "notify_type": { Type: schema.TypeString, Optional: true, - Description: "The notification type. Valid values: <li>`CMQ`: This value is no longer used. Please use `TDMQ-CMQ` instead.</li> <li>`TDMQ-CMQ`: Message queue</li> <li>`URL`: If `NotifyType` is set to `URL`, HTTP callbacks are sent to the URL specified by `NotifyUrl`. HTTP and JSON are used for the callbacks. The packet contains the response parameters of the `ParseNotification` API.</li> <li>`SCF`: This notification type is not recommended. You need to configure it in the SCF console.</li> <li>`AWS-SQS`: AWS queue. This type is only supported for AWS tasks, and the queue must be in the same region as the AWS bucket.</li> <font color=red>Note: If you do not pass this parameter or pass in an empty string, `CMQ` will be used. To use a different notification type, specify this parameter accordingly.</font>.", + Description: "The notification type. Valid values: `CMQ`: This value is no longer used. Please use `TDMQ-CMQ` instead. `TDMQ-CMQ`: Message queue `URL`: If `NotifyType` is set to `URL`, HTTP callbacks are sent to the URL specified by `NotifyUrl`. HTTP and JSON are used for the callbacks. The packet contains the response parameters of the `ParseNotification` API. `SCF`: This notification type is not recommended. You need to configure it in the SCF console. `AWS-SQS`: AWS queue. This type is only supported for AWS tasks, and the queue must be in the same region as the AWS bucket. Note: If you do not pass this parameter or pass in an empty string, `CMQ` will be used. To use a different notification type, specify this parameter accordingly.", }, "notify_url": { Type: schema.TypeString, diff --git a/tencentcloud/resource_tc_mps_withdraws_watermark_operation_test.go b/tencentcloud/resource_tc_mps_withdraws_watermark_operation_test.go index c626c5e844..7d300bcc96 100644 --- a/tencentcloud/resource_tc_mps_withdraws_watermark_operation_test.go +++ b/tencentcloud/resource_tc_mps_withdraws_watermark_operation_test.go @@ -2,7 +2,6 @@ package tencentcloud import ( "fmt" - "os" "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" @@ -17,23 +16,18 @@ func TestAccTencentCloudMpsWithdrawsWatermarkOperationResource_basic(t *testing. Providers: testAccProviders, Steps: []resource.TestStep{ { - Config: fmt.Sprintf(testAccMpsWithdrawsWatermarkOperation, os.Getenv(PROVIDER_REGION)), + Config: fmt.Sprintf(testAccMpsWithdrawsWatermarkOperation, defaultRegion), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet("tencentcloud_mps_withdraws_watermark_operation.operation", "id"), resource.TestCheckResourceAttrSet("tencentcloud_mps_withdraws_watermark_operation.operation", "input_info.#"), - resource.TestCheckResourceAttr("tencentcloud_mps_withdraws_watermark_operation.operation", "input_info.0.type", "cos"), + resource.TestCheckResourceAttr("tencentcloud_mps_withdraws_watermark_operation.operation", "input_info.0.type", "COS"), resource.TestCheckResourceAttrSet("tencentcloud_mps_withdraws_watermark_operation.operation", "input_info.0.cos_input_info.#"), resource.TestCheckResourceAttrSet("tencentcloud_mps_withdraws_watermark_operation.operation", "input_info.0.cos_input_info.0.bucket"), - resource.TestCheckResourceAttr("tencentcloud_mps_withdraws_watermark_operation.operation", "input_info.0.cos_input_info.0.region", os.Getenv(PROVIDER_REGION)), + resource.TestCheckResourceAttr("tencentcloud_mps_withdraws_watermark_operation.operation", "input_info.0.cos_input_info.0.region", defaultRegion), resource.TestCheckResourceAttr("tencentcloud_mps_withdraws_watermark_operation.operation", "input_info.0.cos_input_info.0.object", "/mps-test/test.mov"), resource.TestCheckResourceAttr("tencentcloud_mps_withdraws_watermark_operation.operation", "session_context", "this is a example session context"), ), }, - { - ResourceName: "tencentcloud_mps_withdraws_watermark_operation.operation", - ImportState: true, - ImportStateVerify: true, - }, }, }) } @@ -57,11 +51,11 @@ data "tencentcloud_cos_bucket_object" "object" { resource "tencentcloud_mps_withdraws_watermark_operation" "operation" { input_info { - type = "cos" + type = "COS" cos_input_info { - bucket = data.tencentcloud_cos_bucket_object.object.0.bucket + bucket = data.tencentcloud_cos_bucket_object.object.bucket region = "%s" - object = data.tencentcloud_cos_bucket_object.object.0.key + object = data.tencentcloud_cos_bucket_object.object.key } } // task_notify_config { diff --git a/tencentcloud/resource_tc_mps_workflow.go b/tencentcloud/resource_tc_mps_workflow.go index 80866a161f..9b1f51ffe1 100644 --- a/tencentcloud/resource_tc_mps_workflow.go +++ b/tencentcloud/resource_tc_mps_workflow.go @@ -1990,10 +1990,10 @@ func resourceTencentCloudMpsWorkflowCreate(d *schema.ResourceData, meta interfac videoTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := videoTemplateMap["fps"]; ok { - videoTemplateInfo.Fps = helper.IntUint64(v.(int)) + videoTemplateInfo.Fps = helper.IntInt64(v.(int)) } if v, ok := videoTemplateMap["bitrate"]; ok { - videoTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + videoTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := videoTemplateMap["resolution_adaptive"]; ok { videoTemplateInfo.ResolutionAdaptive = helper.String(v.(string)) @@ -2021,7 +2021,7 @@ func resourceTencentCloudMpsWorkflowCreate(d *schema.ResourceData, meta interfac audioTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := audioTemplateMap["bitrate"]; ok { - audioTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + audioTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := audioTemplateMap["sample_rate"]; ok { audioTemplateInfo.SampleRate = helper.IntUint64(v.(int)) @@ -2037,7 +2037,7 @@ func resourceTencentCloudMpsWorkflowCreate(d *schema.ResourceData, meta interfac tEHDConfig.Type = helper.String(v.(string)) } if v, ok := tEHDConfigMap["max_video_bitrate"]; ok { - tEHDConfig.MaxVideoBitrate = helper.IntUint64(v.(int)) + tEHDConfig.MaxVideoBitrate = helper.IntInt64(v.(int)) } rawTranscodeParameter.TEHDConfig = &tEHDConfig } @@ -2060,10 +2060,10 @@ func resourceTencentCloudMpsWorkflowCreate(d *schema.ResourceData, meta interfac videoTemplateInfoForUpdate.Codec = helper.String(v.(string)) } if v, ok := videoTemplateMap["fps"]; ok { - videoTemplateInfoForUpdate.Fps = helper.IntUint64(v.(int)) + videoTemplateInfoForUpdate.Fps = helper.IntInt64(v.(int)) } if v, ok := videoTemplateMap["bitrate"]; ok { - videoTemplateInfoForUpdate.Bitrate = helper.IntUint64(v.(int)) + videoTemplateInfoForUpdate.Bitrate = helper.IntInt64(v.(int)) } if v, ok := videoTemplateMap["resolution_adaptive"]; ok { videoTemplateInfoForUpdate.ResolutionAdaptive = helper.String(v.(string)) @@ -2094,7 +2094,7 @@ func resourceTencentCloudMpsWorkflowCreate(d *schema.ResourceData, meta interfac audioTemplateInfoForUpdate.Codec = helper.String(v.(string)) } if v, ok := audioTemplateMap["bitrate"]; ok { - audioTemplateInfoForUpdate.Bitrate = helper.IntUint64(v.(int)) + audioTemplateInfoForUpdate.Bitrate = helper.IntInt64(v.(int)) } if v, ok := audioTemplateMap["sample_rate"]; ok { audioTemplateInfoForUpdate.SampleRate = helper.IntUint64(v.(int)) @@ -2117,7 +2117,7 @@ func resourceTencentCloudMpsWorkflowCreate(d *schema.ResourceData, meta interfac tEHDConfigForUpdate.Type = helper.String(v.(string)) } if v, ok := tEHDConfigMap["max_video_bitrate"]; ok { - tEHDConfigForUpdate.MaxVideoBitrate = helper.IntUint64(v.(int)) + tEHDConfigForUpdate.MaxVideoBitrate = helper.IntInt64(v.(int)) } overrideTranscodeParameter.TEHDConfig = &tEHDConfigForUpdate } @@ -4365,10 +4365,10 @@ func resourceTencentCloudMpsWorkflowUpdate(d *schema.ResourceData, meta interfac videoTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := videoTemplateMap["fps"]; ok { - videoTemplateInfo.Fps = helper.IntUint64(v.(int)) + videoTemplateInfo.Fps = helper.IntInt64(v.(int)) } if v, ok := videoTemplateMap["bitrate"]; ok { - videoTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + videoTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := videoTemplateMap["resolution_adaptive"]; ok { videoTemplateInfo.ResolutionAdaptive = helper.String(v.(string)) @@ -4396,7 +4396,7 @@ func resourceTencentCloudMpsWorkflowUpdate(d *schema.ResourceData, meta interfac audioTemplateInfo.Codec = helper.String(v.(string)) } if v, ok := audioTemplateMap["bitrate"]; ok { - audioTemplateInfo.Bitrate = helper.IntUint64(v.(int)) + audioTemplateInfo.Bitrate = helper.IntInt64(v.(int)) } if v, ok := audioTemplateMap["sample_rate"]; ok { audioTemplateInfo.SampleRate = helper.IntUint64(v.(int)) @@ -4412,7 +4412,7 @@ func resourceTencentCloudMpsWorkflowUpdate(d *schema.ResourceData, meta interfac tEHDConfig.Type = helper.String(v.(string)) } if v, ok := tEHDConfigMap["max_video_bitrate"]; ok { - tEHDConfig.MaxVideoBitrate = helper.IntUint64(v.(int)) + tEHDConfig.MaxVideoBitrate = helper.IntInt64(v.(int)) } rawTranscodeParameter.TEHDConfig = &tEHDConfig } @@ -4435,10 +4435,10 @@ func resourceTencentCloudMpsWorkflowUpdate(d *schema.ResourceData, meta interfac videoTemplateInfoForUpdate.Codec = helper.String(v.(string)) } if v, ok := videoTemplateMap["fps"]; ok { - videoTemplateInfoForUpdate.Fps = helper.IntUint64(v.(int)) + videoTemplateInfoForUpdate.Fps = helper.IntInt64(v.(int)) } if v, ok := videoTemplateMap["bitrate"]; ok { - videoTemplateInfoForUpdate.Bitrate = helper.IntUint64(v.(int)) + videoTemplateInfoForUpdate.Bitrate = helper.IntInt64(v.(int)) } if v, ok := videoTemplateMap["resolution_adaptive"]; ok { videoTemplateInfoForUpdate.ResolutionAdaptive = helper.String(v.(string)) @@ -4469,7 +4469,7 @@ func resourceTencentCloudMpsWorkflowUpdate(d *schema.ResourceData, meta interfac audioTemplateInfoForUpdate.Codec = helper.String(v.(string)) } if v, ok := audioTemplateMap["bitrate"]; ok { - audioTemplateInfoForUpdate.Bitrate = helper.IntUint64(v.(int)) + audioTemplateInfoForUpdate.Bitrate = helper.IntInt64(v.(int)) } if v, ok := audioTemplateMap["sample_rate"]; ok { audioTemplateInfoForUpdate.SampleRate = helper.IntUint64(v.(int)) @@ -4492,7 +4492,7 @@ func resourceTencentCloudMpsWorkflowUpdate(d *schema.ResourceData, meta interfac tEHDConfigForUpdate.Type = helper.String(v.(string)) } if v, ok := tEHDConfigMap["max_video_bitrate"]; ok { - tEHDConfigForUpdate.MaxVideoBitrate = helper.IntUint64(v.(int)) + tEHDConfigForUpdate.MaxVideoBitrate = helper.IntInt64(v.(int)) } overrideTranscodeParameter.TEHDConfig = &tEHDConfigForUpdate } diff --git a/website/docs/r/mps_withdraws_watermark_operation.html.markdown b/website/docs/r/mps_withdraws_watermark_operation.html.markdown new file mode 100644 index 0000000000..588d0ba045 --- /dev/null +++ b/website/docs/r/mps_withdraws_watermark_operation.html.markdown @@ -0,0 +1,102 @@ +--- +subcategory: "Media Processing Service(MPS)" +layout: "tencentcloud" +page_title: "TencentCloud: tencentcloud_mps_withdraws_watermark_operation" +sidebar_current: "docs-tencentcloud-resource-mps_withdraws_watermark_operation" +description: |- + Provides a resource to create a mps withdraws_watermark_operation +--- + +# tencentcloud_mps_withdraws_watermark_operation + +Provides a resource to create a mps withdraws_watermark_operation + +## Example Usage + +### Withdraw the watermark from COS + +```hcl +resource "tencentcloud_cos_bucket" "example" { + bucket = "tf-test-mps-wm-${local.app_id}" + acl = "public-read" +} + +resource "tencentcloud_cos_bucket_object" "example" { + bucket = tencentcloud_cos_bucket.example.bucket + key = "/test-file/test.mov" + source = "/Users/luoyin/Downloads/file_example_MOV_480_700kB.mov" +} + +resource "tencentcloud_mps_withdraws_watermark_operation" "operation" { + input_info { + type = "COS" + cos_input_info { + bucket = tencentcloud_cos_bucket_object.example.bucket + region = "%s" + object = tencentcloud_cos_bucket_object.example.key + } + } + + session_context = "this is a example session context" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `input_info` - (Required, List, ForceNew) Input information of file for metadata getting. +* `session_context` - (Optional, String, ForceNew) The source context which is used to pass through the user request information. The task flow status change callback will return the value of this field. +* `task_notify_config` - (Optional, List, ForceNew) Event notification information of a task. If this parameter is left empty, no event notifications will be obtained. + +The `aws_sqs` object supports the following: + +* `sqs_queue_name` - (Required, String) The name of the SQS queue. +* `sqs_region` - (Required, String) The region of the SQS queue. +* `s3_secret_id` - (Optional, String) The key ID required to read from/write to the SQS queue. +* `s3_secret_key` - (Optional, String) The key required to read from/write to the SQS queue. + +The `cos_input_info` object supports the following: + +* `bucket` - (Required, String) The COS bucket of the object to process, such as `TopRankVideo-125xxx88`. +* `object` - (Required, String) The path of the object to process, such as `/movie/201907/WildAnimal.mov`. +* `region` - (Required, String) The region of the COS bucket, such as `ap-chongqing`. + +The `input_info` object supports the following: + +* `type` - (Required, String) The input type. Valid values: `COS`: A COS bucket address. `URL`: A URL. `AWS-S3`: An AWS S3 bucket address. Currently, this type is only supported for transcoding tasks.. +* `cos_input_info` - (Optional, List) The information of the COS object to process. This parameter is valid and required when `Type` is `COS`. +* `s3_input_info` - (Optional, List) The information of the AWS S3 object processed. This parameter is required if `Type` is `AWS-S3`.Note: This field may return null, indicating that no valid value can be obtained. +* `url_input_info` - (Optional, List) The URL of the object to process. This parameter is valid and required when `Type` is `URL`.Note: This field may return null, indicating that no valid value can be obtained. + +The `s3_input_info` object supports the following: + +* `s3_bucket` - (Required, String) The AWS S3 bucket. +* `s3_object` - (Required, String) The path of the AWS S3 object. +* `s3_region` - (Required, String) The region of the AWS S3 bucket. +* `s3_secret_id` - (Optional, String) The key ID required to access the AWS S3 object. +* `s3_secret_key` - (Optional, String) The key required to access the AWS S3 object. + +The `task_notify_config` object supports the following: + +* `aws_sqs` - (Optional, List) The AWS SQS queue. This parameter is required if `NotifyType` is `AWS-SQS`.Note: This field may return null, indicating that no valid values can be obtained. +* `cmq_model` - (Optional, String) The CMQ or TDMQ-CMQ model. Valid values: Queue, Topic. +* `cmq_region` - (Optional, String) The CMQ or TDMQ-CMQ region, such as `sh` (Shanghai) or `bj` (Beijing). +* `notify_mode` - (Optional, String) Workflow notification method. Valid values: Finish, Change. If this parameter is left empty, `Finish` will be used. +* `notify_type` - (Optional, String) The notification type. Valid values: `CMQ`: This value is no longer used. Please use `TDMQ-CMQ` instead. `TDMQ-CMQ`: Message queue `URL`: If `NotifyType` is set to `URL`, HTTP callbacks are sent to the URL specified by `NotifyUrl`. HTTP and JSON are used for the callbacks. The packet contains the response parameters of the `ParseNotification` API. `SCF`: This notification type is not recommended. You need to configure it in the SCF console. `AWS-SQS`: AWS queue. This type is only supported for AWS tasks, and the queue must be in the same region as the AWS bucket. Note: If you do not pass this parameter or pass in an empty string, `CMQ` will be used. To use a different notification type, specify this parameter accordingly. +* `notify_url` - (Optional, String) HTTP callback URL, required if `NotifyType` is set to `URL`. +* `queue_name` - (Optional, String) The CMQ or TDMQ-CMQ queue to receive notifications. This parameter is valid when `CmqModel` is `Queue`. +* `topic_name` - (Optional, String) The CMQ or TDMQ-CMQ topic to receive notifications. This parameter is valid when `CmqModel` is `Topic`. + +The `url_input_info` object supports the following: + +* `url` - (Required, String) URL of a video. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - ID of the resource. + + + diff --git a/website/tencentcloud.erb b/website/tencentcloud.erb index 8405112c74..bcbf490542 100644 --- a/website/tencentcloud.erb +++ b/website/tencentcloud.erb @@ -2035,6 +2035,9 @@
  • tencentcloud_mps_watermark_template
  • +
  • + tencentcloud_mps_withdraws_watermark_operation +
  • tencentcloud_mps_workflow