1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. organizations
  5. getClientConfig
Google Cloud Classic v6.66.0 published on Monday, Sep 18, 2023 by Pulumi

gcp.organizations.getClientConfig

Explore with Pulumi AI

gcp logo
Google Cloud Classic v6.66.0 published on Monday, Sep 18, 2023 by Pulumi

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Gcp.Organizations.GetClientConfig.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["project"] = current.Apply(getClientConfigResult => getClientConfigResult.Project),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := organizations.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("project", current.Project)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    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 current = OrganizationsFunctions.getClientConfig();
    
            ctx.export("project", current.applyValue(getClientConfigResult -> getClientConfigResult.project()));
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    current = gcp.organizations.get_client_config()
    pulumi.export("project", current.project)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const current = gcp.organizations.getClientConfig({});
    export const project = current.then(current => current.project);
    
    variables:
      current:
        fn::invoke:
          Function: gcp:organizations:getClientConfig
          Arguments: {}
    outputs:
      project: ${current.project}
    

    Using getClientConfig

    function getClientConfig(opts?: InvokeOptions): Promise<GetClientConfigResult>
    def get_client_config(opts: Optional[InvokeOptions] = None) -> GetClientConfigResult
    func GetClientConfig(ctx *Context, opts ...InvokeOption) (*GetClientConfigResult, error)

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

    public static class GetClientConfig 
    {
        public static Task<GetClientConfigResult> InvokeAsync(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClientConfigResult> getClientConfig(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:organizations/getClientConfig:getClientConfig
      arguments:
        # arguments dictionary

    getClientConfig Result

    The following output properties are available:

    AccessToken string

    The OAuth2 access token used by the client to authenticate against the Google Cloud API.

    Id string
    Project string

    The ID of the project to apply any resources to.

    Region string

    The region to operate under.

    Zone string

    The zone to operate under.

    AccessToken string

    The OAuth2 access token used by the client to authenticate against the Google Cloud API.

    Id string
    Project string

    The ID of the project to apply any resources to.

    Region string

    The region to operate under.

    Zone string

    The zone to operate under.

    accessToken String

    The OAuth2 access token used by the client to authenticate against the Google Cloud API.

    id String
    project String

    The ID of the project to apply any resources to.

    region String

    The region to operate under.

    zone String

    The zone to operate under.

    accessToken string

    The OAuth2 access token used by the client to authenticate against the Google Cloud API.

    id string
    project string

    The ID of the project to apply any resources to.

    region string

    The region to operate under.

    zone string

    The zone to operate under.

    access_token str

    The OAuth2 access token used by the client to authenticate against the Google Cloud API.

    id str
    project str

    The ID of the project to apply any resources to.

    region str

    The region to operate under.

    zone str

    The zone to operate under.

    accessToken String

    The OAuth2 access token used by the client to authenticate against the Google Cloud API.

    id String
    project String

    The ID of the project to apply any resources to.

    region String

    The region to operate under.

    zone String

    The zone to operate under.

    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 Classic v6.66.0 published on Monday, Sep 18, 2023 by Pulumi