volcengine.organization.Account
Explore with Pulumi AI
Provides a resource to manage organization account
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooUnit = new Volcengine.Organization.Unit("fooUnit", new()
{
ParentId = "730671013833632****",
Description = "acc-test",
});
var fooAccount = new Volcengine.Organization.Account("fooAccount", new()
{
AccountName = "acc-test-account",
ShowName = "acc-test-account",
Description = "acc-test",
OrgUnitId = fooUnit.Id,
VerificationRelationId = "210026****",
Tags = new[]
{
new Volcengine.Organization.Inputs.AccountTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/organization"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooUnit, err := organization.NewUnit(ctx, "fooUnit", &organization.UnitArgs{
ParentId: pulumi.String("730671013833632****"),
Description: pulumi.String("acc-test"),
})
if err != nil {
return err
}
_, err = organization.NewAccount(ctx, "fooAccount", &organization.AccountArgs{
AccountName: pulumi.String("acc-test-account"),
ShowName: pulumi.String("acc-test-account"),
Description: pulumi.String("acc-test"),
OrgUnitId: fooUnit.ID(),
VerificationRelationId: pulumi.String("210026****"),
Tags: organization.AccountTagArray{
&organization.AccountTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.organization.Unit;
import com.pulumi.volcengine.organization.UnitArgs;
import com.pulumi.volcengine.organization.Account;
import com.pulumi.volcengine.organization.AccountArgs;
import com.pulumi.volcengine.organization.inputs.AccountTagArgs;
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 fooUnit = new Unit("fooUnit", UnitArgs.builder()
.parentId("730671013833632****")
.description("acc-test")
.build());
var fooAccount = new Account("fooAccount", AccountArgs.builder()
.accountName("acc-test-account")
.showName("acc-test-account")
.description("acc-test")
.orgUnitId(fooUnit.id())
.verificationRelationId("210026****")
.tags(AccountTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_unit = volcengine.organization.Unit("fooUnit",
parent_id="730671013833632****",
description="acc-test")
foo_account = volcengine.organization.Account("fooAccount",
account_name="acc-test-account",
show_name="acc-test-account",
description="acc-test",
org_unit_id=foo_unit.id,
verification_relation_id="210026****",
tags=[volcengine.organization.AccountTagArgs(
key="k1",
value="v1",
)])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const fooUnit = new volcengine.organization.Unit("fooUnit", {
parentId: "730671013833632****",
description: "acc-test",
});
const fooAccount = new volcengine.organization.Account("fooAccount", {
accountName: "acc-test-account",
showName: "acc-test-account",
description: "acc-test",
orgUnitId: fooUnit.id,
verificationRelationId: "210026****",
tags: [{
key: "k1",
value: "v1",
}],
});
resources:
fooUnit:
type: volcengine:organization:Unit
properties:
parentId: 730671013833632****
description: acc-test
fooAccount:
type: volcengine:organization:Account
properties:
accountName: acc-test-account
showName: acc-test-account
description: acc-test
orgUnitId: ${fooUnit.id}
verificationRelationId: 210026****
tags:
- key: k1
value: v1
Create Account Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
@overload
def Account(resource_name: str,
args: AccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Account(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
show_name: Optional[str] = None,
description: Optional[str] = None,
org_unit_id: Optional[str] = None,
tags: Optional[Sequence[AccountTagArgs]] = None,
verification_relation_id: Optional[str] = None)
func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
public Account(String name, AccountArgs args)
public Account(String name, AccountArgs args, CustomResourceOptions options)
type: volcengine:organization:Account
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 AccountArgs
- 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 AccountArgs
- 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 AccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountArgs
- 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 accountResource = new Volcengine.Organization.Account("accountResource", new()
{
AccountName = "string",
ShowName = "string",
Description = "string",
OrgUnitId = "string",
Tags = new[]
{
new Volcengine.Organization.Inputs.AccountTagArgs
{
Key = "string",
Value = "string",
},
},
VerificationRelationId = "string",
});
example, err := organization.NewAccount(ctx, "accountResource", &organization.AccountArgs{
AccountName: pulumi.String("string"),
ShowName: pulumi.String("string"),
Description: pulumi.String("string"),
OrgUnitId: pulumi.String("string"),
Tags: organization.AccountTagArray{
&organization.AccountTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
VerificationRelationId: pulumi.String("string"),
})
var accountResource = new Account("accountResource", AccountArgs.builder()
.accountName("string")
.showName("string")
.description("string")
.orgUnitId("string")
.tags(AccountTagArgs.builder()
.key("string")
.value("string")
.build())
.verificationRelationId("string")
.build());
account_resource = volcengine.organization.Account("accountResource",
account_name="string",
show_name="string",
description="string",
org_unit_id="string",
tags=[volcengine.organization.AccountTagArgs(
key="string",
value="string",
)],
verification_relation_id="string")
const accountResource = new volcengine.organization.Account("accountResource", {
accountName: "string",
showName: "string",
description: "string",
orgUnitId: "string",
tags: [{
key: "string",
value: "string",
}],
verificationRelationId: "string",
});
type: volcengine:organization:Account
properties:
accountName: string
description: string
orgUnitId: string
showName: string
tags:
- key: string
value: string
verificationRelationId: string
Account 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 Account resource accepts the following input properties:
- Account
Name string - The name of the account.
- Show
Name string - The show name of the account.
- Description string
- The description of the account.
- Org
Unit stringId - The id of the organization unit. Default is root organization.
- List<Account
Tag> - Tags.
- Verification
Relation stringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Account
Name string - The name of the account.
- Show
Name string - The show name of the account.
- Description string
- The description of the account.
- Org
Unit stringId - The id of the organization unit. Default is root organization.
- []Account
Tag Args - Tags.
- Verification
Relation stringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- account
Name String - The name of the account.
- show
Name String - The show name of the account.
- description String
- The description of the account.
- org
Unit StringId - The id of the organization unit. Default is root organization.
- List<Account
Tag> - Tags.
- verification
Relation StringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- account
Name string - The name of the account.
- show
Name string - The show name of the account.
- description string
- The description of the account.
- org
Unit stringId - The id of the organization unit. Default is root organization.
- Account
Tag[] - Tags.
- verification
Relation stringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- account_
name str - The name of the account.
- show_
name str - The show name of the account.
- description str
- The description of the account.
- org_
unit_ strid - The id of the organization unit. Default is root organization.
- Sequence[Account
Tag Args] - Tags.
- verification_
relation_ strid - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- account
Name String - The name of the account.
- show
Name String - The show name of the account.
- description String
- The description of the account.
- org
Unit StringId - The id of the organization unit. Default is root organization.
- List<Property Map>
- Tags.
- verification
Relation StringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
Outputs
All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:
- Iam
Role string - The name of the iam role.
- Id string
- The provider-assigned unique ID for this managed resource.
- Org
Id string - The id of the organization.
- Org
Unit stringName - The name of the organization unit.
- Org
Verification stringId - The id of the organization verification.
- Owner string
- The owner id of the account.
- Iam
Role string - The name of the iam role.
- Id string
- The provider-assigned unique ID for this managed resource.
- Org
Id string - The id of the organization.
- Org
Unit stringName - The name of the organization unit.
- Org
Verification stringId - The id of the organization verification.
- Owner string
- The owner id of the account.
- iam
Role String - The name of the iam role.
- id String
- The provider-assigned unique ID for this managed resource.
- org
Id String - The id of the organization.
- org
Unit StringName - The name of the organization unit.
- org
Verification StringId - The id of the organization verification.
- owner String
- The owner id of the account.
- iam
Role string - The name of the iam role.
- id string
- The provider-assigned unique ID for this managed resource.
- org
Id string - The id of the organization.
- org
Unit stringName - The name of the organization unit.
- org
Verification stringId - The id of the organization verification.
- owner string
- The owner id of the account.
- iam_
role str - The name of the iam role.
- id str
- The provider-assigned unique ID for this managed resource.
- org_
id str - The id of the organization.
- org_
unit_ strname - The name of the organization unit.
- org_
verification_ strid - The id of the organization verification.
- owner str
- The owner id of the account.
- iam
Role String - The name of the iam role.
- id String
- The provider-assigned unique ID for this managed resource.
- org
Id String - The id of the organization.
- org
Unit StringName - The name of the organization unit.
- org
Verification StringId - The id of the organization verification.
- owner String
- The owner id of the account.
Look up Existing Account Resource
Get an existing Account 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?: AccountState, opts?: CustomResourceOptions): Account
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
description: Optional[str] = None,
iam_role: Optional[str] = None,
org_id: Optional[str] = None,
org_unit_id: Optional[str] = None,
org_unit_name: Optional[str] = None,
org_verification_id: Optional[str] = None,
owner: Optional[str] = None,
show_name: Optional[str] = None,
tags: Optional[Sequence[AccountTagArgs]] = None,
verification_relation_id: Optional[str] = None) -> Account
func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
public static Account get(String name, Output<String> id, AccountState 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.
- Account
Name string - The name of the account.
- Description string
- The description of the account.
- Iam
Role string - The name of the iam role.
- Org
Id string - The id of the organization.
- Org
Unit stringId - The id of the organization unit. Default is root organization.
- Org
Unit stringName - The name of the organization unit.
- Org
Verification stringId - The id of the organization verification.
- Owner string
- The owner id of the account.
- Show
Name string - The show name of the account.
- List<Account
Tag> - Tags.
- Verification
Relation stringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Account
Name string - The name of the account.
- Description string
- The description of the account.
- Iam
Role string - The name of the iam role.
- Org
Id string - The id of the organization.
- Org
Unit stringId - The id of the organization unit. Default is root organization.
- Org
Unit stringName - The name of the organization unit.
- Org
Verification stringId - The id of the organization verification.
- Owner string
- The owner id of the account.
- Show
Name string - The show name of the account.
- []Account
Tag Args - Tags.
- Verification
Relation stringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- account
Name String - The name of the account.
- description String
- The description of the account.
- iam
Role String - The name of the iam role.
- org
Id String - The id of the organization.
- org
Unit StringId - The id of the organization unit. Default is root organization.
- org
Unit StringName - The name of the organization unit.
- org
Verification StringId - The id of the organization verification.
- owner String
- The owner id of the account.
- show
Name String - The show name of the account.
- List<Account
Tag> - Tags.
- verification
Relation StringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- account
Name string - The name of the account.
- description string
- The description of the account.
- iam
Role string - The name of the iam role.
- org
Id string - The id of the organization.
- org
Unit stringId - The id of the organization unit. Default is root organization.
- org
Unit stringName - The name of the organization unit.
- org
Verification stringId - The id of the organization verification.
- owner string
- The owner id of the account.
- show
Name string - The show name of the account.
- Account
Tag[] - Tags.
- verification
Relation stringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- account_
name str - The name of the account.
- description str
- The description of the account.
- iam_
role str - The name of the iam role.
- org_
id str - The id of the organization.
- org_
unit_ strid - The id of the organization unit. Default is root organization.
- org_
unit_ strname - The name of the organization unit.
- org_
verification_ strid - The id of the organization verification.
- owner str
- The owner id of the account.
- show_
name str - The show name of the account.
- Sequence[Account
Tag Args] - Tags.
- verification_
relation_ strid - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- account
Name String - The name of the account.
- description String
- The description of the account.
- iam
Role String - The name of the iam role.
- org
Id String - The id of the organization.
- org
Unit StringId - The id of the organization unit. Default is root organization.
- org
Unit StringName - The name of the organization unit.
- org
Verification StringId - The id of the organization verification.
- owner String
- The owner id of the account.
- show
Name String - The show name of the account.
- List<Property Map>
- Tags.
- verification
Relation StringId - The verification relation id of the account. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
Supporting Types
AccountTag, AccountTagArgs
Import
OrganizationAccount can be imported using the id, e.g.
$ pulumi import volcengine:organization/account:Account default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.