Class StringParameter
Creates a new String SSM Parameter.
Inherited Members
Namespace: Amazon.CDK.AWS.SSM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class StringParameter : Resource, IStringParameter, IParameter, IResource
Syntax (vb)
Public Class StringParameter
Inherits Resource
Implements IStringParameter, IParameter, IResource
Remarks
Resource: AWS::SSM::Parameter
Examples
var ssmParameter = new StringParameter(this, "mySsmParameter", new StringParameterProps {
ParameterName = "mySsmParameter",
StringValue = "mySsmParameterValue"
});
Synopsis
Constructors
StringParameter(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
StringParameter(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
StringParameter(Construct, String, IStringParameterProps) |
Properties
EncryptionKey | The encryption key that is used to encrypt this parameter. |
ParameterArn | The ARN of the SSM Parameter resource. |
ParameterName | The name of the SSM Parameter resource. |
ParameterType | The type of the SSM Parameter resource. |
StringValue | The parameter value. |
Methods
FromSecureStringParameterAttributes(Construct, String, ISecureStringParameterAttributes) | Imports a secure string parameter from the SSM parameter store. |
FromStringParameterArn(Construct, String, String) | Imports an external string parameter by ARN. |
FromStringParameterAttributes(Construct, String, IStringParameterAttributes) | Imports an external string parameter with name and optional version. |
FromStringParameterName(Construct, String, String) | Imports an external string parameter by name. |
GrantRead(IGrantable) | Grants read (DescribeParameter, GetParameters, GetParameter, GetParameterHistory) permissions on the SSM Parameter. |
GrantWrite(IGrantable) | Grants write (PutParameter) permissions on the SSM Parameter. |
ValueForSecureStringParameter(Construct, String, Double) | (deprecated) Returns a token that will resolve (during deployment). |
ValueForStringParameter(Construct, String, Nullable<Double>) | Returns a token that will resolve (during deployment) to the string value of an SSM string parameter. |
ValueForTypedStringParameter(Construct, String, Nullable<ParameterType>, Nullable<Double>) | (deprecated) Returns a token that will resolve (during deployment) to the string value of an SSM string parameter. |
ValueForTypedStringParameterV2(Construct, String, Nullable<ParameterValueType>, Nullable<Double>) | Returns a token that will resolve (during deployment) to the string value of an SSM string parameter. |
ValueFromLookup(Construct, String, String) | Reads the value of an SSM parameter during synthesis through an environmental context provider. |
Constructors
StringParameter(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected StringParameter(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
StringParameter(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected StringParameter(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
StringParameter(Construct, String, IStringParameterProps)
public StringParameter(Construct scope, string id, IStringParameterProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IStringParameterProps
Properties
EncryptionKey
The encryption key that is used to encrypt this parameter.
public virtual IKey EncryptionKey { get; }
Property Value
Remarks
Default: - default master key
ParameterArn
The ARN of the SSM Parameter resource.
public virtual string ParameterArn { get; }
Property Value
System.String
ParameterName
The name of the SSM Parameter resource.
public virtual string ParameterName { get; }
Property Value
System.String
ParameterType
The type of the SSM Parameter resource.
public virtual string ParameterType { get; }
Property Value
System.String
StringValue
The parameter value.
public virtual string StringValue { get; }
Property Value
System.String
Remarks
Value must not nest another parameter. Do not use {{}} in the value.
Methods
FromSecureStringParameterAttributes(Construct, String, ISecureStringParameterAttributes)
Imports a secure string parameter from the SSM parameter store.
public static IStringParameter FromSecureStringParameterAttributes(Construct scope, string id, ISecureStringParameterAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs ISecureStringParameterAttributes
Returns
FromStringParameterArn(Construct, String, String)
Imports an external string parameter by ARN.
public static IStringParameter FromStringParameterArn(Construct scope, string id, string stringParameterArn)
Parameters
- scope Constructs.Construct
- id System.String
- stringParameterArn System.String
Returns
FromStringParameterAttributes(Construct, String, IStringParameterAttributes)
Imports an external string parameter with name and optional version.
public static IStringParameter FromStringParameterAttributes(Construct scope, string id, IStringParameterAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IStringParameterAttributes
Returns
FromStringParameterName(Construct, String, String)
Imports an external string parameter by name.
public static IStringParameter FromStringParameterName(Construct scope, string id, string stringParameterName)
Parameters
- scope Constructs.Construct
- id System.String
- stringParameterName System.String
Returns
GrantRead(IGrantable)
Grants read (DescribeParameter, GetParameters, GetParameter, GetParameterHistory) permissions on the SSM Parameter.
public virtual Grant GrantRead(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
GrantWrite(IGrantable)
Grants write (PutParameter) permissions on the SSM Parameter.
public virtual Grant GrantWrite(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
ValueForSecureStringParameter(Construct, String, Double)
(deprecated) Returns a token that will resolve (during deployment).
public static string ValueForSecureStringParameter(Construct scope, string parameterName, double version)
Parameters
- scope Constructs.Construct
Some scope within a stack.
- parameterName System.String
The name of the SSM parameter.
- version System.Double
The parameter version (required for secure strings).
Returns
System.String
Remarks
Stability: Deprecated
ValueForStringParameter(Construct, String, Nullable<Double>)
Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.
public static string ValueForStringParameter(Construct scope, string parameterName, Nullable<double> version = null)
Parameters
- scope Constructs.Construct
Some scope within a stack.
- parameterName System.String
The name of the SSM parameter.
- version System.Nullable<System.Double>
The parameter version (recommended in order to ensure that the value won't change during deployment).
Returns
System.String
ValueForTypedStringParameter(Construct, String, Nullable<ParameterType>, Nullable<Double>)
(deprecated) Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.
public static string ValueForTypedStringParameter(Construct scope, string parameterName, Nullable<ParameterType> type = null, Nullable<double> version = null)
Parameters
- scope Constructs.Construct
Some scope within a stack.
- parameterName System.String
The name of the SSM parameter.
- type System.Nullable<ParameterType>
The type of the SSM parameter.
- version System.Nullable<System.Double>
The parameter version (recommended in order to ensure that the value won't change during deployment).
Returns
System.String
Remarks
Stability: Deprecated
ValueForTypedStringParameterV2(Construct, String, Nullable<ParameterValueType>, Nullable<Double>)
Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.
public static string ValueForTypedStringParameterV2(Construct scope, string parameterName, Nullable<ParameterValueType> type = null, Nullable<double> version = null)
Parameters
- scope Constructs.Construct
Some scope within a stack.
- parameterName System.String
The name of the SSM parameter.
- type System.Nullable<ParameterValueType>
The type of the SSM parameter.
- version System.Nullable<System.Double>
The parameter version (recommended in order to ensure that the value won't change during deployment).
Returns
System.String
ValueFromLookup(Construct, String, String)
Reads the value of an SSM parameter during synthesis through an environmental context provider.
public static string ValueFromLookup(Construct scope, string parameterName, string defaultValue = null)
Parameters
- scope Constructs.Construct
- parameterName System.String
- defaultValue System.String
Returns
System.String
Remarks
Requires that the stack this scope is defined in will have explicit account/region information. Otherwise, it will fail during synthesis.
If defaultValue is provided, it will be used as the dummyValue and the ContextProvider will be told NOT to raise an error on synthesis if the SSM Parameter is not found in the account at synth time.