Google Cloud v8.27.0 published on Thursday, Apr 17, 2025 by Pulumi
gcp.organizations.getS
Explore with Pulumi AI
Gets a list of all organizations. See the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = gcp.organizations.getS({
    filter: "domain:example.com",
});
import pulumi
import pulumi_gcp as gcp
example = gcp.organizations.get_s(filter="domain:example.com")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := organizations.GetS(ctx, &organizations.GetSArgs{
			Filter: pulumi.StringRef("domain:example.com"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var example = Gcp.Organizations.GetS.Invoke(new()
    {
        Filter = "domain:example.com",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetSArgs;
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 example = OrganizationsFunctions.getS(GetSArgs.builder()
            .filter("domain:example.com")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: gcp:organizations:getS
      arguments:
        filter: domain:example.com
Using getS
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 getS(args: GetSArgs, opts?: InvokeOptions): Promise<GetSResult>
function getSOutput(args: GetSOutputArgs, opts?: InvokeOptions): Output<GetSResult>def get_s(filter: Optional[str] = None,
          opts: Optional[InvokeOptions] = None) -> GetSResult
def get_s_output(filter: Optional[pulumi.Input[str]] = None,
          opts: Optional[InvokeOptions] = None) -> Output[GetSResult]func GetS(ctx *Context, args *GetSArgs, opts ...InvokeOption) (*GetSResult, error)
func GetSOutput(ctx *Context, args *GetSOutputArgs, opts ...InvokeOption) GetSResultOutput> Note: This function is named GetS in the Go SDK.
public static class GetS 
{
    public static Task<GetSResult> InvokeAsync(GetSArgs args, InvokeOptions? opts = null)
    public static Output<GetSResult> Invoke(GetSInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSResult> getS(GetSArgs args, InvokeOptions options)
public static Output<GetSResult> getS(GetSArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:organizations/getS:getS
  arguments:
    # arguments dictionaryThe following arguments are supported:
getS Result
The following output properties are available:
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Organizations
List<Get
SOrganization>  - A list of all retrieved organizations. Structure is defined below.
 - Filter string
 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Organizations
[]Get
SOrganization  - A list of all retrieved organizations. Structure is defined below.
 - Filter string
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - organizations
List<Get
SOrganization>  - A list of all retrieved organizations. Structure is defined below.
 - filter String
 
- id string
 - The provider-assigned unique ID for this managed resource.
 - organizations
Get
SOrganization[]  - A list of all retrieved organizations. Structure is defined below.
 - filter string
 
- id str
 - The provider-assigned unique ID for this managed resource.
 - organizations
Sequence[Get
SOrganization]  - A list of all retrieved organizations. Structure is defined below.
 - filter str
 
- id String
 - The provider-assigned unique ID for this managed resource.
 - organizations List<Property Map>
 - A list of all retrieved organizations. Structure is defined below.
 - filter String
 
Supporting Types
GetSOrganization 
- Directory
Customer stringId  - The Google for Work customer ID of the Organization.
 - Display
Name string - A human-readable string that refers to the Organization in the Google Cloud console. The string will be set to the primary domain (for example, 
"google.com") of the G Suite customer that owns the organization. - Lifecycle
State string - The Organization's current lifecycle state.
 - Name string
 - The resource name of the Organization in the form 
organizations/{organization_id}. - Org
Id string - The Organization ID.
 
- Directory
Customer stringId  - The Google for Work customer ID of the Organization.
 - Display
Name string - A human-readable string that refers to the Organization in the Google Cloud console. The string will be set to the primary domain (for example, 
"google.com") of the G Suite customer that owns the organization. - Lifecycle
State string - The Organization's current lifecycle state.
 - Name string
 - The resource name of the Organization in the form 
organizations/{organization_id}. - Org
Id string - The Organization ID.
 
- directory
Customer StringId  - The Google for Work customer ID of the Organization.
 - display
Name String - A human-readable string that refers to the Organization in the Google Cloud console. The string will be set to the primary domain (for example, 
"google.com") of the G Suite customer that owns the organization. - lifecycle
State String - The Organization's current lifecycle state.
 - name String
 - The resource name of the Organization in the form 
organizations/{organization_id}. - org
Id String - The Organization ID.
 
- directory
Customer stringId  - The Google for Work customer ID of the Organization.
 - display
Name string - A human-readable string that refers to the Organization in the Google Cloud console. The string will be set to the primary domain (for example, 
"google.com") of the G Suite customer that owns the organization. - lifecycle
State string - The Organization's current lifecycle state.
 - name string
 - The resource name of the Organization in the form 
organizations/{organization_id}. - org
Id string - The Organization ID.
 
- directory_
customer_ strid  - The Google for Work customer ID of the Organization.
 - display_
name str - A human-readable string that refers to the Organization in the Google Cloud console. The string will be set to the primary domain (for example, 
"google.com") of the G Suite customer that owns the organization. - lifecycle_
state str - The Organization's current lifecycle state.
 - name str
 - The resource name of the Organization in the form 
organizations/{organization_id}. - org_
id str - The Organization ID.
 
- directory
Customer StringId  - The Google for Work customer ID of the Organization.
 - display
Name String - A human-readable string that refers to the Organization in the Google Cloud console. The string will be set to the primary domain (for example, 
"google.com") of the G Suite customer that owns the organization. - lifecycle
State String - The Organization's current lifecycle state.
 - name String
 - The resource name of the Organization in the form 
organizations/{organization_id}. - org
Id String - The Organization ID.
 
Package Details
- Repository
 - Google Cloud (GCP) Classic pulumi/pulumi-gcp
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
google-betaTerraform Provider.