1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cloudauth
  5. getFaceConfigs
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

alicloud.cloudauth.getFaceConfigs

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

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

    NOTE: Available in v1.137.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultFaceConfig = new alicloud.cloudauth.FaceConfig("default", {
        bizName: "example-value",
        bizType: "example-value",
    });
    const default = alicloud.cloudauth.getFaceConfigsOutput({
        ids: [defaultFaceConfig.id],
        nameRegex: defaultFaceConfig.bizName,
    });
    export const faceConfig = _default.apply(_default => _default.configs?.[0]);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_face_config = alicloud.cloudauth.FaceConfig("default",
        biz_name="example-value",
        biz_type="example-value")
    default = alicloud.cloudauth.get_face_configs_output(ids=[default_face_config.id],
        name_regex=default_face_config.biz_name)
    pulumi.export("faceConfig", default.configs[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudauth"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultFaceConfig, err := cloudauth.NewFaceConfig(ctx, "default", &cloudauth.FaceConfigArgs{
    			BizName: pulumi.String("example-value"),
    			BizType: pulumi.String("example-value"),
    		})
    		if err != nil {
    			return err
    		}
    		_default := cloudauth.GetFaceConfigsOutput(ctx, cloudauth.GetFaceConfigsOutputArgs{
    			Ids: pulumi.StringArray{
    				defaultFaceConfig.ID(),
    			},
    			NameRegex: defaultFaceConfig.BizName,
    		}, nil)
    		ctx.Export("faceConfig", _default.ApplyT(func(_default cloudauth.GetFaceConfigsResult) (cloudauth.GetFaceConfigsConfig, error) {
    			return _default.Configs[0], nil
    		}).(cloudauth.GetFaceConfigsConfigOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultFaceConfig = new AliCloud.CloudAuth.FaceConfig("default", new()
        {
            BizName = "example-value",
            BizType = "example-value",
        });
    
        var @default = AliCloud.CloudAuth.GetFaceConfigs.Invoke(new()
        {
            Ids = new[]
            {
                defaultFaceConfig.Id,
            },
            NameRegex = defaultFaceConfig.BizName,
        });
    
        return new Dictionary<string, object?>
        {
            ["faceConfig"] = @default.Apply(@default => @default.Apply(getFaceConfigsResult => getFaceConfigsResult.Configs[0])),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cloudauth.FaceConfig;
    import com.pulumi.alicloud.cloudauth.FaceConfigArgs;
    import com.pulumi.alicloud.cloudauth.CloudauthFunctions;
    import com.pulumi.alicloud.cloudauth.inputs.GetFaceConfigsArgs;
    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 defaultFaceConfig = new FaceConfig("defaultFaceConfig", FaceConfigArgs.builder()
                .bizName("example-value")
                .bizType("example-value")
                .build());
    
            final var default = CloudauthFunctions.getFaceConfigs(GetFaceConfigsArgs.builder()
                .ids(defaultFaceConfig.id())
                .nameRegex(defaultFaceConfig.bizName())
                .build());
    
            ctx.export("faceConfig", default_.applyValue(default_ -> default_.configs()[0]));
        }
    }
    
    resources:
      defaultFaceConfig:
        type: alicloud:cloudauth:FaceConfig
        name: default
        properties:
          bizName: example-value
          bizType: example-value
    variables:
      default:
        fn::invoke:
          Function: alicloud:cloudauth:getFaceConfigs
          Arguments:
            ids:
              - ${defaultFaceConfig.id}
            nameRegex: ${defaultFaceConfig.bizName}
    outputs:
      faceConfig: ${default.configs[0]}
    

    Using getFaceConfigs

    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 getFaceConfigs(args: GetFaceConfigsArgs, opts?: InvokeOptions): Promise<GetFaceConfigsResult>
    function getFaceConfigsOutput(args: GetFaceConfigsOutputArgs, opts?: InvokeOptions): Output<GetFaceConfigsResult>
    def get_face_configs(ids: Optional[Sequence[str]] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetFaceConfigsResult
    def get_face_configs_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         name_regex: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetFaceConfigsResult]
    func GetFaceConfigs(ctx *Context, args *GetFaceConfigsArgs, opts ...InvokeOption) (*GetFaceConfigsResult, error)
    func GetFaceConfigsOutput(ctx *Context, args *GetFaceConfigsOutputArgs, opts ...InvokeOption) GetFaceConfigsResultOutput

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

    public static class GetFaceConfigs 
    {
        public static Task<GetFaceConfigsResult> InvokeAsync(GetFaceConfigsArgs args, InvokeOptions? opts = null)
        public static Output<GetFaceConfigsResult> Invoke(GetFaceConfigsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFaceConfigsResult> getFaceConfigs(GetFaceConfigsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cloudauth/getFaceConfigs:getFaceConfigs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Face Config IDs.
    NameRegex string
    A regex string to filter results by biz_name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    A list of Face Config IDs.
    NameRegex string
    A regex string to filter results by biz_name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Face Config IDs.
    nameRegex String
    A regex string to filter results by biz_name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    A list of Face Config IDs.
    nameRegex string
    A regex string to filter results by biz_name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    A list of Face Config IDs.
    name_regex str
    A regex string to filter results by biz_name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Face Config IDs.
    nameRegex String
    A regex string to filter results by biz_name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getFaceConfigs Result

    The following output properties are available:

    Configs List<Pulumi.AliCloud.CloudAuth.Outputs.GetFaceConfigsConfig>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    NameRegex string
    OutputFile string
    Configs []GetFaceConfigsConfig
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    NameRegex string
    OutputFile string
    configs List<GetFaceConfigsConfig>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    nameRegex String
    outputFile String
    configs GetFaceConfigsConfig[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    nameRegex string
    outputFile string
    configs Sequence[GetFaceConfigsConfig]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    name_regex str
    output_file str
    configs List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    nameRegex String
    outputFile String

    Supporting Types

    GetFaceConfigsConfig

    BizName string
    Scene name.
    BizType string
    Scene type. NOTE: The biz_type cannot exceed 32 characters and can only use English letters, numbers and dashes (-).
    GmtUpdated string
    The Update Time.
    BizName string
    Scene name.
    BizType string
    Scene type. NOTE: The biz_type cannot exceed 32 characters and can only use English letters, numbers and dashes (-).
    GmtUpdated string
    The Update Time.
    bizName String
    Scene name.
    bizType String
    Scene type. NOTE: The biz_type cannot exceed 32 characters and can only use English letters, numbers and dashes (-).
    gmtUpdated String
    The Update Time.
    bizName string
    Scene name.
    bizType string
    Scene type. NOTE: The biz_type cannot exceed 32 characters and can only use English letters, numbers and dashes (-).
    gmtUpdated string
    The Update Time.
    biz_name str
    Scene name.
    biz_type str
    Scene type. NOTE: The biz_type cannot exceed 32 characters and can only use English letters, numbers and dashes (-).
    gmt_updated str
    The Update Time.
    bizName String
    Scene name.
    bizType String
    Scene type. NOTE: The biz_type cannot exceed 32 characters and can only use English letters, numbers and dashes (-).
    gmtUpdated String
    The Update Time.

    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.57.0 published on Saturday, Jun 15, 2024 by Pulumi