1. Packages
  2. AWS
  3. API Docs
  4. ssm
  5. getParametersByPath
Viewing docs for AWS v7.22.0
published on Wednesday, Mar 11, 2026 by Pulumi
aws logo
Viewing docs for AWS v7.22.0
published on Wednesday, Mar 11, 2026 by Pulumi

    Use this data source to get information about one or more System Manager parameters in a specific hierarchy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ssm.getParametersByPath({
        path: "/site/newyork/department/",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssm.get_parameters_by_path(path="/site/newyork/department/")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssm.GetParametersByPath(ctx, &ssm.GetParametersByPathArgs{
    			Path: "/site/newyork/department/",
    		}, 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 example = Aws.Ssm.GetParametersByPath.Invoke(new()
        {
            Path = "/site/newyork/department/",
        });
    
    });
    
    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.GetParametersByPathArgs;
    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 example = SsmFunctions.getParametersByPath(GetParametersByPathArgs.builder()
                .path("/site/newyork/department/")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:ssm:getParametersByPath
          arguments:
            path: /site/newyork/department/
    

    Note: When the with_decryption argument is set to true, the unencrypted values of SecureString parameters will be stored in the raw state as plain-text as per normal Terraform behavior. > Note: The data source follows the behavior of the SSM API to return a string value, regardless of parameter type. For StringList type where the value is returned as a comma-separated string with no spaces between comma, you may use the built-in split function to get values in a list. Example: split(",", data.aws_ssm_parameter.subnets.value)

    Using getParametersByPath

    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 getParametersByPath(args: GetParametersByPathArgs, opts?: InvokeOptions): Promise<GetParametersByPathResult>
    function getParametersByPathOutput(args: GetParametersByPathOutputArgs, opts?: InvokeOptions): Output<GetParametersByPathResult>
    def get_parameters_by_path(path: Optional[str] = None,
                               recursive: Optional[bool] = None,
                               region: Optional[str] = None,
                               with_decryption: Optional[bool] = None,
                               opts: Optional[InvokeOptions] = None) -> GetParametersByPathResult
    def get_parameters_by_path_output(path: Optional[pulumi.Input[str]] = None,
                               recursive: Optional[pulumi.Input[bool]] = None,
                               region: Optional[pulumi.Input[str]] = None,
                               with_decryption: Optional[pulumi.Input[bool]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetParametersByPathResult]
    func GetParametersByPath(ctx *Context, args *GetParametersByPathArgs, opts ...InvokeOption) (*GetParametersByPathResult, error)
    func GetParametersByPathOutput(ctx *Context, args *GetParametersByPathOutputArgs, opts ...InvokeOption) GetParametersByPathResultOutput

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

    public static class GetParametersByPath 
    {
        public static Task<GetParametersByPathResult> InvokeAsync(GetParametersByPathArgs args, InvokeOptions? opts = null)
        public static Output<GetParametersByPathResult> Invoke(GetParametersByPathInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetParametersByPathResult> getParametersByPath(GetParametersByPathArgs args, InvokeOptions options)
    public static Output<GetParametersByPathResult> getParametersByPath(GetParametersByPathArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:ssm/getParametersByPath:getParametersByPath
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Path string
    The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. The last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Note: If the parameter name (e.g., /my-app/my-param) is specified, the data source will not retrieve any value as designed, unless there are other parameters that happen to use the former path in their hierarchy (e.g., /my-app/my-param/my-actual-param).
    Recursive bool
    Whether to retrieve all parameters within the hirerachy. Defaults to false.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    WithDecryption bool
    Whether to retrieve all parameters in the hierarchy, particularly those of SecureString type, with their value decrypted. Defaults to true.
    Path string
    The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. The last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Note: If the parameter name (e.g., /my-app/my-param) is specified, the data source will not retrieve any value as designed, unless there are other parameters that happen to use the former path in their hierarchy (e.g., /my-app/my-param/my-actual-param).
    Recursive bool
    Whether to retrieve all parameters within the hirerachy. Defaults to false.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    WithDecryption bool
    Whether to retrieve all parameters in the hierarchy, particularly those of SecureString type, with their value decrypted. Defaults to true.
    path String
    The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. The last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Note: If the parameter name (e.g., /my-app/my-param) is specified, the data source will not retrieve any value as designed, unless there are other parameters that happen to use the former path in their hierarchy (e.g., /my-app/my-param/my-actual-param).
    recursive Boolean
    Whether to retrieve all parameters within the hirerachy. Defaults to false.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    withDecryption Boolean
    Whether to retrieve all parameters in the hierarchy, particularly those of SecureString type, with their value decrypted. Defaults to true.
    path string
    The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. The last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Note: If the parameter name (e.g., /my-app/my-param) is specified, the data source will not retrieve any value as designed, unless there are other parameters that happen to use the former path in their hierarchy (e.g., /my-app/my-param/my-actual-param).
    recursive boolean
    Whether to retrieve all parameters within the hirerachy. Defaults to false.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    withDecryption boolean
    Whether to retrieve all parameters in the hierarchy, particularly those of SecureString type, with their value decrypted. Defaults to true.
    path str
    The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. The last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Note: If the parameter name (e.g., /my-app/my-param) is specified, the data source will not retrieve any value as designed, unless there are other parameters that happen to use the former path in their hierarchy (e.g., /my-app/my-param/my-actual-param).
    recursive bool
    Whether to retrieve all parameters within the hirerachy. Defaults to false.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    with_decryption bool
    Whether to retrieve all parameters in the hierarchy, particularly those of SecureString type, with their value decrypted. Defaults to true.
    path String
    The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. The last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Note: If the parameter name (e.g., /my-app/my-param) is specified, the data source will not retrieve any value as designed, unless there are other parameters that happen to use the former path in their hierarchy (e.g., /my-app/my-param/my-actual-param).
    recursive Boolean
    Whether to retrieve all parameters within the hirerachy. Defaults to false.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    withDecryption Boolean
    Whether to retrieve all parameters in the hierarchy, particularly those of SecureString type, with their value decrypted. Defaults to true.

    getParametersByPath Result

    The following output properties are available:

    Arns List<string>
    A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters.
    Id string
    The provider-assigned unique ID for this managed resource.
    Names List<string>
    A list that contains the names of the retrieved parameters.
    Path string
    Region string
    Types List<string>
    A list that contains the types (String, StringList, or SecureString) of retrieved parameters.
    Values List<string>
    A list that contains the retrieved parameter values. Note: This value is always marked as sensitive in the pulumi preview output, regardless of whether any retrieved parameters are of SecureString type. Use the nonsensitive function to override the behavior at your own risk and discretion, if you are certain that there are no sensitive values being retrieved.
    Recursive bool
    WithDecryption bool
    Arns []string
    A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters.
    Id string
    The provider-assigned unique ID for this managed resource.
    Names []string
    A list that contains the names of the retrieved parameters.
    Path string
    Region string
    Types []string
    A list that contains the types (String, StringList, or SecureString) of retrieved parameters.
    Values []string
    A list that contains the retrieved parameter values. Note: This value is always marked as sensitive in the pulumi preview output, regardless of whether any retrieved parameters are of SecureString type. Use the nonsensitive function to override the behavior at your own risk and discretion, if you are certain that there are no sensitive values being retrieved.
    Recursive bool
    WithDecryption bool
    arns List<String>
    A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters.
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    A list that contains the names of the retrieved parameters.
    path String
    region String
    types List<String>
    A list that contains the types (String, StringList, or SecureString) of retrieved parameters.
    values List<String>
    A list that contains the retrieved parameter values. Note: This value is always marked as sensitive in the pulumi preview output, regardless of whether any retrieved parameters are of SecureString type. Use the nonsensitive function to override the behavior at your own risk and discretion, if you are certain that there are no sensitive values being retrieved.
    recursive Boolean
    withDecryption Boolean
    arns string[]
    A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters.
    id string
    The provider-assigned unique ID for this managed resource.
    names string[]
    A list that contains the names of the retrieved parameters.
    path string
    region string
    types string[]
    A list that contains the types (String, StringList, or SecureString) of retrieved parameters.
    values string[]
    A list that contains the retrieved parameter values. Note: This value is always marked as sensitive in the pulumi preview output, regardless of whether any retrieved parameters are of SecureString type. Use the nonsensitive function to override the behavior at your own risk and discretion, if you are certain that there are no sensitive values being retrieved.
    recursive boolean
    withDecryption boolean
    arns Sequence[str]
    A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters.
    id str
    The provider-assigned unique ID for this managed resource.
    names Sequence[str]
    A list that contains the names of the retrieved parameters.
    path str
    region str
    types Sequence[str]
    A list that contains the types (String, StringList, or SecureString) of retrieved parameters.
    values Sequence[str]
    A list that contains the retrieved parameter values. Note: This value is always marked as sensitive in the pulumi preview output, regardless of whether any retrieved parameters are of SecureString type. Use the nonsensitive function to override the behavior at your own risk and discretion, if you are certain that there are no sensitive values being retrieved.
    recursive bool
    with_decryption bool
    arns List<String>
    A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters.
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    A list that contains the names of the retrieved parameters.
    path String
    region String
    types List<String>
    A list that contains the types (String, StringList, or SecureString) of retrieved parameters.
    values List<String>
    A list that contains the retrieved parameter values. Note: This value is always marked as sensitive in the pulumi preview output, regardless of whether any retrieved parameters are of SecureString type. Use the nonsensitive function to override the behavior at your own risk and discretion, if you are certain that there are no sensitive values being retrieved.
    recursive Boolean
    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
    Viewing docs for AWS v7.22.0
    published on Wednesday, Mar 11, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.