github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ssm/getParametersByPath.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package ssm 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 func GetParametersByPath(ctx *pulumi.Context, args *GetParametersByPathArgs, opts ...pulumi.InvokeOption) (*GetParametersByPathResult, error) { 15 opts = internal.PkgInvokeDefaultOpts(opts) 16 var rv GetParametersByPathResult 17 err := ctx.Invoke("aws:ssm/getParametersByPath:getParametersByPath", args, &rv, opts...) 18 if err != nil { 19 return nil, err 20 } 21 return &rv, nil 22 } 23 24 // A collection of arguments for invoking getParametersByPath. 25 type GetParametersByPathArgs struct { 26 // 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`). 27 Path string `pulumi:"path"` 28 // Whether to retrieve all parameters within the hirerachy. Defaults to `false`. 29 Recursive *bool `pulumi:"recursive"` 30 // Whether to retrieve all parameters in the hierarchy, particularly those of `SecureString` type, with their value decrypted. Defaults to `true`. 31 WithDecryption *bool `pulumi:"withDecryption"` 32 } 33 34 // A collection of values returned by getParametersByPath. 35 type GetParametersByPathResult struct { 36 // A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters. 37 Arns []string `pulumi:"arns"` 38 // The provider-assigned unique ID for this managed resource. 39 Id string `pulumi:"id"` 40 // A list that contains the names of the retrieved parameters. 41 Names []string `pulumi:"names"` 42 Path string `pulumi:"path"` 43 Recursive *bool `pulumi:"recursive"` 44 // A list that contains the types (`String`, `StringList`, or `SecureString`) of retrieved parameters. 45 Types []string `pulumi:"types"` 46 // 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. 47 Values []string `pulumi:"values"` 48 WithDecryption *bool `pulumi:"withDecryption"` 49 } 50 51 func GetParametersByPathOutput(ctx *pulumi.Context, args GetParametersByPathOutputArgs, opts ...pulumi.InvokeOption) GetParametersByPathResultOutput { 52 return pulumi.ToOutputWithContext(context.Background(), args). 53 ApplyT(func(v interface{}) (GetParametersByPathResult, error) { 54 args := v.(GetParametersByPathArgs) 55 r, err := GetParametersByPath(ctx, &args, opts...) 56 var s GetParametersByPathResult 57 if r != nil { 58 s = *r 59 } 60 return s, err 61 }).(GetParametersByPathResultOutput) 62 } 63 64 // A collection of arguments for invoking getParametersByPath. 65 type GetParametersByPathOutputArgs struct { 66 // 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`). 67 Path pulumi.StringInput `pulumi:"path"` 68 // Whether to retrieve all parameters within the hirerachy. Defaults to `false`. 69 Recursive pulumi.BoolPtrInput `pulumi:"recursive"` 70 // Whether to retrieve all parameters in the hierarchy, particularly those of `SecureString` type, with their value decrypted. Defaults to `true`. 71 WithDecryption pulumi.BoolPtrInput `pulumi:"withDecryption"` 72 } 73 74 func (GetParametersByPathOutputArgs) ElementType() reflect.Type { 75 return reflect.TypeOf((*GetParametersByPathArgs)(nil)).Elem() 76 } 77 78 // A collection of values returned by getParametersByPath. 79 type GetParametersByPathResultOutput struct{ *pulumi.OutputState } 80 81 func (GetParametersByPathResultOutput) ElementType() reflect.Type { 82 return reflect.TypeOf((*GetParametersByPathResult)(nil)).Elem() 83 } 84 85 func (o GetParametersByPathResultOutput) ToGetParametersByPathResultOutput() GetParametersByPathResultOutput { 86 return o 87 } 88 89 func (o GetParametersByPathResultOutput) ToGetParametersByPathResultOutputWithContext(ctx context.Context) GetParametersByPathResultOutput { 90 return o 91 } 92 93 // A list that contains the Amazon Resource Names (ARNs) of the retrieved parameters. 94 func (o GetParametersByPathResultOutput) Arns() pulumi.StringArrayOutput { 95 return o.ApplyT(func(v GetParametersByPathResult) []string { return v.Arns }).(pulumi.StringArrayOutput) 96 } 97 98 // The provider-assigned unique ID for this managed resource. 99 func (o GetParametersByPathResultOutput) Id() pulumi.StringOutput { 100 return o.ApplyT(func(v GetParametersByPathResult) string { return v.Id }).(pulumi.StringOutput) 101 } 102 103 // A list that contains the names of the retrieved parameters. 104 func (o GetParametersByPathResultOutput) Names() pulumi.StringArrayOutput { 105 return o.ApplyT(func(v GetParametersByPathResult) []string { return v.Names }).(pulumi.StringArrayOutput) 106 } 107 108 func (o GetParametersByPathResultOutput) Path() pulumi.StringOutput { 109 return o.ApplyT(func(v GetParametersByPathResult) string { return v.Path }).(pulumi.StringOutput) 110 } 111 112 func (o GetParametersByPathResultOutput) Recursive() pulumi.BoolPtrOutput { 113 return o.ApplyT(func(v GetParametersByPathResult) *bool { return v.Recursive }).(pulumi.BoolPtrOutput) 114 } 115 116 // A list that contains the types (`String`, `StringList`, or `SecureString`) of retrieved parameters. 117 func (o GetParametersByPathResultOutput) Types() pulumi.StringArrayOutput { 118 return o.ApplyT(func(v GetParametersByPathResult) []string { return v.Types }).(pulumi.StringArrayOutput) 119 } 120 121 // 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. 122 func (o GetParametersByPathResultOutput) Values() pulumi.StringArrayOutput { 123 return o.ApplyT(func(v GetParametersByPathResult) []string { return v.Values }).(pulumi.StringArrayOutput) 124 } 125 126 func (o GetParametersByPathResultOutput) WithDecryption() pulumi.BoolPtrOutput { 127 return o.ApplyT(func(v GetParametersByPathResult) *bool { return v.WithDecryption }).(pulumi.BoolPtrOutput) 128 } 129 130 func init() { 131 pulumi.RegisterOutputType(GetParametersByPathResultOutput{}) 132 }