StateConfigurationArgs

data class StateConfigurationArgs(val configureMode: Output<String>? = null, val description: Output<String>? = null, val parameters: Output<String>? = null, val resourceGroupId: Output<String>? = null, val scheduleExpression: Output<String>? = null, val scheduleType: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val targets: Output<String>? = null, val templateName: Output<String>? = null, val templateVersion: Output<String>? = null) : ConvertibleToJava<StateConfigurationArgs>

Provides a OOS State Configuration resource. For information about OOS State Configuration and how to use it, see What is State Configuration.

NOTE: Available in v1.147.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.oos.StateConfiguration;
import com.pulumi.alicloud.oos.StateConfigurationArgs;
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 defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups();
var defaultStateConfiguration = new StateConfiguration("defaultStateConfiguration", StateConfigurationArgs.builder()
.templateName("ACS-ECS-InventoryDataCollection")
.configureMode("ApplyOnly")
.description("terraform-example")
.scheduleType("rate")
.scheduleExpression("1 hour")
.resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
.targets("{\"Filters\": [{\"Type\": \"All\", \"Parameters\": {\"InstanceChargeType\": \"PrePaid\"}}], \"ResourceType\": \"ALIYUN::ECS::Instance\"}")
.parameters("{\"policy\": {\"ACS:Application\": {\"Collection\": \"Enabled\"}}}")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "example")
))
.build());
}
}

Import

OOS State Configuration can be imported using the id, e.g.

$ pulumi import alicloud:oos/stateConfiguration:StateConfiguration example <id>

Constructors

Link copied to clipboard
fun StateConfigurationArgs(configureMode: Output<String>? = null, description: Output<String>? = null, parameters: Output<String>? = null, resourceGroupId: Output<String>? = null, scheduleExpression: Output<String>? = null, scheduleType: Output<String>? = null, tags: Output<Map<String, Any>>? = null, targets: Output<String>? = null, templateName: Output<String>? = null, templateVersion: Output<String>? = null)

Functions

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

Properties

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

Configuration mode. Valid values: ApplyAndAutoCorrect, ApplyAndMonitor, ApplyOnly.

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

The description of the resource.

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

The parameter of the Template. This field is in the format of JSON strings. For detailed definition instructions, please refer to Metadata types that are supported by a configuration list.

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

The ID of the resource group.

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

Timing expression.

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

Timing type. Valid values: rate.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

The tag of the resource.

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

The Target resources. This field is in the format of JSON strings. For detailed definition instructions, please refer to Parameter.

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

The name of the template.

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

The version number. If you do not specify this parameter, the system uses the latest version.