@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)
191 lines • 8.49 kB
JavaScript
;
// *** 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.Parameter = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The ``AWS::SSM::Parameter`` resource creates an SSM parameter in SYSlong Parameter Store.
* To create an SSM parameter, you must have the IAMlong (IAM) permissions ``ssm:PutParameter`` and ``ssm:AddTagsToResource``. On stack creation, CFNlong adds the following three tags to the parameter: ``aws:cloudformation:stack-name``, ``aws:cloudformation:logical-id``, and ``aws:cloudformation:stack-id``, in addition to any custom tags you specify.
* To add, update, or remove tags during stack update, you must have IAM permissions for both ``ssm:AddTagsToResource`` and ``ssm:RemoveTagsFromResource``. For more information, see [Managing Access Using Policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/security-iam.html#security_iam_access-manage) in the *User Guide*.
* For information about valid values for parameters, see [About requirements and constraints for parameter names](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html#sysman-parameter-name-constraints) in the *User Guide* and [PutParameter](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PutParameter.html) in the *API Reference*.
*
* ## Example Usage
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const basicParameter = new aws_native.ssm.Parameter("basicParameter", {
* name: "command",
* type: aws_native.ssm.ParameterType.String,
* value: "date",
* description: "SSM Parameter for running date command.",
* allowedPattern: "^[a-zA-Z]{1,10}$",
* tags: {
* environment: "DEV",
* },
* });
*
* ```
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const basicParameter = new aws_native.ssm.Parameter("basicParameter", {
* name: "command",
* type: aws_native.ssm.ParameterType.String,
* value: "date",
* description: "SSM Parameter for running date command.",
* allowedPattern: "^[a-zA-Z]{1,10}$",
* tags: {
* environment: "DEV",
* },
* });
*
* ```
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const basicParameter = new aws_native.ssm.Parameter("basicParameter", {
* name: "commands",
* type: aws_native.ssm.ParameterType.StringList,
* value: "date,ls",
* description: "SSM Parameter of type StringList.",
* allowedPattern: "^[a-zA-Z]{1,10}$",
* });
*
* ```
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const basicParameter = new aws_native.ssm.Parameter("basicParameter", {
* name: "commands",
* type: aws_native.ssm.ParameterType.StringList,
* value: "date,ls",
* description: "SSM Parameter of type StringList.",
* allowedPattern: "^[a-zA-Z]{1,10}$",
* });
*
* ```
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const basicParameter = new aws_native.ssm.Parameter("basicParameter", {
* name: "command",
* type: aws_native.ssm.ParameterType.String,
* value: "date",
* tier: aws_native.ssm.ParameterTier.Advanced,
* policies: "[{\"Type\":\"Expiration\",\"Version\":\"1.0\",\"Attributes\":{\"Timestamp\":\"2020-05-13T00:00:00.000Z\"}},{\"Type\":\"ExpirationNotification\",\"Version\":\"1.0\",\"Attributes\":{\"Before\":\"5\",\"Unit\":\"Days\"}},{\"Type\":\"NoChangeNotification\",\"Version\":\"1.0\",\"Attributes\":{\"After\":\"60\",\"Unit\":\"Days\"}}]",
* description: "SSM Parameter for running date command.",
* allowedPattern: "^[a-zA-Z]{1,10}$",
* tags: {
* environment: "DEV",
* },
* });
*
* ```
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const basicParameter = new aws_native.ssm.Parameter("basicParameter", {
* name: "command",
* type: aws_native.ssm.ParameterType.String,
* value: "date",
* tier: aws_native.ssm.ParameterTier.Advanced,
* policies: "[{\"Type\":\"Expiration\",\"Version\":\"1.0\",\"Attributes\":{\"Timestamp\":\"2020-05-13T00:00:00.000Z\"}},{\"Type\":\"ExpirationNotification\",\"Version\":\"1.0\",\"Attributes\":{\"Before\":\"5\",\"Unit\":\"Days\"}},{\"Type\":\"NoChangeNotification\",\"Version\":\"1.0\",\"Attributes\":{\"After\":\"60\",\"Unit\":\"Days\"}}]",
* description: "SSM Parameter for running date command.",
* allowedPattern: "^[a-zA-Z]{1,10}$",
* tags: {
* environment: "DEV",
* },
* });
*
* ```
*/
class Parameter extends pulumi.CustomResource {
/**
* Get an existing Parameter 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 Parameter(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Parameter. 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'] === Parameter.__pulumiType;
}
/**
* Create a Parameter 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) {
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
if ((!args || args.value === undefined) && !opts.urn) {
throw new Error("Missing required property 'value'");
}
resourceInputs["allowedPattern"] = args ? args.allowedPattern : undefined;
resourceInputs["dataType"] = args ? args.dataType : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["policies"] = args ? args.policies : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["tier"] = args ? args.tier : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["value"] = args ? args.value : undefined;
}
else {
resourceInputs["allowedPattern"] = undefined /*out*/;
resourceInputs["dataType"] = undefined /*out*/;
resourceInputs["description"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["policies"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
resourceInputs["tier"] = undefined /*out*/;
resourceInputs["type"] = undefined /*out*/;
resourceInputs["value"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["name"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(Parameter.__pulumiType, name, resourceInputs, opts);
}
}
exports.Parameter = Parameter;
/** @internal */
Parameter.__pulumiType = 'aws-native:ssm:Parameter';
//# sourceMappingURL=parameter.js.map