Show / Hide Table of Contents

Class StringParameter

Creates a new String SSM Parameter.

Inheritance
object
Resource
StringParameter
Implements
IStringParameter
IParameter
IResource
IParameterRef
IConstruct
IDependable
IEncryptedResource
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.SSM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class StringParameter : Resource, IStringParameter, IParameter, IResource, IParameterRef, IConstruct, IDependable, IEncryptedResource, IEnvironmentAware
Syntax (vb)
Public Class StringParameter Inherits Resource Implements IStringParameter, IParameter, IResource, IParameterRef, IConstruct, IDependable, IEncryptedResource, IEnvironmentAware
Remarks

Resource: AWS::SSM::Parameter

Examples
var ssmParameter = new StringParameter(this, "mySsmParameter", new StringParameterProps {
                ParameterName = "mySsmParameter",
                StringValue = "mySsmParameterValue"
            });

Synopsis

Constructors

StringParameter(Construct, string, IStringParameterProps)

Creates a new String SSM Parameter.

Properties

EncryptionKey

The encryption key that is used to encrypt this parameter.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

ParameterArn

The ARN of the SSM Parameter resource.

ParameterName

The name of the SSM Parameter resource.

ParameterRef

A reference to a 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.

GrantOnKey(IGrantable, params string[])

Gives permissions to a grantable entity to perform actions on the encryption key.

GrantRead(IGrantable)

[disable-awslint:no-grants].

GrantWrite(IGrantable)

[disable-awslint:no-grants].

ValueForSecureStringParameter(Construct, string, double)

(deprecated) Returns a token that will resolve (during deployment).

ValueForStringParameter(Construct, string, double?)

Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.

ValueForTypedStringParameter(Construct, string, ParameterType?, double?)

(deprecated) Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.

ValueForTypedStringParameterV2(Construct, string, ParameterValueType?, double?)

Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.

ValueFromLookup(Construct, string, string?, IStringParameterLookupOptions?)

Reads the value of an SSM parameter during synthesis through an environmental context provider.

Constructors

StringParameter(Construct, string, IStringParameterProps)

Creates a new String SSM Parameter.

public StringParameter(Construct scope, string id, IStringParameterProps props)
Parameters
scope Construct
id string
props IStringParameterProps
Remarks

Resource: AWS::SSM::Parameter

Examples
var ssmParameter = new StringParameter(this, "mySsmParameter", new StringParameterProps {
                ParameterName = "mySsmParameter",
                StringValue = "mySsmParameterValue"
            });

Properties

EncryptionKey

The encryption key that is used to encrypt this parameter.

public virtual IKey? EncryptionKey { get; }
Property Value

IKey

Remarks

Default: - default master key

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Resource: AWS::SSM::Parameter

ParameterArn

The ARN of the SSM Parameter resource.

public virtual string ParameterArn { get; }
Property Value

string

Remarks

Resource: AWS::SSM::Parameter

ParameterName

The name of the SSM Parameter resource.

public virtual string ParameterName { get; }
Property Value

string

Remarks

Resource: AWS::SSM::Parameter

ParameterRef

A reference to a Parameter resource.

public virtual IParameterReference ParameterRef { get; }
Property Value

IParameterReference

Remarks

Resource: AWS::SSM::Parameter

ParameterType

The type of the SSM Parameter resource.

public virtual string ParameterType { get; }
Property Value

string

Remarks

Resource: AWS::SSM::Parameter

StringValue

The parameter value.

public virtual string StringValue { get; }
Property Value

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 Construct
id string
attrs ISecureStringParameterAttributes
Returns

IStringParameter

Remarks

Resource: AWS::SSM::Parameter

FromStringParameterArn(Construct, string, string)

Imports an external string parameter by ARN.

public static IStringParameter FromStringParameterArn(Construct scope, string id, string stringParameterArn)
Parameters
scope Construct
id string
stringParameterArn string
Returns

IStringParameter

Remarks

Resource: AWS::SSM::Parameter

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 Construct
id string
attrs IStringParameterAttributes
Returns

IStringParameter

Remarks

Resource: AWS::SSM::Parameter

FromStringParameterName(Construct, string, string)

Imports an external string parameter by name.

public static IStringParameter FromStringParameterName(Construct scope, string id, string stringParameterName)
Parameters
scope Construct
id string
stringParameterName string
Returns

IStringParameter

Remarks

Resource: AWS::SSM::Parameter

GrantOnKey(IGrantable, params string[])

Gives permissions to a grantable entity to perform actions on the encryption key.

public virtual IGrantOnKeyResult GrantOnKey(IGrantable grantee, params string[] actions)
Parameters
grantee IGrantable
actions string[]
Returns

IGrantOnKeyResult

Remarks

Resource: AWS::SSM::Parameter

GrantRead(IGrantable)

[disable-awslint:no-grants].

public virtual Grant GrantRead(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

Remarks

Resource: AWS::SSM::Parameter

GrantWrite(IGrantable)

[disable-awslint:no-grants].

public virtual Grant GrantWrite(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

Remarks

Resource: AWS::SSM::Parameter

ValueForSecureStringParameter(Construct, string, double)

(deprecated) Returns a token that will resolve (during deployment).

[Obsolete("Use `SecretValue.ssmSecure()` instead, it will correctly type the imported value as a `SecretValue` and allow importing without version. `SecretValue` lives in the core `aws-cdk-lib` module.")]
public static string ValueForSecureStringParameter(Construct scope, string parameterName, double version)
Parameters
scope Construct

Some scope within a stack.

parameterName string

The name of the SSM parameter.

version double

The parameter version (required for secure strings).

Returns

string

Remarks

Stability: Deprecated

ValueForStringParameter(Construct, string, 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, double? version = null)
Parameters
scope Construct

Some scope within a stack.

parameterName string

The name of the SSM parameter.

version double?

The parameter version (recommended in order to ensure that the value won't change during deployment).

Returns

string

Remarks

Resource: AWS::SSM::Parameter

ValueForTypedStringParameter(Construct, string, ParameterType?, double?)

(deprecated) Returns a token that will resolve (during deployment) to the string value of an SSM string parameter.

[Obsolete("- use valueForTypedStringParameterV2 instead")]
public static string ValueForTypedStringParameter(Construct scope, string parameterName, ParameterType? type = null, double? version = null)
Parameters
scope Construct

Some scope within a stack.

parameterName string

The name of the SSM parameter.

type ParameterType?

The type of the SSM parameter.

version double?

The parameter version (recommended in order to ensure that the value won't change during deployment).

Returns

string

Remarks

Stability: Deprecated

ValueForTypedStringParameterV2(Construct, string, ParameterValueType?, 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, ParameterValueType? type = null, double? version = null)
Parameters
scope Construct

Some scope within a stack.

parameterName string

The name of the SSM parameter.

type ParameterValueType?

The type of the SSM parameter.

version double?

The parameter version (recommended in order to ensure that the value won't change during deployment).

Returns

string

Remarks

Resource: AWS::SSM::Parameter

ValueFromLookup(Construct, string, string?, IStringParameterLookupOptions?)

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, IStringParameterLookupOptions? options = null)
Parameters
scope Construct
parameterName string
defaultValue string
options IStringParameterLookupOptions
Returns

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.

Implements

IStringParameter
IParameter
IResource
IParameterRef
Constructs.IConstruct
Constructs.IDependable
IEncryptedResource
IEnvironmentAware
Back to top Generated by DocFX