1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getFederatedSettingsOrgRoleMapping
MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi

mongodbatlas.getFederatedSettingsOrgRoleMapping

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi

    # Data Source: mongodbatlas.FederatedSettingsOrgRoleMapping

    mongodbatlas.FederatedSettingsOrgRoleMapping provides an Federated Settings Org Role Mapping datasource. Atlas Cloud Federated Settings Org Role Mapping provides federated settings outputs for the configured Org Role Mapping.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const orgGroupRoleMappingImport = new mongodbatlas.FederatedSettingsOrgRoleMapping("org_group_role_mapping_import", {
        federationSettingsId: federatedSettings.id,
        orgId: "627a9683e7f7f7ff7fe306f14",
        externalGroupName: "myGrouptest",
        roleAssignments: [
            {
                orgId: "627a9683e7f7f7ff7fe306f14",
                roles: [
                    "ORG_MEMBER",
                    "ORG_GROUP_CREATOR",
                    "ORG_BILLING_ADMIN",
                ],
            },
            {
                groupId: "628aa20db7f7f7f98b81b8",
                roles: [
                    "GROUP_OWNER",
                    "GROUP_DATA_ACCESS_ADMIN",
                    "GROUP_SEARCH_INDEX_EDITOR",
                    "GROUP_DATA_ACCESS_READ_ONLY",
                ],
            },
            {
                groupId: "62b477f7f7f7f5e741489c",
                roles: [
                    "GROUP_OWNER",
                    "GROUP_DATA_ACCESS_ADMIN",
                    "GROUP_SEARCH_INDEX_EDITOR",
                    "GROUP_DATA_ACCESS_READ_ONLY",
                    "GROUP_DATA_ACCESS_READ_WRITE",
                ],
            },
        ],
    });
    const roleMapping = mongodbatlas.getFederatedSettingsOrgRoleMappingOutput({
        federationSettingsId: orgGroupRoleMappingImport.id,
        orgId: "627a9683e7f7f7ff7fe306f14",
        roleMappingId: "627a9673e7f7f7ff7fe306f14",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    org_group_role_mapping_import = mongodbatlas.FederatedSettingsOrgRoleMapping("org_group_role_mapping_import",
        federation_settings_id=federated_settings["id"],
        org_id="627a9683e7f7f7ff7fe306f14",
        external_group_name="myGrouptest",
        role_assignments=[
            {
                "org_id": "627a9683e7f7f7ff7fe306f14",
                "roles": [
                    "ORG_MEMBER",
                    "ORG_GROUP_CREATOR",
                    "ORG_BILLING_ADMIN",
                ],
            },
            {
                "group_id": "628aa20db7f7f7f98b81b8",
                "roles": [
                    "GROUP_OWNER",
                    "GROUP_DATA_ACCESS_ADMIN",
                    "GROUP_SEARCH_INDEX_EDITOR",
                    "GROUP_DATA_ACCESS_READ_ONLY",
                ],
            },
            {
                "group_id": "62b477f7f7f7f5e741489c",
                "roles": [
                    "GROUP_OWNER",
                    "GROUP_DATA_ACCESS_ADMIN",
                    "GROUP_SEARCH_INDEX_EDITOR",
                    "GROUP_DATA_ACCESS_READ_ONLY",
                    "GROUP_DATA_ACCESS_READ_WRITE",
                ],
            },
        ])
    role_mapping = mongodbatlas.get_federated_settings_org_role_mapping_output(federation_settings_id=org_group_role_mapping_import.id,
        org_id="627a9683e7f7f7ff7fe306f14",
        role_mapping_id="627a9673e7f7f7ff7fe306f14")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		orgGroupRoleMappingImport, err := mongodbatlas.NewFederatedSettingsOrgRoleMapping(ctx, "org_group_role_mapping_import", &mongodbatlas.FederatedSettingsOrgRoleMappingArgs{
    			FederationSettingsId: pulumi.Any(federatedSettings.Id),
    			OrgId:                pulumi.String("627a9683e7f7f7ff7fe306f14"),
    			ExternalGroupName:    pulumi.String("myGrouptest"),
    			RoleAssignments: mongodbatlas.FederatedSettingsOrgRoleMappingRoleAssignmentArray{
    				&mongodbatlas.FederatedSettingsOrgRoleMappingRoleAssignmentArgs{
    					OrgId: pulumi.String("627a9683e7f7f7ff7fe306f14"),
    					Roles: pulumi.StringArray{
    						pulumi.String("ORG_MEMBER"),
    						pulumi.String("ORG_GROUP_CREATOR"),
    						pulumi.String("ORG_BILLING_ADMIN"),
    					},
    				},
    				&mongodbatlas.FederatedSettingsOrgRoleMappingRoleAssignmentArgs{
    					GroupId: pulumi.String("628aa20db7f7f7f98b81b8"),
    					Roles: pulumi.StringArray{
    						pulumi.String("GROUP_OWNER"),
    						pulumi.String("GROUP_DATA_ACCESS_ADMIN"),
    						pulumi.String("GROUP_SEARCH_INDEX_EDITOR"),
    						pulumi.String("GROUP_DATA_ACCESS_READ_ONLY"),
    					},
    				},
    				&mongodbatlas.FederatedSettingsOrgRoleMappingRoleAssignmentArgs{
    					GroupId: pulumi.String("62b477f7f7f7f5e741489c"),
    					Roles: pulumi.StringArray{
    						pulumi.String("GROUP_OWNER"),
    						pulumi.String("GROUP_DATA_ACCESS_ADMIN"),
    						pulumi.String("GROUP_SEARCH_INDEX_EDITOR"),
    						pulumi.String("GROUP_DATA_ACCESS_READ_ONLY"),
    						pulumi.String("GROUP_DATA_ACCESS_READ_WRITE"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = mongodbatlas.LookupFederatedSettingsOrgRoleMappingOutput(ctx, mongodbatlas.GetFederatedSettingsOrgRoleMappingOutputArgs{
    			FederationSettingsId: orgGroupRoleMappingImport.ID(),
    			OrgId:                pulumi.String("627a9683e7f7f7ff7fe306f14"),
    			RoleMappingId:        pulumi.String("627a9673e7f7f7ff7fe306f14"),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var orgGroupRoleMappingImport = new Mongodbatlas.FederatedSettingsOrgRoleMapping("org_group_role_mapping_import", new()
        {
            FederationSettingsId = federatedSettings.Id,
            OrgId = "627a9683e7f7f7ff7fe306f14",
            ExternalGroupName = "myGrouptest",
            RoleAssignments = new[]
            {
                new Mongodbatlas.Inputs.FederatedSettingsOrgRoleMappingRoleAssignmentArgs
                {
                    OrgId = "627a9683e7f7f7ff7fe306f14",
                    Roles = new[]
                    {
                        "ORG_MEMBER",
                        "ORG_GROUP_CREATOR",
                        "ORG_BILLING_ADMIN",
                    },
                },
                new Mongodbatlas.Inputs.FederatedSettingsOrgRoleMappingRoleAssignmentArgs
                {
                    GroupId = "628aa20db7f7f7f98b81b8",
                    Roles = new[]
                    {
                        "GROUP_OWNER",
                        "GROUP_DATA_ACCESS_ADMIN",
                        "GROUP_SEARCH_INDEX_EDITOR",
                        "GROUP_DATA_ACCESS_READ_ONLY",
                    },
                },
                new Mongodbatlas.Inputs.FederatedSettingsOrgRoleMappingRoleAssignmentArgs
                {
                    GroupId = "62b477f7f7f7f5e741489c",
                    Roles = new[]
                    {
                        "GROUP_OWNER",
                        "GROUP_DATA_ACCESS_ADMIN",
                        "GROUP_SEARCH_INDEX_EDITOR",
                        "GROUP_DATA_ACCESS_READ_ONLY",
                        "GROUP_DATA_ACCESS_READ_WRITE",
                    },
                },
            },
        });
    
        var roleMapping = Mongodbatlas.GetFederatedSettingsOrgRoleMapping.Invoke(new()
        {
            FederationSettingsId = orgGroupRoleMappingImport.Id,
            OrgId = "627a9683e7f7f7ff7fe306f14",
            RoleMappingId = "627a9673e7f7f7ff7fe306f14",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.FederatedSettingsOrgRoleMapping;
    import com.pulumi.mongodbatlas.FederatedSettingsOrgRoleMappingArgs;
    import com.pulumi.mongodbatlas.inputs.FederatedSettingsOrgRoleMappingRoleAssignmentArgs;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetFederatedSettingsOrgRoleMappingArgs;
    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) {
            var orgGroupRoleMappingImport = new FederatedSettingsOrgRoleMapping("orgGroupRoleMappingImport", FederatedSettingsOrgRoleMappingArgs.builder()
                .federationSettingsId(federatedSettings.id())
                .orgId("627a9683e7f7f7ff7fe306f14")
                .externalGroupName("myGrouptest")
                .roleAssignments(            
                    FederatedSettingsOrgRoleMappingRoleAssignmentArgs.builder()
                        .orgId("627a9683e7f7f7ff7fe306f14")
                        .roles(                    
                            "ORG_MEMBER",
                            "ORG_GROUP_CREATOR",
                            "ORG_BILLING_ADMIN")
                        .build(),
                    FederatedSettingsOrgRoleMappingRoleAssignmentArgs.builder()
                        .groupId("628aa20db7f7f7f98b81b8")
                        .roles(                    
                            "GROUP_OWNER",
                            "GROUP_DATA_ACCESS_ADMIN",
                            "GROUP_SEARCH_INDEX_EDITOR",
                            "GROUP_DATA_ACCESS_READ_ONLY")
                        .build(),
                    FederatedSettingsOrgRoleMappingRoleAssignmentArgs.builder()
                        .groupId("62b477f7f7f7f5e741489c")
                        .roles(                    
                            "GROUP_OWNER",
                            "GROUP_DATA_ACCESS_ADMIN",
                            "GROUP_SEARCH_INDEX_EDITOR",
                            "GROUP_DATA_ACCESS_READ_ONLY",
                            "GROUP_DATA_ACCESS_READ_WRITE")
                        .build())
                .build());
    
            final var roleMapping = MongodbatlasFunctions.getFederatedSettingsOrgRoleMapping(GetFederatedSettingsOrgRoleMappingArgs.builder()
                .federationSettingsId(orgGroupRoleMappingImport.id())
                .orgId("627a9683e7f7f7ff7fe306f14")
                .roleMappingId("627a9673e7f7f7ff7fe306f14")
                .build());
    
        }
    }
    
    resources:
      orgGroupRoleMappingImport:
        type: mongodbatlas:FederatedSettingsOrgRoleMapping
        name: org_group_role_mapping_import
        properties:
          federationSettingsId: ${federatedSettings.id}
          orgId: 627a9683e7f7f7ff7fe306f14
          externalGroupName: myGrouptest
          roleAssignments:
            - orgId: 627a9683e7f7f7ff7fe306f14
              roles:
                - ORG_MEMBER
                - ORG_GROUP_CREATOR
                - ORG_BILLING_ADMIN
            - groupId: 628aa20db7f7f7f98b81b8
              roles:
                - GROUP_OWNER
                - GROUP_DATA_ACCESS_ADMIN
                - GROUP_SEARCH_INDEX_EDITOR
                - GROUP_DATA_ACCESS_READ_ONLY
            - groupId: 62b477f7f7f7f5e741489c
              roles:
                - GROUP_OWNER
                - GROUP_DATA_ACCESS_ADMIN
                - GROUP_SEARCH_INDEX_EDITOR
                - GROUP_DATA_ACCESS_READ_ONLY
                - GROUP_DATA_ACCESS_READ_WRITE
    variables:
      roleMapping:
        fn::invoke:
          Function: mongodbatlas:getFederatedSettingsOrgRoleMapping
          Arguments:
            federationSettingsId: ${orgGroupRoleMappingImport.id}
            orgId: 627a9683e7f7f7ff7fe306f14
            roleMappingId: 627a9673e7f7f7ff7fe306f14
    

    Using getFederatedSettingsOrgRoleMapping

    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 getFederatedSettingsOrgRoleMapping(args: GetFederatedSettingsOrgRoleMappingArgs, opts?: InvokeOptions): Promise<GetFederatedSettingsOrgRoleMappingResult>
    function getFederatedSettingsOrgRoleMappingOutput(args: GetFederatedSettingsOrgRoleMappingOutputArgs, opts?: InvokeOptions): Output<GetFederatedSettingsOrgRoleMappingResult>
    def get_federated_settings_org_role_mapping(federation_settings_id: Optional[str] = None,
                                                org_id: Optional[str] = None,
                                                role_mapping_id: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetFederatedSettingsOrgRoleMappingResult
    def get_federated_settings_org_role_mapping_output(federation_settings_id: Optional[pulumi.Input[str]] = None,
                                                org_id: Optional[pulumi.Input[str]] = None,
                                                role_mapping_id: Optional[pulumi.Input[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetFederatedSettingsOrgRoleMappingResult]
    func LookupFederatedSettingsOrgRoleMapping(ctx *Context, args *LookupFederatedSettingsOrgRoleMappingArgs, opts ...InvokeOption) (*LookupFederatedSettingsOrgRoleMappingResult, error)
    func LookupFederatedSettingsOrgRoleMappingOutput(ctx *Context, args *LookupFederatedSettingsOrgRoleMappingOutputArgs, opts ...InvokeOption) LookupFederatedSettingsOrgRoleMappingResultOutput

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

    public static class GetFederatedSettingsOrgRoleMapping 
    {
        public static Task<GetFederatedSettingsOrgRoleMappingResult> InvokeAsync(GetFederatedSettingsOrgRoleMappingArgs args, InvokeOptions? opts = null)
        public static Output<GetFederatedSettingsOrgRoleMappingResult> Invoke(GetFederatedSettingsOrgRoleMappingInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFederatedSettingsOrgRoleMappingResult> getFederatedSettingsOrgRoleMapping(GetFederatedSettingsOrgRoleMappingArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: mongodbatlas:index/getFederatedSettingsOrgRoleMapping:getFederatedSettingsOrgRoleMapping
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FederationSettingsId string
    Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    RoleMappingId string
    FederationSettingsId string
    Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    RoleMappingId string
    federationSettingsId String
    Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    roleMappingId String
    federationSettingsId string
    Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    roleMappingId string
    federation_settings_id str
    Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    role_mapping_id str
    federationSettingsId String
    Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    roleMappingId String

    getFederatedSettingsOrgRoleMapping Result

    The following output properties are available:

    ExternalGroupName string
    Unique human-readable label that identifies the identity provider group to which this role mapping applies.
    FederationSettingsId string
    Id string
    Unique 24-hexadecimal digit string that identifies this role mapping.
    OrgId string
    RoleAssignments List<GetFederatedSettingsOrgRoleMappingRoleAssignment>
    Atlas roles and the unique identifiers of the groups and organizations associated with each role.
    RoleMappingId string
    ExternalGroupName string
    Unique human-readable label that identifies the identity provider group to which this role mapping applies.
    FederationSettingsId string
    Id string
    Unique 24-hexadecimal digit string that identifies this role mapping.
    OrgId string
    RoleAssignments []GetFederatedSettingsOrgRoleMappingRoleAssignment
    Atlas roles and the unique identifiers of the groups and organizations associated with each role.
    RoleMappingId string
    externalGroupName String
    Unique human-readable label that identifies the identity provider group to which this role mapping applies.
    federationSettingsId String
    id String
    Unique 24-hexadecimal digit string that identifies this role mapping.
    orgId String
    roleAssignments List<GetFederatedSettingsOrgRoleMappingRoleAssignment>
    Atlas roles and the unique identifiers of the groups and organizations associated with each role.
    roleMappingId String
    externalGroupName string
    Unique human-readable label that identifies the identity provider group to which this role mapping applies.
    federationSettingsId string
    id string
    Unique 24-hexadecimal digit string that identifies this role mapping.
    orgId string
    roleAssignments GetFederatedSettingsOrgRoleMappingRoleAssignment[]
    Atlas roles and the unique identifiers of the groups and organizations associated with each role.
    roleMappingId string
    external_group_name str
    Unique human-readable label that identifies the identity provider group to which this role mapping applies.
    federation_settings_id str
    id str
    Unique 24-hexadecimal digit string that identifies this role mapping.
    org_id str
    role_assignments Sequence[GetFederatedSettingsOrgRoleMappingRoleAssignment]
    Atlas roles and the unique identifiers of the groups and organizations associated with each role.
    role_mapping_id str
    externalGroupName String
    Unique human-readable label that identifies the identity provider group to which this role mapping applies.
    federationSettingsId String
    id String
    Unique 24-hexadecimal digit string that identifies this role mapping.
    orgId String
    roleAssignments List<Property Map>
    Atlas roles and the unique identifiers of the groups and organizations associated with each role.
    roleMappingId String

    Supporting Types

    GetFederatedSettingsOrgRoleMappingRoleAssignment

    GroupId string
    Unique identifier of the project to which you want the role mapping to apply.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    Role string
    Specifies the Role that is attached to the Role Mapping.
    GroupId string
    Unique identifier of the project to which you want the role mapping to apply.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    Role string
    Specifies the Role that is attached to the Role Mapping.
    groupId String
    Unique identifier of the project to which you want the role mapping to apply.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    role String
    Specifies the Role that is attached to the Role Mapping.
    groupId string
    Unique identifier of the project to which you want the role mapping to apply.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    role string
    Specifies the Role that is attached to the Role Mapping.
    group_id str
    Unique identifier of the project to which you want the role mapping to apply.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    role str
    Specifies the Role that is attached to the Role Mapping.
    groupId String
    Unique identifier of the project to which you want the role mapping to apply.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    role String
    Specifies the Role that is attached to the Role Mapping.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi