Show / Hide Table of Contents

Enum ParameterDataType

SSM parameter data type.

Namespace: Amazon.CDK.AWS.SSM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum ParameterDataType
Syntax (vb)
Public Enum ParameterDataType
Remarks

ExampleMetadata: infused

Examples
var distributionConfiguration = new DistributionConfiguration(this, "DistributionConfiguration", new DistributionConfigurationProps {
                DistributionConfigurationName = "test-distribution-configuration",
                Description = "A Distribution Configuration",
                AmiDistributions = new [] { new AmiDistribution {
                    // Distribute AMI to us-east-2 and publish the AMI ID to an SSM parameter
                    Region = "us-east-2",
                    SsmParameters = new [] { new SSMParameterConfigurations {
                        Parameter = StringParameter.FromStringParameterAttributes(this, "CrossRegionParameter", new StringParameterAttributes {
                            ParameterName = "/imagebuilder/ami",
                            ForceDynamicReference = true
                        })
                    } }
                } }
            });

            // For AMI-based image builds - add an AMI distribution in the current region
            distributionConfiguration.AddAmiDistributions(new AmiDistribution {
                AmiName = "imagebuilder-{{ imagebuilder:buildDate }}",
                AmiDescription = "Build AMI",
                AmiKmsKey = Key.FromLookup(this, "ComponentKey", new KeyLookupOptions { AliasName = "alias/distribution-encryption-key" }),
                // Copy the AMI to different accounts
                AmiTargetAccountIds = new [] { "123456789012", "098765432109" },
                // Add launch permissions on the AMI
                AmiLaunchPermission = new AmiLaunchPermission {
                    OrganizationArns = new [] { FormatArn(new ArnComponents { Region = "", Service = "organizations", Resource = "organization", ResourceName = "o-1234567abc" }) },
                    OrganizationalUnitArns = new [] { FormatArn(new ArnComponents {
                        Region = "",
                        Service = "organizations",
                        Resource = "ou",
                        ResourceName = "o-1234567abc/ou-a123-b4567890"
                    }) },
                    IsPublicUserGroup = true,
                    AccountIds = new [] { "234567890123" }
                },
                // Attach tags to the AMI
                AmiTags = new Dictionary<string, string> {
                    { "Environment", "production" },
                    { "Version", "{{ imagebuilder:buildVersion }}" }
                },
                // Optional - publish the distributed AMI ID to an SSM parameter
                SsmParameters = new [] { new SSMParameterConfigurations {
                    Parameter = StringParameter.FromStringParameterAttributes(this, "Parameter", new StringParameterAttributes {
                        ParameterName = "/imagebuilder/ami",
                        ForceDynamicReference = true
                    })
                }, new SSMParameterConfigurations {
                    AmiAccount = "098765432109",
                    DataType = ParameterDataType.TEXT,
                    Parameter = StringParameter.FromStringParameterAttributes(this, "CrossAccountParameter", new StringParameterAttributes {
                        ParameterName = "imagebuilder-prod-ami",
                        ForceDynamicReference = true
                    })
                } },
                // Optional - create a new launch template version with the distributed AMI ID
                LaunchTemplates = new [] { new LaunchTemplateConfiguration {
                    LaunchTemplate = LaunchTemplate.FromLaunchTemplateAttributes(this, "LaunchTemplate", new LaunchTemplateAttributes {
                        LaunchTemplateId = "lt-1234"
                    }),
                    SetDefaultVersion = true
                }, new LaunchTemplateConfiguration {
                    AccountId = "123456789012",
                    LaunchTemplate = LaunchTemplate.FromLaunchTemplateAttributes(this, "CrossAccountLaunchTemplate", new LaunchTemplateAttributes {
                        LaunchTemplateId = "lt-5678"
                    }),
                    SetDefaultVersion = true
                } },
                // Optional - enable Fast Launch on an imported launch template
                FastLaunchConfigurations = new [] { new FastLaunchConfiguration {
                    Enabled = true,
                    LaunchTemplate = LaunchTemplate.FromLaunchTemplateAttributes(this, "FastLaunchLT", new LaunchTemplateAttributes {
                        LaunchTemplateName = "fast-launch-lt"
                    }),
                    MaxParallelLaunches = 10,
                    TargetSnapshotCount = 2
                } },
                // Optional - license configurations to apply to the AMI
                LicenseConfigurationArns = new [] { "arn:aws:license-manager:us-west-2:123456789012:license-configuration:lic-abcdefghijklmnopqrstuvwxyz" }
            });

Synopsis

Fields

AWS_EC2_IMAGE

Aws Ec2 Image.

TEXT

Text.

Fields

Name Description
AWS_EC2_IMAGE

Aws Ec2 Image.

TEXT

Text.

Back to top Generated by DocFX