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});
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)
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 {
_, 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
})
}
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,
});
});
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());
}
}
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}
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 string
- The unique name of the resource.
- args DefaultPatchBaselineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args DefaultPatchBaselineArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DefaultPatchBaselineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := oos.NewDefaultPatchBaseline(ctx, "defaultPatchBaselineResource", &oos.DefaultPatchBaselineArgs{
PatchBaselineName: pulumi.String("string"),
})
var defaultPatchBaselineResource = new DefaultPatchBaseline("defaultPatchBaselineResource", DefaultPatchBaselineArgs.builder()
.patchBaselineName("string")
.build());
default_patch_baseline_resource = alicloud.oos.DefaultPatchBaseline("defaultPatchBaselineResource", patch_baseline_name="string")
const defaultPatchBaselineResource = new alicloud.oos.DefaultPatchBaseline("defaultPatchBaselineResource", {patchBaselineName: "string"});
type: alicloud:oos:DefaultPatchBaseline
properties:
patchBaselineName: string
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
The DefaultPatchBaseline resource accepts the following input properties:
- Patch
Baseline stringName - The name of the patch baseline.
- Patch
Baseline stringName - The name of the patch baseline.
- patch
Baseline StringName - The name of the patch baseline.
- patch
Baseline stringName - The name of the patch baseline.
- patch_
baseline_ strname - The name of the patch baseline.
- patch
Baseline StringName - 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.
- Patch
Baseline stringId - The ID of the patch baseline.
- Id string
- The provider-assigned unique ID for this managed resource.
- Patch
Baseline stringId - The ID of the patch baseline.
- id String
- The provider-assigned unique ID for this managed resource.
- patch
Baseline StringId - The ID of the patch baseline.
- id string
- The provider-assigned unique ID for this managed resource.
- patch
Baseline stringId - The ID of the patch baseline.
- id str
- The provider-assigned unique ID for this managed resource.
- patch_
baseline_ strid - The ID of the patch baseline.
- id String
- The provider-assigned unique ID for this managed resource.
- patch
Baseline StringId - 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Patch
Baseline stringId - The ID of the patch baseline.
- Patch
Baseline stringName - The name of the patch baseline.
- Patch
Baseline stringId - The ID of the patch baseline.
- Patch
Baseline stringName - The name of the patch baseline.
- patch
Baseline StringId - The ID of the patch baseline.
- patch
Baseline StringName - The name of the patch baseline.
- patch
Baseline stringId - The ID of the patch baseline.
- patch
Baseline stringName - The name of the patch baseline.
- patch_
baseline_ strid - The ID of the patch baseline.
- patch_
baseline_ strname - The name of the patch baseline.
- patch
Baseline StringId - The ID of the patch baseline.
- patch
Baseline StringName - 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>
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.