1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. organizations
  5. getS
Google Cloud v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi

gcp.organizations.getS

Start a Neo task
Explain and create a gcp.organizations.getS resource
gcp logo
Google Cloud v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi

    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/v9/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 dictionary

    The following arguments are supported:

    Filter string
    An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive. Further information can be found in the REST API.
    Filter string
    An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive. Further information can be found in the REST API.
    filter String
    An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive. Further information can be found in the REST API.
    filter string
    An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive. Further information can be found in the REST API.
    filter str
    An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive. Further information can be found in the REST API.
    filter String
    An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive. Further information can be found in the REST API.

    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

    DirectoryCustomerId string
    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.
    DirectoryCustomerId string
    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.
    directoryCustomerId String
    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.
    directoryCustomerId string
    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_id str
    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.
    directoryCustomerId String
    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-beta Terraform Provider.
    gcp logo
    Google Cloud v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate