1. Packages
  2. Grafana Cloud
  3. API Docs
  4. cloud
  5. getOrganization
Viewing docs for Grafana v2.21.0
published on Tuesday, Mar 3, 2026 by pulumiverse
grafana logo
Viewing docs for Grafana v2.21.0
published on Tuesday, Mar 3, 2026 by pulumiverse

    Fetches a Grafana Cloud organization.

    Required access policy scopes:

    • orgs:read

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const test = grafana.cloud.getOrganization({
        slug: "my-org",
    });
    
    import pulumi
    import pulumi_grafana as grafana
    
    test = grafana.cloud.get_organization(slug="my-org")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/cloud"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloud.GetOrganization(ctx, &cloud.GetOrganizationArgs{
    			Slug: pulumi.StringRef("my-org"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumi.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Grafana.Cloud.GetOrganization.Invoke(new()
        {
            Slug = "my-org",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.cloud.CloudFunctions;
    import com.pulumi.grafana.cloud.inputs.GetOrganizationArgs;
    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 test = CloudFunctions.getOrganization(GetOrganizationArgs.builder()
                .slug("my-org")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: grafana:cloud:getOrganization
          arguments:
            slug: my-org
    

    Using getOrganization

    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 getOrganization(args: GetOrganizationArgs, opts?: InvokeOptions): Promise<GetOrganizationResult>
    function getOrganizationOutput(args: GetOrganizationOutputArgs, opts?: InvokeOptions): Output<GetOrganizationResult>
    def get_organization(id: Optional[str] = None,
                         slug: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetOrganizationResult
    def get_organization_output(id: Optional[pulumi.Input[str]] = None,
                         slug: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationResult]
    func GetOrganization(ctx *Context, args *GetOrganizationArgs, opts ...InvokeOption) (*GetOrganizationResult, error)
    func GetOrganizationOutput(ctx *Context, args *GetOrganizationOutputArgs, opts ...InvokeOption) GetOrganizationResultOutput

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

    public static class GetOrganization 
    {
        public static Task<GetOrganizationResult> InvokeAsync(GetOrganizationArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationResult> Invoke(GetOrganizationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrganizationResult> getOrganization(GetOrganizationArgs args, InvokeOptions options)
    public static Output<GetOrganizationResult> getOrganization(GetOrganizationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: grafana:cloud/getOrganization:getOrganization
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The organization ID.
    Slug string
    The organization slug.
    Id string
    The organization ID.
    Slug string
    The organization slug.
    id String
    The organization ID.
    slug String
    The organization slug.
    id string
    The organization ID.
    slug string
    The organization slug.
    id str
    The organization ID.
    slug str
    The organization slug.
    id String
    The organization ID.
    slug String
    The organization slug.

    getOrganization Result

    The following output properties are available:

    CreatedAt string
    The date and time the organization was created.
    Id string
    The organization ID.
    Name string
    The organization name.
    Slug string
    The organization slug.
    UpdatedAt string
    The date and time the organization was last updated.
    Url string
    The organization URL.
    CreatedAt string
    The date and time the organization was created.
    Id string
    The organization ID.
    Name string
    The organization name.
    Slug string
    The organization slug.
    UpdatedAt string
    The date and time the organization was last updated.
    Url string
    The organization URL.
    createdAt String
    The date and time the organization was created.
    id String
    The organization ID.
    name String
    The organization name.
    slug String
    The organization slug.
    updatedAt String
    The date and time the organization was last updated.
    url String
    The organization URL.
    createdAt string
    The date and time the organization was created.
    id string
    The organization ID.
    name string
    The organization name.
    slug string
    The organization slug.
    updatedAt string
    The date and time the organization was last updated.
    url string
    The organization URL.
    created_at str
    The date and time the organization was created.
    id str
    The organization ID.
    name str
    The organization name.
    slug str
    The organization slug.
    updated_at str
    The date and time the organization was last updated.
    url str
    The organization URL.
    createdAt String
    The date and time the organization was created.
    id String
    The organization ID.
    name String
    The organization name.
    slug String
    The organization slug.
    updatedAt String
    The date and time the organization was last updated.
    url String
    The organization URL.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Viewing docs for Grafana v2.21.0
    published on Tuesday, Mar 3, 2026 by pulumiverse
      Try Pulumi Cloud free. Your team will thank you.