1. Packages
  2. Packages
  3. Datadog Provider
  4. API Docs
  5. getOrgGroupMemberships
Viewing docs for Datadog v5.2.0
published on Thursday, May 21, 2026 by Pulumi
datadog logo
Viewing docs for Datadog v5.2.0
published on Thursday, May 21, 2026 by Pulumi

    Use this data source to retrieve org group memberships. At least one filter (orgGroupId or orgUuid) is required.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // List every org that is a member of the given org group.
    const byGroup = datadog.getOrgGroupMemberships({
        orgGroupId: "019d97e8-74d4-7060-806e-e731c8f1d005",
    });
    // Or look up the group an organization currently belongs to.
    const byOrg = datadog.getOrgGroupMemberships({
        orgUuid: "ff4a8255-6931-58d1-add0-a6b3602d5421",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    # List every org that is a member of the given org group.
    by_group = datadog.get_org_group_memberships(org_group_id="019d97e8-74d4-7060-806e-e731c8f1d005")
    # Or look up the group an organization currently belongs to.
    by_org = datadog.get_org_group_memberships(org_uuid="ff4a8255-6931-58d1-add0-a6b3602d5421")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v5/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// List every org that is a member of the given org group.
    		_, err := datadog.GetOrgGroupMemberships(ctx, &datadog.GetOrgGroupMembershipsArgs{
    			OrgGroupId: pulumi.StringRef("019d97e8-74d4-7060-806e-e731c8f1d005"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Or look up the group an organization currently belongs to.
    		_, err = datadog.GetOrgGroupMemberships(ctx, &datadog.GetOrgGroupMembershipsArgs{
    			OrgUuid: pulumi.StringRef("ff4a8255-6931-58d1-add0-a6b3602d5421"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // List every org that is a member of the given org group.
        var byGroup = Datadog.GetOrgGroupMemberships.Invoke(new()
        {
            OrgGroupId = "019d97e8-74d4-7060-806e-e731c8f1d005",
        });
    
        // Or look up the group an organization currently belongs to.
        var byOrg = Datadog.GetOrgGroupMemberships.Invoke(new()
        {
            OrgUuid = "ff4a8255-6931-58d1-add0-a6b3602d5421",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.DatadogFunctions;
    import com.pulumi.datadog.inputs.GetOrgGroupMembershipsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // List every org that is a member of the given org group.
            final var byGroup = DatadogFunctions.getOrgGroupMemberships(GetOrgGroupMembershipsArgs.builder()
                .orgGroupId("019d97e8-74d4-7060-806e-e731c8f1d005")
                .build());
    
            // Or look up the group an organization currently belongs to.
            final var byOrg = DatadogFunctions.getOrgGroupMemberships(GetOrgGroupMembershipsArgs.builder()
                .orgUuid("ff4a8255-6931-58d1-add0-a6b3602d5421")
                .build());
    
        }
    }
    
    variables:
      # List every org that is a member of the given org group.
      byGroup:
        fn::invoke:
          function: datadog:getOrgGroupMemberships
          arguments:
            orgGroupId: 019d97e8-74d4-7060-806e-e731c8f1d005
      # Or look up the group an organization currently belongs to.
      byOrg:
        fn::invoke:
          function: datadog:getOrgGroupMemberships
          arguments:
            orgUuid: ff4a8255-6931-58d1-add0-a6b3602d5421
    
    Example coming soon!
    

    Using getOrgGroupMemberships

    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 getOrgGroupMemberships(args: GetOrgGroupMembershipsArgs, opts?: InvokeOptions): Promise<GetOrgGroupMembershipsResult>
    function getOrgGroupMembershipsOutput(args: GetOrgGroupMembershipsOutputArgs, opts?: InvokeOptions): Output<GetOrgGroupMembershipsResult>
    def get_org_group_memberships(org_group_id: Optional[str] = None,
                                  org_uuid: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetOrgGroupMembershipsResult
    def get_org_group_memberships_output(org_group_id: pulumi.Input[Optional[str]] = None,
                                  org_uuid: pulumi.Input[Optional[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetOrgGroupMembershipsResult]
    func GetOrgGroupMemberships(ctx *Context, args *GetOrgGroupMembershipsArgs, opts ...InvokeOption) (*GetOrgGroupMembershipsResult, error)
    func GetOrgGroupMembershipsOutput(ctx *Context, args *GetOrgGroupMembershipsOutputArgs, opts ...InvokeOption) GetOrgGroupMembershipsResultOutput

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

    public static class GetOrgGroupMemberships 
    {
        public static Task<GetOrgGroupMembershipsResult> InvokeAsync(GetOrgGroupMembershipsArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgGroupMembershipsResult> Invoke(GetOrgGroupMembershipsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrgGroupMembershipsResult> getOrgGroupMemberships(GetOrgGroupMembershipsArgs args, InvokeOptions options)
    public static Output<GetOrgGroupMembershipsResult> getOrgGroupMemberships(GetOrgGroupMembershipsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: datadog:index/getOrgGroupMemberships:getOrgGroupMemberships
      arguments:
        # arguments dictionary
    data "datadog_getorggroupmemberships" "name" {
        # arguments
    }

    The following arguments are supported:

    OrgGroupId string
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    OrgUuid string
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    OrgGroupId string
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    OrgUuid string
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    org_group_id string
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    org_uuid string
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgGroupId String
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgUuid String
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgGroupId string
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgUuid string
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    org_group_id str
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    org_uuid str
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgGroupId String
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgUuid String
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.

    getOrgGroupMemberships Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Memberships List<GetOrgGroupMembershipsMembership>
    The list of org group memberships.
    OrgGroupId string
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    OrgUuid string
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    Id string
    The ID of this resource.
    Memberships []GetOrgGroupMembershipsMembership
    The list of org group memberships.
    OrgGroupId string
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    OrgUuid string
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    id string
    The ID of this resource.
    memberships list(object)
    The list of org group memberships.
    org_group_id string
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    org_uuid string
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    id String
    The ID of this resource.
    memberships List<GetOrgGroupMembershipsMembership>
    The list of org group memberships.
    orgGroupId String
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgUuid String
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    id string
    The ID of this resource.
    memberships GetOrgGroupMembershipsMembership[]
    The list of org group memberships.
    orgGroupId string
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgUuid string
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    id str
    The ID of this resource.
    memberships Sequence[GetOrgGroupMembershipsMembership]
    The list of org group memberships.
    org_group_id str
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    org_uuid str
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    id String
    The ID of this resource.
    memberships List<Property Map>
    The list of org group memberships.
    orgGroupId String
    Filter memberships to those within the given org group. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.
    orgUuid String
    Filter memberships to those for the given organization. At least one filter (orgGroupId or orgUuid) is required. Must be a valid UUID.

    Supporting Types

    GetOrgGroupMembershipsMembership

    Id string
    OrgGroupId string
    OrgName string
    OrgSite string
    OrgUuid string
    Id string
    OrgGroupId string
    OrgName string
    OrgSite string
    OrgUuid string
    id string
    org_group_id string
    org_name string
    org_site string
    org_uuid string
    id String
    orgGroupId String
    orgName String
    orgSite String
    orgUuid String
    id string
    orgGroupId string
    orgName string
    orgSite string
    orgUuid string
    id String
    orgGroupId String
    orgName String
    orgSite String
    orgUuid String

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Viewing docs for Datadog v5.2.0
    published on Thursday, May 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial