Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Identity.getGroup
Explore with Pulumi AI
This data source provides details about a specific Group resource in Oracle Cloud Infrastructure Identity service.
Gets the specified group’s information.
This operation does not return a list of all the users in the group. To do that, use ListUserGroupMemberships and provide the group’s OCID as a query parameter in the request.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testGroup = oci.Identity.getGroup({
    groupId: testGroupOciIdentityGroup.id,
});
import pulumi
import pulumi_oci as oci
test_group = oci.Identity.get_group(group_id=test_group_oci_identity_group["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/identity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identity.GetGroup(ctx, &identity.GetGroupArgs{
			GroupId: testGroupOciIdentityGroup.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testGroup = Oci.Identity.GetGroup.Invoke(new()
    {
        GroupId = testGroupOciIdentityGroup.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Identity.IdentityFunctions;
import com.pulumi.oci.Identity.inputs.GetGroupArgs;
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 testGroup = IdentityFunctions.getGroup(GetGroupArgs.builder()
            .groupId(testGroupOciIdentityGroup.id())
            .build());
    }
}
variables:
  testGroup:
    fn::invoke:
      function: oci:Identity:getGroup
      arguments:
        groupId: ${testGroupOciIdentityGroup.id}
Using getGroup
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 getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>def get_group(group_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetGroupResult
def get_group_output(group_id: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput> Note: This function is named LookupGroup in the Go SDK.
public static class GetGroup 
{
    public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
public static Output<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Identity/getGroup:getGroup
  arguments:
    # arguments dictionaryThe following arguments are supported:
- GroupId string
- The OCID of the group.
- GroupId string
- The OCID of the group.
- groupId String
- The OCID of the group.
- groupId string
- The OCID of the group.
- group_id str
- The OCID of the group.
- groupId String
- The OCID of the group.
getGroup Result
The following output properties are available:
- CompartmentId string
- The OCID of the tenancy containing the group.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Description string
- The description you assign to the group. Does not have to be unique, and it's changeable.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- GroupId string
- Id string
- The OCID of the group.
- InactiveState string
- The detailed status of INACTIVE lifecycleState.
- Name string
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- State string
- The group's current state.
- TimeCreated string
- Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- CompartmentId string
- The OCID of the tenancy containing the group.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Description string
- The description you assign to the group. Does not have to be unique, and it's changeable.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- GroupId string
- Id string
- The OCID of the group.
- InactiveState string
- The detailed status of INACTIVE lifecycleState.
- Name string
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- State string
- The group's current state.
- TimeCreated string
- Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- compartmentId String
- The OCID of the tenancy containing the group.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- description String
- The description you assign to the group. Does not have to be unique, and it's changeable.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- groupId String
- id String
- The OCID of the group.
- inactiveState String
- The detailed status of INACTIVE lifecycleState.
- name String
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- state String
- The group's current state.
- timeCreated String
- Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- compartmentId string
- The OCID of the tenancy containing the group.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- description string
- The description you assign to the group. Does not have to be unique, and it's changeable.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- groupId string
- id string
- The OCID of the group.
- inactiveState string
- The detailed status of INACTIVE lifecycleState.
- name string
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- state string
- The group's current state.
- timeCreated string
- Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- compartment_id str
- The OCID of the tenancy containing the group.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- description str
- The description you assign to the group. Does not have to be unique, and it's changeable.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- group_id str
- id str
- The OCID of the group.
- inactive_state str
- The detailed status of INACTIVE lifecycleState.
- name str
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- state str
- The group's current state.
- time_created str
- Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- compartmentId String
- The OCID of the tenancy containing the group.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- description String
- The description you assign to the group. Does not have to be unique, and it's changeable.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- groupId String
- id String
- The OCID of the group.
- inactiveState String
- The detailed status of INACTIVE lifecycleState.
- name String
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- state String
- The group's current state.
- timeCreated String
- Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.