1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. oos
  5. DefaultPatchBaseline
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.oos.DefaultPatchBaseline

Explore with Pulumi AI

Provides a Oos Default Patch Baseline resource.

For information about Oos Default Patch Baseline and how to use it, see What is Default Patch Baseline.

NOTE: Available in v1.203.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.oos.PatchBaseline("default", {
    operationSystem: "Windows",
    patchBaselineName: "terraform-example",
    description: "terraform-example",
    approvalRules: "{\"PatchRules\":[{\"PatchFilterGroup\":[{\"Key\":\"PatchSet\",\"Values\":[\"OS\"]},{\"Key\":\"ProductFamily\",\"Values\":[\"Windows\"]},{\"Key\":\"Product\",\"Values\":[\"Windows 10\",\"Windows 7\"]},{\"Key\":\"Classification\",\"Values\":[\"Security Updates\",\"Updates\",\"Update Rollups\",\"Critical Updates\"]},{\"Key\":\"Severity\",\"Values\":[\"Critical\",\"Important\",\"Moderate\"]}],\"ApproveAfterDays\":7,\"EnableNonSecurity\":true,\"ComplianceLevel\":\"Medium\"}]}",
});
const defaultDefaultPatchBaseline = new alicloud.oos.DefaultPatchBaseline("default", {patchBaselineName: _default.id});
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.oos.PatchBaseline("default",
    operation_system="Windows",
    patch_baseline_name="terraform-example",
    description="terraform-example",
    approval_rules="{\"PatchRules\":[{\"PatchFilterGroup\":[{\"Key\":\"PatchSet\",\"Values\":[\"OS\"]},{\"Key\":\"ProductFamily\",\"Values\":[\"Windows\"]},{\"Key\":\"Product\",\"Values\":[\"Windows 10\",\"Windows 7\"]},{\"Key\":\"Classification\",\"Values\":[\"Security Updates\",\"Updates\",\"Update Rollups\",\"Critical Updates\"]},{\"Key\":\"Severity\",\"Values\":[\"Critical\",\"Important\",\"Moderate\"]}],\"ApproveAfterDays\":7,\"EnableNonSecurity\":true,\"ComplianceLevel\":\"Medium\"}]}")
default_default_patch_baseline = alicloud.oos.DefaultPatchBaseline("default", patch_baseline_name=default.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := oos.NewPatchBaseline(ctx, "default", &oos.PatchBaselineArgs{
			OperationSystem:   pulumi.String("Windows"),
			PatchBaselineName: pulumi.String("terraform-example"),
			Description:       pulumi.String("terraform-example"),
			ApprovalRules:     pulumi.String("{\"PatchRules\":[{\"PatchFilterGroup\":[{\"Key\":\"PatchSet\",\"Values\":[\"OS\"]},{\"Key\":\"ProductFamily\",\"Values\":[\"Windows\"]},{\"Key\":\"Product\",\"Values\":[\"Windows 10\",\"Windows 7\"]},{\"Key\":\"Classification\",\"Values\":[\"Security Updates\",\"Updates\",\"Update Rollups\",\"Critical Updates\"]},{\"Key\":\"Severity\",\"Values\":[\"Critical\",\"Important\",\"Moderate\"]}],\"ApproveAfterDays\":7,\"EnableNonSecurity\":true,\"ComplianceLevel\":\"Medium\"}]}"),
		})
		if err != nil {
			return err
		}
		_, err = oos.NewDefaultPatchBaseline(ctx, "default", &oos.DefaultPatchBaselineArgs{
			PatchBaselineName: _default.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Oos.PatchBaseline("default", new()
    {
        OperationSystem = "Windows",
        PatchBaselineName = "terraform-example",
        Description = "terraform-example",
        ApprovalRules = "{\"PatchRules\":[{\"PatchFilterGroup\":[{\"Key\":\"PatchSet\",\"Values\":[\"OS\"]},{\"Key\":\"ProductFamily\",\"Values\":[\"Windows\"]},{\"Key\":\"Product\",\"Values\":[\"Windows 10\",\"Windows 7\"]},{\"Key\":\"Classification\",\"Values\":[\"Security Updates\",\"Updates\",\"Update Rollups\",\"Critical Updates\"]},{\"Key\":\"Severity\",\"Values\":[\"Critical\",\"Important\",\"Moderate\"]}],\"ApproveAfterDays\":7,\"EnableNonSecurity\":true,\"ComplianceLevel\":\"Medium\"}]}",
    });

    var defaultDefaultPatchBaseline = new AliCloud.Oos.DefaultPatchBaseline("default", new()
    {
        PatchBaselineName = @default.Id,
    });

});
Copy
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 com.pulumi.alicloud.oos.DefaultPatchBaseline;
import com.pulumi.alicloud.oos.DefaultPatchBaselineArgs;
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) {
        var default_ = new PatchBaseline("default", PatchBaselineArgs.builder()
            .operationSystem("Windows")
            .patchBaselineName("terraform-example")
            .description("terraform-example")
            .approvalRules("{\"PatchRules\":[{\"PatchFilterGroup\":[{\"Key\":\"PatchSet\",\"Values\":[\"OS\"]},{\"Key\":\"ProductFamily\",\"Values\":[\"Windows\"]},{\"Key\":\"Product\",\"Values\":[\"Windows 10\",\"Windows 7\"]},{\"Key\":\"Classification\",\"Values\":[\"Security Updates\",\"Updates\",\"Update Rollups\",\"Critical Updates\"]},{\"Key\":\"Severity\",\"Values\":[\"Critical\",\"Important\",\"Moderate\"]}],\"ApproveAfterDays\":7,\"EnableNonSecurity\":true,\"ComplianceLevel\":\"Medium\"}]}")
            .build());

        var defaultDefaultPatchBaseline = new DefaultPatchBaseline("defaultDefaultPatchBaseline", DefaultPatchBaselineArgs.builder()
            .patchBaselineName(default_.id())
            .build());

    }
}
Copy
resources:
  default:
    type: alicloud:oos:PatchBaseline
    properties:
      operationSystem: Windows
      patchBaselineName: terraform-example
      description: terraform-example
      approvalRules: '{"PatchRules":[{"PatchFilterGroup":[{"Key":"PatchSet","Values":["OS"]},{"Key":"ProductFamily","Values":["Windows"]},{"Key":"Product","Values":["Windows 10","Windows 7"]},{"Key":"Classification","Values":["Security Updates","Updates","Update Rollups","Critical Updates"]},{"Key":"Severity","Values":["Critical","Important","Moderate"]}],"ApproveAfterDays":7,"EnableNonSecurity":true,"ComplianceLevel":"Medium"}]}'
  defaultDefaultPatchBaseline:
    type: alicloud:oos:DefaultPatchBaseline
    name: default
    properties:
      patchBaselineName: ${default.id}
Copy

Create DefaultPatchBaseline Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new DefaultPatchBaseline(name: string, args: DefaultPatchBaselineArgs, opts?: CustomResourceOptions);
@overload
def DefaultPatchBaseline(resource_name: str,
                         args: DefaultPatchBaselineArgs,
                         opts: Optional[ResourceOptions] = None)

@overload
def DefaultPatchBaseline(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         patch_baseline_name: Optional[str] = None)
func NewDefaultPatchBaseline(ctx *Context, name string, args DefaultPatchBaselineArgs, opts ...ResourceOption) (*DefaultPatchBaseline, error)
public DefaultPatchBaseline(string name, DefaultPatchBaselineArgs args, CustomResourceOptions? opts = null)
public DefaultPatchBaseline(String name, DefaultPatchBaselineArgs args)
public DefaultPatchBaseline(String name, DefaultPatchBaselineArgs args, CustomResourceOptions options)
type: alicloud:oos:DefaultPatchBaseline
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DefaultPatchBaselineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DefaultPatchBaselineArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DefaultPatchBaselineArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DefaultPatchBaselineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DefaultPatchBaselineArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var defaultPatchBaselineResource = new AliCloud.Oos.DefaultPatchBaseline("defaultPatchBaselineResource", new()
{
    PatchBaselineName = "string",
});
Copy
example, err := oos.NewDefaultPatchBaseline(ctx, "defaultPatchBaselineResource", &oos.DefaultPatchBaselineArgs{
	PatchBaselineName: pulumi.String("string"),
})
Copy
var defaultPatchBaselineResource = new DefaultPatchBaseline("defaultPatchBaselineResource", DefaultPatchBaselineArgs.builder()
    .patchBaselineName("string")
    .build());
Copy
default_patch_baseline_resource = alicloud.oos.DefaultPatchBaseline("defaultPatchBaselineResource", patch_baseline_name="string")
Copy
const defaultPatchBaselineResource = new alicloud.oos.DefaultPatchBaseline("defaultPatchBaselineResource", {patchBaselineName: "string"});
Copy
type: alicloud:oos:DefaultPatchBaseline
properties:
    patchBaselineName: string
Copy

DefaultPatchBaseline Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DefaultPatchBaseline resource accepts the following input properties:

PatchBaselineName
This property is required.
Changes to this property will trigger replacement.
string
The name of the patch baseline.
PatchBaselineName
This property is required.
Changes to this property will trigger replacement.
string
The name of the patch baseline.
patchBaselineName
This property is required.
Changes to this property will trigger replacement.
String
The name of the patch baseline.
patchBaselineName
This property is required.
Changes to this property will trigger replacement.
string
The name of the patch baseline.
patch_baseline_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the patch baseline.
patchBaselineName
This property is required.
Changes to this property will trigger replacement.
String
The name of the patch baseline.

Outputs

All input properties are implicitly available as output properties. Additionally, the DefaultPatchBaseline resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
PatchBaselineId string
The ID of the patch baseline.
Id string
The provider-assigned unique ID for this managed resource.
PatchBaselineId string
The ID of the patch baseline.
id String
The provider-assigned unique ID for this managed resource.
patchBaselineId String
The ID of the patch baseline.
id string
The provider-assigned unique ID for this managed resource.
patchBaselineId string
The ID of the patch baseline.
id str
The provider-assigned unique ID for this managed resource.
patch_baseline_id str
The ID of the patch baseline.
id String
The provider-assigned unique ID for this managed resource.
patchBaselineId String
The ID of the patch baseline.

Look up Existing DefaultPatchBaseline Resource

Get an existing DefaultPatchBaseline resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DefaultPatchBaselineState, opts?: CustomResourceOptions): DefaultPatchBaseline
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        patch_baseline_id: Optional[str] = None,
        patch_baseline_name: Optional[str] = None) -> DefaultPatchBaseline
func GetDefaultPatchBaseline(ctx *Context, name string, id IDInput, state *DefaultPatchBaselineState, opts ...ResourceOption) (*DefaultPatchBaseline, error)
public static DefaultPatchBaseline Get(string name, Input<string> id, DefaultPatchBaselineState? state, CustomResourceOptions? opts = null)
public static DefaultPatchBaseline get(String name, Output<String> id, DefaultPatchBaselineState state, CustomResourceOptions options)
resources:  _:    type: alicloud:oos:DefaultPatchBaseline    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
PatchBaselineId string
The ID of the patch baseline.
PatchBaselineName Changes to this property will trigger replacement. string
The name of the patch baseline.
PatchBaselineId string
The ID of the patch baseline.
PatchBaselineName Changes to this property will trigger replacement. string
The name of the patch baseline.
patchBaselineId String
The ID of the patch baseline.
patchBaselineName Changes to this property will trigger replacement. String
The name of the patch baseline.
patchBaselineId string
The ID of the patch baseline.
patchBaselineName Changes to this property will trigger replacement. string
The name of the patch baseline.
patch_baseline_id str
The ID of the patch baseline.
patch_baseline_name Changes to this property will trigger replacement. str
The name of the patch baseline.
patchBaselineId String
The ID of the patch baseline.
patchBaselineName Changes to this property will trigger replacement. String
The name of the patch baseline.

Import

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

$ pulumi import alicloud:oos/defaultPatchBaseline:DefaultPatchBaseline example <id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.