1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. organizations
  5. getS
Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi

gcp.organizations.getS

Explore with Pulumi AI

Google Cloud v8.25.0 published on Thursday, Apr 3, 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",
});
Copy
import pulumi
import pulumi_gcp as gcp

example = gcp.organizations.get_s(filter="domain:example.com")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: gcp:organizations:getS
      arguments:
        filter: domain:example.com
Copy

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>
Copy
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]
Copy
func GetS(ctx *Context, args *GetSArgs, opts ...InvokeOption) (*GetSResult, error)
func GetSOutput(ctx *Context, args *GetSOutputArgs, opts ...InvokeOption) GetSResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSResult> getS(GetSArgs args, InvokeOptions options)
public static Output<GetSResult> getS(GetSArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:organizations/getS:getS
  arguments:
    # arguments dictionary
Copy

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 This property is required. string
The Google for Work customer ID of the Organization.
DisplayName This property is required. 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 This property is required. string
The Organization's current lifecycle state.
Name This property is required. string
The resource name of the Organization in the form organizations/{organization_id}.
OrgId This property is required. string
The Organization ID.
DirectoryCustomerId This property is required. string
The Google for Work customer ID of the Organization.
DisplayName This property is required. 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 This property is required. string
The Organization's current lifecycle state.
Name This property is required. string
The resource name of the Organization in the form organizations/{organization_id}.
OrgId This property is required. string
The Organization ID.
directoryCustomerId This property is required. String
The Google for Work customer ID of the Organization.
displayName This property is required. 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 This property is required. String
The Organization's current lifecycle state.
name This property is required. String
The resource name of the Organization in the form organizations/{organization_id}.
orgId This property is required. String
The Organization ID.
directoryCustomerId This property is required. string
The Google for Work customer ID of the Organization.
displayName This property is required. 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 This property is required. string
The Organization's current lifecycle state.
name This property is required. string
The resource name of the Organization in the form organizations/{organization_id}.
orgId This property is required. string
The Organization ID.
directory_customer_id This property is required. str
The Google for Work customer ID of the Organization.
display_name This property is required. 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 This property is required. str
The Organization's current lifecycle state.
name This property is required. str
The resource name of the Organization in the form organizations/{organization_id}.
org_id This property is required. str
The Organization ID.
directoryCustomerId This property is required. String
The Google for Work customer ID of the Organization.
displayName This property is required. 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 This property is required. String
The Organization's current lifecycle state.
name This property is required. String
The resource name of the Organization in the form organizations/{organization_id}.
orgId This property is required. 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.
Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi