PublishTaskArgs

data class PublishTaskArgs(val agentKey: Output<String>? = null, val bizType: Output<String>? = null, val dataIdLists: Output<List<String>>? = null) : ConvertibleToJava<PublishTaskArgs>

Provides a Chatbot Publish Task resource. For information about Chatbot Publish Task and how to use it, see What is Publish Task.

NOTE: Available since v1.203.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.chatbot.getAgents({});
const defaultPublishTask = new alicloud.chatbot.PublishTask("default", {
bizType: "faq",
agentKey: _default.then(_default => _default.agents?.[0]?.agentKey),
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.chatbot.get_agents()
default_publish_task = alicloud.chatbot.PublishTask("default",
biz_type="faq",
agent_key=default.agents[0].agent_key)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Chatbot.GetAgents.Invoke();
var defaultPublishTask = new AliCloud.Chatbot.PublishTask("default", new()
{
BizType = "faq",
AgentKey = @default.Apply(@default => @default.Apply(getAgentsResult => getAgentsResult.Agents[0]?.AgentKey)),
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/chatbot"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := chatbot.GetAgents(ctx, &chatbot.GetAgentsArgs{}, nil)
if err != nil {
return err
}
_, err = chatbot.NewPublishTask(ctx, "default", &chatbot.PublishTaskArgs{
BizType: pulumi.String("faq"),
AgentKey: pulumi.String(_default.Agents[0].AgentKey),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.chatbot.ChatbotFunctions;
import com.pulumi.alicloud.chatbot.inputs.GetAgentsArgs;
import com.pulumi.alicloud.chatbot.PublishTask;
import com.pulumi.alicloud.chatbot.PublishTaskArgs;
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) {
final var default = ChatbotFunctions.getAgents(GetAgentsArgs.builder()
.build());
var defaultPublishTask = new PublishTask("defaultPublishTask", PublishTaskArgs.builder()
.bizType("faq")
.agentKey(default_.agents()[0].agentKey())
.build());
}
}
resources:
defaultPublishTask:
type: alicloud:chatbot:PublishTask
name: default
properties:
bizType: faq
agentKey: ${default.agents[0].agentKey}
variables:
default:
fn::invoke:
function: alicloud:chatbot:getAgents
arguments: {}

Import

Chatbot Publish Task can be imported using the id, e.g.

$ pulumi import alicloud:chatbot/publishTask:PublishTask example <id>

Constructors

Link copied to clipboard
constructor(agentKey: Output<String>? = null, bizType: Output<String>? = null, dataIdLists: Output<List<String>>? = null)

Properties

Link copied to clipboard
val agentKey: Output<String>? = null

The business space key. If you do not set it, the default business space is accessed. The key value is obtained on the business management page of the primary account.

Link copied to clipboard
val bizType: Output<String>? = null

The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.

Link copied to clipboard
val dataIdLists: Output<List<String>>? = null

Additional release information. Currently supported: If the BizType is faq, enter the category Id in this field to indicate that only the knowledge under these categories is published.

Functions

Link copied to clipboard
open override fun toJava(): PublishTaskArgs