1. Packages
  2. Zitadel
  3. API Docs
  4. getOrgs
zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse

zitadel.getOrgs

Explore with Pulumi AI

zitadel logo
zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse

    Datasource representing an organization in ZITADEL, which is the highest level after the instance and contains several other resource including policies if the configuration differs to the default policies on the instance.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zitadel = Pulumi.Zitadel;
    
    	
    static object NotImplemented(string errorMessage) 
    {
        throw new System.NotImplementedException(errorMessage);
    }
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Zitadel.GetOrgs.Invoke(new()
        {
            Name = "example-name",
            NameMethod = "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE",
            Domain = "example.com",
            DomainMethod = "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE",
            State = "ORG_STATE_ACTIVE",
        });
    
        var defaultGetOrg = .ToDictionary(item => {
            var __key = item.Key;
            return __key;
        }, item => {
            var __value = item.Value;
            return Zitadel.GetOrg.Invoke(new()
            {
                Id = __value,
            });
        });
    
        return new Dictionary<string, object?>
        {
            ["orgNames"] = NotImplemented(@"toset([
    fororgindata.zitadel_org.default:org.name
    ])"),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
    )
    
    func notImplemented(message string) pulumi.AnyOutput {
    	panic(message)
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zitadel.GetOrgs(ctx, &zitadel.GetOrgsArgs{
    			Name:         pulumi.StringRef("example-name"),
    			NameMethod:   pulumi.StringRef("TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE"),
    			Domain:       pulumi.StringRef("example.com"),
    			DomainMethod: pulumi.StringRef("TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE"),
    			State:        pulumi.StringRef("ORG_STATE_ACTIVE"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_ := "TODO: For expression"
    		ctx.Export("orgNames", notImplemented("toset([\nfororgindata.zitadel_org.default:org.name\n])"))
    		return nil
    	})
    }
    

    Coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumi/zitadel";
    
    function notImplemented(message: string) {
        throw new Error(message);
    }
    
    const default = zitadel.getOrgs({
        name: "example-name",
        nameMethod: "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE",
        domain: "example.com",
        domainMethod: "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE",
        state: "ORG_STATE_ACTIVE",
    });
    const defaultGetOrg = .reduce((__obj, [, ]) => ({ ...__obj, [__key]: zitadel.getOrg({
        id: __value,
    }) }));
    export const orgNames = notImplemented(`toset([
    fororgindata.zitadel_org.default:org.name
    ])`);
    
    import pulumi
    import pulumi_zitadel as zitadel
    
    
    def not_implemented(msg):
        raise NotImplementedError(msg)
    
    default = zitadel.get_orgs(name="example-name",
        name_method="TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE",
        domain="example.com",
        domain_method="TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE",
        state="ORG_STATE_ACTIVE")
    default_get_org = {__key: zitadel.get_org(id=__value) for __key, __value in not_implemented("toset(data.zitadel_orgs.default.ids)")}
    pulumi.export("orgNames", not_implemented("""toset([
    fororgindata.zitadel_org.default:org.name
    ])"""))
    

    Coming soon!

    Using getOrgs

    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 getOrgs(args: GetOrgsArgs, opts?: InvokeOptions): Promise<GetOrgsResult>
    function getOrgsOutput(args: GetOrgsOutputArgs, opts?: InvokeOptions): Output<GetOrgsResult>
    def get_orgs(domain: Optional[str] = None,
                 domain_method: Optional[str] = None,
                 name: Optional[str] = None,
                 name_method: Optional[str] = None,
                 state: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetOrgsResult
    def get_orgs_output(domain: Optional[pulumi.Input[str]] = None,
                 domain_method: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 name_method: Optional[pulumi.Input[str]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetOrgsResult]
    func GetOrgs(ctx *Context, args *GetOrgsArgs, opts ...InvokeOption) (*GetOrgsResult, error)
    func GetOrgsOutput(ctx *Context, args *GetOrgsOutputArgs, opts ...InvokeOption) GetOrgsResultOutput

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

    public static class GetOrgs 
    {
        public static Task<GetOrgsResult> InvokeAsync(GetOrgsArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgsResult> Invoke(GetOrgsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrgsResult> getOrgs(GetOrgsArgs args, InvokeOptions options)
    public static Output<GetOrgsResult> getOrgs(GetOrgsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: zitadel:index/getOrgs:getOrgs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Domain string
    A domain of the org.
    DomainMethod string
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    Name string
    Name of the org.
    NameMethod string
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    State string
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    Domain string
    A domain of the org.
    DomainMethod string
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    Name string
    Name of the org.
    NameMethod string
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    State string
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    domain String
    A domain of the org.
    domainMethod String
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    name String
    Name of the org.
    nameMethod String
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    state String
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    domain string
    A domain of the org.
    domainMethod string
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    name string
    Name of the org.
    nameMethod string
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    state string
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    domain str
    A domain of the org.
    domain_method str
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    name str
    Name of the org.
    name_method str
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    state str
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    domain String
    A domain of the org.
    domainMethod String
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    name String
    Name of the org.
    nameMethod String
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    state String
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED

    getOrgs Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A set of all organization IDs.
    PrimaryDomain string
    Primary domain of the org
    Domain string
    A domain of the org.
    DomainMethod string
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    Name string
    Name of the org.
    NameMethod string
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    State string
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A set of all organization IDs.
    PrimaryDomain string
    Primary domain of the org
    Domain string
    A domain of the org.
    DomainMethod string
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    Name string
    Name of the org.
    NameMethod string
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    State string
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A set of all organization IDs.
    primaryDomain String
    Primary domain of the org
    domain String
    A domain of the org.
    domainMethod String
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    name String
    Name of the org.
    nameMethod String
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    state String
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A set of all organization IDs.
    primaryDomain string
    Primary domain of the org
    domain string
    A domain of the org.
    domainMethod string
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    name string
    Name of the org.
    nameMethod string
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    state string
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A set of all organization IDs.
    primary_domain str
    Primary domain of the org
    domain str
    A domain of the org.
    domain_method str
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    name str
    Name of the org.
    name_method str
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    state str
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A set of all organization IDs.
    primaryDomain String
    Primary domain of the org
    domain String
    A domain of the org.
    domainMethod String
    Method for querying orgs by domain, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    name String
    Name of the org.
    nameMethod String
    Method for querying orgs by name, supported values: TEXTQUERYMETHODEQUALS, TEXTQUERYMETHODEQUALSIGNORECASE, TEXTQUERYMETHODSTARTSWITH, TEXTQUERYMETHODSTARTSWITHIGNORECASE, TEXTQUERYMETHODCONTAINS, TEXTQUERYMETHODCONTAINSIGNORECASE, TEXTQUERYMETHODENDSWITH, TEXTQUERYMETHODENDSWITHIGNORECASE
    state String
    State of the org, supported values: ORGSTATEUNSPECIFIED, ORGSTATEACTIVE, ORGSTATEINACTIVE, ORGSTATEREMOVED

    Package Details

    Repository
    zitadel pulumiverse/pulumi-zitadel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the zitadel Terraform Provider.
    zitadel logo
    zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse