@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:20.970Z") @Stability(value=Stable) public class StringParameter extends Resource implements IStringParameter, IParameter
Example:
IVpc vpc = Vpc.fromVpcAttributes(this, "VPC", VpcAttributes.builder()
.vpcId("vpc-1234")
.availabilityZones(List.of("us-east-1a", "us-east-1b"))
// Either pass literals for all IDs
.publicSubnetIds(List.of("s-12345", "s-67890"))
// OR: import a list of known length
.privateSubnetIds(Fn.importListValue("PrivateSubnetIds", 2))
// OR: split an imported string to a list of known length
.isolatedSubnetIds(Fn.split(",", StringParameter.valueForStringParameter(this, "MyParameter"), 2))
.build());
| Modifier and Type | Class and Description |
|---|---|
static class |
StringParameter.Builder
A fluent builder for
StringParameter. |
software.amazon.jsii.JsiiObject.InitializationModeIStringParameter.Jsii$Default, IStringParameter.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
StringParameter(software.constructs.Construct scope,
String id,
StringParameterProps props) |
protected |
StringParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
StringParameter(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IStringParameter |
fromSecureStringParameterAttributes(software.constructs.Construct scope,
String id,
SecureStringParameterAttributes attrs)
Imports a secure string parameter from the SSM parameter store.
|
static IStringParameter |
fromStringParameterAttributes(software.constructs.Construct scope,
String id,
StringParameterAttributes attrs)
Imports an external string parameter with name and optional version.
|
static IStringParameter |
fromStringParameterName(software.constructs.Construct scope,
String id,
String stringParameterName)
Imports an external string parameter by name.
|
IKey |
getEncryptionKey()
The encryption key that is used to encrypt this parameter.
|
String |
getParameterArn()
The ARN of the SSM Parameter resource.
|
String |
getParameterName()
The name of the SSM Parameter resource.
|
String |
getParameterType()
The type of the SSM Parameter resource.
|
String |
getStringValue()
The parameter value.
|
Grant |
grantRead(IGrantable grantee)
Grants read (DescribeParameter, GetParameter, GetParameterHistory) permissions on the SSM Parameter.
|
Grant |
grantWrite(IGrantable grantee)
Grants write (PutParameter) permissions on the SSM Parameter.
|
static String |
valueForSecureStringParameter(software.constructs.Construct scope,
String parameterName,
Number version)
Deprecated.
Use `SecretValue.ssmSecure()` instead, it will correctly type the imported value as a `SecretValue` and allow importing without version.
|
static String |
valueForStringParameter(software.constructs.Construct scope,
String parameterName)
Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.
|
static String |
valueForStringParameter(software.constructs.Construct scope,
String parameterName,
Number version)
Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.
|
static String |
valueForTypedStringParameter(software.constructs.Construct scope,
String parameterName)
Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.
|
static String |
valueForTypedStringParameter(software.constructs.Construct scope,
String parameterName,
ParameterType type)
Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.
|
static String |
valueForTypedStringParameter(software.constructs.Construct scope,
String parameterName,
ParameterType type,
Number version)
Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.
|
static String |
valueFromLookup(Construct scope,
String parameterName)
Reads the value of an SSM parameter during synthesis through an environmental context provider.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcegetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackgetNodeprotected StringParameter(software.amazon.jsii.JsiiObjectRef objRef)
protected StringParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public StringParameter(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
StringParameterProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IStringParameter fromSecureStringParameterAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SecureStringParameterAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Stable) @NotNull public static IStringParameter fromStringParameterAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull StringParameterAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Stable) @NotNull public static IStringParameter fromStringParameterName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String stringParameterName)
scope - This parameter is required.id - This parameter is required.stringParameterName - This parameter is required.@Stability(value=Deprecated) @Deprecated @NotNull public static String valueForSecureStringParameter(@NotNull software.constructs.Construct scope, @NotNull String parameterName, @NotNull Number version)
scope - Some scope within a stack. This parameter is required.parameterName - The name of the SSM parameter. This parameter is required.version - The parameter version (required for secure strings). This parameter is required.@Stability(value=Stable) @NotNull public static String valueForStringParameter(@NotNull software.constructs.Construct scope, @NotNull String parameterName, @Nullable Number version)
scope - Some scope within a stack. This parameter is required.parameterName - The name of the SSM parameter. This parameter is required.version - The parameter version (recommended in order to ensure that the value won't change during deployment).@Stability(value=Stable) @NotNull public static String valueForStringParameter(@NotNull software.constructs.Construct scope, @NotNull String parameterName)
scope - Some scope within a stack. This parameter is required.parameterName - The name of the SSM parameter. This parameter is required.@Stability(value=Stable) @NotNull public static String valueForTypedStringParameter(@NotNull software.constructs.Construct scope, @NotNull String parameterName, @Nullable ParameterType type, @Nullable Number version)
scope - Some scope within a stack. This parameter is required.parameterName - The name of the SSM parameter. This parameter is required.type - The type of the SSM parameter.version - The parameter version (recommended in order to ensure that the value won't change during deployment).@Stability(value=Stable) @NotNull public static String valueForTypedStringParameter(@NotNull software.constructs.Construct scope, @NotNull String parameterName, @Nullable ParameterType type)
scope - Some scope within a stack. This parameter is required.parameterName - The name of the SSM parameter. This parameter is required.type - The type of the SSM parameter.@Stability(value=Stable) @NotNull public static String valueForTypedStringParameter(@NotNull software.constructs.Construct scope, @NotNull String parameterName)
scope - Some scope within a stack. This parameter is required.parameterName - The name of the SSM parameter. This parameter is required.@Stability(value=Stable) @NotNull public static String valueFromLookup(@NotNull Construct scope, @NotNull String parameterName)
Requires that the stack this scope is defined in will have explicit account/region information. Otherwise, it will fail during synthesis.
scope - This parameter is required.parameterName - This parameter is required.@Stability(value=Stable) @NotNull public Grant grantRead(@NotNull IGrantable grantee)
grantRead in interface IParametergrantee - This parameter is required.@Stability(value=Stable) @NotNull public Grant grantWrite(@NotNull IGrantable grantee)
grantWrite in interface IParametergrantee - This parameter is required.@Stability(value=Stable) @NotNull public String getParameterArn()
getParameterArn in interface IParameter@Stability(value=Stable) @NotNull public String getParameterName()
getParameterName in interface IParameter@Stability(value=Stable) @NotNull public String getParameterType()
getParameterType in interface IParameter@Stability(value=Stable) @NotNull public String getStringValue()
Value must not nest another parameter. Do not use {{}} in the value.
getStringValue in interface IStringParameter@Stability(value=Stable) @Nullable public IKey getEncryptionKey()
Copyright © 2023. All rights reserved.