1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. Organization
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

harness.platform.Organization

Explore with Pulumi AI

harness logo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const _this = new harness.platform.Organization("this", {
        identifier: "MyOrg",
        name: "My Organization",
        description: "An example organization",
        tags: [
            "foo:bar",
            "baz:qux",
        ],
    });
    
    import pulumi
    import pulumi_harness as harness
    
    this = harness.platform.Organization("this",
        identifier="MyOrg",
        name="My Organization",
        description="An example organization",
        tags=[
            "foo:bar",
            "baz:qux",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.NewOrganization(ctx, "this", &platform.OrganizationArgs{
    			Identifier:  pulumi.String("MyOrg"),
    			Name:        pulumi.String("My Organization"),
    			Description: pulumi.String("An example organization"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    				pulumi.String("baz:qux"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Harness.Platform.Organization("this", new()
        {
            Identifier = "MyOrg",
            Name = "My Organization",
            Description = "An example organization",
            Tags = new[]
            {
                "foo:bar",
                "baz:qux",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.Organization;
    import com.pulumi.harness.platform.OrganizationArgs;
    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) {
            var this_ = new Organization("this", OrganizationArgs.builder()
                .identifier("MyOrg")
                .name("My Organization")
                .description("An example organization")
                .tags(            
                    "foo:bar",
                    "baz:qux")
                .build());
    
        }
    }
    
    resources:
      this:
        type: harness:platform:Organization
        properties:
          identifier: MyOrg
          name: My Organization
          description: An example organization
          tags:
            - foo:bar
            - baz:qux
    

    Create Organization Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Organization(name: string, args: OrganizationArgs, opts?: CustomResourceOptions);
    @overload
    def Organization(resource_name: str,
                     args: OrganizationArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Organization(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     identifier: Optional[str] = None,
                     description: Optional[str] = None,
                     name: Optional[str] = None,
                     tags: Optional[Sequence[str]] = None)
    func NewOrganization(ctx *Context, name string, args OrganizationArgs, opts ...ResourceOption) (*Organization, error)
    public Organization(string name, OrganizationArgs args, CustomResourceOptions? opts = null)
    public Organization(String name, OrganizationArgs args)
    public Organization(String name, OrganizationArgs args, CustomResourceOptions options)
    
    type: harness:platform:Organization
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OrganizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OrganizationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OrganizationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var organizationResource = new Harness.Platform.Organization("organizationResource", new()
    {
        Identifier = "string",
        Description = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := platform.NewOrganization(ctx, "organizationResource", &platform.OrganizationArgs{
    	Identifier:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var organizationResource = new Organization("organizationResource", OrganizationArgs.builder()
        .identifier("string")
        .description("string")
        .name("string")
        .tags("string")
        .build());
    
    organization_resource = harness.platform.Organization("organizationResource",
        identifier="string",
        description="string",
        name="string",
        tags=["string"])
    
    const organizationResource = new harness.platform.Organization("organizationResource", {
        identifier: "string",
        description: "string",
        name: "string",
        tags: ["string"],
    });
    
    type: harness:platform:Organization
    properties:
        description: string
        identifier: string
        name: string
        tags:
            - string
    

    Organization Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Organization resource accepts the following input properties:

    Identifier string
    Unique identifier of the resource.
    Description string
    Description of the resource.
    Name string
    Name of the resource.
    Tags List<string>
    Tags to associate with the resource.
    Identifier string
    Unique identifier of the resource.
    Description string
    Description of the resource.
    Name string
    Name of the resource.
    Tags []string
    Tags to associate with the resource.
    identifier String
    Unique identifier of the resource.
    description String
    Description of the resource.
    name String
    Name of the resource.
    tags List<String>
    Tags to associate with the resource.
    identifier string
    Unique identifier of the resource.
    description string
    Description of the resource.
    name string
    Name of the resource.
    tags string[]
    Tags to associate with the resource.
    identifier str
    Unique identifier of the resource.
    description str
    Description of the resource.
    name str
    Name of the resource.
    tags Sequence[str]
    Tags to associate with the resource.
    identifier String
    Unique identifier of the resource.
    description String
    Description of the resource.
    name String
    Name of the resource.
    tags List<String>
    Tags to associate with the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Organization resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Organization Resource

    Get an existing Organization resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: OrganizationState, opts?: CustomResourceOptions): Organization
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            identifier: Optional[str] = None,
            name: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> Organization
    func GetOrganization(ctx *Context, name string, id IDInput, state *OrganizationState, opts ...ResourceOption) (*Organization, error)
    public static Organization Get(string name, Input<string> id, OrganizationState? state, CustomResourceOptions? opts = null)
    public static Organization get(String name, Output<String> id, OrganizationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    Description of the resource.
    Identifier string
    Unique identifier of the resource.
    Name string
    Name of the resource.
    Tags List<string>
    Tags to associate with the resource.
    Description string
    Description of the resource.
    Identifier string
    Unique identifier of the resource.
    Name string
    Name of the resource.
    Tags []string
    Tags to associate with the resource.
    description String
    Description of the resource.
    identifier String
    Unique identifier of the resource.
    name String
    Name of the resource.
    tags List<String>
    Tags to associate with the resource.
    description string
    Description of the resource.
    identifier string
    Unique identifier of the resource.
    name string
    Name of the resource.
    tags string[]
    Tags to associate with the resource.
    description str
    Description of the resource.
    identifier str
    Unique identifier of the resource.
    name str
    Name of the resource.
    tags Sequence[str]
    Tags to associate with the resource.
    description String
    Description of the resource.
    identifier String
    Unique identifier of the resource.
    name String
    Name of the resource.
    tags List<String>
    Tags to associate with the resource.

    Import

    Import using organization id

    $ pulumi import harness:platform/organization:Organization example <organization_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi