1. Packages
  2. Volcengine
  3. API Docs
  4. cloud_identity
  5. Users
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.cloud_identity.Users

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    Use this data source to query detailed information of cloud identity users

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooUser = new List<Volcengine.Cloud_identity.User>();
        for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            fooUser.Add(new Volcengine.Cloud_identity.User($"fooUser-{range.Value}", new()
            {
                Description = "tf",
                DisplayName = $"tf-test-user-{range.Value}",
                Email = "88@qq.com",
                Phone = "181",
                UserName = $"acc-test-user-{range.Value}",
            }));
        }
        var fooUsers = Volcengine.Cloud_identity.Users.Invoke(new()
        {
            Source = "Manual",
            UserName = "acc-test-user",
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_identity"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		var fooUser []*cloud_identity.User
    		for index := 0; index < 2; index++ {
    			key0 := index
    			val0 := index
    			__res, err := cloud_identity.NewUser(ctx, fmt.Sprintf("fooUser-%v", key0), &cloud_identity.UserArgs{
    				Description: pulumi.String("tf"),
    				DisplayName: pulumi.String(fmt.Sprintf("tf-test-user-%v", val0)),
    				Email:       pulumi.String("88@qq.com"),
    				Phone:       pulumi.String("181"),
    				UserName:    pulumi.String(fmt.Sprintf("acc-test-user-%v", val0)),
    			})
    			if err != nil {
    				return err
    			}
    			fooUser = append(fooUser, __res)
    		}
    		_, err = cloud_identity.Users(ctx, &cloud_identity.UsersArgs{
    			Source:   pulumi.StringRef("Manual"),
    			UserName: pulumi.StringRef("acc-test-user"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.cloud_identity.User;
    import com.pulumi.volcengine.cloud_identity.UserArgs;
    import com.pulumi.volcengine.cloud_identity.Cloud_identityFunctions;
    import com.pulumi.volcengine.cloud_identity.inputs.UsersArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    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) {
            for (var i = 0; i < 2; i++) {
                new User("fooUser-" + i, UserArgs.builder()            
                    .description("tf")
                    .displayName(String.format("tf-test-user-%s", range.value()))
                    .email("88@qq.com")
                    .phone("181")
                    .userName(String.format("acc-test-user-%s", range.value()))
                    .build());
    
            
    }
            final var fooUsers = Cloud_identityFunctions.Users(UsersArgs.builder()
                .source("Manual")
                .userName("acc-test-user")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_user = []
    for range in [{"value": i} for i in range(0, 2)]:
        foo_user.append(volcengine.cloud_identity.User(f"fooUser-{range['value']}",
            description="tf",
            display_name=f"tf-test-user-{range['value']}",
            email="88@qq.com",
            phone="181",
            user_name=f"acc-test-user-{range['value']}"))
    foo_users = volcengine.cloud_identity.users(source="Manual",
        user_name="acc-test-user")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooUser: volcengine.cloud_identity.User[] = [];
    for (const range = {value: 0}; range.value < 2; range.value++) {
        fooUser.push(new volcengine.cloud_identity.User(`fooUser-${range.value}`, {
            description: "tf",
            displayName: `tf-test-user-${range.value}`,
            email: "88@qq.com",
            phone: "181",
            userName: `acc-test-user-${range.value}`,
        }));
    }
    const fooUsers = volcengine.cloud_identity.Users({
        source: "Manual",
        userName: "acc-test-user",
    });
    
    resources:
      fooUser:
        type: volcengine:cloud_identity:User
        properties:
          description: tf
          displayName: tf-test-user-${range.value}
          email: 88@qq.com
          phone: '181'
          userName: acc-test-user-${range.value}
        options: {}
    variables:
      fooUsers:
        fn::invoke:
          Function: volcengine:cloud_identity:Users
          Arguments:
            source: Manual
            userName: acc-test-user
    

    Using Users

    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 users(args: UsersArgs, opts?: InvokeOptions): Promise<UsersResult>
    function usersOutput(args: UsersOutputArgs, opts?: InvokeOptions): Output<UsersResult>
    def users(department_id: Optional[str] = None,
              display_name: Optional[str] = None,
              name_regex: Optional[str] = None,
              output_file: Optional[str] = None,
              source: Optional[str] = None,
              user_name: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> UsersResult
    def users_output(department_id: Optional[pulumi.Input[str]] = None,
              display_name: Optional[pulumi.Input[str]] = None,
              name_regex: Optional[pulumi.Input[str]] = None,
              output_file: Optional[pulumi.Input[str]] = None,
              source: Optional[pulumi.Input[str]] = None,
              user_name: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[UsersResult]
    func Users(ctx *Context, args *UsersArgs, opts ...InvokeOption) (*UsersResult, error)
    func UsersOutput(ctx *Context, args *UsersOutputArgs, opts ...InvokeOption) UsersResultOutput
    public static class Users 
    {
        public static Task<UsersResult> InvokeAsync(UsersArgs args, InvokeOptions? opts = null)
        public static Output<UsersResult> Invoke(UsersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<UsersResult> users(UsersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: volcengine:cloud_identity:Users
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DepartmentId string
    The department id.
    DisplayName string
    The display name of cloud identity user.
    NameRegex string
    A Name Regex of Resource.
    OutputFile string
    File name where to save data source results.
    Source string
    The source of cloud identity user. Valid values: Sync, Manual.
    UserName string
    The name of cloud identity user.
    DepartmentId string
    The department id.
    DisplayName string
    The display name of cloud identity user.
    NameRegex string
    A Name Regex of Resource.
    OutputFile string
    File name where to save data source results.
    Source string
    The source of cloud identity user. Valid values: Sync, Manual.
    UserName string
    The name of cloud identity user.
    departmentId String
    The department id.
    displayName String
    The display name of cloud identity user.
    nameRegex String
    A Name Regex of Resource.
    outputFile String
    File name where to save data source results.
    source String
    The source of cloud identity user. Valid values: Sync, Manual.
    userName String
    The name of cloud identity user.
    departmentId string
    The department id.
    displayName string
    The display name of cloud identity user.
    nameRegex string
    A Name Regex of Resource.
    outputFile string
    File name where to save data source results.
    source string
    The source of cloud identity user. Valid values: Sync, Manual.
    userName string
    The name of cloud identity user.
    department_id str
    The department id.
    display_name str
    The display name of cloud identity user.
    name_regex str
    A Name Regex of Resource.
    output_file str
    File name where to save data source results.
    source str
    The source of cloud identity user. Valid values: Sync, Manual.
    user_name str
    The name of cloud identity user.
    departmentId String
    The department id.
    displayName String
    The display name of cloud identity user.
    nameRegex String
    A Name Regex of Resource.
    outputFile String
    File name where to save data source results.
    source String
    The source of cloud identity user. Valid values: Sync, Manual.
    userName String
    The name of cloud identity user.

    Users Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    Users List<UsersUser>
    The collection of query.
    DepartmentId string
    DisplayName string
    The display name of the cloud identity user.
    NameRegex string
    OutputFile string
    Source string
    The source of the cloud identity user.
    UserName string
    The name of the cloud identity user.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    Users []UsersUser
    The collection of query.
    DepartmentId string
    DisplayName string
    The display name of the cloud identity user.
    NameRegex string
    OutputFile string
    Source string
    The source of the cloud identity user.
    UserName string
    The name of the cloud identity user.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Integer
    The total count of query.
    users List<UsersUser>
    The collection of query.
    departmentId String
    displayName String
    The display name of the cloud identity user.
    nameRegex String
    outputFile String
    source String
    The source of the cloud identity user.
    userName String
    The name of the cloud identity user.
    id string
    The provider-assigned unique ID for this managed resource.
    totalCount number
    The total count of query.
    users UsersUser[]
    The collection of query.
    departmentId string
    displayName string
    The display name of the cloud identity user.
    nameRegex string
    outputFile string
    source string
    The source of the cloud identity user.
    userName string
    The name of the cloud identity user.
    id str
    The provider-assigned unique ID for this managed resource.
    total_count int
    The total count of query.
    users Sequence[UsersUser]
    The collection of query.
    department_id str
    display_name str
    The display name of the cloud identity user.
    name_regex str
    output_file str
    source str
    The source of the cloud identity user.
    user_name str
    The name of the cloud identity user.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Number
    The total count of query.
    users List<Property Map>
    The collection of query.
    departmentId String
    displayName String
    The display name of the cloud identity user.
    nameRegex String
    outputFile String
    source String
    The source of the cloud identity user.
    userName String
    The name of the cloud identity user.

    Supporting Types

    UsersUser

    CreatedTime string
    The created time of the cloud identity user.
    Description string
    The description of the cloud identity user.
    DisplayName string
    The display name of cloud identity user.
    Email string
    The email of the cloud identity user.
    Id string
    The id of the cloud identity user.
    IdentityType string
    The identity type of the cloud identity user.
    Phone string
    The phone of the cloud identity user.
    Source string
    The source of cloud identity user. Valid values: Sync, Manual.
    UpdatedTime string
    The updated time of the cloud identity user.
    UserId string
    The id of the cloud identity user.
    UserName string
    The name of cloud identity user.
    CreatedTime string
    The created time of the cloud identity user.
    Description string
    The description of the cloud identity user.
    DisplayName string
    The display name of cloud identity user.
    Email string
    The email of the cloud identity user.
    Id string
    The id of the cloud identity user.
    IdentityType string
    The identity type of the cloud identity user.
    Phone string
    The phone of the cloud identity user.
    Source string
    The source of cloud identity user. Valid values: Sync, Manual.
    UpdatedTime string
    The updated time of the cloud identity user.
    UserId string
    The id of the cloud identity user.
    UserName string
    The name of cloud identity user.
    createdTime String
    The created time of the cloud identity user.
    description String
    The description of the cloud identity user.
    displayName String
    The display name of cloud identity user.
    email String
    The email of the cloud identity user.
    id String
    The id of the cloud identity user.
    identityType String
    The identity type of the cloud identity user.
    phone String
    The phone of the cloud identity user.
    source String
    The source of cloud identity user. Valid values: Sync, Manual.
    updatedTime String
    The updated time of the cloud identity user.
    userId String
    The id of the cloud identity user.
    userName String
    The name of cloud identity user.
    createdTime string
    The created time of the cloud identity user.
    description string
    The description of the cloud identity user.
    displayName string
    The display name of cloud identity user.
    email string
    The email of the cloud identity user.
    id string
    The id of the cloud identity user.
    identityType string
    The identity type of the cloud identity user.
    phone string
    The phone of the cloud identity user.
    source string
    The source of cloud identity user. Valid values: Sync, Manual.
    updatedTime string
    The updated time of the cloud identity user.
    userId string
    The id of the cloud identity user.
    userName string
    The name of cloud identity user.
    created_time str
    The created time of the cloud identity user.
    description str
    The description of the cloud identity user.
    display_name str
    The display name of cloud identity user.
    email str
    The email of the cloud identity user.
    id str
    The id of the cloud identity user.
    identity_type str
    The identity type of the cloud identity user.
    phone str
    The phone of the cloud identity user.
    source str
    The source of cloud identity user. Valid values: Sync, Manual.
    updated_time str
    The updated time of the cloud identity user.
    user_id str
    The id of the cloud identity user.
    user_name str
    The name of cloud identity user.
    createdTime String
    The created time of the cloud identity user.
    description String
    The description of the cloud identity user.
    displayName String
    The display name of cloud identity user.
    email String
    The email of the cloud identity user.
    id String
    The id of the cloud identity user.
    identityType String
    The identity type of the cloud identity user.
    phone String
    The phone of the cloud identity user.
    source String
    The source of cloud identity user. Valid values: Sync, Manual.
    updatedTime String
    The updated time of the cloud identity user.
    userId String
    The id of the cloud identity user.
    userName String
    The name of cloud identity user.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine