1. Packages
  2. Ucloud Provider
  3. API Docs
  4. getIamProjects
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.getIamProjects

Explore with Pulumi AI

ucloud logo
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

    Provides a list of IAM projects.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    const foo = ucloud.getIamProjects({
        nameRegex: "^tf-acc-iam-project$",
    });
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    foo = ucloud.get_iam_projects(name_regex="^tf-acc-iam-project$")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ucloud.GetIamProjects(ctx, &ucloud.GetIamProjectsArgs{
    			NameRegex: pulumi.StringRef("^tf-acc-iam-project$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ucloud = Pulumi.Ucloud;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Ucloud.GetIamProjects.Invoke(new()
        {
            NameRegex = "^tf-acc-iam-project$",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ucloud.UcloudFunctions;
    import com.pulumi.ucloud.inputs.GetIamProjectsArgs;
    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 foo = UcloudFunctions.getIamProjects(GetIamProjectsArgs.builder()
                .nameRegex("^tf-acc-iam-project$")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: ucloud:getIamProjects
          arguments:
            nameRegex: ^tf-acc-iam-project$
    

    Using getIamProjects

    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 getIamProjects(args: GetIamProjectsArgs, opts?: InvokeOptions): Promise<GetIamProjectsResult>
    function getIamProjectsOutput(args: GetIamProjectsOutputArgs, opts?: InvokeOptions): Output<GetIamProjectsResult>
    def get_iam_projects(id: Optional[str] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetIamProjectsResult
    def get_iam_projects_output(id: Optional[pulumi.Input[str]] = None,
                         name_regex: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetIamProjectsResult]
    func GetIamProjects(ctx *Context, args *GetIamProjectsArgs, opts ...InvokeOption) (*GetIamProjectsResult, error)
    func GetIamProjectsOutput(ctx *Context, args *GetIamProjectsOutputArgs, opts ...InvokeOption) GetIamProjectsResultOutput

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

    public static class GetIamProjects 
    {
        public static Task<GetIamProjectsResult> InvokeAsync(GetIamProjectsArgs args, InvokeOptions? opts = null)
        public static Output<GetIamProjectsResult> Invoke(GetIamProjectsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamProjectsResult> getIamProjects(GetIamProjectsArgs args, InvokeOptions options)
    public static Output<GetIamProjectsResult> getIamProjects(GetIamProjectsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ucloud:index/getIamProjects:getIamProjects
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    ID of the IAM project.
    NameRegex string
    A regex string to filter resulting users by their names.
    OutputFile string
    Id string
    ID of the IAM project.
    NameRegex string
    A regex string to filter resulting users by their names.
    OutputFile string
    id String
    ID of the IAM project.
    nameRegex String
    A regex string to filter resulting users by their names.
    outputFile String
    id string
    ID of the IAM project.
    nameRegex string
    A regex string to filter resulting users by their names.
    outputFile string
    id str
    ID of the IAM project.
    name_regex str
    A regex string to filter resulting users by their names.
    output_file str
    id String
    ID of the IAM project.
    nameRegex String
    A regex string to filter resulting users by their names.
    outputFile String

    getIamProjects Result

    The following output properties are available:

    Id string
    ID of the IAM project.
    Projects List<GetIamProjectsProject>
    A list of projects. Each element contains the following attributes
    TotalCount double
    NameRegex string
    OutputFile string
    Id string
    ID of the IAM project.
    Projects []GetIamProjectsProject
    A list of projects. Each element contains the following attributes
    TotalCount float64
    NameRegex string
    OutputFile string
    id String
    ID of the IAM project.
    projects List<GetIamProjectsProject>
    A list of projects. Each element contains the following attributes
    totalCount Double
    nameRegex String
    outputFile String
    id string
    ID of the IAM project.
    projects GetIamProjectsProject[]
    A list of projects. Each element contains the following attributes
    totalCount number
    nameRegex string
    outputFile string
    id str
    ID of the IAM project.
    projects Sequence[GetIamProjectsProject]
    A list of projects. Each element contains the following attributes
    total_count float
    name_regex str
    output_file str
    id String
    ID of the IAM project.
    projects List<Property Map>
    A list of projects. Each element contains the following attributes
    totalCount Number
    nameRegex String
    outputFile String

    Supporting Types

    GetIamProjectsProject

    CreateTime string
    Id string
    ID of the IAM project.
    Name string
    Name of the IAM project.
    UserCount double
    CreateTime string
    Id string
    ID of the IAM project.
    Name string
    Name of the IAM project.
    UserCount float64
    createTime String
    id String
    ID of the IAM project.
    name String
    Name of the IAM project.
    userCount Double
    createTime string
    id string
    ID of the IAM project.
    name string
    Name of the IAM project.
    userCount number
    create_time str
    id str
    ID of the IAM project.
    name str
    Name of the IAM project.
    user_count float
    createTime String
    id String
    ID of the IAM project.
    name String
    Name of the IAM project.
    userCount Number

    Package Details

    Repository
    ucloud ucloud/terraform-provider-ucloud
    License
    Notes
    This Pulumi package is based on the ucloud Terraform Provider.
    ucloud logo
    ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud