PatchBaselineArgs

data class PatchBaselineArgs(val approvalRules: Output<String>? = null, val approvedPatches: Output<List<String>>? = null, val approvedPatchesEnableNonSecurity: Output<Boolean>? = null, val description: Output<String>? = null, val operationSystem: Output<String>? = null, val patchBaselineName: Output<String>? = null, val rejectedPatches: Output<List<String>>? = null, val rejectedPatchesAction: Output<String>? = null, val resourceGroupId: Output<String>? = null, val sources: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<PatchBaselineArgs>

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

NOTE: Available since v1.146.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 _default = new alicloud.oos.PatchBaseline("default", {
patchBaselineName: name,
operationSystem: "Windows",
approvalRules: "{\"PatchRules\":[{\"EnableNonSecurity\":true,\"PatchFilterGroup\":[{\"Values\":[\"*\"],\"Key\":\"Product\"},{\"Values\":[\"Security\",\"Bugfix\"],\"Key\":\"Classification\"},{\"Values\":[\"Critical\",\"Important\"],\"Key\":\"Severity\"}],\"ApproveAfterDays\":7,\"ComplianceLevel\":\"Unspecified\"}]}",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.oos.PatchBaseline("default",
patch_baseline_name=name,
operation_system="Windows",
approval_rules="{\"PatchRules\":[{\"EnableNonSecurity\":true,\"PatchFilterGroup\":[{\"Values\":[\"*\"],\"Key\":\"Product\"},{\"Values\":[\"Security\",\"Bugfix\"],\"Key\":\"Classification\"},{\"Values\":[\"Critical\",\"Important\"],\"Key\":\"Severity\"}],\"ApproveAfterDays\":7,\"ComplianceLevel\":\"Unspecified\"}]}")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Oos.PatchBaseline("default", new()
{
PatchBaselineName = name,
OperationSystem = "Windows",
ApprovalRules = "{\"PatchRules\":[{\"EnableNonSecurity\":true,\"PatchFilterGroup\":[{\"Values\":[\"*\"],\"Key\":\"Product\"},{\"Values\":[\"Security\",\"Bugfix\"],\"Key\":\"Classification\"},{\"Values\":[\"Critical\",\"Important\"],\"Key\":\"Severity\"}],\"ApproveAfterDays\":7,\"ComplianceLevel\":\"Unspecified\"}]}",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
"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
}
_, err := oos.NewPatchBaseline(ctx, "default", &oos.PatchBaselineArgs{
PatchBaselineName: pulumi.String(name),
OperationSystem: pulumi.String("Windows"),
ApprovalRules: pulumi.String("{\"PatchRules\":[{\"EnableNonSecurity\":true,\"PatchFilterGroup\":[{\"Values\":[\"*\"],\"Key\":\"Product\"},{\"Values\":[\"Security\",\"Bugfix\"],\"Key\":\"Classification\"},{\"Values\":[\"Critical\",\"Important\"],\"Key\":\"Severity\"}],\"ApproveAfterDays\":7,\"ComplianceLevel\":\"Unspecified\"}]}"),
})
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.oos.PatchBaseline;
import com.pulumi.alicloud.oos.PatchBaselineArgs;
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 default_ = new PatchBaseline("default", PatchBaselineArgs.builder()
.patchBaselineName(name)
.operationSystem("Windows")
.approvalRules("{\"PatchRules\":[{\"EnableNonSecurity\":true,\"PatchFilterGroup\":[{\"Values\":[\"*\"],\"Key\":\"Product\"},{\"Values\":[\"Security\",\"Bugfix\"],\"Key\":\"Classification\"},{\"Values\":[\"Critical\",\"Important\"],\"Key\":\"Severity\"}],\"ApproveAfterDays\":7,\"ComplianceLevel\":\"Unspecified\"}]}")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:oos:PatchBaseline
properties:
patchBaselineName: ${name}
operationSystem: Windows
approvalRules: '{"PatchRules":[{"EnableNonSecurity":true,"PatchFilterGroup":[{"Values":["*"],"Key":"Product"},{"Values":["Security","Bugfix"],"Key":"Classification"},{"Values":["Critical","Important"],"Key":"Severity"}],"ApproveAfterDays":7,"ComplianceLevel":"Unspecified"}]}'

Import

OOS Patch Baseline can be imported using the id, e.g.

$ pulumi import alicloud:oos/patchBaseline:PatchBaseline example <id>

Constructors

Link copied to clipboard
constructor(approvalRules: Output<String>? = null, approvedPatches: Output<List<String>>? = null, approvedPatchesEnableNonSecurity: Output<Boolean>? = null, description: Output<String>? = null, operationSystem: Output<String>? = null, patchBaselineName: Output<String>? = null, rejectedPatches: Output<List<String>>? = null, rejectedPatchesAction: Output<String>? = null, resourceGroupId: Output<String>? = null, sources: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

Accept the rules. This value follows the json format. For more details, see the description of ApprovalRules in the Request parameters table for details.

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

Approved Patch.

Link copied to clipboard

ApprovedPatchesEnableNonSecurity.

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

Patches baseline description information.

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

Operating system type. Valid values: AliyunLinux, Anolis, CentOS, Debian, RedhatEnterpriseLinux, Ubuntu, Windows, AlmaLinux.

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

The name of the patch baseline.

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

Reject patches.

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

Rejected patches action. Valid values: ALLOW_AS_DEPENDENCY, BLOCK.

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

The ID of the resource group.

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

Source.

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

Label.

Functions

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