get Agents
This data source provides the Chatbot Agents of the current Alibaba Cloud user.
NOTE: Available in v1.203.0+.
Example Usage
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 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 nameRegex = ChatbotFunctions.getAgents(GetAgentsArgs.builder()
.nameRegex("^my-Agent")
.build());
ctx.export("alicloudChatbotAgentsId1", nameRegex.applyValue(getAgentsResult -> getAgentsResult.agents()[0].id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getAgents.
Parameters
argument
A collection of arguments for invoking getAgents.
suspend fun getAgents(agentName: String? = null, nameRegex: String? = null, outputFile: String? = null, pageNumber: Int? = null, pageSize: Int? = null): GetAgentsResult
Return
A collection of values returned by getAgents.
See also
Parameters
agent Name
The name of the agent.
name Regex
A regex string to filter resulting chatbot agents by name.
output File
File name where to save data source results (after running pulumi preview
).
page Number
page Size
Return
A collection of values returned by getAgents.
See also
Parameters
argument
Builder for com.pulumi.alicloud.chatbot.kotlin.inputs.GetAgentsPlainArgs.