import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Cloud Assistant is a native automated operations tool developed by Volcano Engine. You can create jobs for immediate, periodic, or scheduled execution. After creation, the Cloud Assistant client automatically starts execution according to the execution mode. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcenginecc from "@volcengine/pulumi-volcenginecc"; * * const invocationDemo = new volcenginecc.ecs.Invocation("InvocationDemo", { * invocationName: "InvocationDemo", * invocationDescription: "InvocationDemo desc", * workingDir: "/home", * username: "InvocationDemo", * windowsPassword: "********", * timeout: 60, * instanceIds: ["i-ye2v6l0pvkqc6inxxxxx"], * repeatMode: "Rate", * frequency: "1h", * launchTime: "2025-08-30T11:10Z", * recurrenceEndTime: "2025-08-31T11:04Z", * projectName: "default", * tags: [{ * key: "env", * value: "test", * }], * commandId: "cmd-ye28kugp249tzrexxxxx", * parameters: "{\"dirname\":\"10\"}", * }); * ``` * * ## Import * * ```sh * $ pulumi import volcenginecc:ecs/invocation:Invocation example "invocation_id" * ``` */ export declare class Invocation extends pulumi.CustomResource { /** * Get an existing Invocation resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: InvocationState, opts?: pulumi.CustomResourceOptions): Invocation; /** * Returns true if the given object is an instance of Invocation. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Invocation; /** * Command content. */ readonly commandContent: pulumi.Output; /** * Description of the invoked command. */ readonly commandDescription: pulumi.Output; /** * Command ID. */ readonly commandId: pulumi.Output; /** * Command name when the task is triggered. */ readonly commandName: pulumi.Output; /** * Provider of the invoked command. */ readonly commandProvider: pulumi.Output; /** * Command type triggered by the job. */ readonly commandType: pulumi.Output; /** * Whether the invoked command uses custom parameters. true: enabled. false: not enabled. */ readonly enableParameter: pulumi.Output; /** * Task end time. */ readonly endTime: pulumi.Output; /** * Execution frequency. This parameter is required when RepeatMode=Rate. Format: \n\n\n\n. Interval units supported: minutes (5m–60m), hours (1h–24h), and days (1d–7d). The interval is based on a fixed frequency and is independent of the actual job execution time. After job creation, it executes once based on LaunchTime, and the next execution time is determined by the interval setting. */ readonly frequency: pulumi.Output; /** * Instance ID list, supports up to 200 IDs. */ readonly instanceIds: pulumi.Output; /** * Number of instances executed. */ readonly instanceNumber: pulumi.Output; /** * Job description. Defaults to an empty string and must not exceed 256 characters. */ readonly invocationDescription: pulumi.Output; /** * Task execution ID. */ readonly invocationId: pulumi.Output; /** * Job name. Maximum 64 characters. No restriction on special characters. Job names can be duplicated within the same region. */ readonly invocationName: pulumi.Output; readonly invocationResults: pulumi.Output; /** * Overall execution status of the command. */ readonly invocationStatus: pulumi.Output; /** * Execution time. */ readonly launchTime: pulumi.Output; readonly parameterDefinitions: pulumi.Output; /** * When the command includes custom parameters, use this parameter to pass custom parameter key-value pairs. The number of custom parameters ranges from 0 to 60. Key cannot be an empty string and supports up to 64 characters. Value can be an empty string. The combined length of custom parameters and original command content after Base64 encoding must not exceed 16 KB. The set of custom parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided. */ readonly parameters: pulumi.Output; /** * Project to which the resource belongs; each resource can belong to only one project. */ readonly projectName: pulumi.Output; /** * Cycle end time, applicable only to periodic tasks (Rate). */ readonly recurrenceEndTime: pulumi.Output; /** * Set the command execution mode. Once: Default, executes the command immediately. Rate: Executes the command periodically; specify the execution cycle using the Frequency parameter and Rate expression. Fixed: Executes the command at a scheduled time; specify the execution time using the LaunchTime parameter. */ readonly repeatMode: pulumi.Output; /** * Task start time. */ readonly startTime: pulumi.Output; readonly tags: pulumi.Output; /** * Maximum timeout for command execution in ECS instances, in seconds. Default: 60. Optional range: 30–86400. */ readonly timeout: pulumi.Output; /** * User name for executing the command in the ECS instance. */ readonly username: pulumi.Output; /** * Password for custom Windows user. */ readonly windowsPassword: pulumi.Output; /** * Directory where the created command runs in the ECS instance. */ readonly workingDir: pulumi.Output; /** * Create a Invocation resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: InvocationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Invocation resources. */ export interface InvocationState { /** * Command content. */ commandContent?: pulumi.Input; /** * Description of the invoked command. */ commandDescription?: pulumi.Input; /** * Command ID. */ commandId?: pulumi.Input; /** * Command name when the task is triggered. */ commandName?: pulumi.Input; /** * Provider of the invoked command. */ commandProvider?: pulumi.Input; /** * Command type triggered by the job. */ commandType?: pulumi.Input; /** * Whether the invoked command uses custom parameters. true: enabled. false: not enabled. */ enableParameter?: pulumi.Input; /** * Task end time. */ endTime?: pulumi.Input; /** * Execution frequency. This parameter is required when RepeatMode=Rate. Format: \n\n\n\n. Interval units supported: minutes (5m–60m), hours (1h–24h), and days (1d–7d). The interval is based on a fixed frequency and is independent of the actual job execution time. After job creation, it executes once based on LaunchTime, and the next execution time is determined by the interval setting. */ frequency?: pulumi.Input; /** * Instance ID list, supports up to 200 IDs. */ instanceIds?: pulumi.Input[]>; /** * Number of instances executed. */ instanceNumber?: pulumi.Input; /** * Job description. Defaults to an empty string and must not exceed 256 characters. */ invocationDescription?: pulumi.Input; /** * Task execution ID. */ invocationId?: pulumi.Input; /** * Job name. Maximum 64 characters. No restriction on special characters. Job names can be duplicated within the same region. */ invocationName?: pulumi.Input; invocationResults?: pulumi.Input[]>; /** * Overall execution status of the command. */ invocationStatus?: pulumi.Input; /** * Execution time. */ launchTime?: pulumi.Input; parameterDefinitions?: pulumi.Input[]>; /** * When the command includes custom parameters, use this parameter to pass custom parameter key-value pairs. The number of custom parameters ranges from 0 to 60. Key cannot be an empty string and supports up to 64 characters. Value can be an empty string. The combined length of custom parameters and original command content after Base64 encoding must not exceed 16 KB. The set of custom parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided. */ parameters?: pulumi.Input; /** * Project to which the resource belongs; each resource can belong to only one project. */ projectName?: pulumi.Input; /** * Cycle end time, applicable only to periodic tasks (Rate). */ recurrenceEndTime?: pulumi.Input; /** * Set the command execution mode. Once: Default, executes the command immediately. Rate: Executes the command periodically; specify the execution cycle using the Frequency parameter and Rate expression. Fixed: Executes the command at a scheduled time; specify the execution time using the LaunchTime parameter. */ repeatMode?: pulumi.Input; /** * Task start time. */ startTime?: pulumi.Input; tags?: pulumi.Input[]>; /** * Maximum timeout for command execution in ECS instances, in seconds. Default: 60. Optional range: 30–86400. */ timeout?: pulumi.Input; /** * User name for executing the command in the ECS instance. */ username?: pulumi.Input; /** * Password for custom Windows user. */ windowsPassword?: pulumi.Input; /** * Directory where the created command runs in the ECS instance. */ workingDir?: pulumi.Input; } /** * The set of arguments for constructing a Invocation resource. */ export interface InvocationArgs { /** * Command ID. */ commandId: pulumi.Input; /** * Execution frequency. This parameter is required when RepeatMode=Rate. Format: \n\n\n\n. Interval units supported: minutes (5m–60m), hours (1h–24h), and days (1d–7d). The interval is based on a fixed frequency and is independent of the actual job execution time. After job creation, it executes once based on LaunchTime, and the next execution time is determined by the interval setting. */ frequency?: pulumi.Input; /** * Instance ID list, supports up to 200 IDs. */ instanceIds: pulumi.Input[]>; /** * Job description. Defaults to an empty string and must not exceed 256 characters. */ invocationDescription?: pulumi.Input; /** * Job name. Maximum 64 characters. No restriction on special characters. Job names can be duplicated within the same region. */ invocationName: pulumi.Input; /** * Execution time. */ launchTime?: pulumi.Input; /** * When the command includes custom parameters, use this parameter to pass custom parameter key-value pairs. The number of custom parameters ranges from 0 to 60. Key cannot be an empty string and supports up to 64 characters. Value can be an empty string. The combined length of custom parameters and original command content after Base64 encoding must not exceed 16 KB. The set of custom parameter names must be a subset of the parameter set defined when creating the command. Default values are used for parameters not provided. */ parameters?: pulumi.Input; /** * Project to which the resource belongs; each resource can belong to only one project. */ projectName?: pulumi.Input; /** * Cycle end time, applicable only to periodic tasks (Rate). */ recurrenceEndTime?: pulumi.Input; /** * Set the command execution mode. Once: Default, executes the command immediately. Rate: Executes the command periodically; specify the execution cycle using the Frequency parameter and Rate expression. Fixed: Executes the command at a scheduled time; specify the execution time using the LaunchTime parameter. */ repeatMode?: pulumi.Input; tags?: pulumi.Input[]>; /** * Maximum timeout for command execution in ECS instances, in seconds. Default: 60. Optional range: 30–86400. */ timeout?: pulumi.Input; /** * User name for executing the command in the ECS instance. */ username?: pulumi.Input; /** * Password for custom Windows user. */ windowsPassword?: pulumi.Input; /** * Directory where the created command runs in the ECS instance. */ workingDir?: pulumi.Input; }