AppGroupArgs

data class AppGroupArgs(val appName: Output<String>? = null, val appType: Output<Int>? = null, val appVersion: Output<String>? = null, val deleteJobs: Output<Boolean>? = null, val description: Output<String>? = null, val enableLog: Output<Boolean>? = null, val groupId: Output<String>? = null, val maxConcurrency: Output<Int>? = null, val maxJobs: Output<Int>? = null, val monitorConfigJson: Output<String>? = null, val monitorContactsJson: Output<String>? = null, val namespace: Output<String>? = null, val namespaceName: Output<String>? = null, val namespaceSource: Output<String>? = null, val scheduleBusyWorkers: Output<Boolean>? = null) : ConvertibleToJava<AppGroupArgs>

Provides a Schedulerx App Group resource. For information about Schedulerx App Group and how to use it, see What is App Group.

NOTE: Available since v1.240.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const createNameSpace = new alicloud.schedulerx.Namespace("CreateNameSpace", {
namespaceName: name,
description: name,
});
const _default = new alicloud.schedulerx.AppGroup("default", {
maxJobs: 100,
monitorContactsJson: JSON.stringify([
{
userName: "name1",
userPhone: "89756******",
},
{
userName: "name2",
ding: "http://www.example.com",
},
]),
deleteJobs: false,
appType: 1,
namespaceSource: "schedulerx",
groupId: "example-appgroup-pop-autoexample",
namespaceName: "default",
description: name,
monitorConfigJson: JSON.stringify({
sendChannel: "sms,ding",
}),
appVersion: "1",
appName: "example-appgroup-pop-autoexample",
namespace: createNameSpace.namespaceUid,
enableLog: false,
scheduleBusyWorkers: false,
});
import pulumi
import json
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
create_name_space = alicloud.schedulerx.Namespace("CreateNameSpace",
namespace_name=name,
description=name)
default = alicloud.schedulerx.AppGroup("default",
max_jobs=100,
monitor_contacts_json=json.dumps([
{
"userName": "name1",
"userPhone": "89756******",
},
{
"userName": "name2",
"ding": "http://www.example.com",
},
]),
delete_jobs=False,
app_type=1,
namespace_source="schedulerx",
group_id="example-appgroup-pop-autoexample",
namespace_name="default",
description=name,
monitor_config_json=json.dumps({
"sendChannel": "sms,ding",
}),
app_version="1",
app_name="example-appgroup-pop-autoexample",
namespace=create_name_space.namespace_uid,
enable_log=False,
schedule_busy_workers=False)
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var createNameSpace = new AliCloud.SchedulerX.Namespace("CreateNameSpace", new()
{
NamespaceName = name,
Description = name,
});
var @default = new AliCloud.SchedulerX.AppGroup("default", new()
{
MaxJobs = 100,
MonitorContactsJson = JsonSerializer.Serialize(new[]
{
new Dictionary<string, object?>
{
["userName"] = "name1",
["userPhone"] = "89756******",
},
new Dictionary<string, object?>
{
["userName"] = "name2",
["ding"] = "http://www.example.com",
},
}),
DeleteJobs = false,
AppType = 1,
NamespaceSource = "schedulerx",
GroupId = "example-appgroup-pop-autoexample",
NamespaceName = "default",
Description = name,
MonitorConfigJson = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["sendChannel"] = "sms,ding",
}),
AppVersion = "1",
AppName = "example-appgroup-pop-autoexample",
Namespace = createNameSpace.NamespaceUid,
EnableLog = false,
ScheduleBusyWorkers = false,
});
});
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/schedulerx"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
createNameSpace, err := schedulerx.NewNamespace(ctx, "CreateNameSpace", &schedulerx.NamespaceArgs{
NamespaceName: pulumi.String(name),
Description: pulumi.String(name),
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal([]interface{}{
map[string]interface{}{
"userName": "name1",
"userPhone": "89756******",
},
map[string]interface{}{
"userName": "name2",
"ding": "http://www.example.com",
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
tmpJSON1, err := json.Marshal(map[string]interface{}{
"sendChannel": "sms,ding",
})
if err != nil {
return err
}
json1 := string(tmpJSON1)
_, err = schedulerx.NewAppGroup(ctx, "default", &schedulerx.AppGroupArgs{
MaxJobs: pulumi.Int(100),
MonitorContactsJson: pulumi.String(json0),
DeleteJobs: pulumi.Bool(false),
AppType: pulumi.Int(1),
NamespaceSource: pulumi.String("schedulerx"),
GroupId: pulumi.String("example-appgroup-pop-autoexample"),
NamespaceName: pulumi.String("default"),
Description: pulumi.String(name),
MonitorConfigJson: pulumi.String(json1),
AppVersion: pulumi.String("1"),
AppName: pulumi.String("example-appgroup-pop-autoexample"),
Namespace: createNameSpace.NamespaceUid,
EnableLog: pulumi.Bool(false),
ScheduleBusyWorkers: pulumi.Bool(false),
})
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.schedulerx.Namespace;
import com.pulumi.alicloud.schedulerx.NamespaceArgs;
import com.pulumi.alicloud.schedulerx.AppGroup;
import com.pulumi.alicloud.schedulerx.AppGroupArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var createNameSpace = new Namespace("createNameSpace", NamespaceArgs.builder()
.namespaceName(name)
.description(name)
.build());
var default_ = new AppGroup("default", AppGroupArgs.builder()
.maxJobs("100")
.monitorContactsJson(serializeJson(
jsonArray(
jsonObject(
jsonProperty("userName", "name1"),
jsonProperty("userPhone", "89756******")
),
jsonObject(
jsonProperty("userName", "name2"),
jsonProperty("ding", "http://www.example.com")
)
)))
.deleteJobs("false")
.appType("1")
.namespaceSource("schedulerx")
.groupId("example-appgroup-pop-autoexample")
.namespaceName("default")
.description(name)
.monitorConfigJson(serializeJson(
jsonObject(
jsonProperty("sendChannel", "sms,ding")
)))
.appVersion("1")
.appName("example-appgroup-pop-autoexample")
.namespace(createNameSpace.namespaceUid())
.enableLog("false")
.scheduleBusyWorkers("false")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
createNameSpace:
type: alicloud:schedulerx:Namespace
name: CreateNameSpace
properties:
namespaceName: ${name}
description: ${name}
default:
type: alicloud:schedulerx:AppGroup
properties:
maxJobs: '100'
monitorContactsJson:
fn::toJSON:
- userName: name1
userPhone: 89756******
- userName: name2
ding: http://www.example.com
deleteJobs: 'false'
appType: '1'
namespaceSource: schedulerx
groupId: example-appgroup-pop-autoexample
namespaceName: default
description: ${name}
monitorConfigJson:
fn::toJSON:
sendChannel: sms,ding
appVersion: '1'
appName: example-appgroup-pop-autoexample
namespace: ${createNameSpace.namespaceUid}
enableLog: 'false'
scheduleBusyWorkers: 'false'

Import

Schedulerx App Group can be imported using the id, e.g.

$ pulumi import alicloud:schedulerx/appGroup:AppGroup example <namespace>:<group_id>

Constructors

Link copied to clipboard
constructor(appName: Output<String>? = null, appType: Output<Int>? = null, appVersion: Output<String>? = null, deleteJobs: Output<Boolean>? = null, description: Output<String>? = null, enableLog: Output<Boolean>? = null, groupId: Output<String>? = null, maxConcurrency: Output<Int>? = null, maxJobs: Output<Int>? = null, monitorConfigJson: Output<String>? = null, monitorContactsJson: Output<String>? = null, namespace: Output<String>? = null, namespaceName: Output<String>? = null, namespaceSource: Output<String>? = null, scheduleBusyWorkers: Output<Boolean>? = null)

Properties

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

Application Name

Link copied to clipboard
val appType: Output<Int>? = null

Application type.

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

Application Version, 1: Basic Edition, 2: Professional Edition

Link copied to clipboard
val deleteJobs: Output<Boolean>? = null

Whether to delete the task in the application Group. The values are as follows:

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

Application Description

Link copied to clipboard
val enableLog: Output<Boolean>? = null

Whether to enable the log.

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

Application ID

Link copied to clipboard
val maxConcurrency: Output<Int>? = null

The maximum number of instances running at the same time. The default value is 1, that is, the last trigger is not completed, and the next trigger will not be performed even at the running time.

Link copied to clipboard
val maxJobs: Output<Int>? = null

Application Grouping Configurable Maximum Number of Tasks

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

Alarm configuration JSON field. For more information about this field, see **Request Parameters * *.

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

Alarm contact JSON format.

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

The namespace ID, which is obtained on the namespace page of the console.

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

The namespace name.

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

Not supported for the time being, no need to fill in.

Link copied to clipboard
val scheduleBusyWorkers: Output<Boolean>? = null

Whether to schedule a busy machine.

Functions

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