getParameters

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)
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&#46;Apply(getParametersResult => getParametersResult&#46;Parameters[0]?.Id),
["oosParameterId2"] = nameRegex&#46;Apply(getParametersResult => getParametersResult&#46;Parameters[0]?.Id),
["oosParameterId3"] = resourceGroupId&#46;Apply(getParametersResult => getParametersResult&#46;Parameters[0]?.Id),
["oosParameterId4"] = tags&#46;Apply(getParametersResult => getParametersResult&#46;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
})
}
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}

Return

A collection of values returned by getParameters.

Parameters

argument

A collection of arguments for invoking getParameters.


suspend fun getParameters(enableDetails: Boolean? = null, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, parameterName: String? = null, resourceGroupId: String? = null, sortField: String? = null, sortOrder: String? = null, tags: Map<String, String>? = null, type: String? = null): GetParametersResult

Return

A collection of values returned by getParameters.

Parameters

enableDetails

Default to false. Set it to true can output more details about resource attributes.

ids

A list of Parameter IDs. Its element value is same as Parameter Name.

nameRegex

A regex string to filter results by Parameter name.

outputFile

File name where to save data source results (after running pulumi preview).

parameterName

The name of the common parameter. You can enter a keyword to query parameter names in fuzzy match mode.

resourceGroupId

The ID of the Resource Group.

sortField
sortOrder
tags

A mapping of tags to assign to the resource.

type

The data type of the common parameter. Valid values: String and StringList.

See also


Return

A collection of values returned by getParameters.

Parameters

argument

Builder for com.pulumi.alicloud.oos.kotlin.inputs.GetParametersPlainArgs.

See also