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,
timeouts: Optional[OrganizationalUnitTimeoutsArgs] = 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",
Timeouts = new Aiven.Inputs.OrganizationalUnitTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
});
example, err := aiven.NewOrganizationalUnit(ctx, "organizationalUnitResource", &aiven.OrganizationalUnitArgs{
ParentId: pulumi.String("string"),
Name: pulumi.String("string"),
Timeouts: &aiven.OrganizationalUnitTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var organizationalUnitResource = new OrganizationalUnit("organizationalUnitResource", OrganizationalUnitArgs.builder()
.parentId("string")
.name("string")
.timeouts(OrganizationalUnitTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.build());
organizational_unit_resource = aiven.OrganizationalUnit("organizationalUnitResource",
parent_id="string",
name="string",
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
})
const organizationalUnitResource = new aiven.OrganizationalUnit("organizationalUnitResource", {
parentId: "string",
name: "string",
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
});
type: aiven:OrganizationalUnit
properties:
name: string
parentId: string
timeouts:
create: string
delete: string
read: string
update: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The OrganizationalUnit resource accepts the following input properties:
- Parent
Id string - The ID of the organization that the unit is created in. Maximum length:
36. - Name string
- The name of the organizational unit. Maximum length:
128. - Timeouts
Organizational
Unit Timeouts
- Parent
Id string - The ID of the organization that the unit is created in. Maximum length:
36. - Name string
- The name of the organizational unit. Maximum length:
128. - Timeouts
Organizational
Unit Timeouts Args
- parent
Id String - The ID of the organization that the unit is created in. Maximum length:
36. - name String
- The name of the organizational unit. Maximum length:
128. - timeouts
Organizational
Unit Timeouts
- parent
Id string - The ID of the organization that the unit is created in. Maximum length:
36. - name string
- The name of the organizational unit. Maximum length:
128. - timeouts
Organizational
Unit Timeouts
- parent_
id str - The ID of the organization that the unit is created in. Maximum length:
36. - name str
- The name of the organizational unit. Maximum length:
128. - timeouts
Organizational
Unit Timeouts Args
- parent
Id String - The ID of the organization that the unit is created in. Maximum length:
36. - name String
- The name of the organizational unit. Maximum length:
128. - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the OrganizationalUnit resource produces the following output properties:
- Create
Time string - Timestamp in ISO 8601 format, always in UTC.
- Id string
- The provider-assigned unique ID for this managed resource.
- Tenant
Id string - Tenant identifier.
- Update
Time string - Timestamp in ISO 8601 format, always in UTC.
- Create
Time string - Timestamp in ISO 8601 format, always in UTC.
- Id string
- The provider-assigned unique ID for this managed resource.
- Tenant
Id string - Tenant identifier.
- Update
Time string - Timestamp in ISO 8601 format, always in UTC.
- create
Time String - Timestamp in ISO 8601 format, always in UTC.
- id String
- The provider-assigned unique ID for this managed resource.
- tenant
Id String - Tenant identifier.
- update
Time String - Timestamp in ISO 8601 format, always in UTC.
- create
Time string - Timestamp in ISO 8601 format, always in UTC.
- id string
- The provider-assigned unique ID for this managed resource.
- tenant
Id string - Tenant identifier.
- update
Time string - Timestamp in ISO 8601 format, always in UTC.
- create_
time str - Timestamp in ISO 8601 format, always in UTC.
- id str
- The provider-assigned unique ID for this managed resource.
- tenant_
id str - Tenant identifier.
- update_
time str - Timestamp in ISO 8601 format, always in UTC.
- create
Time String - Timestamp in ISO 8601 format, always in UTC.
- id String
- The provider-assigned unique ID for this managed resource.
- tenant
Id String - Tenant identifier.
- update
Time String - Timestamp in ISO 8601 format, always in UTC.
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,
timeouts: Optional[OrganizationalUnitTimeoutsArgs] = None,
update_time: Optional[str] = None) -> OrganizationalUnitfunc 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)resources: _: type: aiven:OrganizationalUnit get: id: ${id}- 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.
- Create
Time string - Timestamp in ISO 8601 format, always in UTC.
- Name string
- The name of the organizational unit. Maximum length:
128. - Parent
Id string - The ID of the organization that the unit is created in. Maximum length:
36. - Tenant
Id string - Tenant identifier.
- Timeouts
Organizational
Unit Timeouts - Update
Time string - Timestamp in ISO 8601 format, always in UTC.
- Create
Time string - Timestamp in ISO 8601 format, always in UTC.
- Name string
- The name of the organizational unit. Maximum length:
128. - Parent
Id string - The ID of the organization that the unit is created in. Maximum length:
36. - Tenant
Id string - Tenant identifier.
- Timeouts
Organizational
Unit Timeouts Args - Update
Time string - Timestamp in ISO 8601 format, always in UTC.
- create
Time String - Timestamp in ISO 8601 format, always in UTC.
- name String
- The name of the organizational unit. Maximum length:
128. - parent
Id String - The ID of the organization that the unit is created in. Maximum length:
36. - tenant
Id String - Tenant identifier.
- timeouts
Organizational
Unit Timeouts - update
Time String - Timestamp in ISO 8601 format, always in UTC.
- create
Time string - Timestamp in ISO 8601 format, always in UTC.
- name string
- The name of the organizational unit. Maximum length:
128. - parent
Id string - The ID of the organization that the unit is created in. Maximum length:
36. - tenant
Id string - Tenant identifier.
- timeouts
Organizational
Unit Timeouts - update
Time string - Timestamp in ISO 8601 format, always in UTC.
- create_
time str - Timestamp in ISO 8601 format, always in UTC.
- name str
- The name of the organizational unit. Maximum length:
128. - parent_
id str - The ID of the organization that the unit is created in. Maximum length:
36. - tenant_
id str - Tenant identifier.
- timeouts
Organizational
Unit Timeouts Args - update_
time str - Timestamp in ISO 8601 format, always in UTC.
- create
Time String - Timestamp in ISO 8601 format, always in UTC.
- name String
- The name of the organizational unit. Maximum length:
128. - parent
Id String - The ID of the organization that the unit is created in. Maximum length:
36. - tenant
Id String - Tenant identifier.
- timeouts Property Map
- update
Time String - Timestamp in ISO 8601 format, always in UTC.
Supporting Types
OrganizationalUnitTimeouts, OrganizationalUnitTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default_ String
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default str
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default String
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
$ pulumi import aiven:index/organizationalUnit:OrganizationalUnit example 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
aivenTerraform Provider.
