getParametersByPath function
- GetParametersByPathArgs args, {
- InvokeOptions? options,
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/")
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 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
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_ssm_getparametersbypath" "example" {
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.ArrayList;
import java.util.Arrays;
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 withDecryption 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)
args Arguments passed to this invoke. Arguments for getParametersByPath.
options Invoke options controlling this call.
Implementation
Future<GetParametersByPathResult> getParametersByPath(
GetParametersByPathArgs args, {
pulumi.InvokeOptions? options,
}) async {
final deployment = pulumi.Deployment.instance;
final result = await deployment.invoke<Map<String, dynamic>>(
'aws:ssm/getParametersByPath:getParametersByPath',
args.toMap(),
options: pulumi.toDeploymentInvokeOptions(options),
);
return GetParametersByPathResult.fromMap(result);
}