Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getFaceConfigs

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

NOTE: Available in v1.137.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultFaceConfig = new AliCloud.CloudAuth.FaceConfig("defaultFaceConfig", new AliCloud.CloudAuth.FaceConfigArgs
        {
            BizName = "example-value",
            BizType = "example-value",
        });
        var defaultFaceConfigs = AliCloud.CloudAuth.GetFaceConfigs.Invoke(new AliCloud.CloudAuth.GetFaceConfigsInvokeArgs
        {
            Ids = 
            {
                defaultFaceConfig.Id,
            },
            NameRegex = defaultFaceConfig.BizName,
        });
        this.FaceConfig = defaultFaceConfigs.Apply(defaultFaceConfigs => defaultFaceConfigs.Configs?[0]);
    }

    [Output("faceConfig")]
    public Output<string> FaceConfig { get; set; }
}
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, "defaultFaceConfig", &cloudauth.FaceConfigArgs{
			BizName: pulumi.String("example-value"),
			BizType: pulumi.String("example-value"),
		})
		if err != nil {
			return err
		}
		defaultFaceConfigs := cloudauth.GetFaceConfigsOutput(ctx, cloudauth.GetFaceConfigsOutputArgs{
			Ids: pulumi.StringArray{
				defaultFaceConfig.ID(),
			},
			NameRegex: defaultFaceConfig.BizName,
		}, nil)
		ctx.Export("faceConfig", defaultFaceConfigs.ApplyT(func(defaultFaceConfigs cloudauth.GetFaceConfigsResult) (cloudauth.GetFaceConfigsConfig, error) {
			return defaultFaceConfigs.Configs[0], nil
		}).(cloudauth.GetFaceConfigsConfigOutput))
		return nil
	})
}
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 defaultFaceConfigs = CloudauthFunctions.getFaceConfigs(GetFaceConfigsArgs.builder()
            .ids(defaultFaceConfig.id())
            .nameRegex(defaultFaceConfig.bizName())
            .build());

        ctx.export("faceConfig", defaultFaceConfigs.applyValue(getFaceConfigsResult -> getFaceConfigsResult).applyValue(defaultFaceConfigs -> defaultFaceConfigs.applyValue(getFaceConfigsResult -> getFaceConfigsResult.configs()[0])));
    }
}
import pulumi
import pulumi_alicloud as alicloud

default_face_config = alicloud.cloudauth.FaceConfig("defaultFaceConfig",
    biz_name="example-value",
    biz_type="example-value")
default_face_configs = alicloud.cloudauth.get_face_configs_output(ids=[default_face_config.id],
    name_regex=default_face_config.biz_name)
pulumi.export("faceConfig", default_face_configs.configs[0])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultFaceConfig = new alicloud.cloudauth.FaceConfig("defaultFaceConfig", {
    bizName: "example-value",
    bizType: "example-value",
});
const defaultFaceConfigs = alicloud.cloudauth.getFaceConfigsOutput({
    ids: [defaultFaceConfig.id],
    nameRegex: defaultFaceConfig.bizName,
});
export const faceConfig = defaultFaceConfigs.apply(defaultFaceConfigs => defaultFaceConfigs.configs?[0]);
resources:
  defaultFaceConfig:
    type: alicloud:cloudauth:FaceConfig
    properties:
      bizName: example-value
      bizType: example-value
variables:
  defaultFaceConfigs:
    Fn::Invoke:
      Function: alicloud:cloudauth:getFaceConfigs
      Arguments:
        ids:
          - ${defaultFaceConfig.id}
        nameRegex: ${defaultFaceConfig.bizName}
outputs:
  faceConfig: ${defaultFaceConfigs.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
Ids []string

A list of Face Config IDs.

NameRegex string

A regex string to filter results by biz_name.

OutputFile string
ids List<String>

A list of Face Config IDs.

nameRegex String

A regex string to filter results by biz_name.

outputFile String
ids string[]

A list of Face Config IDs.

nameRegex string

A regex string to filter results by biz_name.

outputFile string
ids Sequence[str]

A list of Face Config IDs.

name_regex str

A regex string to filter results by biz_name.

output_file str
ids List<String>

A list of Face Config IDs.

nameRegex String

A regex string to filter results by biz_name.

outputFile String

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
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.