UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

242 lines • 11.2 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.PatchBaseline = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource Type definition for AWS::SSM::PatchBaseline * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const myPatchBaseline = new aws_native.ssm.PatchBaseline("myPatchBaseline", { * name: "myPatchBaseline", * description: "Baseline containing all updates approved for Windows instances", * operatingSystem: aws_native.ssm.PatchBaselineOperatingSystem.Windows, * patchGroups: ["myPatchGroup"], * approvalRules: { * patchRules: [ * { * patchFilterGroup: { * patchFilters: [ * { * values: [ * "Critical", * "Important", * "Moderate", * ], * key: aws_native.ssm.PatchBaselinePatchFilterKey.MsrcSeverity, * }, * { * values: [ * "SecurityUpdates", * "CriticalUpdates", * ], * key: aws_native.ssm.PatchBaselinePatchFilterKey.Classification, * }, * { * values: ["WindowsServer2019"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.Product, * }, * ], * }, * approveAfterDays: 7, * complianceLevel: aws_native.ssm.PatchBaselineRuleComplianceLevel.Critical, * }, * { * patchFilterGroup: { * patchFilters: [ * { * values: [ * "Critical", * "Important", * "Moderate", * ], * key: aws_native.ssm.PatchBaselinePatchFilterKey.MsrcSeverity, * }, * { * values: ["*"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.Classification, * }, * { * values: ["APPLICATION"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.PatchSet, * }, * { * values: ["Active Directory Rights Management Services Client 2.0"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.Product, * }, * { * values: ["Active Directory"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.ProductFamily, * }, * ], * }, * approveAfterDays: 7, * complianceLevel: aws_native.ssm.PatchBaselineRuleComplianceLevel.Critical, * }, * ], * }, * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const myPatchBaseline = new aws_native.ssm.PatchBaseline("myPatchBaseline", { * name: "myPatchBaseline", * description: "Baseline containing all updates approved for Windows instances", * operatingSystem: aws_native.ssm.PatchBaselineOperatingSystem.Windows, * patchGroups: ["myPatchGroup"], * approvalRules: { * patchRules: [ * { * patchFilterGroup: { * patchFilters: [ * { * values: [ * "Critical", * "Important", * "Moderate", * ], * key: aws_native.ssm.PatchBaselinePatchFilterKey.MsrcSeverity, * }, * { * values: [ * "SecurityUpdates", * "CriticalUpdates", * ], * key: aws_native.ssm.PatchBaselinePatchFilterKey.Classification, * }, * { * values: ["WindowsServer2019"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.Product, * }, * ], * }, * approveAfterDays: 7, * complianceLevel: aws_native.ssm.PatchBaselineRuleComplianceLevel.Critical, * }, * { * patchFilterGroup: { * patchFilters: [ * { * values: [ * "Critical", * "Important", * "Moderate", * ], * key: aws_native.ssm.PatchBaselinePatchFilterKey.MsrcSeverity, * }, * { * values: ["*"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.Classification, * }, * { * values: ["APPLICATION"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.PatchSet, * }, * { * values: ["Active Directory Rights Management Services Client 2.0"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.Product, * }, * { * values: ["Active Directory"], * key: aws_native.ssm.PatchBaselinePatchFilterKey.ProductFamily, * }, * ], * }, * approveAfterDays: 7, * complianceLevel: aws_native.ssm.PatchBaselineRuleComplianceLevel.Critical, * }, * ], * }, * }); * * ``` */ class PatchBaseline extends pulumi.CustomResource { /** * Get an existing PatchBaseline resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new PatchBaseline(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PatchBaseline. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === PatchBaseline.__pulumiType; } /** * Create a PatchBaseline resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { resourceInputs["approvalRules"] = args ? args.approvalRules : undefined; resourceInputs["approvedPatches"] = args ? args.approvedPatches : undefined; resourceInputs["approvedPatchesComplianceLevel"] = args ? args.approvedPatchesComplianceLevel : undefined; resourceInputs["approvedPatchesEnableNonSecurity"] = args ? args.approvedPatchesEnableNonSecurity : undefined; resourceInputs["defaultBaseline"] = args ? args.defaultBaseline : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["globalFilters"] = args ? args.globalFilters : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["operatingSystem"] = args ? args.operatingSystem : undefined; resourceInputs["patchGroups"] = args ? args.patchGroups : undefined; resourceInputs["rejectedPatches"] = args ? args.rejectedPatches : undefined; resourceInputs["rejectedPatchesAction"] = args ? args.rejectedPatchesAction : undefined; resourceInputs["sources"] = args ? args.sources : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["awsId"] = undefined /*out*/; } else { resourceInputs["approvalRules"] = undefined /*out*/; resourceInputs["approvedPatches"] = undefined /*out*/; resourceInputs["approvedPatchesComplianceLevel"] = undefined /*out*/; resourceInputs["approvedPatchesEnableNonSecurity"] = undefined /*out*/; resourceInputs["awsId"] = undefined /*out*/; resourceInputs["defaultBaseline"] = undefined /*out*/; resourceInputs["description"] = undefined /*out*/; resourceInputs["globalFilters"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["operatingSystem"] = undefined /*out*/; resourceInputs["patchGroups"] = undefined /*out*/; resourceInputs["rejectedPatches"] = undefined /*out*/; resourceInputs["rejectedPatchesAction"] = undefined /*out*/; resourceInputs["sources"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["operatingSystem"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(PatchBaseline.__pulumiType, name, resourceInputs, opts); } } exports.PatchBaseline = PatchBaseline; /** @internal */ PatchBaseline.__pulumiType = 'aws-native:ssm:PatchBaseline'; //# sourceMappingURL=patchBaseline.js.map