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

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$",
});
Copy
import pulumi
import pulumi_ucloud as ucloud

foo = ucloud.get_iam_projects(name_regex="^tf-acc-iam-project$")
Copy
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
	})
}
Copy
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$",
    });

});
Copy
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());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: ucloud:getIamProjects
      arguments:
        nameRegex: ^tf-acc-iam-project$
Copy

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>
Copy
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]
Copy
func GetIamProjects(ctx *Context, args *GetIamProjectsArgs, opts ...InvokeOption) (*GetIamProjectsResult, error)
func GetIamProjectsOutput(ctx *Context, args *GetIamProjectsOutputArgs, opts ...InvokeOption) GetIamProjectsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetIamProjectsResult> getIamProjects(GetIamProjectsArgs args, InvokeOptions options)
public static Output<GetIamProjectsResult> getIamProjects(GetIamProjectsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ucloud:index/getIamProjects:getIamProjects
  arguments:
    # arguments dictionary
Copy

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 This property is required. string
Id This property is required. string
ID of the IAM project.
Name This property is required. string
Name of the IAM project.
UserCount This property is required. double
CreateTime This property is required. string
Id This property is required. string
ID of the IAM project.
Name This property is required. string
Name of the IAM project.
UserCount This property is required. float64
createTime This property is required. String
id This property is required. String
ID of the IAM project.
name This property is required. String
Name of the IAM project.
userCount This property is required. Double
createTime This property is required. string
id This property is required. string
ID of the IAM project.
name This property is required. string
Name of the IAM project.
userCount This property is required. number
create_time This property is required. str
id This property is required. str
ID of the IAM project.
name This property is required. str
Name of the IAM project.
user_count This property is required. float
createTime This property is required. String
id This property is required. String
ID of the IAM project.
name This property is required. String
Name of the IAM project.
userCount This property is required. Number

Package Details

Repository
ucloud ucloud/terraform-provider-ucloud
License
Notes
This Pulumi package is based on the ucloud Terraform Provider.