Google Cloud v8.29.0 published on Thursday, May 1, 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<GetSOrganization> 
- A list of all retrieved organizations. Structure is defined below.
- Filter string
- Id string
- The provider-assigned unique ID for this managed resource.
- Organizations
[]GetSOrganization 
- 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<GetSOrganization> 
- A list of all retrieved organizations. Structure is defined below.
- filter String
- id string
- The provider-assigned unique ID for this managed resource.
- organizations
GetSOrganization[] 
- 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[GetSOrganization] 
- 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 
- DirectoryCustomer stringId 
- The Google for Work customer ID of the Organization.
- DisplayName 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.
- LifecycleState string
- The Organization's current lifecycle state.
- Name string
- The resource name of the Organization in the form organizations/{organization_id}.
- OrgId string
- The Organization ID.
- DirectoryCustomer stringId 
- The Google for Work customer ID of the Organization.
- DisplayName 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.
- LifecycleState string
- The Organization's current lifecycle state.
- Name string
- The resource name of the Organization in the form organizations/{organization_id}.
- OrgId string
- The Organization ID.
- directoryCustomer StringId 
- The Google for Work customer ID of the Organization.
- displayName 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.
- lifecycleState String
- The Organization's current lifecycle state.
- name String
- The resource name of the Organization in the form organizations/{organization_id}.
- orgId String
- The Organization ID.
- directoryCustomer stringId 
- The Google for Work customer ID of the Organization.
- displayName 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.
- lifecycleState string
- The Organization's current lifecycle state.
- name string
- The resource name of the Organization in the form organizations/{organization_id}.
- orgId 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.
- directoryCustomer StringId 
- The Google for Work customer ID of the Organization.
- displayName 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.
- lifecycleState String
- The Organization's current lifecycle state.
- name String
- The resource name of the Organization in the form organizations/{organization_id}.
- orgId 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.