Package com.pulumi.aws.ssm
Class Parameter
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ssm.Parameter
-
public class Parameter extends com.pulumi.resources.CustomResourceProvides an SSM Parameter resource. > **Note:** The `overwrite` argument makes it possible to overwrite an existing SSM Parameter created outside of IAC. ## Example Usage ### Basic example
### Encrypted string using default SSM KMS keypackage generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ssm.Parameter; import com.pulumi.aws.ssm.ParameterArgs; import java.util.ArrayList; import java.util.Arrays; 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 foo = new Parameter("foo", ParameterArgs.builder() .name("foo") .type("String") .value("bar") .build()); } }
## Import ### Identity Schema #### Required * `name` - (String) Name of the parameter. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import SSM Parameters using the parameter store `name`. For example: ```sh $ pulumi import aws:ssm/parameter:Parameter example /my_path/my_paramname ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.rds.Instance; import com.pulumi.aws.rds.InstanceArgs; import com.pulumi.aws.ssm.Parameter; import com.pulumi.aws.ssm.ParameterArgs; import java.util.ArrayList; import java.util.Arrays; 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 Instance("default", InstanceArgs.builder() .allocatedStorage(10) .storageType("gp2") .engine("mysql") .engineVersion("5.7.16") .instanceClass("db.t2.micro") .dbName("mydb") .username("foo") .password(databaseMasterPassword) .dbSubnetGroupName("my_database_subnet_group") .parameterGroupName("default.mysql5.7") .build()); var secret = new Parameter("secret", ParameterArgs.builder() .name("/production/database/password/master") .description("The parameter description") .type("SecureString") .value(databaseMasterPassword) .tags(Map.of("environment", "production")) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Parameter(java.lang.String name)Parameter(java.lang.String name, ParameterArgs args)Parameter(java.lang.String name, ParameterArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.String>>allowedPattern()com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.String>dataType()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()static Parameterget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ParameterState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.Boolean>hasValueWo()com.pulumi.core.Output<java.lang.String>insecureValue()com.pulumi.core.Output<java.lang.String>keyId()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>overwrite()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.lang.String>tier()com.pulumi.core.Output<java.lang.String>type()com.pulumi.core.Output<java.lang.String>value()com.pulumi.core.Output<java.util.Optional<java.lang.String>>valueWo()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>valueWoVersion()com.pulumi.core.Output<java.lang.Integer>version()
-
-
-
Constructor Detail
-
Parameter
public Parameter(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Parameter
public Parameter(java.lang.String name, ParameterArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Parameter
public Parameter(java.lang.String name, ParameterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
allowedPattern
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> allowedPattern()
- Returns:
- Regular expression used to validate the parameter value.
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the parameter.
-
dataType
public com.pulumi.core.Output<java.lang.String> dataType()
- Returns:
- Data type of the parameter. Valid values: `text`, `aws:ssm:integration` and `aws:ec2:image` for AMI format, see the [Native parameter support for AMI IDs](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html).
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- Description of the parameter.
-
hasValueWo
public com.pulumi.core.Output<java.lang.Boolean> hasValueWo()
- Returns:
- Indicates whether the resource has a `valueWo` set.
-
insecureValue
public com.pulumi.core.Output<java.lang.String> insecureValue()
- Returns:
- Value of the parameter. **Use caution:** This value is _never_ marked as sensitive in the pulumi preview output. This argument is not valid with a `type` of `SecureString`.
-
keyId
public com.pulumi.core.Output<java.lang.String> keyId()
- Returns:
- KMS key ID or ARN for encrypting a SecureString.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the parameter. If the name contains a path (e.g., any forward slashes (`/`)), it must be fully qualified with a leading forward slash (`/`). For additional requirements and constraints, see the [AWS SSM User Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-parameter-name-constraints.html).
-
overwrite
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> overwrite()
- Returns:
- Overwrite an existing parameter. If not specified, defaults to `false` during create operations to avoid overwriting existing resources and then `true` for all subsequent operations once the resource is managed by IAC. Lifecycle rules should be used to manage non-standard update behavior.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Map of tags to assign to the object. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
tier
public com.pulumi.core.Output<java.lang.String> tier()
- Returns:
- Parameter tier to assign to the parameter. If not specified, will use the default parameter tier for the region. Valid tiers are `Standard`, `Advanced`, and `Intelligent-Tiering`. Downgrading an `Advanced` tier parameter to `Standard` will recreate the resource. For more information on parameter tiers, see the [AWS SSM Parameter tier comparison and guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html).
-
type
public com.pulumi.core.Output<java.lang.String> type()
- Returns:
- Type of the parameter. Valid types are `String`, `StringList` and `SecureString`. The following arguments are optional:
-
value
public com.pulumi.core.Output<java.lang.String> value()
- Returns:
- Value of the parameter. This value is always marked as sensitive in the pulumi preview output, regardless of `type
-
valueWo
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> valueWo()
- Returns:
- **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. Value of the parameter. This value is always marked as sensitive in the pulumi preview output, regardless of `type`. Additionally, `write-only` values are never stored to state. If set, requires `valueWoVersion`.
-
valueWoVersion
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> valueWoVersion()
- Returns:
- Required when `valueWo` is set. Changing this value triggers an update to `valueWo`. > **NOTE:** `aws:ssm:integration` dataType parameters must be of the type `SecureString` and the name must start with the prefix `/d9d01087-4a3f-49e0-b0b4-d568d7826553/ssm/integrations/webhook/`. See [here](https://docs.aws.amazon.com/systems-manager/latest/userguide/creating-integrations.html) for information on the usage of `aws:ssm:integration` parameters.
-
version
public com.pulumi.core.Output<java.lang.Integer> version()
- Returns:
- Version of the parameter.
-
get
public static Parameter get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ParameterState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-