1. Packages
  2. Equinix
  3. API Docs
  4. metal
  5. getOrganization
Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix

equinix.metal.getOrganization

Explore with Pulumi AI

equinix logo
Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix

    Provides an Equinix Metal organization datasource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@pulumi/equinix";
    
    const test = equinix.metal.getOrganization({
        organizationId: local.org_id,
    });
    export const projectsInTheOrg = test.then(test => test.projectIds);
    
    import pulumi
    import pulumi_equinix as equinix
    
    test = equinix.metal.get_organization(organization_id=local["org_id"])
    pulumi.export("projectsInTheOrg", test.project_ids)
    
    package main
    
    import (
    	"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := metal.LookupOrganization(ctx, &metal.LookupOrganizationArgs{
    			OrganizationId: pulumi.StringRef(local.Org_id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("projectsInTheOrg", test.ProjectIds)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Equinix.Metal.GetOrganization.Invoke(new()
        {
            OrganizationId = local.Org_id,
        });
    
        return new Dictionary<string, object?>
        {
            ["projectsInTheOrg"] = test.Apply(getOrganizationResult => getOrganizationResult.ProjectIds),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.equinix.metal.MetalFunctions;
    import com.pulumi.equinix.metal.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 = MetalFunctions.getOrganization(GetOrganizationArgs.builder()
                .organizationId(local.org_id())
                .build());
    
            ctx.export("projectsInTheOrg", test.applyValue(getOrganizationResult -> getOrganizationResult.projectIds()));
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: equinix:metal:getOrganization
          Arguments:
            organizationId: ${local.org_id}
    outputs:
      projectsInTheOrg: ${test.projectIds}
    

    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(description: Optional[str] = None,
                         name: Optional[str] = None,
                         organization_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetOrganizationResult
    def get_organization_output(description: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         organization_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationResult]
    func LookupOrganization(ctx *Context, args *LookupOrganizationArgs, opts ...InvokeOption) (*LookupOrganizationResult, error)
    func LookupOrganizationOutput(ctx *Context, args *LookupOrganizationOutputArgs, opts ...InvokeOption) LookupOrganizationResultOutput

    > Note: This function is named LookupOrganization 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: equinix:metal/getOrganization:getOrganization
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    Description string.
    Name string
    The organization name.
    OrganizationId string

    The UUID of the organization resource.

    Exactly one of name or organization_id must be given.

    Description string
    Description string.
    Name string
    The organization name.
    OrganizationId string

    The UUID of the organization resource.

    Exactly one of name or organization_id must be given.

    description String
    Description string.
    name String
    The organization name.
    organizationId String

    The UUID of the organization resource.

    Exactly one of name or organization_id must be given.

    description string
    Description string.
    name string
    The organization name.
    organizationId string

    The UUID of the organization resource.

    Exactly one of name or organization_id must be given.

    description str
    Description string.
    name str
    The organization name.
    organization_id str

    The UUID of the organization resource.

    Exactly one of name or organization_id must be given.

    description String
    Description string.
    name String
    The organization name.
    organizationId String

    The UUID of the organization resource.

    Exactly one of name or organization_id must be given.

    getOrganization Result

    The following output properties are available:

    Address GetOrganizationAddress
    Postal address.
    Id string
    Logo string
    Logo URL.
    Name string
    OrganizationId string
    ProjectIds List<string>
    UUIDs of project resources which belong to this organization.
    Twitter string
    Twitter handle.
    Website string
    Website link.
    Description string
    Description string.
    Address GetOrganizationAddress
    Postal address.
    Id string
    Logo string
    Logo URL.
    Name string
    OrganizationId string
    ProjectIds []string
    UUIDs of project resources which belong to this organization.
    Twitter string
    Twitter handle.
    Website string
    Website link.
    Description string
    Description string.
    address GetOrganizationAddress
    Postal address.
    id String
    logo String
    Logo URL.
    name String
    organizationId String
    projectIds List<String>
    UUIDs of project resources which belong to this organization.
    twitter String
    Twitter handle.
    website String
    Website link.
    description String
    Description string.
    address GetOrganizationAddress
    Postal address.
    id string
    logo string
    Logo URL.
    name string
    organizationId string
    projectIds string[]
    UUIDs of project resources which belong to this organization.
    twitter string
    Twitter handle.
    website string
    Website link.
    description string
    Description string.
    address GetOrganizationAddress
    Postal address.
    id str
    logo str
    Logo URL.
    name str
    organization_id str
    project_ids Sequence[str]
    UUIDs of project resources which belong to this organization.
    twitter str
    Twitter handle.
    website str
    Website link.
    description str
    Description string.
    address Property Map
    Postal address.
    id String
    logo String
    Logo URL.
    name String
    organizationId String
    projectIds List<String>
    UUIDs of project resources which belong to this organization.
    twitter String
    Twitter handle.
    website String
    Website link.
    description String
    Description string.

    Supporting Types

    GetOrganizationAddress

    Address string
    Postal address.
    City string
    City name.
    Country string
    Two letter country code (ISO 3166-1 alpha-2), e.g. US.
    State string
    State name.
    ZipCode string
    Zip Code.
    Address string
    Postal address.
    City string
    City name.
    Country string
    Two letter country code (ISO 3166-1 alpha-2), e.g. US.
    State string
    State name.
    ZipCode string
    Zip Code.
    address String
    Postal address.
    city String
    City name.
    country String
    Two letter country code (ISO 3166-1 alpha-2), e.g. US.
    state String
    State name.
    zipCode String
    Zip Code.
    address string
    Postal address.
    city string
    City name.
    country string
    Two letter country code (ISO 3166-1 alpha-2), e.g. US.
    state string
    State name.
    zipCode string
    Zip Code.
    address str
    Postal address.
    city str
    City name.
    country str
    Two letter country code (ISO 3166-1 alpha-2), e.g. US.
    state str
    State name.
    zip_code str
    Zip Code.
    address String
    Postal address.
    city String
    City name.
    country String
    Two letter country code (ISO 3166-1 alpha-2), e.g. US.
    state String
    State name.
    zipCode String
    Zip Code.

    Package Details

    Repository
    equinix equinix/pulumi-equinix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the equinix Terraform Provider.
    equinix logo
    Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix