alicloud.chatbot.PublishTask
Explore with Pulumi AI
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)
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
	})
}
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 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();
        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: {}
Create PublishTask Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PublishTask(name: string, args: PublishTaskArgs, opts?: CustomResourceOptions);@overload
def PublishTask(resource_name: str,
                args: PublishTaskArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def PublishTask(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                biz_type: Optional[str] = None,
                agent_key: Optional[str] = None,
                data_id_lists: Optional[Sequence[str]] = None)func NewPublishTask(ctx *Context, name string, args PublishTaskArgs, opts ...ResourceOption) (*PublishTask, error)public PublishTask(string name, PublishTaskArgs args, CustomResourceOptions? opts = null)
public PublishTask(String name, PublishTaskArgs args)
public PublishTask(String name, PublishTaskArgs args, CustomResourceOptions options)
type: alicloud:chatbot:PublishTask
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 PublishTaskArgs
- 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 PublishTaskArgs
- 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 PublishTaskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PublishTaskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PublishTaskArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var publishTaskResource = new AliCloud.Chatbot.PublishTask("publishTaskResource", new()
{
    BizType = "string",
    AgentKey = "string",
    DataIdLists = new[]
    {
        "string",
    },
});
example, err := chatbot.NewPublishTask(ctx, "publishTaskResource", &chatbot.PublishTaskArgs{
	BizType:  pulumi.String("string"),
	AgentKey: pulumi.String("string"),
	DataIdLists: pulumi.StringArray{
		pulumi.String("string"),
	},
})
var publishTaskResource = new PublishTask("publishTaskResource", PublishTaskArgs.builder()
    .bizType("string")
    .agentKey("string")
    .dataIdLists("string")
    .build());
publish_task_resource = alicloud.chatbot.PublishTask("publishTaskResource",
    biz_type="string",
    agent_key="string",
    data_id_lists=["string"])
const publishTaskResource = new alicloud.chatbot.PublishTask("publishTaskResource", {
    bizType: "string",
    agentKey: "string",
    dataIdLists: ["string"],
});
type: alicloud:chatbot:PublishTask
properties:
    agentKey: string
    bizType: string
    dataIdLists:
        - string
PublishTask 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 PublishTask resource accepts the following input properties:
- BizType string
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- AgentKey string
- 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.
- DataId List<string>Lists 
- 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.
- BizType string
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- AgentKey string
- 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.
- DataId []stringLists 
- 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.
- bizType String
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- agentKey String
- 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.
- dataId List<String>Lists 
- 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.
- bizType string
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- agentKey string
- 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.
- dataId string[]Lists 
- 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.
- biz_type str
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- agent_key str
- 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.
- data_id_ Sequence[str]lists 
- 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.
- bizType String
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- agentKey String
- 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.
- dataId List<String>Lists 
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the PublishTask resource produces the following output properties:
- CreateTime string
- UTC time of task creation
- Id string
- The provider-assigned unique ID for this managed resource.
- ModifyTime string
- UTC time for task modification
- Status string
- The status of the task.
- CreateTime string
- UTC time of task creation
- Id string
- The provider-assigned unique ID for this managed resource.
- ModifyTime string
- UTC time for task modification
- Status string
- The status of the task.
- createTime String
- UTC time of task creation
- id String
- The provider-assigned unique ID for this managed resource.
- modifyTime String
- UTC time for task modification
- status String
- The status of the task.
- createTime string
- UTC time of task creation
- id string
- The provider-assigned unique ID for this managed resource.
- modifyTime string
- UTC time for task modification
- status string
- The status of the task.
- create_time str
- UTC time of task creation
- id str
- The provider-assigned unique ID for this managed resource.
- modify_time str
- UTC time for task modification
- status str
- The status of the task.
- createTime String
- UTC time of task creation
- id String
- The provider-assigned unique ID for this managed resource.
- modifyTime String
- UTC time for task modification
- status String
- The status of the task.
Look up Existing PublishTask Resource
Get an existing PublishTask 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?: PublishTaskState, opts?: CustomResourceOptions): PublishTask@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        agent_key: Optional[str] = None,
        biz_type: Optional[str] = None,
        create_time: Optional[str] = None,
        data_id_lists: Optional[Sequence[str]] = None,
        modify_time: Optional[str] = None,
        status: Optional[str] = None) -> PublishTaskfunc GetPublishTask(ctx *Context, name string, id IDInput, state *PublishTaskState, opts ...ResourceOption) (*PublishTask, error)public static PublishTask Get(string name, Input<string> id, PublishTaskState? state, CustomResourceOptions? opts = null)public static PublishTask get(String name, Output<String> id, PublishTaskState state, CustomResourceOptions options)Resource lookup is not supported in YAML- 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.
- AgentKey string
- 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.
- BizType string
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- CreateTime string
- UTC time of task creation
- DataId List<string>Lists 
- 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.
- ModifyTime string
- UTC time for task modification
- Status string
- The status of the task.
- AgentKey string
- 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.
- BizType string
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- CreateTime string
- UTC time of task creation
- DataId []stringLists 
- 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.
- ModifyTime string
- UTC time for task modification
- Status string
- The status of the task.
- agentKey String
- 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.
- bizType String
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- createTime String
- UTC time of task creation
- dataId List<String>Lists 
- 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.
- modifyTime String
- UTC time for task modification
- status String
- The status of the task.
- agentKey string
- 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.
- bizType string
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- createTime string
- UTC time of task creation
- dataId string[]Lists 
- 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.
- modifyTime string
- UTC time for task modification
- status string
- The status of the task.
- agent_key str
- 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.
- biz_type str
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- create_time str
- UTC time of task creation
- data_id_ Sequence[str]lists 
- 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.
- modify_time str
- UTC time for task modification
- status str
- The status of the task.
- agentKey String
- 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.
- bizType String
- The type of the publishing unit. Please use the CreateInstancePublishTask API to publish the robot.
- createTime String
- UTC time of task creation
- dataId List<String>Lists 
- 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.
- modifyTime String
- UTC time for task modification
- status String
- The status of the task.
Import
Chatbot Publish Task can be imported using the id, e.g.
$ pulumi import alicloud:chatbot/publishTask:PublishTask example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.