1. Packages
  2. Googleworkspace Provider
  3. API Docs
  4. getOrgUnit
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp

googleworkspace.getOrgUnit

Explore with Pulumi AI

googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as googleworkspace from "@pulumi/googleworkspace";

const org = googleworkspace.getOrgUnit({
    orgUnitId: "id:01ab2c3d4efg56h",
});
Copy
import pulumi
import pulumi_googleworkspace as googleworkspace

org = googleworkspace.get_org_unit(org_unit_id="id:01ab2c3d4efg56h")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/googleworkspace/googleworkspace"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := googleworkspace.LookupOrgUnit(ctx, &googleworkspace.LookupOrgUnitArgs{
			OrgUnitId: pulumi.StringRef("id:01ab2c3d4efg56h"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Googleworkspace = Pulumi.Googleworkspace;

return await Deployment.RunAsync(() => 
{
    var org = Googleworkspace.GetOrgUnit.Invoke(new()
    {
        OrgUnitId = "id:01ab2c3d4efg56h",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.googleworkspace.GoogleworkspaceFunctions;
import com.pulumi.googleworkspace.inputs.GetOrgUnitArgs;
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 org = GoogleworkspaceFunctions.getOrgUnit(GetOrgUnitArgs.builder()
            .orgUnitId("id:01ab2c3d4efg56h")
            .build());

    }
}
Copy
variables:
  org:
    fn::invoke:
      function: googleworkspace:getOrgUnit
      arguments:
        orgUnitId: id:01ab2c3d4efg56h
Copy

Using getOrgUnit

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 getOrgUnit(args: GetOrgUnitArgs, opts?: InvokeOptions): Promise<GetOrgUnitResult>
function getOrgUnitOutput(args: GetOrgUnitOutputArgs, opts?: InvokeOptions): Output<GetOrgUnitResult>
Copy
def get_org_unit(org_unit_id: Optional[str] = None,
                 org_unit_path: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetOrgUnitResult
def get_org_unit_output(org_unit_id: Optional[pulumi.Input[str]] = None,
                 org_unit_path: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetOrgUnitResult]
Copy
func LookupOrgUnit(ctx *Context, args *LookupOrgUnitArgs, opts ...InvokeOption) (*LookupOrgUnitResult, error)
func LookupOrgUnitOutput(ctx *Context, args *LookupOrgUnitOutputArgs, opts ...InvokeOption) LookupOrgUnitResultOutput
Copy

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

public static class GetOrgUnit 
{
    public static Task<GetOrgUnitResult> InvokeAsync(GetOrgUnitArgs args, InvokeOptions? opts = null)
    public static Output<GetOrgUnitResult> Invoke(GetOrgUnitInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOrgUnitResult> getOrgUnit(GetOrgUnitArgs args, InvokeOptions options)
public static Output<GetOrgUnitResult> getOrgUnit(GetOrgUnitArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: googleworkspace:index/getOrgUnit:getOrgUnit
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

OrgUnitId string
The unique ID of the organizational unit.
OrgUnitPath string
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
OrgUnitId string
The unique ID of the organizational unit.
OrgUnitPath string
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
orgUnitId String
The unique ID of the organizational unit.
orgUnitPath String
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
orgUnitId string
The unique ID of the organizational unit.
orgUnitPath string
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
org_unit_id str
The unique ID of the organizational unit.
org_unit_path str
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
orgUnitId String
The unique ID of the organizational unit.
orgUnitPath String
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.

getOrgUnit Result

The following output properties are available:

BlockInheritance bool
Determines if a sub-organizational unit can inherit the settings of the parent organization. False means a sub-organizational unit inherits the settings of the nearest parent organizational unit. For more information on inheritance and users in an organization structure, see the administration help center.
Description string
Description of the organizational unit.
Etag string
ETag of the resource.
Id string
The ID of this resource.
Name string
The organizational unit's path name. For example, an organizational unit's name within the /corp/support/salessupport parent path is salessupport.
OrgUnitId string
The unique ID of the organizational unit.
OrgUnitPath string
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
ParentOrgUnitId string
The unique ID of the parent organizational unit.
ParentOrgUnitPath string
The organizational unit's parent path. For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit.
BlockInheritance bool
Determines if a sub-organizational unit can inherit the settings of the parent organization. False means a sub-organizational unit inherits the settings of the nearest parent organizational unit. For more information on inheritance and users in an organization structure, see the administration help center.
Description string
Description of the organizational unit.
Etag string
ETag of the resource.
Id string
The ID of this resource.
Name string
The organizational unit's path name. For example, an organizational unit's name within the /corp/support/salessupport parent path is salessupport.
OrgUnitId string
The unique ID of the organizational unit.
OrgUnitPath string
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
ParentOrgUnitId string
The unique ID of the parent organizational unit.
ParentOrgUnitPath string
The organizational unit's parent path. For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit.
blockInheritance Boolean
Determines if a sub-organizational unit can inherit the settings of the parent organization. False means a sub-organizational unit inherits the settings of the nearest parent organizational unit. For more information on inheritance and users in an organization structure, see the administration help center.
description String
Description of the organizational unit.
etag String
ETag of the resource.
id String
The ID of this resource.
name String
The organizational unit's path name. For example, an organizational unit's name within the /corp/support/salessupport parent path is salessupport.
orgUnitId String
The unique ID of the organizational unit.
orgUnitPath String
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
parentOrgUnitId String
The unique ID of the parent organizational unit.
parentOrgUnitPath String
The organizational unit's parent path. For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit.
blockInheritance boolean
Determines if a sub-organizational unit can inherit the settings of the parent organization. False means a sub-organizational unit inherits the settings of the nearest parent organizational unit. For more information on inheritance and users in an organization structure, see the administration help center.
description string
Description of the organizational unit.
etag string
ETag of the resource.
id string
The ID of this resource.
name string
The organizational unit's path name. For example, an organizational unit's name within the /corp/support/salessupport parent path is salessupport.
orgUnitId string
The unique ID of the organizational unit.
orgUnitPath string
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
parentOrgUnitId string
The unique ID of the parent organizational unit.
parentOrgUnitPath string
The organizational unit's parent path. For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit.
block_inheritance bool
Determines if a sub-organizational unit can inherit the settings of the parent organization. False means a sub-organizational unit inherits the settings of the nearest parent organizational unit. For more information on inheritance and users in an organization structure, see the administration help center.
description str
Description of the organizational unit.
etag str
ETag of the resource.
id str
The ID of this resource.
name str
The organizational unit's path name. For example, an organizational unit's name within the /corp/support/salessupport parent path is salessupport.
org_unit_id str
The unique ID of the organizational unit.
org_unit_path str
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
parent_org_unit_id str
The unique ID of the parent organizational unit.
parent_org_unit_path str
The organizational unit's parent path. For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit.
blockInheritance Boolean
Determines if a sub-organizational unit can inherit the settings of the parent organization. False means a sub-organizational unit inherits the settings of the nearest parent organizational unit. For more information on inheritance and users in an organization structure, see the administration help center.
description String
Description of the organizational unit.
etag String
ETag of the resource.
id String
The ID of this resource.
name String
The organizational unit's path name. For example, an organizational unit's name within the /corp/support/salessupport parent path is salessupport.
orgUnitId String
The unique ID of the organizational unit.
orgUnitPath String
The full path to the organizational unit. The orgUnitPath is a derived property. When listed, it is derived from parentOrgunitPath and organizational unit's name. For example, for an organizational unit named 'apps' under parent organization '/engineering', the orgUnitPath is '/engineering/apps'. In order to edit an orgUnitPath, either update the name of the organization or the parentOrgunitPath. A user's organizational unit determines which Google Workspace services the user has access to. If the user is moved to a new organization, the user's access changes. For more information about organization structures, see the administration help center. For more information about moving a user to a different organization, see chromeosdevices.update a user.
parentOrgUnitId String
The unique ID of the parent organizational unit.
parentOrgUnitPath String
The organizational unit's parent path. For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit.

Package Details

Repository
googleworkspace hashicorp/terraform-provider-googleworkspace
License
Notes
This Pulumi package is based on the googleworkspace Terraform Provider.
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp