| Interface | Description |
|---|---|
| CfnAssociation.InstanceAssociationOutputLocationProperty |
`InstanceAssociationOutputLocation` is a property of the [AWS::SSM::Association](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html) resource that specifies an Amazon S3 bucket where you want to store the results of this association request.
|
| CfnAssociation.S3OutputLocationProperty |
`S3OutputLocation` is a property of the [AWS::SSM::Association](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html) resource that specifies an Amazon S3 bucket where you want to store the results of this association request.
|
| CfnAssociation.TargetProperty |
`Target` is a property of the [AWS::SSM::Association](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-association.html) resource that specifies the targets for an SSM document in Systems Manager .
|
| CfnAssociationProps |
Properties for defining a `CfnAssociation`.
|
| CfnDocument.AttachmentsSourceProperty |
Identifying information about a document attachment, including the file name and a key-value pair that identifies the location of an attachment to a document.
|
| CfnDocument.DocumentRequiresProperty |
An SSM document required by the current document.
|
| CfnDocumentProps |
Properties for defining a `CfnDocument`.
|
| CfnMaintenanceWindowProps |
Properties for defining a `CfnMaintenanceWindow`.
|
| CfnMaintenanceWindowTarget.TargetsProperty |
The `Targets` property type specifies adding a target to a maintenance window target in AWS Systems Manager .
|
| CfnMaintenanceWindowTargetProps |
Properties for defining a `CfnMaintenanceWindowTarget`.
|
| CfnMaintenanceWindowTask.CloudWatchOutputConfigProperty |
Configuration options for sending command output to Amazon CloudWatch Logs.
|
| CfnMaintenanceWindowTask.LoggingInfoProperty |
The `LoggingInfo` property type specifies information about the Amazon S3 bucket to write instance-level logs to.
|
| CfnMaintenanceWindowTask.MaintenanceWindowAutomationParametersProperty |
The `MaintenanceWindowAutomationParameters` property type specifies the parameters for an `AUTOMATION` task type for a maintenance window task in AWS Systems Manager .
|
| CfnMaintenanceWindowTask.MaintenanceWindowLambdaParametersProperty |
The `MaintenanceWindowLambdaParameters` property type specifies the parameters for a `LAMBDA` task type for a maintenance window task in AWS Systems Manager .
|
| CfnMaintenanceWindowTask.MaintenanceWindowRunCommandParametersProperty |
The `MaintenanceWindowRunCommandParameters` property type specifies the parameters for a `RUN_COMMAND` task type for a maintenance window task in AWS Systems Manager .
|
| CfnMaintenanceWindowTask.MaintenanceWindowStepFunctionsParametersProperty |
The `MaintenanceWindowStepFunctionsParameters` property type specifies the parameters for the execution of a `STEP_FUNCTIONS` task in a Systems Manager maintenance window.
|
| CfnMaintenanceWindowTask.NotificationConfigProperty |
The `NotificationConfig` property type specifies configurations for sending notifications for a maintenance window task in AWS Systems Manager .
|
| CfnMaintenanceWindowTask.TargetProperty |
The `Target` property type specifies targets (either instances or window target IDs).
|
| CfnMaintenanceWindowTask.TaskInvocationParametersProperty |
The `TaskInvocationParameters` property type specifies the task execution parameters for a maintenance window task in AWS Systems Manager .
|
| CfnMaintenanceWindowTaskProps |
Properties for defining a `CfnMaintenanceWindowTask`.
|
| CfnParameterProps |
Properties for defining a `CfnParameter`.
|
| CfnPatchBaseline.PatchFilterGroupProperty |
The `PatchFilterGroup` property type specifies a set of patch filters for an AWS Systems Manager patch baseline, typically used for approval rules for a Systems Manager patch baseline.
|
| CfnPatchBaseline.PatchFilterProperty |
The `PatchFilter` property type defines a patch filter for an AWS Systems Manager patch baseline.
|
| CfnPatchBaseline.PatchSourceProperty |
`PatchSource` is the property type for the `Sources` resource of the [AWS::SSM::PatchBaseline](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-patchbaseline.html) resource.
|
| CfnPatchBaseline.RuleGroupProperty |
The `RuleGroup` property type specifies a set of rules that define the approval rules for an AWS Systems Manager patch baseline.
|
| CfnPatchBaseline.RuleProperty |
The `Rule` property type specifies an approval rule for a Systems Manager patch baseline.
|
| CfnPatchBaselineProps |
Properties for defining a `CfnPatchBaseline`.
|
| CfnResourceDataSync.AwsOrganizationsSourceProperty |
Information about the `AwsOrganizationsSource` resource data sync source.
|
| CfnResourceDataSync.S3DestinationProperty |
Information about the target S3 bucket for the resource data sync.
|
| CfnResourceDataSync.SyncSourceProperty |
Information about the source of the data included in the resource data sync.
|
| CfnResourceDataSyncProps |
Properties for defining a `CfnResourceDataSync`.
|
| CommonStringParameterAttributes |
Common attributes for string parameters.
|
| IParameter |
An SSM Parameter reference.
|
| IParameter.Jsii$Default |
Internal default implementation for
IParameter. |
| IStringListParameter |
A StringList SSM Parameter.
|
| IStringListParameter.Jsii$Default |
Internal default implementation for
IStringListParameter. |
| IStringParameter |
A String SSM Parameter.
|
| IStringParameter.Jsii$Default |
Internal default implementation for
IStringParameter. |
| ListParameterAttributes |
Attributes for parameters of string list type.
|
| ParameterOptions |
Properties needed to create a new SSM Parameter.
|
| SecureStringParameterAttributes |
Attributes for secure string parameters.
|
| StringListParameterProps |
Properties needed to create a StringList SSM Parameter.
|
| StringParameterAttributes |
Attributes for parameters of various types of string.
|
| StringParameterProps |
Properties needed to create a String SSM parameter.
|
| Enum | Description |
|---|---|
| ParameterDataType |
SSM parameter data type.
|
| ParameterTier |
SSM parameter tier.
|
| ParameterType | Deprecated
these types are no longer used
|
| ParameterValueType |
The type of CFN SSM Parameter.
|
This module is part of the AWS Cloud Development Kit project.
You can reference existing SSM Parameter Store values that you want to use in
your CDK app by using ssm.StringParameter.fromStringParameterAttributes:
// 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());
You can also reference an existing SSM Parameter Store value that matches an AWS specific parameter type:
// Example automatically generated from non-compiling source. May contain errors. StringParameter.valueForTypedStringParameterV2(stack, "/My/Public/Parameter", ParameterValueType.AWS_EC2_IMAGE_ID);
To do the same for a SSM Parameter Store value that is stored as a list:
// Example automatically generated from non-compiling source. May contain errors. StringListParameter.valueForTypedListParameter(stack, "/My/Public/Parameter", ParameterValueType.AWS_EC2_IMAGE_ID);
You can also use an existing parameter by looking up the parameter from the AWS environment. This method uses AWS API calls to lookup the value from SSM during synthesis.
// Example automatically generated from non-compiling source. May contain errors. String stringValue = StringParameter.valueFromLookup(stack, "/My/Public/Parameter");
When using valueFromLookup an initial value of 'dummy-value-for-${parameterName}'
(dummy-value-for-/My/Public/Parameter in the above example)
is returned prior to the lookup being performed. This can lead to errors if you are using this
value in places that require a certain format. For example if you have stored the ARN for a SNS
topic in a SSM Parameter which you want to lookup and provide to Topic.fromTopicArn()
String arnLookup = StringParameter.valueFromLookup(this, "/my/topic/arn"); Topic.fromTopicArn(this, "Topic", arnLookup);
Initially arnLookup will be equal to dummy-value-for-/my/topic/arn which will cause
Topic.fromTopicArn to throw an error indicating that the value is not in arn format.
For these use cases you need to handle the dummy-value in your code. For example:
String arnLookup = StringParameter.valueFromLookup(this, "/my/topic/arn");
String arnLookupValue;
if (arnLookup.includes("dummy-value")) {
arnLookupValue = this.formatArn(ArnComponents.builder()
.service("sns")
.resource("topic")
.resourceName(arnLookup)
.build());
} else {
arnLookupValue = arnLookup;
}
Topic.fromTopicArn(this, "Topic", arnLookupValue);
Alternatively, if the property supports tokens you can convert the parameter value into a token to be resolved after the lookup has been completed.
String arnLookup = StringParameter.valueFromLookup(this, "/my/role/arn");
Role.fromRoleArn(this, "role", Lazy.string(Map.of("produce", () => arnLookup)));
You can create either ssm.StringParameter or ssm.StringListParameters in
a CDK app. These are public (not secret) values. Parameters of type
SecureString cannot be created directly from a CDK application; if you want
to provision secrets automatically, use Secrets Manager Secrets (see the
@aws-cdk/aws-secretsmanager package).
StringParameter.Builder.create(this, "Parameter")
.allowedPattern(".*")
.description("The value Foo")
.parameterName("FooParameter")
.stringValue("Foo")
.tier(ParameterTier.ADVANCED)
.build();
// Create a new SSM Parameter holding a String
StringParameter param = StringParameter.Builder.create(stack, "StringParameter")
// description: 'Some user-friendly description',
// name: 'ParameterName',
.stringValue("Initial parameter value")
.build();
// Grant read access to some Role
param.grantRead(role);
// Create a new SSM Parameter holding a StringList
StringListParameter listParameter = StringListParameter.Builder.create(stack, "StringListParameter")
// description: 'Some user-friendly description',
// name: 'ParameterName',
.stringListValue(List.of("Initial parameter value A", "Initial parameter value B"))
.build();
When specifying an allowedPattern, the values provided as string literals
are validated against the pattern and an exception is raised if a value
provided does not comply.
Copyright © 2022. All rights reserved.