Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.oos.getParameters
Explore with Pulumi AI
This data source provides the Oos Parameters of the current Alibaba Cloud user.
NOTE: Available in v1.147.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.oos.getParameters({
    ids: ["my-Parameter"],
});
export const oosParameterId1 = ids.then(ids => ids.parameters?.[0]?.id);
const nameRegex = alicloud.oos.getParameters({
    nameRegex: "^my-Parameter",
});
export const oosParameterId2 = nameRegex.then(nameRegex => nameRegex.parameters?.[0]?.id);
const resourceGroupId = alicloud.oos.getParameters({
    ids: ["my-Parameter"],
    resourceGroupId: "example_value",
});
export const oosParameterId3 = resourceGroupId.then(resourceGroupId => resourceGroupId.parameters?.[0]?.id);
const tags = alicloud.oos.getParameters({
    ids: ["my-Parameter"],
    tags: {
        Created: "TF",
        For: "OosParameter",
    },
});
export const oosParameterId4 = tags.then(tags => tags.parameters?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.oos.get_parameters(ids=["my-Parameter"])
pulumi.export("oosParameterId1", ids.parameters[0].id)
name_regex = alicloud.oos.get_parameters(name_regex="^my-Parameter")
pulumi.export("oosParameterId2", name_regex.parameters[0].id)
resource_group_id = alicloud.oos.get_parameters(ids=["my-Parameter"],
    resource_group_id="example_value")
pulumi.export("oosParameterId3", resource_group_id.parameters[0].id)
tags = alicloud.oos.get_parameters(ids=["my-Parameter"],
    tags={
        "Created": "TF",
        "For": "OosParameter",
    })
pulumi.export("oosParameterId4", tags.parameters[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := oos.GetParameters(ctx, &oos.GetParametersArgs{
			Ids: []string{
				"my-Parameter",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("oosParameterId1", ids.Parameters[0].Id)
		nameRegex, err := oos.GetParameters(ctx, &oos.GetParametersArgs{
			NameRegex: pulumi.StringRef("^my-Parameter"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("oosParameterId2", nameRegex.Parameters[0].Id)
		resourceGroupId, err := oos.GetParameters(ctx, &oos.GetParametersArgs{
			Ids: []string{
				"my-Parameter",
			},
			ResourceGroupId: pulumi.StringRef("example_value"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("oosParameterId3", resourceGroupId.Parameters[0].Id)
		tags, err := oos.GetParameters(ctx, &oos.GetParametersArgs{
			Ids: []string{
				"my-Parameter",
			},
			Tags: map[string]interface{}{
				"Created": "TF",
				"For":     "OosParameter",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("oosParameterId4", tags.Parameters[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Oos.GetParameters.Invoke(new()
    {
        Ids = new[]
        {
            "my-Parameter",
        },
    });
    var nameRegex = AliCloud.Oos.GetParameters.Invoke(new()
    {
        NameRegex = "^my-Parameter",
    });
    var resourceGroupId = AliCloud.Oos.GetParameters.Invoke(new()
    {
        Ids = new[]
        {
            "my-Parameter",
        },
        ResourceGroupId = "example_value",
    });
    var tags = AliCloud.Oos.GetParameters.Invoke(new()
    {
        Ids = new[]
        {
            "my-Parameter",
        },
        Tags = 
        {
            { "Created", "TF" },
            { "For", "OosParameter" },
        },
    });
    return new Dictionary<string, object?>
    {
        ["oosParameterId1"] = ids.Apply(getParametersResult => getParametersResult.Parameters[0]?.Id),
        ["oosParameterId2"] = nameRegex.Apply(getParametersResult => getParametersResult.Parameters[0]?.Id),
        ["oosParameterId3"] = resourceGroupId.Apply(getParametersResult => getParametersResult.Parameters[0]?.Id),
        ["oosParameterId4"] = tags.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.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 ids = OosFunctions.getParameters(GetParametersArgs.builder()
            .ids("my-Parameter")
            .build());
        ctx.export("oosParameterId1", ids.applyValue(getParametersResult -> getParametersResult.parameters()[0].id()));
        final var nameRegex = OosFunctions.getParameters(GetParametersArgs.builder()
            .nameRegex("^my-Parameter")
            .build());
        ctx.export("oosParameterId2", nameRegex.applyValue(getParametersResult -> getParametersResult.parameters()[0].id()));
        final var resourceGroupId = OosFunctions.getParameters(GetParametersArgs.builder()
            .ids("my-Parameter")
            .resourceGroupId("example_value")
            .build());
        ctx.export("oosParameterId3", resourceGroupId.applyValue(getParametersResult -> getParametersResult.parameters()[0].id()));
        final var tags = OosFunctions.getParameters(GetParametersArgs.builder()
            .ids("my-Parameter")
            .tags(Map.ofEntries(
                Map.entry("Created", "TF"),
                Map.entry("For", "OosParameter")
            ))
            .build());
        ctx.export("oosParameterId4", tags.applyValue(getParametersResult -> getParametersResult.parameters()[0].id()));
    }
}
variables:
  ids:
    fn::invoke:
      Function: alicloud:oos:getParameters
      Arguments:
        ids:
          - my-Parameter
  nameRegex:
    fn::invoke:
      Function: alicloud:oos:getParameters
      Arguments:
        nameRegex: ^my-Parameter
  resourceGroupId:
    fn::invoke:
      Function: alicloud:oos:getParameters
      Arguments:
        ids:
          - my-Parameter
        resourceGroupId: example_value
  tags:
    fn::invoke:
      Function: alicloud:oos:getParameters
      Arguments:
        ids:
          - my-Parameter
        tags:
          Created: TF
          For: OosParameter
outputs:
  oosParameterId1: ${ids.parameters[0].id}
  oosParameterId2: ${nameRegex.parameters[0].id}
  oosParameterId3: ${resourceGroupId.parameters[0].id}
  oosParameterId4: ${tags.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, Any]] = 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, Any]]] = 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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:oos/getParameters:getParameters
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Enable
Details bool - Default to 
false. Set it totruecan output more details about resource attributes. - Ids List<string>
 - A list of Parameter IDs. Its element value is same as Parameter Name.
 - Name
Regex string - A regex string to filter results by Parameter name.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). - Parameter
Name string - The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
 - Resource
Group stringId  - The ID of the Resource Group.
 - Sort
Field string - Sort
Order string - Dictionary<string, object>
 - A mapping of tags to assign to the resource.
 - Type string
 - The data type of the common parameter. Valid values: 
StringandStringList. 
- Enable
Details bool - Default to 
false. Set it totruecan output more details about resource attributes. - Ids []string
 - A list of Parameter IDs. Its element value is same as Parameter Name.
 - Name
Regex string - A regex string to filter results by Parameter name.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). - Parameter
Name string - The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
 - Resource
Group stringId  - The ID of the Resource Group.
 - Sort
Field string - Sort
Order string - map[string]interface{}
 - A mapping of tags to assign to the resource.
 - Type string
 - The data type of the common parameter. Valid values: 
StringandStringList. 
- enable
Details Boolean - Default to 
false. Set it totruecan output more details about resource attributes. - ids List<String>
 - A list of Parameter IDs. Its element value is same as Parameter Name.
 - name
Regex String - A regex string to filter results by Parameter name.
 - output
File String - File name where to save data source results (after running 
pulumi preview). - parameter
Name String - The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
 - resource
Group StringId  - The ID of the Resource Group.
 - sort
Field String - sort
Order String - Map<String,Object>
 - A mapping of tags to assign to the resource.
 - type String
 - The data type of the common parameter. Valid values: 
StringandStringList. 
- enable
Details boolean - Default to 
false. Set it totruecan output more details about resource attributes. - ids string[]
 - A list of Parameter IDs. Its element value is same as Parameter Name.
 - name
Regex string - A regex string to filter results by Parameter name.
 - output
File string - File name where to save data source results (after running 
pulumi preview). - parameter
Name string - The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
 - resource
Group stringId  - The ID of the Resource Group.
 - sort
Field string - sort
Order string - {[key: string]: any}
 - A mapping of tags to assign to the resource.
 - type string
 - The data type of the common parameter. Valid values: 
StringandStringList. 
- enable_
details bool - Default to 
false. Set it totruecan output more details about resource attributes. - ids Sequence[str]
 - A list of Parameter IDs. Its element value is same as Parameter Name.
 - 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_ strid  - The ID of the Resource Group.
 - sort_
field str - sort_
order str - Mapping[str, Any]
 - A mapping of tags to assign to the resource.
 - type str
 - The data type of the common parameter. Valid values: 
StringandStringList. 
- enable
Details Boolean - Default to 
false. Set it totruecan output more details about resource attributes. - ids List<String>
 - A list of Parameter IDs. Its element value is same as Parameter Name.
 - name
Regex String - A regex string to filter results by Parameter name.
 - output
File String - File name where to save data source results (after running 
pulumi preview). - parameter
Name String - The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.
 - resource
Group StringId  - The ID of the Resource Group.
 - sort
Field String - sort
Order String - Map<Any>
 - A mapping of tags to assign to the resource.
 - type String
 - The data type of the common parameter. Valid values: 
StringandStringList. 
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>
 - Parameters
List<Pulumi.
Ali Cloud. Oos. Outputs. Get Parameters Parameter>  - Enable
Details bool - Name
Regex string - Output
File string - Parameter
Name string - Resource
Group stringId  - Sort
Field string - Sort
Order string - Dictionary<string, object>
 - Type string
 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Ids []string
 - Names []string
 - Parameters
[]Get
Parameters Parameter  - Enable
Details bool - Name
Regex string - Output
File string - Parameter
Name string - Resource
Group stringId  - Sort
Field string - Sort
Order string - map[string]interface{}
 - Type string
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - names List<String>
 - parameters
List<Get
Parameters Parameter>  - enable
Details Boolean - name
Regex String - output
File String - parameter
Name String - resource
Group StringId  - sort
Field String - sort
Order String - Map<String,Object>
 - type String
 
- id string
 - The provider-assigned unique ID for this managed resource.
 - ids string[]
 - names string[]
 - parameters
Get
Parameters Parameter[]  - enable
Details boolean - name
Regex string - output
File string - parameter
Name string - resource
Group stringId  - sort
Field string - sort
Order string - {[key: string]: any}
 - type string
 
- id str
 - The provider-assigned unique ID for this managed resource.
 - ids Sequence[str]
 - names Sequence[str]
 - parameters
Sequence[Get
Parameters Parameter]  - enable_
details bool - name_
regex str - output_
file str - parameter_
name str - resource_
group_ strid  - sort_
field str - sort_
order str - Mapping[str, Any]
 - type str
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - names List<String>
 - parameters List<Property Map>
 - enable
Details Boolean - name
Regex String - output
File String - parameter
Name String - resource
Group StringId  - sort
Field String - sort
Order String - Map<Any>
 - type String
 
Supporting Types
GetParametersParameter  
- Constraints string
 - The constraints of the common parameter.
 - Create
Time string - The time when the common parameter was created.
 - Created
By 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. - Parameter
Id string - The ID of the common parameter.
 - Parameter
Name string - The name of the common parameter.
 - Parameter
Version int - The version number of the common parameter.
 - Resource
Group stringId  - The ID of the Resource Group.
 - string
 - The share type of the common parameter.
 - Dictionary<string, object>
 - The tag of the resource.
 - Type string
 - The data type of the common parameter.
 - Updated
By string - The user who updated the common parameter.
 - Updated
Date string - The time when the common parameter was updated.
 - Value string
 - The value of the common parameter.
 
- Constraints string
 - The constraints of the common parameter.
 - Create
Time string - The time when the common parameter was created.
 - Created
By 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. - Parameter
Id string - The ID of the common parameter.
 - Parameter
Name string - The name of the common parameter.
 - Parameter
Version int - The version number of the common parameter.
 - Resource
Group stringId  - The ID of the Resource Group.
 - string
 - The share type of the common parameter.
 - map[string]interface{}
 - The tag of the resource.
 - Type string
 - The data type of the common parameter.
 - Updated
By string - The user who updated the common parameter.
 - Updated
Date string - The time when the common parameter was updated.
 - Value string
 - The value of the common parameter.
 
- constraints String
 - The constraints of the common parameter.
 - create
Time String - The time when the common parameter was created.
 - created
By 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. - parameter
Id String - The ID of the common parameter.
 - parameter
Name String - The name of the common parameter.
 - parameter
Version Integer - The version number of the common parameter.
 - resource
Group StringId  - The ID of the Resource Group.
 - String
 - The share type of the common parameter.
 - Map<String,Object>
 - The tag of the resource.
 - type String
 - The data type of the common parameter.
 - updated
By String - The user who updated the common parameter.
 - updated
Date String - The time when the common parameter was updated.
 - value String
 - The value of the common parameter.
 
- constraints string
 - The constraints of the common parameter.
 - create
Time string - The time when the common parameter was created.
 - created
By 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. - parameter
Id string - The ID of the common parameter.
 - parameter
Name string - The name of the common parameter.
 - parameter
Version number - The version number of the common parameter.
 - resource
Group stringId  - The ID of the Resource Group.
 - string
 - The share type of the common parameter.
 - {[key: string]: any}
 - The tag of the resource.
 - type string
 - The data type of the common parameter.
 - updated
By string - The user who updated the common parameter.
 - updated
Date string - The time when the common parameter was updated.
 - value string
 - The value of the common parameter.
 
- constraints str
 - The constraints of the common parameter.
 - 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.
 - parameter_
version int - The version number of the common parameter.
 - resource_
group_ strid  - The ID of the Resource Group.
 - str
 - The share type of the common parameter.
 - Mapping[str, Any]
 - The tag of the resource.
 - type str
 - The data type of the common parameter.
 - updated_
by str - The user who updated the common parameter.
 - updated_
date str - The time when the common parameter was updated.
 - value str
 - The value of the common parameter.
 
- constraints String
 - The constraints of the common parameter.
 - create
Time String - The time when the common parameter was created.
 - created
By 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. - parameter
Id String - The ID of the common parameter.
 - parameter
Name String - The name of the common parameter.
 - parameter
Version Number - The version number of the common parameter.
 - resource
Group StringId  - The ID of the Resource Group.
 - String
 - The share type of the common parameter.
 - Map<Any>
 - The tag of the resource.
 - type String
 - The data type of the common parameter.
 - updated
By String - The user who updated the common parameter.
 - updated
Date String - The time when the common parameter was updated.
 - value String
 - The value of the common parameter.
 
Package Details
- Repository
 - Alibaba Cloud pulumi/pulumi-alicloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
alicloudTerraform Provider.