1. Packages
  2. Aiven Provider
  3. API Docs
  4. OrganizationalUnit
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

aiven.OrganizationalUnit

Explore with Pulumi AI

aiven logo
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

    Creates and manages an organizational unit in an Aiven organization.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const exampleUnit = new aiven.OrganizationalUnit("example_unit", {
        name: "Example organizational unit",
        parentId: main.id,
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example_unit = aiven.OrganizationalUnit("example_unit",
        name="Example organizational unit",
        parent_id=main["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.NewOrganizationalUnit(ctx, "example_unit", &aiven.OrganizationalUnitArgs{
    			Name:     pulumi.String("Example organizational unit"),
    			ParentId: pulumi.Any(main.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleUnit = new Aiven.OrganizationalUnit("example_unit", new()
        {
            Name = "Example organizational unit",
            ParentId = main.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.OrganizationalUnit;
    import com.pulumi.aiven.OrganizationalUnitArgs;
    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 exampleUnit = new OrganizationalUnit("exampleUnit", OrganizationalUnitArgs.builder()
                .name("Example organizational unit")
                .parentId(main.id())
                .build());
    
        }
    }
    
    resources:
      exampleUnit:
        type: aiven:OrganizationalUnit
        name: example_unit
        properties:
          name: Example organizational unit
          parentId: ${main.id}
    

    Create OrganizationalUnit Resource

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

    Constructor syntax

    new OrganizationalUnit(name: string, args: OrganizationalUnitArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationalUnit(resource_name: str,
                           args: OrganizationalUnitArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationalUnit(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           parent_id: Optional[str] = None,
                           name: Optional[str] = None)
    func NewOrganizationalUnit(ctx *Context, name string, args OrganizationalUnitArgs, opts ...ResourceOption) (*OrganizationalUnit, error)
    public OrganizationalUnit(string name, OrganizationalUnitArgs args, CustomResourceOptions? opts = null)
    public OrganizationalUnit(String name, OrganizationalUnitArgs args)
    public OrganizationalUnit(String name, OrganizationalUnitArgs args, CustomResourceOptions options)
    
    type: aiven:OrganizationalUnit
    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 OrganizationalUnitArgs
    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 OrganizationalUnitArgs
    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 OrganizationalUnitArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationalUnitArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationalUnitArgs
    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 organizationalUnitResource = new Aiven.OrganizationalUnit("organizationalUnitResource", new()
    {
        ParentId = "string",
        Name = "string",
    });
    
    example, err := aiven.NewOrganizationalUnit(ctx, "organizationalUnitResource", &aiven.OrganizationalUnitArgs{
    	ParentId: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    })
    
    var organizationalUnitResource = new OrganizationalUnit("organizationalUnitResource", OrganizationalUnitArgs.builder()
        .parentId("string")
        .name("string")
        .build());
    
    organizational_unit_resource = aiven.OrganizationalUnit("organizationalUnitResource",
        parent_id="string",
        name="string")
    
    const organizationalUnitResource = new aiven.OrganizationalUnit("organizationalUnitResource", {
        parentId: "string",
        name: "string",
    });
    
    type: aiven:OrganizationalUnit
    properties:
        name: string
        parentId: string
    

    OrganizationalUnit Resource Properties

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

    Inputs

    The OrganizationalUnit resource accepts the following input properties:

    ParentId string
    The ID of the organization that the unit is created in.
    Name string
    The name of the organizational unit.
    ParentId string
    The ID of the organization that the unit is created in.
    Name string
    The name of the organizational unit.
    parentId String
    The ID of the organization that the unit is created in.
    name String
    The name of the organizational unit.
    parentId string
    The ID of the organization that the unit is created in.
    name string
    The name of the organizational unit.
    parent_id str
    The ID of the organization that the unit is created in.
    name str
    The name of the organizational unit.
    parentId String
    The ID of the organization that the unit is created in.
    name String
    The name of the organizational unit.

    Outputs

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

    CreateTime string
    Time of creation.
    Id string
    The provider-assigned unique ID for this managed resource.
    TenantId string
    Tenant ID.
    UpdateTime string
    Time of last update.
    CreateTime string
    Time of creation.
    Id string
    The provider-assigned unique ID for this managed resource.
    TenantId string
    Tenant ID.
    UpdateTime string
    Time of last update.
    createTime String
    Time of creation.
    id String
    The provider-assigned unique ID for this managed resource.
    tenantId String
    Tenant ID.
    updateTime String
    Time of last update.
    createTime string
    Time of creation.
    id string
    The provider-assigned unique ID for this managed resource.
    tenantId string
    Tenant ID.
    updateTime string
    Time of last update.
    create_time str
    Time of creation.
    id str
    The provider-assigned unique ID for this managed resource.
    tenant_id str
    Tenant ID.
    update_time str
    Time of last update.
    createTime String
    Time of creation.
    id String
    The provider-assigned unique ID for this managed resource.
    tenantId String
    Tenant ID.
    updateTime String
    Time of last update.

    Look up Existing OrganizationalUnit Resource

    Get an existing OrganizationalUnit 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?: OrganizationalUnitState, opts?: CustomResourceOptions): OrganizationalUnit
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            name: Optional[str] = None,
            parent_id: Optional[str] = None,
            tenant_id: Optional[str] = None,
            update_time: Optional[str] = None) -> OrganizationalUnit
    func GetOrganizationalUnit(ctx *Context, name string, id IDInput, state *OrganizationalUnitState, opts ...ResourceOption) (*OrganizationalUnit, error)
    public static OrganizationalUnit Get(string name, Input<string> id, OrganizationalUnitState? state, CustomResourceOptions? opts = null)
    public static OrganizationalUnit get(String name, Output<String> id, OrganizationalUnitState 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:
    CreateTime string
    Time of creation.
    Name string
    The name of the organizational unit.
    ParentId string
    The ID of the organization that the unit is created in.
    TenantId string
    Tenant ID.
    UpdateTime string
    Time of last update.
    CreateTime string
    Time of creation.
    Name string
    The name of the organizational unit.
    ParentId string
    The ID of the organization that the unit is created in.
    TenantId string
    Tenant ID.
    UpdateTime string
    Time of last update.
    createTime String
    Time of creation.
    name String
    The name of the organizational unit.
    parentId String
    The ID of the organization that the unit is created in.
    tenantId String
    Tenant ID.
    updateTime String
    Time of last update.
    createTime string
    Time of creation.
    name string
    The name of the organizational unit.
    parentId string
    The ID of the organization that the unit is created in.
    tenantId string
    Tenant ID.
    updateTime string
    Time of last update.
    create_time str
    Time of creation.
    name str
    The name of the organizational unit.
    parent_id str
    The ID of the organization that the unit is created in.
    tenant_id str
    Tenant ID.
    update_time str
    Time of last update.
    createTime String
    Time of creation.
    name String
    The name of the organizational unit.
    parentId String
    The ID of the organization that the unit is created in.
    tenantId String
    Tenant ID.
    updateTime String
    Time of last update.

    Import

    $ pulumi import aiven:index/organizationalUnit:OrganizationalUnit example_unit ORGANIZATIONAL_UNIT_ID
    

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

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi