UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

104 lines 4.01 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.DefaultPatchBaseline = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for registering an AWS Systems Manager Default Patch Baseline. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const examplePatchBaseline = new aws.ssm.PatchBaseline("example", { * name: "example", * approvedPatches: ["KB123456"], * }); * const example = new aws.ssm.DefaultPatchBaseline("example", { * baselineId: examplePatchBaseline.id, * operatingSystem: examplePatchBaseline.operatingSystem, * }); * ``` * * ## Import * * Using the patch baseline ARN: * * Using the operating system value: * * __Using `pulumi import` to import__ the Systems Manager Default Patch Baseline using the patch baseline ID, patch baseline ARN, or the operating system value. For example: * * Using the patch baseline ID: * * ```sh * $ pulumi import aws:ssm/defaultPatchBaseline:DefaultPatchBaseline example pb-1234567890abcdef1 * ``` * Using the patch baseline ARN: * * ```sh * $ pulumi import aws:ssm/defaultPatchBaseline:DefaultPatchBaseline example arn:aws:ssm:us-west-2:123456789012:patchbaseline/pb-1234567890abcdef1 * ``` * Using the operating system value: * * ```sh * $ pulumi import aws:ssm/defaultPatchBaseline:DefaultPatchBaseline example CENTOS * ``` */ class DefaultPatchBaseline extends pulumi.CustomResource { /** * Get an existing DefaultPatchBaseline 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new DefaultPatchBaseline(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DefaultPatchBaseline. 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'] === DefaultPatchBaseline.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["baselineId"] = state?.baselineId; resourceInputs["operatingSystem"] = state?.operatingSystem; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.baselineId === undefined && !opts.urn) { throw new Error("Missing required property 'baselineId'"); } if (args?.operatingSystem === undefined && !opts.urn) { throw new Error("Missing required property 'operatingSystem'"); } resourceInputs["baselineId"] = args?.baselineId; resourceInputs["operatingSystem"] = args?.operatingSystem; resourceInputs["region"] = args?.region; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DefaultPatchBaseline.__pulumiType, name, resourceInputs, opts); } } exports.DefaultPatchBaseline = DefaultPatchBaseline; /** @internal */ DefaultPatchBaseline.__pulumiType = 'aws:ssm/defaultPatchBaseline:DefaultPatchBaseline'; //# sourceMappingURL=defaultPatchBaseline.js.map