1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. oos
  5. getParameters
Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi

alicloud.oos.getParameters

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi

    This data source provides the Oos 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.Parameter("default", {
        parameterName: name,
        value: "tf-testacc-oos_parameter",
        type: "String",
        description: name,
        constraints: `  {
        "AllowedValues": [
            "tf-testacc-oos_parameter"
        ],
        "AllowedPattern": "tf-testacc-oos_parameter",
        "MinLength": 1,
        "MaxLength": 100
      }
    `,
        tags: {
            Created: "TF",
            For: "Parameter",
        },
    });
    const ids = alicloud.oos.getParametersOutput({
        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.Parameter("default",
        parameter_name=name,
        value="tf-testacc-oos_parameter",
        type="String",
        description=name,
        constraints="""  {
        "AllowedValues": [
            "tf-testacc-oos_parameter"
        ],
        "AllowedPattern": "tf-testacc-oos_parameter",
        "MinLength": 1,
        "MaxLength": 100
      }
    """,
        tags={
            "Created": "TF",
            "For": "Parameter",
        })
    ids = alicloud.oos.get_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.NewParameter(ctx, "default", &oos.ParameterArgs{
    			ParameterName: pulumi.String(name),
    			Value:         pulumi.String("tf-testacc-oos_parameter"),
    			Type:          pulumi.String("String"),
    			Description:   pulumi.String(name),
    			Constraints: pulumi.String(`  {
        "AllowedValues": [
            "tf-testacc-oos_parameter"
        ],
        "AllowedPattern": "tf-testacc-oos_parameter",
        "MinLength": 1,
        "MaxLength": 100
      }
    `),
    			Tags: pulumi.StringMap{
    				"Created": pulumi.String("TF"),
    				"For":     pulumi.String("Parameter"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ids := oos.GetParametersOutput(ctx, oos.GetParametersOutputArgs{
    			Ids: pulumi.StringArray{
    				_default.ID(),
    			},
    		}, nil)
    		ctx.Export("oosSecretParameterId0", ids.ApplyT(func(ids oos.GetParametersResult) (*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.Parameter("default", new()
        {
            ParameterName = name,
            Value = "tf-testacc-oos_parameter",
            Type = "String",
            Description = name,
            Constraints = @"  {
        ""AllowedValues"": [
            ""tf-testacc-oos_parameter""
        ],
        ""AllowedPattern"": ""tf-testacc-oos_parameter"",
        ""MinLength"": 1,
        ""MaxLength"": 100
      }
    ",
            Tags = 
            {
                { "Created", "TF" },
                { "For", "Parameter" },
            },
        });
    
        var ids = AliCloud.Oos.GetParameters.Invoke(new()
        {
            Ids = new[]
            {
                @default.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["oosSecretParameterId0"] = ids.Apply(getParametersResult => getParametersResult.Parameters[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.oos.Parameter;
    import com.pulumi.alicloud.oos.ParameterArgs;
    import com.pulumi.alicloud.oos.OosFunctions;
    import com.pulumi.alicloud.oos.inputs.GetParametersArgs;
    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 Parameter("default", ParameterArgs.builder()
                .parameterName(name)
                .value("tf-testacc-oos_parameter")
                .type("String")
                .description(name)
                .constraints("""
      {
        "AllowedValues": [
            "tf-testacc-oos_parameter"
        ],
        "AllowedPattern": "tf-testacc-oos_parameter",
        "MinLength": 1,
        "MaxLength": 100
      }
                """)
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "Parameter")
                ))
                .build());
    
            final var ids = OosFunctions.getParameters(GetParametersArgs.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:Parameter
        properties:
          parameterName: ${name}
          value: tf-testacc-oos_parameter
          type: String
          description: ${name}
          constraints: |2
              {
                "AllowedValues": [
                    "tf-testacc-oos_parameter"
                ],
                "AllowedPattern": "tf-testacc-oos_parameter",
                "MinLength": 1,
                "MaxLength": 100
              }
          tags:
            Created: TF
            For: Parameter
    variables:
      ids:
        fn::invoke:
          function: alicloud:oos:getParameters
          arguments:
            ids:
              - ${default.id}
    outputs:
      oosSecretParameterId0: ${ids.parameters[0].id}
    

    Using getParameters

    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 getParameters(args: GetParametersArgs, opts?: InvokeOptions): Promise<GetParametersResult>
    function getParametersOutput(args: GetParametersOutputArgs, opts?: InvokeOptions): Output<GetParametersResult>
    def get_parameters(enable_details: Optional[bool] = None,
                       ids: Optional[Sequence[str]] = None,
                       name_regex: Optional[str] = None,
                       output_file: Optional[str] = None,
                       parameter_name: Optional[str] = None,
                       resource_group_id: Optional[str] = None,
                       sort_field: Optional[str] = None,
                       sort_order: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       type: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetParametersResult
    def get_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,
                       parameter_name: Optional[pulumi.Input[str]] = None,
                       resource_group_id: 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,
                       type: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetParametersResult]
    func GetParameters(ctx *Context, args *GetParametersArgs, opts ...InvokeOption) (*GetParametersResult, error)
    func GetParametersOutput(ctx *Context, args *GetParametersOutputArgs, opts ...InvokeOption) GetParametersResultOutput

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

    public static class GetParameters 
    {
        public static Task<GetParametersResult> InvokeAsync(GetParametersArgs args, InvokeOptions? opts = null)
        public static Output<GetParametersResult> Invoke(GetParametersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetParametersResult> getParameters(GetParametersArgs args, InvokeOptions options)
    public static Output<GetParametersResult> getParameters(GetParametersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: alicloud:oos/getParameters:getParameters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnableDetails bool
    Whether to query the detailed list of resource attributes. Default value: false.
    Ids List<string>
    A list of Parameter IDs.
    NameRegex string
    A regex string to filter results by Parameter name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ParameterName string
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    ResourceGroupId string
    The ID of the Resource Group.
    SortField string
    The field used to sort the query results. Valid values: Name, CreatedDate.
    SortOrder string
    The order in which the entries are sorted. Default value: Descending. Valid values: Ascending, Descending.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Type string
    The data type of the common parameter. Valid values: String, StringList.
    EnableDetails bool
    Whether to query the detailed list of resource attributes. Default value: false.
    Ids []string
    A list of Parameter IDs.
    NameRegex string
    A regex string to filter results by Parameter name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ParameterName string
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    ResourceGroupId string
    The ID of the Resource Group.
    SortField string
    The field used to sort the query results. Valid values: Name, CreatedDate.
    SortOrder string
    The order in which the entries are sorted. Default value: Descending. Valid values: Ascending, Descending.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    Type string
    The data type of the common parameter. Valid values: String, StringList.
    enableDetails Boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids List<String>
    A list of Parameter IDs.
    nameRegex String
    A regex string to filter results by Parameter name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    parameterName String
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    resourceGroupId String
    The ID of the Resource Group.
    sortField String
    The field used to sort the query results. Valid values: Name, CreatedDate.
    sortOrder String
    The order in which the entries are sorted. Default value: Descending. Valid values: Ascending, Descending.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    type String
    The data type of the common parameter. Valid values: String, StringList.
    enableDetails boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids string[]
    A list of Parameter IDs.
    nameRegex string
    A regex string to filter results by Parameter name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    parameterName string
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    resourceGroupId string
    The ID of the Resource Group.
    sortField string
    The field used to sort the query results. Valid values: Name, CreatedDate.
    sortOrder string
    The order in which the entries are sorted. Default value: Descending. Valid values: Ascending, Descending.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    type string
    The data type of the common parameter. Valid values: String, StringList.
    enable_details bool
    Whether to query the detailed list of resource attributes. Default value: false.
    ids Sequence[str]
    A list of Parameter IDs.
    name_regex str
    A regex string to filter results by Parameter name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    parameter_name str
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    resource_group_id str
    The ID of the Resource Group.
    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.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    type str
    The data type of the common parameter. Valid values: String, StringList.
    enableDetails Boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids List<String>
    A list of Parameter IDs.
    nameRegex String
    A regex string to filter results by Parameter name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    parameterName String
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    resourceGroupId String
    The ID of the Resource Group.
    sortField String
    The field used to sort the query results. Valid values: Name, CreatedDate.
    sortOrder String
    The order in which the entries are sorted. Default value: Descending. Valid values: Ascending, Descending.
    tags Map<String>
    A mapping of tags to assign to the resource.
    type String
    The data type of the common parameter. Valid values: String, StringList.

    getParameters 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 Parameter names.
    Parameters List<Pulumi.AliCloud.Oos.Outputs.GetParametersParameter>
    A list of Oos Parameters. Each element contains the following attributes:
    EnableDetails bool
    NameRegex string
    OutputFile string
    ParameterName string
    The name of the common parameter.
    ResourceGroupId string
    The ID of the Resource Group.
    SortField string
    SortOrder string
    Tags Dictionary<string, string>
    The tags added to the common parameter.
    Type string
    The data type of the common parameter.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    A list of Parameter names.
    Parameters []GetParametersParameter
    A list of Oos Parameters. Each element contains the following attributes:
    EnableDetails bool
    NameRegex string
    OutputFile string
    ParameterName string
    The name of the common parameter.
    ResourceGroupId string
    The ID of the Resource Group.
    SortField string
    SortOrder string
    Tags map[string]string
    The tags added to the common parameter.
    Type string
    The data type of the common parameter.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Parameter names.
    parameters List<GetParametersParameter>
    A list of Oos Parameters. Each element contains the following attributes:
    enableDetails Boolean
    nameRegex String
    outputFile String
    parameterName String
    The name of the common parameter.
    resourceGroupId String
    The ID of the Resource Group.
    sortField String
    sortOrder String
    tags Map<String,String>
    The tags added to the common parameter.
    type String
    The data type of the common parameter.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    A list of Parameter names.
    parameters GetParametersParameter[]
    A list of Oos Parameters. Each element contains the following attributes:
    enableDetails boolean
    nameRegex string
    outputFile string
    parameterName string
    The name of the common parameter.
    resourceGroupId string
    The ID of the Resource Group.
    sortField string
    sortOrder string
    tags {[key: string]: string}
    The tags added to the common parameter.
    type string
    The data type of the common parameter.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    A list of Parameter names.
    parameters Sequence[GetParametersParameter]
    A list of Oos Parameters. Each element contains the following attributes:
    enable_details bool
    name_regex str
    output_file str
    parameter_name str
    The name of the common parameter.
    resource_group_id str
    The ID of the Resource Group.
    sort_field str
    sort_order str
    tags Mapping[str, str]
    The tags added to the common parameter.
    type str
    The data type of the common parameter.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Parameter names.
    parameters List<Property Map>
    A list of Oos Parameters. Each element contains the following attributes:
    enableDetails Boolean
    nameRegex String
    outputFile String
    parameterName String
    The name of the common parameter.
    resourceGroupId String
    The ID of the Resource Group.
    sortField String
    sortOrder String
    tags Map<String>
    The tags added to the common parameter.
    type String
    The data type of the common parameter.

    Supporting Types

    GetParametersParameter

    Constraints string
    The constraints of the common parameter. Note: constraints takes effect only if enable_details is set to true.
    CreateTime string
    The time when the common parameter was created.
    CreatedBy string
    The user who created the common parameter.
    Description string
    The description of the common parameter.
    Id string
    The ID of the Parameter. Its value is same as parameter_name.
    ParameterId string
    The ID of the common parameter.
    ParameterName string
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    ParameterVersion int
    The version number of the common parameter.
    ResourceGroupId string
    The ID of the Resource Group.
    ShareType string
    The share type of the common parameter.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Type string
    The data type of the common parameter. Valid values: String, StringList.
    UpdatedBy string
    The user who updated the common parameter.
    UpdatedDate string
    The time when the common parameter was updated.
    Value string
    (Available since v1.231.0) The value of the common parameter. Note: value takes effect only if enable_details is set to true.
    Constraints string
    The constraints of the common parameter. Note: constraints takes effect only if enable_details is set to true.
    CreateTime string
    The time when the common parameter was created.
    CreatedBy string
    The user who created the common parameter.
    Description string
    The description of the common parameter.
    Id string
    The ID of the Parameter. Its value is same as parameter_name.
    ParameterId string
    The ID of the common parameter.
    ParameterName string
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    ParameterVersion int
    The version number of the common parameter.
    ResourceGroupId string
    The ID of the Resource Group.
    ShareType string
    The share type of the common parameter.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    Type string
    The data type of the common parameter. Valid values: String, StringList.
    UpdatedBy string
    The user who updated the common parameter.
    UpdatedDate string
    The time when the common parameter was updated.
    Value string
    (Available since v1.231.0) The value of the common parameter. Note: value takes effect only if enable_details is set to true.
    constraints String
    The constraints of the common parameter. Note: constraints takes effect only if enable_details is set to true.
    createTime String
    The time when the common parameter was created.
    createdBy String
    The user who created the common parameter.
    description String
    The description of the common parameter.
    id String
    The ID of the Parameter. Its value is same as parameter_name.
    parameterId String
    The ID of the common parameter.
    parameterName String
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    parameterVersion Integer
    The version number of the common parameter.
    resourceGroupId String
    The ID of the Resource Group.
    shareType String
    The share type of the common parameter.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    type String
    The data type of the common parameter. Valid values: String, StringList.
    updatedBy String
    The user who updated the common parameter.
    updatedDate String
    The time when the common parameter was updated.
    value String
    (Available since v1.231.0) The value of the common parameter. Note: value takes effect only if enable_details is set to true.
    constraints string
    The constraints of the common parameter. Note: constraints takes effect only if enable_details is set to true.
    createTime string
    The time when the common parameter was created.
    createdBy string
    The user who created the common parameter.
    description string
    The description of the common parameter.
    id string
    The ID of the Parameter. Its value is same as parameter_name.
    parameterId string
    The ID of the common parameter.
    parameterName string
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    parameterVersion number
    The version number of the common parameter.
    resourceGroupId string
    The ID of the Resource Group.
    shareType string
    The share type of the common parameter.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    type string
    The data type of the common parameter. Valid values: String, StringList.
    updatedBy string
    The user who updated the common parameter.
    updatedDate string
    The time when the common parameter was updated.
    value string
    (Available since v1.231.0) The value of the common parameter. Note: value takes effect only if enable_details is set to true.
    constraints str
    The constraints of the common parameter. Note: constraints takes effect only if enable_details is set to true.
    create_time str
    The time when the common parameter was created.
    created_by str
    The user who created the common parameter.
    description str
    The description of the common parameter.
    id str
    The ID of the Parameter. Its value is same as parameter_name.
    parameter_id str
    The ID of the common parameter.
    parameter_name str
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    parameter_version int
    The version number of the common parameter.
    resource_group_id str
    The ID of the Resource Group.
    share_type str
    The share type of the common parameter.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    type str
    The data type of the common parameter. Valid values: String, StringList.
    updated_by str
    The user who updated the common parameter.
    updated_date str
    The time when the common parameter was updated.
    value str
    (Available since v1.231.0) The value of the common parameter. Note: value takes effect only if enable_details is set to true.
    constraints String
    The constraints of the common parameter. Note: constraints takes effect only if enable_details is set to true.
    createTime String
    The time when the common parameter was created.
    createdBy String
    The user who created the common parameter.
    description String
    The description of the common parameter.
    id String
    The ID of the Parameter. Its value is same as parameter_name.
    parameterId String
    The ID of the common parameter.
    parameterName String
    The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
    parameterVersion Number
    The version number of the common parameter.
    resourceGroupId String
    The ID of the Resource Group.
    shareType String
    The share type of the common parameter.
    tags Map<String>
    A mapping of tags to assign to the resource.
    type String
    The data type of the common parameter. Valid values: String, StringList.
    updatedBy String
    The user who updated the common parameter.
    updatedDate String
    The time when the common parameter was updated.
    value String
    (Available since v1.231.0) The value of the common parameter. Note: value takes effect only if enable_details is set to true.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.81.0 published on Monday, Jun 23, 2025 by Pulumi