Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.oos.getSecretParameters
This data source provides the Oos Secret Parameters of the current Alibaba Cloud user.
NOTE: Available since v1.147.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.oos.SecretParameter("default", {
secretParameterName: name,
value: "tf-testacc-oos_secret_parameter",
type: "Secret",
description: name,
constraints: ` {
\\"AllowedValues\\": [
\\"tf-testacc-oos_secret_parameter\\"
],
\\"AllowedPattern\\": \\"tf-testacc-oos_secret_parameter\\",
\\"MinLength\\": 1,
\\"MaxLength\\": 100
}
`,
tags: {
Created: "TF",
For: "SecretParameter",
},
});
const ids = alicloud.oos.getSecretParametersOutput({
ids: [_default.id],
});
export const oosSecretParameterId0 = ids.apply(ids => ids.parameters?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.oos.SecretParameter("default",
secret_parameter_name=name,
value="tf-testacc-oos_secret_parameter",
type="Secret",
description=name,
constraints=""" {
\"AllowedValues\": [
\"tf-testacc-oos_secret_parameter\"
],
\"AllowedPattern\": \"tf-testacc-oos_secret_parameter\",
\"MinLength\": 1,
\"MaxLength\": 100
}
""",
tags={
"Created": "TF",
"For": "SecretParameter",
})
ids = alicloud.oos.get_secret_parameters_output(ids=[default.id])
pulumi.export("oosSecretParameterId0", ids.parameters[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := oos.NewSecretParameter(ctx, "default", &oos.SecretParameterArgs{
SecretParameterName: pulumi.String(name),
Value: pulumi.String("tf-testacc-oos_secret_parameter"),
Type: pulumi.String("Secret"),
Description: pulumi.String(name),
Constraints: pulumi.String(` {
\"AllowedValues\": [
\"tf-testacc-oos_secret_parameter\"
],
\"AllowedPattern\": \"tf-testacc-oos_secret_parameter\",
\"MinLength\": 1,
\"MaxLength\": 100
}
`),
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
"For": pulumi.String("SecretParameter"),
},
})
if err != nil {
return err
}
ids := oos.GetSecretParametersOutput(ctx, oos.GetSecretParametersOutputArgs{
Ids: pulumi.StringArray{
_default.ID(),
},
}, nil)
ctx.Export("oosSecretParameterId0", ids.ApplyT(func(ids oos.GetSecretParametersResult) (*string, error) {
return &ids.Parameters[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Oos.SecretParameter("default", new()
{
SecretParameterName = name,
Value = "tf-testacc-oos_secret_parameter",
Type = "Secret",
Description = name,
Constraints = @" {
\""AllowedValues\"": [
\""tf-testacc-oos_secret_parameter\""
],
\""AllowedPattern\"": \""tf-testacc-oos_secret_parameter\"",
\""MinLength\"": 1,
\""MaxLength\"": 100
}
",
Tags =
{
{ "Created", "TF" },
{ "For", "SecretParameter" },
},
});
var ids = AliCloud.Oos.GetSecretParameters.Invoke(new()
{
Ids = new[]
{
@default.Id,
},
});
return new Dictionary<string, object?>
{
["oosSecretParameterId0"] = ids.Apply(getSecretParametersResult => getSecretParametersResult.Parameters[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.oos.SecretParameter;
import com.pulumi.alicloud.oos.SecretParameterArgs;
import com.pulumi.alicloud.oos.OosFunctions;
import com.pulumi.alicloud.oos.inputs.GetSecretParametersArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new SecretParameter("default", SecretParameterArgs.builder()
.secretParameterName(name)
.value("tf-testacc-oos_secret_parameter")
.type("Secret")
.description(name)
.constraints("""
{
\"AllowedValues\": [
\"tf-testacc-oos_secret_parameter\"
],
\"AllowedPattern\": \"tf-testacc-oos_secret_parameter\",
\"MinLength\": 1,
\"MaxLength\": 100
}
""")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "SecretParameter")
))
.build());
final var ids = OosFunctions.getSecretParameters(GetSecretParametersArgs.builder()
.ids(default_.id())
.build());
ctx.export("oosSecretParameterId0", ids.applyValue(_ids -> _ids.parameters()[0].id()));
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:oos:SecretParameter
properties:
secretParameterName: ${name}
value: tf-testacc-oos_secret_parameter
type: Secret
description: ${name}
constraints: |2
{
\"AllowedValues\": [
\"tf-testacc-oos_secret_parameter\"
],
\"AllowedPattern\": \"tf-testacc-oos_secret_parameter\",
\"MinLength\": 1,
\"MaxLength\": 100
}
tags:
Created: TF
For: SecretParameter
variables:
ids:
fn::invoke:
function: alicloud:oos:getSecretParameters
arguments:
ids:
- ${default.id}
outputs:
oosSecretParameterId0: ${ids.parameters[0].id}
Using getSecretParameters
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 getSecretParameters(args: GetSecretParametersArgs, opts?: InvokeOptions): Promise<GetSecretParametersResult>
function getSecretParametersOutput(args: GetSecretParametersOutputArgs, opts?: InvokeOptions): Output<GetSecretParametersResult>
def get_secret_parameters(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
resource_group_id: Optional[str] = None,
secret_parameter_name: Optional[str] = None,
sort_field: Optional[str] = None,
sort_order: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
with_decryption: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetSecretParametersResult
def get_secret_parameters_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
secret_parameter_name: Optional[pulumi.Input[str]] = None,
sort_field: Optional[pulumi.Input[str]] = None,
sort_order: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
with_decryption: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecretParametersResult]
func GetSecretParameters(ctx *Context, args *GetSecretParametersArgs, opts ...InvokeOption) (*GetSecretParametersResult, error)
func GetSecretParametersOutput(ctx *Context, args *GetSecretParametersOutputArgs, opts ...InvokeOption) GetSecretParametersResultOutput
> Note: This function is named GetSecretParameters
in the Go SDK.
public static class GetSecretParameters
{
public static Task<GetSecretParametersResult> InvokeAsync(GetSecretParametersArgs args, InvokeOptions? opts = null)
public static Output<GetSecretParametersResult> Invoke(GetSecretParametersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecretParametersResult> getSecretParameters(GetSecretParametersArgs args, InvokeOptions options)
public static Output<GetSecretParametersResult> getSecretParameters(GetSecretParametersArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:oos/getSecretParameters:getSecretParameters
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool - Whether to query the detailed list of resource attributes. Default value:
false
. - Ids List<string>
- A list of Secret Parameter IDs.
- Name
Regex string - A regex string to filter results by Secret Parameter name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Resource
Group stringId - The ID of the Resource Group.
- Secret
Parameter stringName - The name of the Secret Parameter.
- Sort
Field string - The field used to sort the query results. Valid values:
Name
,CreatedDate
. - Sort
Order string - The order in which the entries are sorted. Default value:
Descending
. Valid values:Ascending
,Descending
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- With
Decryption bool - Specifies whether to decrypt the parameter value. Default value:
false
. Note:with_decryption
takes effect only ifenable_details
is set totrue
.
- Enable
Details bool - Whether to query the detailed list of resource attributes. Default value:
false
. - Ids []string
- A list of Secret Parameter IDs.
- Name
Regex string - A regex string to filter results by Secret Parameter name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Resource
Group stringId - The ID of the Resource Group.
- Secret
Parameter stringName - The name of the Secret Parameter.
- Sort
Field string - The field used to sort the query results. Valid values:
Name
,CreatedDate
. - Sort
Order string - The order in which the entries are sorted. Default value:
Descending
. Valid values:Ascending
,Descending
. - map[string]string
- A mapping of tags to assign to the resource.
- With
Decryption bool - Specifies whether to decrypt the parameter value. Default value:
false
. Note:with_decryption
takes effect only ifenable_details
is set totrue
.
- enable
Details Boolean - Whether to query the detailed list of resource attributes. Default value:
false
. - ids List<String>
- A list of Secret Parameter IDs.
- name
Regex String - A regex string to filter results by Secret Parameter name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - resource
Group StringId - The ID of the Resource Group.
- secret
Parameter StringName - The name of the Secret Parameter.
- sort
Field String - The field used to sort the query results. Valid values:
Name
,CreatedDate
. - sort
Order String - The order in which the entries are sorted. Default value:
Descending
. Valid values:Ascending
,Descending
. - Map<String,String>
- A mapping of tags to assign to the resource.
- with
Decryption Boolean - Specifies whether to decrypt the parameter value. Default value:
false
. Note:with_decryption
takes effect only ifenable_details
is set totrue
.
- enable
Details boolean - Whether to query the detailed list of resource attributes. Default value:
false
. - ids string[]
- A list of Secret Parameter IDs.
- name
Regex string - A regex string to filter results by Secret Parameter name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - resource
Group stringId - The ID of the Resource Group.
- secret
Parameter stringName - The name of the Secret Parameter.
- sort
Field string - The field used to sort the query results. Valid values:
Name
,CreatedDate
. - sort
Order string - The order in which the entries are sorted. Default value:
Descending
. Valid values:Ascending
,Descending
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- with
Decryption boolean - Specifies whether to decrypt the parameter value. Default value:
false
. Note:with_decryption
takes effect only ifenable_details
is set totrue
.
- enable_
details bool - Whether to query the detailed list of resource attributes. Default value:
false
. - ids Sequence[str]
- A list of Secret Parameter IDs.
- name_
regex str - A regex string to filter results by Secret Parameter name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - resource_
group_ strid - The ID of the Resource Group.
- secret_
parameter_ strname - The name of the Secret Parameter.
- sort_
field str - The field used to sort the query results. Valid values:
Name
,CreatedDate
. - sort_
order str - The order in which the entries are sorted. Default value:
Descending
. Valid values:Ascending
,Descending
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- with_
decryption bool - Specifies whether to decrypt the parameter value. Default value:
false
. Note:with_decryption
takes effect only ifenable_details
is set totrue
.
- enable
Details Boolean - Whether to query the detailed list of resource attributes. Default value:
false
. - ids List<String>
- A list of Secret Parameter IDs.
- name
Regex String - A regex string to filter results by Secret Parameter name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - resource
Group StringId - The ID of the Resource Group.
- secret
Parameter StringName - The name of the Secret Parameter.
- sort
Field String - The field used to sort the query results. Valid values:
Name
,CreatedDate
. - sort
Order String - The order in which the entries are sorted. Default value:
Descending
. Valid values:Ascending
,Descending
. - Map<String>
- A mapping of tags to assign to the resource.
- with
Decryption Boolean - Specifies whether to decrypt the parameter value. Default value:
false
. Note:with_decryption
takes effect only ifenable_details
is set totrue
.
getSecretParameters Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Secret Parameter names.
- Parameters
List<Pulumi.
Ali Cloud. Oos. Outputs. Get Secret Parameters Parameter> - A list of Oos Secret Parameters. Each element contains the following attributes:
- Enable
Details bool - Name
Regex string - Output
File string - Resource
Group stringId - The ID of the Resource Group.
- Secret
Parameter stringName - The name of the encryption parameter.
- Sort
Field string - Sort
Order string - Dictionary<string, string>
- The tags of the parameter.
- With
Decryption bool
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Secret Parameter names.
- Parameters
[]Get
Secret Parameters Parameter - A list of Oos Secret Parameters. Each element contains the following attributes:
- Enable
Details bool - Name
Regex string - Output
File string - Resource
Group stringId - The ID of the Resource Group.
- Secret
Parameter stringName - The name of the encryption parameter.
- Sort
Field string - Sort
Order string - map[string]string
- The tags of the parameter.
- With
Decryption bool
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Secret Parameter names.
- parameters
List<Get
Secret Parameters Parameter> - A list of Oos Secret Parameters. Each element contains the following attributes:
- enable
Details Boolean - name
Regex String - output
File String - resource
Group StringId - The ID of the Resource Group.
- secret
Parameter StringName - The name of the encryption parameter.
- sort
Field String - sort
Order String - Map<String,String>
- The tags of the parameter.
- with
Decryption Boolean
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Secret Parameter names.
- parameters
Get
Secret Parameters Parameter[] - A list of Oos Secret Parameters. Each element contains the following attributes:
- enable
Details boolean - name
Regex string - output
File string - resource
Group stringId - The ID of the Resource Group.
- secret
Parameter stringName - The name of the encryption parameter.
- sort
Field string - sort
Order string - {[key: string]: string}
- The tags of the parameter.
- with
Decryption boolean
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Secret Parameter names.
- parameters
Sequence[Get
Secret Parameters Parameter] - A list of Oos Secret Parameters. Each element contains the following attributes:
- enable_
details bool - name_
regex str - output_
file str - resource_
group_ strid - The ID of the Resource Group.
- secret_
parameter_ strname - The name of the encryption parameter.
- sort_
field str - sort_
order str - Mapping[str, str]
- The tags of the parameter.
- with_
decryption bool
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Secret Parameter names.
- parameters List<Property Map>
- A list of Oos Secret Parameters. Each element contains the following attributes:
- enable
Details Boolean - name
Regex String - output
File String - resource
Group StringId - The ID of the Resource Group.
- secret
Parameter StringName - The name of the encryption parameter.
- sort
Field String - sort
Order String - Map<String>
- The tags of the parameter.
- with
Decryption Boolean
Supporting Types
GetSecretParametersParameter
- Constraints string
- The constraints of the encryption parameter. Note:
constraints
takes effect only ifenable_details
is set totrue
. - Create
Time string - The time when the encryption parameter was created.
- Created
By string - The user who created the encryption parameter.
- Description string
- The description of the encryption parameter.
- Id string
- The ID of the Secret Parameter.
- Key
Id string - The ID of the key of Key Management Service (KMS) that is used for encryption.
- Parameter
Version int - The version number of the encryption parameter.
- Resource
Group stringId - The ID of the Resource Group.
- Secret
Parameter stringId - The ID of the encryption parameter.
- Secret
Parameter stringName - The name of the Secret Parameter.
- string
- The share type of the encryption parameter.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Type string
- The type of the parameter.
- Updated
By string - The user who updated the encryption parameter.
- Updated
Date string - The time when the encryption parameter was updated.
- Value string
- (Available since v1.231.0) The value of the encryption parameter. Note:
value
takes effect only ifwith_decryption
is set totrue
.
- Constraints string
- The constraints of the encryption parameter. Note:
constraints
takes effect only ifenable_details
is set totrue
. - Create
Time string - The time when the encryption parameter was created.
- Created
By string - The user who created the encryption parameter.
- Description string
- The description of the encryption parameter.
- Id string
- The ID of the Secret Parameter.
- Key
Id string - The ID of the key of Key Management Service (KMS) that is used for encryption.
- Parameter
Version int - The version number of the encryption parameter.
- Resource
Group stringId - The ID of the Resource Group.
- Secret
Parameter stringId - The ID of the encryption parameter.
- Secret
Parameter stringName - The name of the Secret Parameter.
- string
- The share type of the encryption parameter.
- map[string]string
- A mapping of tags to assign to the resource.
- Type string
- The type of the parameter.
- Updated
By string - The user who updated the encryption parameter.
- Updated
Date string - The time when the encryption parameter was updated.
- Value string
- (Available since v1.231.0) The value of the encryption parameter. Note:
value
takes effect only ifwith_decryption
is set totrue
.
- constraints String
- The constraints of the encryption parameter. Note:
constraints
takes effect only ifenable_details
is set totrue
. - create
Time String - The time when the encryption parameter was created.
- created
By String - The user who created the encryption parameter.
- description String
- The description of the encryption parameter.
- id String
- The ID of the Secret Parameter.
- key
Id String - The ID of the key of Key Management Service (KMS) that is used for encryption.
- parameter
Version Integer - The version number of the encryption parameter.
- resource
Group StringId - The ID of the Resource Group.
- secret
Parameter StringId - The ID of the encryption parameter.
- secret
Parameter StringName - The name of the Secret Parameter.
- String
- The share type of the encryption parameter.
- Map<String,String>
- A mapping of tags to assign to the resource.
- type String
- The type of the parameter.
- updated
By String - The user who updated the encryption parameter.
- updated
Date String - The time when the encryption parameter was updated.
- value String
- (Available since v1.231.0) The value of the encryption parameter. Note:
value
takes effect only ifwith_decryption
is set totrue
.
- constraints string
- The constraints of the encryption parameter. Note:
constraints
takes effect only ifenable_details
is set totrue
. - create
Time string - The time when the encryption parameter was created.
- created
By string - The user who created the encryption parameter.
- description string
- The description of the encryption parameter.
- id string
- The ID of the Secret Parameter.
- key
Id string - The ID of the key of Key Management Service (KMS) that is used for encryption.
- parameter
Version number - The version number of the encryption parameter.
- resource
Group stringId - The ID of the Resource Group.
- secret
Parameter stringId - The ID of the encryption parameter.
- secret
Parameter stringName - The name of the Secret Parameter.
- string
- The share type of the encryption parameter.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- type string
- The type of the parameter.
- updated
By string - The user who updated the encryption parameter.
- updated
Date string - The time when the encryption parameter was updated.
- value string
- (Available since v1.231.0) The value of the encryption parameter. Note:
value
takes effect only ifwith_decryption
is set totrue
.
- constraints str
- The constraints of the encryption parameter. Note:
constraints
takes effect only ifenable_details
is set totrue
. - create_
time str - The time when the encryption parameter was created.
- created_
by str - The user who created the encryption parameter.
- description str
- The description of the encryption parameter.
- id str
- The ID of the Secret Parameter.
- key_
id str - The ID of the key of Key Management Service (KMS) that is used for encryption.
- parameter_
version int - The version number of the encryption parameter.
- resource_
group_ strid - The ID of the Resource Group.
- secret_
parameter_ strid - The ID of the encryption parameter.
- secret_
parameter_ strname - The name of the Secret Parameter.
- str
- The share type of the encryption parameter.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- type str
- The type of the parameter.
- updated_
by str - The user who updated the encryption parameter.
- updated_
date str - The time when the encryption parameter was updated.
- value str
- (Available since v1.231.0) The value of the encryption parameter. Note:
value
takes effect only ifwith_decryption
is set totrue
.
- constraints String
- The constraints of the encryption parameter. Note:
constraints
takes effect only ifenable_details
is set totrue
. - create
Time String - The time when the encryption parameter was created.
- created
By String - The user who created the encryption parameter.
- description String
- The description of the encryption parameter.
- id String
- The ID of the Secret Parameter.
- key
Id String - The ID of the key of Key Management Service (KMS) that is used for encryption.
- parameter
Version Number - The version number of the encryption parameter.
- resource
Group StringId - The ID of the Resource Group.
- secret
Parameter StringId - The ID of the encryption parameter.
- secret
Parameter StringName - The name of the Secret Parameter.
- String
- The share type of the encryption parameter.
- Map<String>
- A mapping of tags to assign to the resource.
- type String
- The type of the parameter.
- updated
By String - The user who updated the encryption parameter.
- updated
Date String - The time when the encryption parameter was updated.
- value String
- (Available since v1.231.0) The value of the encryption parameter. Note:
value
takes effect only ifwith_decryption
is set totrue
.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.