1. Packages
  2. AWS
  3. API Docs
  4. ssm
  5. getParameter
AWS v6.82.2 published on Thursday, Jun 12, 2025 by Pulumi

aws.ssm.getParameter

Explore with Pulumi AI

aws logo
AWS v6.82.2 published on Thursday, Jun 12, 2025 by Pulumi

    Provides an SSM Parameter data source.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const foo = aws.ssm.getParameter({
        name: "foo",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    foo = aws.ssm.get_parameter(name="foo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.LookupParameter(ctx, &ssm.LookupParameterArgs{
    			Name: "foo",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Aws.Ssm.GetParameter.Invoke(new()
        {
            Name = "foo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssm.SsmFunctions;
    import com.pulumi.aws.ssm.inputs.GetParameterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var foo = SsmFunctions.getParameter(GetParameterArgs.builder()
                .name("foo")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: aws:ssm:getParameter
          arguments:
            name: foo
    

    Note: The unencrypted value of a SecureString will be stored in the raw state as plain-text.

    Using getParameter

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getParameter(args: GetParameterArgs, opts?: InvokeOptions): Promise<GetParameterResult>
    function getParameterOutput(args: GetParameterOutputArgs, opts?: InvokeOptions): Output<GetParameterResult>
    def get_parameter(name: Optional[str] = None,
                      with_decryption: Optional[bool] = None,
                      opts: Optional[InvokeOptions] = None) -> GetParameterResult
    def get_parameter_output(name: Optional[pulumi.Input[str]] = None,
                      with_decryption: Optional[pulumi.Input[bool]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetParameterResult]
    func LookupParameter(ctx *Context, args *LookupParameterArgs, opts ...InvokeOption) (*LookupParameterResult, error)
    func LookupParameterOutput(ctx *Context, args *LookupParameterOutputArgs, opts ...InvokeOption) LookupParameterResultOutput

    > Note: This function is named LookupParameter in the Go SDK.

    public static class GetParameter 
    {
        public static Task<GetParameterResult> InvokeAsync(GetParameterArgs args, InvokeOptions? opts = null)
        public static Output<GetParameterResult> Invoke(GetParameterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetParameterResult> getParameter(GetParameterArgs args, InvokeOptions options)
    public static Output<GetParameterResult> getParameter(GetParameterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:ssm/getParameter:getParameter
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the parameter.
    WithDecryption bool
    Whether to return decrypted SecureString value. Defaults to true.
    Name string
    Name of the parameter.
    WithDecryption bool
    Whether to return decrypted SecureString value. Defaults to true.
    name String
    Name of the parameter.
    withDecryption Boolean
    Whether to return decrypted SecureString value. Defaults to true.
    name string
    Name of the parameter.
    withDecryption boolean
    Whether to return decrypted SecureString value. Defaults to true.
    name str
    Name of the parameter.
    with_decryption bool
    Whether to return decrypted SecureString value. Defaults to true.
    name String
    Name of the parameter.
    withDecryption Boolean
    Whether to return decrypted SecureString value. Defaults to true.

    getParameter Result

    The following output properties are available:

    Arn string
    ARN of the parameter.
    Id string
    The provider-assigned unique ID for this managed resource.
    InsecureValue string
    Value of the parameter. Use caution: This value is never marked as sensitive.
    Name string
    Name of the parameter.
    Type string
    Type of the parameter. Valid types are String, StringList and SecureString.
    Value string
    Value of the parameter. This value is always marked as sensitive in the pulumi preview output, regardless of type.
    Version int
    Version of the parameter.
    WithDecryption bool
    Arn string
    ARN of the parameter.
    Id string
    The provider-assigned unique ID for this managed resource.
    InsecureValue string
    Value of the parameter. Use caution: This value is never marked as sensitive.
    Name string
    Name of the parameter.
    Type string
    Type of the parameter. Valid types are String, StringList and SecureString.
    Value string
    Value of the parameter. This value is always marked as sensitive in the pulumi preview output, regardless of type.
    Version int
    Version of the parameter.
    WithDecryption bool
    arn String
    ARN of the parameter.
    id String
    The provider-assigned unique ID for this managed resource.
    insecureValue String
    Value of the parameter. Use caution: This value is never marked as sensitive.
    name String
    Name of the parameter.
    type String
    Type of the parameter. Valid types are String, StringList and SecureString.
    value String
    Value of the parameter. This value is always marked as sensitive in the pulumi preview output, regardless of type.
    version Integer
    Version of the parameter.
    withDecryption Boolean
    arn string
    ARN of the parameter.
    id string
    The provider-assigned unique ID for this managed resource.
    insecureValue string
    Value of the parameter. Use caution: This value is never marked as sensitive.
    name string
    Name of the parameter.
    type string
    Type of the parameter. Valid types are String, StringList and SecureString.
    value string
    Value of the parameter. This value is always marked as sensitive in the pulumi preview output, regardless of type.
    version number
    Version of the parameter.
    withDecryption boolean
    arn str
    ARN of the parameter.
    id str
    The provider-assigned unique ID for this managed resource.
    insecure_value str
    Value of the parameter. Use caution: This value is never marked as sensitive.
    name str
    Name of the parameter.
    type str
    Type of the parameter. Valid types are String, StringList and SecureString.
    value str
    Value of the parameter. This value is always marked as sensitive in the pulumi preview output, regardless of type.
    version int
    Version of the parameter.
    with_decryption bool
    arn String
    ARN of the parameter.
    id String
    The provider-assigned unique ID for this managed resource.
    insecureValue String
    Value of the parameter. Use caution: This value is never marked as sensitive.
    name String
    Name of the parameter.
    type String
    Type of the parameter. Valid types are String, StringList and SecureString.
    value String
    Value of the parameter. This value is always marked as sensitive in the pulumi preview output, regardless of type.
    version Number
    Version of the parameter.
    withDecryption Boolean

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.82.2 published on Thursday, Jun 12, 2025 by Pulumi