Interface StringParameterAttributes

All Superinterfaces:
CommonStringParameterAttributes, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
StringParameterAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:14.274Z") @Stability(Stable) public interface StringParameterAttributes extends software.amazon.jsii.JsiiSerializable, CommonStringParameterAttributes
Attributes for parameters of various types of string.

Example:

 Number parameterVersion = Token.asNumber(Map.of("Ref", "MyParameter"));
 // Retrieve the latest value of the non-secret parameter
 // with name "/My/String/Parameter".
 String stringValue = StringParameter.fromStringParameterAttributes(this, "MyValue", StringParameterAttributes.builder()
         .parameterName("/My/Public/Parameter")
         .build()).getStringValue();
 String stringValueVersionFromToken = StringParameter.fromStringParameterAttributes(this, "MyValueVersionFromToken", StringParameterAttributes.builder()
         .parameterName("/My/Public/Parameter")
         // parameter version from token
         .version(parameterVersion)
         .build()).getStringValue();
 // Retrieve a specific version of the secret (SecureString) parameter.
 // 'version' is always required.
 IStringParameter secretValue = StringParameter.fromSecureStringParameterAttributes(this, "MySecureValue", SecureStringParameterAttributes.builder()
         .parameterName("/My/Secret/Parameter")
         .version(5)
         .build());
 IStringParameter secretValueVersionFromToken = StringParameter.fromSecureStringParameterAttributes(this, "MySecureValueVersionFromToken", SecureStringParameterAttributes.builder()
         .parameterName("/My/Secret/Parameter")
         // parameter version from token
         .version(parameterVersion)
         .build());
 

See Also:
  • Method Details

    • getForceDynamicReference

      @Stability(Stable) @Nullable default Boolean getForceDynamicReference()
      Use a dynamic reference as the representation in CloudFormation template level.

      By default, CDK tries to deduce an appropriate representation based on the parameter value (a CfnParameter or a dynamic reference). Use this flag to override the representation when it does not work.

      Default: false

    • getType

      @Stability(Deprecated) @Deprecated @Nullable default ParameterType getType()
      Deprecated.
      • use valueType instead
      (deprecated) The type of the string parameter.

      Default: ParameterType.STRING

    • getValueType

      @Stability(Stable) @Nullable default ParameterValueType getValueType()
      The type of the string parameter value.

      Using specific types can be helpful in catching invalid values at the start of creating or updating a stack. CloudFormation validates the values against existing values in the account.

      Note - if you want to allow values from different AWS accounts, use ParameterValueType.STRING

      Default: ParameterValueType.STRING

      See Also:
    • getVersion

      @Stability(Stable) @Nullable default Number getVersion()
      The version number of the value you wish to retrieve.

      Default: The latest version will be retrieved.

    • builder

      @Stability(Stable) static StringParameterAttributes.Builder builder()
      Returns:
      a StringParameterAttributes.Builder of StringParameterAttributes