@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)
228 lines (227 loc) • 10.8 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as enums from "../types/enums";
/**
* 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",
* },
* });
*
* ```
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Parameter;
/**
* 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: any): obj is Parameter;
/**
* A regular expression used to validate the parameter value. For example, for ``String`` types with values restricted to numbers, you can specify the following: ``AllowedPattern=^\d+$``
*/
readonly allowedPattern: pulumi.Output<string | undefined>;
/**
* The data type of the parameter, such as ``text`` or ``aws:ec2:image``. The default is ``text``.
*/
readonly dataType: pulumi.Output<enums.ssm.ParameterDataType | undefined>;
/**
* Information about the parameter.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The name of the parameter.
* The maximum length constraint listed below includes capacity for additional system attributes that aren't part of the name. The maximum length for a parameter name, including the full length of the parameter Amazon Resource Name (ARN), is 1011 characters. For example, the length of the following parameter name is 65 characters, not 20 characters: ``arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName``
*/
readonly name: pulumi.Output<string | undefined>;
/**
* Information about the policies assigned to a parameter.
* [Assigning parameter policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html) in the *User Guide*.
*/
readonly policies: pulumi.Output<string | undefined>;
/**
* Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a SYS parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The parameter tier.
*/
readonly tier: pulumi.Output<enums.ssm.ParameterTier | undefined>;
/**
* The type of parameter.
*/
readonly type: pulumi.Output<enums.ssm.ParameterType>;
/**
* The parameter value.
* If type is ``StringList``, the system returns a comma-separated string with no spaces between commas in the ``Value`` field.
*/
readonly value: pulumi.Output<string>;
/**
* 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: string, args: ParameterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a Parameter resource.
*/
export interface ParameterArgs {
/**
* A regular expression used to validate the parameter value. For example, for ``String`` types with values restricted to numbers, you can specify the following: ``AllowedPattern=^\d+$``
*/
allowedPattern?: pulumi.Input<string>;
/**
* The data type of the parameter, such as ``text`` or ``aws:ec2:image``. The default is ``text``.
*/
dataType?: pulumi.Input<enums.ssm.ParameterDataType>;
/**
* Information about the parameter.
*/
description?: pulumi.Input<string>;
/**
* The name of the parameter.
* The maximum length constraint listed below includes capacity for additional system attributes that aren't part of the name. The maximum length for a parameter name, including the full length of the parameter Amazon Resource Name (ARN), is 1011 characters. For example, the length of the following parameter name is 65 characters, not 20 characters: ``arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName``
*/
name?: pulumi.Input<string>;
/**
* Information about the policies assigned to a parameter.
* [Assigning parameter policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html) in the *User Guide*.
*/
policies?: pulumi.Input<string>;
/**
* Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a SYS parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The parameter tier.
*/
tier?: pulumi.Input<enums.ssm.ParameterTier>;
/**
* The type of parameter.
*/
type: pulumi.Input<enums.ssm.ParameterType>;
/**
* The parameter value.
* If type is ``StringList``, the system returns a comma-separated string with no spaces between commas in the ``Value`` field.
*/
value: pulumi.Input<string>;
}