1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. sddp
  5. getConfigs
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.sddp.getConfigs

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the Sddp Configs of the current Alibaba Cloud user.

    NOTE: Available in v1.133.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultConfig = new alicloud.sddp.Config("default", {
        code: "access_failed_cnt",
        value: "10",
    });
    const default = alicloud.sddp.getConfigsOutput({
        ids: [defaultConfig.id],
        outputFile: "./t.json",
    });
    export const sddpConfigId = _default.apply(_default => _default.ids);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_config = alicloud.sddp.Config("default",
        code="access_failed_cnt",
        value="10")
    default = alicloud.sddp.get_configs_output(ids=[default_config.id],
        output_file="./t.json")
    pulumi.export("sddpConfigId", default.ids)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sddp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    defaultConfig, err := sddp.NewConfig(ctx, "default", &sddp.ConfigArgs{
    Code: pulumi.String("access_failed_cnt"),
    Value: pulumi.String("10"),
    })
    if err != nil {
    return err
    }
    _default := sddp.GetConfigsOutput(ctx, sddp.GetConfigsOutputArgs{
    Ids: pulumi.StringArray{
    defaultConfig.ID(),
    },
    OutputFile: pulumi.String("./t.json"),
    }, nil);
    ctx.Export("sddpConfigId", _default.ApplyT(func(_default sddp.GetConfigsResult) (interface{}, error) {
    return _default.Ids, nil
    }).(pulumi.Interface{}Output))
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultConfig = new AliCloud.Sddp.Config("default", new()
        {
            Code = "access_failed_cnt",
            Value = "10",
        });
    
        var @default = AliCloud.Sddp.GetConfigs.Invoke(new()
        {
            Ids = new[]
            {
                defaultConfig.Id,
            },
            OutputFile = "./t.json",
        });
    
        return new Dictionary<string, object?>
        {
            ["sddpConfigId"] = @default.Apply(@default => @default.Apply(getConfigsResult => getConfigsResult.Ids)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.sddp.Config;
    import com.pulumi.alicloud.sddp.ConfigArgs;
    import com.pulumi.alicloud.sddp.SddpFunctions;
    import com.pulumi.alicloud.sddp.inputs.GetConfigsArgs;
    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) {
            var defaultConfig = new Config("defaultConfig", ConfigArgs.builder()
                .code("access_failed_cnt")
                .value(10)
                .build());
    
            final var default = SddpFunctions.getConfigs(GetConfigsArgs.builder()
                .ids(defaultConfig.id())
                .outputFile("./t.json")
                .build());
    
            ctx.export("sddpConfigId", default_.applyValue(default_ -> default_.ids()));
        }
    }
    
    resources:
      defaultConfig:
        type: alicloud:sddp:Config
        name: default
        properties:
          code: access_failed_cnt
          value: 10
    variables:
      default:
        fn::invoke:
          Function: alicloud:sddp:getConfigs
          Arguments:
            ids:
              - ${defaultConfig.id}
            outputFile: ./t.json
    outputs:
      sddpConfigId: ${default.ids}
    

    Using getConfigs

    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 getConfigs(args: GetConfigsArgs, opts?: InvokeOptions): Promise<GetConfigsResult>
    function getConfigsOutput(args: GetConfigsOutputArgs, opts?: InvokeOptions): Output<GetConfigsResult>
    def get_configs(ids: Optional[Sequence[str]] = None,
                    lang: Optional[str] = None,
                    output_file: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetConfigsResult
    def get_configs_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    lang: Optional[pulumi.Input[str]] = None,
                    output_file: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetConfigsResult]
    func GetConfigs(ctx *Context, args *GetConfigsArgs, opts ...InvokeOption) (*GetConfigsResult, error)
    func GetConfigsOutput(ctx *Context, args *GetConfigsOutputArgs, opts ...InvokeOption) GetConfigsResultOutput

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

    public static class GetConfigs 
    {
        public static Task<GetConfigsResult> InvokeAsync(GetConfigsArgs args, InvokeOptions? opts = null)
        public static Output<GetConfigsResult> Invoke(GetConfigsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConfigsResult> getConfigs(GetConfigsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:sddp/getConfigs:getConfigs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Config IDs.
    Lang string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    A list of Config IDs.
    Lang string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Config IDs.
    lang String
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    A list of Config IDs.
    lang string
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    A list of Config IDs.
    lang str
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Config IDs.
    lang String
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getConfigs Result

    The following output properties are available:

    Configs List<Pulumi.AliCloud.Sddp.Outputs.GetConfigsConfig>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Lang string
    OutputFile string
    Configs []GetConfigsConfig
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Lang string
    OutputFile string
    configs List<GetConfigsConfig>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    lang String
    outputFile String
    configs GetConfigsConfig[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    lang string
    outputFile string
    configs Sequence[GetConfigsConfig]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    lang str
    output_file str
    configs List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    lang String
    outputFile String

    Supporting Types

    GetConfigsConfig

    Code string
    Abnormal Alarm General Configuration Module by Using the Encoding.Valid values: access_failed_cnt, access_permission_exprie_max_days, log_datasize_avg_days.
    ConfigId string
    Configure the Number.
    DefaultValue string
    Default Value.
    Description string
    Abnormal Alarm General Description of the Configuration Item.
    Id string
    The ID of the Config.
    Value string
    The Specified Exception Alarm Generic by Using the Value. Code Different Values for This Parameter the Specific Meaning of Different.
    Code string
    Abnormal Alarm General Configuration Module by Using the Encoding.Valid values: access_failed_cnt, access_permission_exprie_max_days, log_datasize_avg_days.
    ConfigId string
    Configure the Number.
    DefaultValue string
    Default Value.
    Description string
    Abnormal Alarm General Description of the Configuration Item.
    Id string
    The ID of the Config.
    Value string
    The Specified Exception Alarm Generic by Using the Value. Code Different Values for This Parameter the Specific Meaning of Different.
    code String
    Abnormal Alarm General Configuration Module by Using the Encoding.Valid values: access_failed_cnt, access_permission_exprie_max_days, log_datasize_avg_days.
    configId String
    Configure the Number.
    defaultValue String
    Default Value.
    description String
    Abnormal Alarm General Description of the Configuration Item.
    id String
    The ID of the Config.
    value String
    The Specified Exception Alarm Generic by Using the Value. Code Different Values for This Parameter the Specific Meaning of Different.
    code string
    Abnormal Alarm General Configuration Module by Using the Encoding.Valid values: access_failed_cnt, access_permission_exprie_max_days, log_datasize_avg_days.
    configId string
    Configure the Number.
    defaultValue string
    Default Value.
    description string
    Abnormal Alarm General Description of the Configuration Item.
    id string
    The ID of the Config.
    value string
    The Specified Exception Alarm Generic by Using the Value. Code Different Values for This Parameter the Specific Meaning of Different.
    code str
    Abnormal Alarm General Configuration Module by Using the Encoding.Valid values: access_failed_cnt, access_permission_exprie_max_days, log_datasize_avg_days.
    config_id str
    Configure the Number.
    default_value str
    Default Value.
    description str
    Abnormal Alarm General Description of the Configuration Item.
    id str
    The ID of the Config.
    value str
    The Specified Exception Alarm Generic by Using the Value. Code Different Values for This Parameter the Specific Meaning of Different.
    code String
    Abnormal Alarm General Configuration Module by Using the Encoding.Valid values: access_failed_cnt, access_permission_exprie_max_days, log_datasize_avg_days.
    configId String
    Configure the Number.
    defaultValue String
    Default Value.
    description String
    Abnormal Alarm General Description of the Configuration Item.
    id String
    The ID of the Config.
    value String
    The Specified Exception Alarm Generic by Using the Value. Code Different Values for This Parameter the Specific Meaning of Different.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi