Module resourcemanager
This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-alicloudrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-alicloudrepo.
Resources
Functions
- getAccounts
- getFolders
- getHandshakes
- getPolicies
- getPolicyVersions
- getResourceDirectories
- getResourceGroups
- getRoles
Others
- AccountArgs
- AccountState
- FolderArgs
- FolderState
- GetAccountsArgs
- GetAccountsResult
- GetFoldersArgs
- GetFoldersResult
- GetHandshakesArgs
- GetHandshakesResult
- GetPoliciesArgs
- GetPoliciesResult
- GetPolicyVersionsArgs
- GetPolicyVersionsResult
- GetResourceDirectoriesArgs
- GetResourceDirectoriesResult
- GetResourceGroupsArgs
- GetResourceGroupsResult
- GetRolesArgs
- GetRolesResult
- HandshakeArgs
- HandshakeState
- PolicyArgs
- PolicyState
- PolicyVersionArgs
- PolicyVersionState
- ResourceDirectoryArgs
- ResourceDirectoryState
- ResourceGroupArgs
- ResourceGroupState
- RoleArgs
- RoleState
Resources
Resource Account
class Account extends CustomResourceProvides a Resource Manager Account resource. Member accounts are containers for resources in a resource directory. These accounts isolate resources and serve as organizational units in the resource directory. You can create member accounts in a folder and then manage them in a unified manner. For information about Resource Manager Account and how to use it, see What is Resource Manager Account.
NOTE: Available in v1.83.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Add a Resource Manager Account.
const f1 = new alicloud.resourcemanager.Folder("f1", {folderName: "test1"});
const example = new alicloud.resourcemanager.Account("example", {
displayName: "RDAccount",
folderId: f1.id,
});constructor
new Account(name: string, args: AccountArgs, opts?: pulumi.CustomResourceOptions)Create a Account resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccountState, opts?: pulumi.CustomResourceOptions): AccountGet an existing Account resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AccountReturns true if the given object is an instance of Account. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property displayName
public displayName: pulumi.Output<string>;Member name. The length is 2 ~ 50 characters or Chinese characters, which can include Chinese characters, English letters, numbers, underscores (_), dots (.) And dashes (-).
property folderId
public folderId: pulumi.Output<string | undefined>;The ID of the parent folder.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property joinMethod
public joinMethod: pulumi.Output<string>;Ways for members to join the resource directory. Valid values: invited, created.
property joinTime
public joinTime: pulumi.Output<string>;The time when the member joined the resource directory.
property modifyTime
public modifyTime: pulumi.Output<string>;The modification time of the invitation.
property payerAccountId
public payerAccountId: pulumi.Output<string | undefined>;Settlement account ID. If the value is empty, the current account will be used for settlement.
property resourceDirectoryId
public resourceDirectoryId: pulumi.Output<string>;Resource directory ID.
property status
public status: pulumi.Output<string>;Member joining status. Valid values: CreateSuccess,CreateVerifying,CreateFailed,CreateExpired,CreateCancelled,PromoteVerifying,PromoteFailed,PromoteExpired,PromoteCancelled,PromoteSuccess,InviteSuccess,Removed.
property type
public type: pulumi.Output<string>;Member type. The value of ResourceAccount indicates the resource account.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Folder
class Folder extends CustomResourceProvides a Resource Manager Folder resource. A folder is an organizational unit in a resource directory. You can use folders to build an organizational structure for resources. For information about Resource Manager Foler and how to use it, see What is Resource Manager Folder.
NOTE: Available in v1.82.0+.
NOTE: A maximum of five levels of folders can be created under the root folder.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.resourcemanager.Folder("example", {
folderName: "test",
});constructor
new Folder(name: string, args: FolderArgs, opts?: pulumi.CustomResourceOptions)Create a Folder resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FolderState, opts?: pulumi.CustomResourceOptions): FolderGet an existing Folder resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is FolderReturns true if the given object is an instance of Folder. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property folderName
public folderName: pulumi.Output<string>;The name of the folder. The name must be 1 to 24 characters in length and can contain letters, digits, underscores (_), periods (.), and hyphens (-).
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property parentFolderId
public parentFolderId: pulumi.Output<string>;The ID of the parent folder. If not set, the system default value will be used.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Handshake
class Handshake extends CustomResourceProvides a Resource Manager handshake resource. You can invite accounts to join a resource directory for unified management. For information about Resource Manager handshake and how to use it, see What is Resource Manager handshake.
NOTE: Available in v1.82.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Add a Resource Manager handshake.
const example = new alicloud.resourcemanager.Handshake("example", {
note: "test resource manager handshake",
targetEntity: "1182775234******",
targetType: "Account",
});constructor
new Handshake(name: string, args: HandshakeArgs, opts?: pulumi.CustomResourceOptions)Create a Handshake resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: HandshakeState, opts?: pulumi.CustomResourceOptions): HandshakeGet an existing Handshake resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is HandshakeReturns true if the given object is an instance of Handshake. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property expireTime
public expireTime: pulumi.Output<string>;The expiration time of the invitation.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property masterAccountId
public masterAccountId: pulumi.Output<string>;Resource account master account ID.
property masterAccountName
public masterAccountName: pulumi.Output<string>;The name of the main account of the resource directory.
property modifyTime
public modifyTime: pulumi.Output<string>;The modification time of the invitation.
property note
public note: pulumi.Output<string | undefined>;Remarks. The maximum length is 1024 characters.
property resourceDirectoryId
public resourceDirectoryId: pulumi.Output<string>;Resource directory ID.
property status
public status: pulumi.Output<string>;Invitation status. Valid values: Pending waiting for confirmation, Accepted, Cancelled, Declined, Expired.
property targetEntity
public targetEntity: pulumi.Output<string>;Invited account ID or login email.
property targetType
public targetType: pulumi.Output<string>;Type of account being invited. Valid values: Account, Email.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Policy
class Policy extends CustomResourceProvides a Resource Manager Policy resource. For information about Resource Manager Policy and how to use it, see What is Resource Manager Policy.
NOTE: Available in v1.83.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.resourcemanager.Policy("example", {
policyDocument: ` {
"Statement": [{
"Action": ["oss:*"],
"Effect": "Allow",
"Resource": ["acs:oss:*:*:*"]
}],
"Version": "1"
}
`,
policyName: "abc12345",
});constructor
new Policy(name: string, args: PolicyArgs, opts?: pulumi.CustomResourceOptions)Create a Policy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PolicyState, opts?: pulumi.CustomResourceOptions): PolicyGet an existing Policy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is PolicyReturns true if the given object is an instance of Policy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property createDate
public createDate: pulumi.Output<string>;The time when the policy was created.
property defaultVersion
public defaultVersion: pulumi.Output<string>;The version of the policy. Default to v1.
property description
public description: pulumi.Output<string | undefined>;The description of the policy. The description must be 1 to 1,024 characters in length.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property policyDocument
public policyDocument: pulumi.Output<string>;The content of the policy. The content must be 1 to 2,048 characters in length.
property policyName
public policyName: pulumi.Output<string>;The name of the policy. name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).
property policyType
public policyType: pulumi.Output<string>;The type of the policy. Valid values: Custom, System.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource PolicyVersion
class PolicyVersion extends CustomResourceProvides a Resource Manager Policy Version resource. For information about Resource Manager Policy Version and how to use it, see What is Resource Manager Policy Version.
NOTE: Available in v1.84.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const examplePolicy = new alicloud.resourcemanager.Policy("examplePolicy", {
policyName: "tftest",
policyDocument: ` {
"Statement": [{
"Action": ["oss:*"],
"Effect": "Allow",
"Resource": ["acs:oss:*:*:*"]
}],
"Version": "1"
}
`,
});
const examplePolicyVersion = new alicloud.resourcemanager.PolicyVersion("examplePolicyVersion", {
policyName: examplePolicy.policyName,
policyDocument: ` {
"Statement": [{
"Action": ["oss:*"],
"Effect": "Allow",
"Resource": ["acs:oss:*:*:myphotos"]
}],
"Version": "1"
}
`,
});constructor
new PolicyVersion(name: string, args: PolicyVersionArgs, opts?: pulumi.CustomResourceOptions)Create a PolicyVersion resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PolicyVersionState, opts?: pulumi.CustomResourceOptions): PolicyVersionGet an existing PolicyVersion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is PolicyVersionReturns true if the given object is an instance of PolicyVersion. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property createDate
public createDate: pulumi.Output<string>;The time when the policy version was created.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property isDefaultVersion
public isDefaultVersion: pulumi.Output<boolean | undefined>;Specifies whether to set the policy version as the default version. Default to false.
property policyDocument
public policyDocument: pulumi.Output<string>;The content of the policy. The content must be 1 to 2,048 characters in length.
property policyName
public policyName: pulumi.Output<string>;The name of the policy. Name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property versionId
public versionId: pulumi.Output<string>;The ID of the policy version.
Resource ResourceDirectory
class ResourceDirectory extends CustomResourceProvides a Resource Manager Resource Directory resource. Resource Directory enables you to establish an organizational structure for the resources used by applications of your enterprise. You can plan, build, and manage the resources in a centralized manner by using only one resource directory.
For information about Resource Manager Resource Directory and how to use it, see What is Resource Manager Resource Directory.
NOTE: Available in v1.84.0+.
NOTE: An account can only be used to enable a resource directory after it passes enterprise real-name verification. An account that only passed individual real-name verification cannot be used to enable a resource directory.
NOTE: Before you destroy the resource, make sure that the following requirements are met: - All member accounts must be removed from the resource directory. - All folders except the root folder must be deleted from the resource directory.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.resourcemanager.ResourceDirectory("example", {});constructor
new ResourceDirectory(name: string, args?: ResourceDirectoryArgs, opts?: pulumi.CustomResourceOptions)Create a ResourceDirectory resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceDirectoryState, opts?: pulumi.CustomResourceOptions): ResourceDirectoryGet an existing ResourceDirectory resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ResourceDirectoryReturns true if the given object is an instance of ResourceDirectory. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property masterAccountId
public masterAccountId: pulumi.Output<string>;The ID of the master account.
property masterAccountName
public masterAccountName: pulumi.Output<string>;The name of the master account.
property rootFolderId
public rootFolderId: pulumi.Output<string>;The ID of the root folder.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ResourceGroup
class ResourceGroup extends CustomResourceProvides a Resource Manager Resource Group resource. If you need to group cloud resources according to business departments, projects, and other dimensions, you can create resource groups. For information about Resource Manager Resoource Group and how to use it, see What is Resource Manager Resource Group
NOTE: Available in v1.82.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.resourcemanager.ResourceGroup("example", {
displayName: "testrd",
});constructor
new ResourceGroup(name: string, args: ResourceGroupArgs, opts?: pulumi.CustomResourceOptions)Create a ResourceGroup resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceGroupState, opts?: pulumi.CustomResourceOptions): ResourceGroupGet an existing ResourceGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ResourceGroupReturns true if the given object is an instance of ResourceGroup. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property accountId
public accountId: pulumi.Output<string>;The ID of the Alibaba Cloud account to which the resource group belongs.
property createDate
public createDate: pulumi.Output<string>;The time when the resource group was created.
* regionStatuses -The status of the resource group in all regions.
- regionId - The region ID.
- status - The status of the regional resource group.
property displayName
public displayName: pulumi.Output<string>;The display name of the resource group. The name must be 1 to 30 characters in length and can contain letters, digits, periods (.), at signs (@), and hyphens (-).
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The unique identifier of the resource group.The identifier must be 3 to 12 characters in length and can contain letters, digits, periods (.), hyphens (-), and underscores (_). The identifier must start with a letter.
property regionStatuses
public regionStatuses: pulumi.Output<ResourceGroupRegionStatus[]>;property status
public status: pulumi.Output<string>;The status of the resource group.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Role
class Role extends CustomResourceProvides a Resource Manager role resource. Members are resource containers in the resource directory, which can physically isolate resources to form an independent resource grouping unit. You can create members in the resource folder to manage them in a unified manner. For information about Resource Manager role and how to use it, see What is Resource Manager role.
NOTE: Available in v1.82.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Add a Resource Manager role.
const example = new alicloud.resourcemanager.Role("example", {
assumeRolePolicyDocument: ` {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"RAM":"acs:ram::103755469187****:root"
}
}
],
"Version": "1"
}
`,
roleName: "testrd",
});constructor
new Role(name: string, args: RoleArgs, opts?: pulumi.CustomResourceOptions)Create a Role resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RoleState, opts?: pulumi.CustomResourceOptions): RoleGet an existing Role resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is RoleReturns true if the given object is an instance of Role. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The resource descriptor of the role.
property assumeRolePolicyDocument
public assumeRolePolicyDocument: pulumi.Output<string>;The content of the permissions strategy that plays a role.
property createDate
public createDate: pulumi.Output<string>;Role creation time.
property description
public description: pulumi.Output<string | undefined>;The description of the Resource Manager role.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property maxSessionDuration
public maxSessionDuration: pulumi.Output<number | undefined>;Role maximum session time. Valid values: [3600-43200]. Default to 3600.
property roleId
public roleId: pulumi.Output<string>;property roleName
public roleName: pulumi.Output<string>;Role Name. The length is 1 ~ 64 characters, which can include English letters, numbers, dots “.” and dashes “-”.
property updateDate
public updateDate: pulumi.Output<string>;Role update time.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getAccounts
getAccounts(args?: GetAccountsArgs, opts?: pulumi.InvokeOptions): Promise<GetAccountsResult>This data source provides the Resource Manager Accounts of the current Alibaba Cloud user.
NOTE: Available in 1.86.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultAccounts = pulumi.output(alicloud.resourcemanager.getAccounts({ async: true }));
export const firstAccountId = defaultAccounts.accounts[0].id;Function getFolders
getFolders(args?: GetFoldersArgs, opts?: pulumi.InvokeOptions): Promise<GetFoldersResult>This data source provides the resource manager folders of the current Alibaba Cloud user.
NOTE: Available in 1.84.0+.
NOTE: You can view only the information of the first-level child folders of the specified folder.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = pulumi.output(alicloud.resourcemanager.getFolders({
nameRegex: "tftest",
}, { async: true }));
export const firstFolderId = example.folders[0].id;Function getHandshakes
getHandshakes(args?: GetHandshakesArgs, opts?: pulumi.InvokeOptions): Promise<GetHandshakesResult>This data source provides the Resource Manager Handshakes of the current Alibaba Cloud user.
NOTE: Available in 1.86.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = pulumi.output(alicloud.resourcemanager.getHandshakes({ async: true }));
export const firstHandshakeId = example.handshakes[0].id;Function getPolicies
getPolicies(args?: GetPoliciesArgs, opts?: pulumi.InvokeOptions): Promise<GetPoliciesResult>This data source provides the Resource Manager Policies of the current Alibaba Cloud user.
NOTE: Available in 1.86.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = pulumi.output(alicloud.resourcemanager.getPolicies({
descriptionRegex: "tftestPolicy",
nameRegex: "tftest",
policyType: "Custom",
}, { async: true }));
export const firstPolicyId = example.policies[0].id;Function getPolicyVersions
getPolicyVersions(args: GetPolicyVersionsArgs, opts?: pulumi.InvokeOptions): Promise<GetPolicyVersionsResult>This data source provides the Resource Manager Policy Versions of the current Alibaba Cloud user.
NOTE: Available in 1.85.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultPolicyVersions = pulumi.output(alicloud.resourcemanager.getPolicyVersions({
policyName: "tftest",
policyType: "Custom",
}, { async: true }));
export const firstPolicyVersionId = defaultPolicyVersions.versions[0].id;Function getResourceDirectories
getResourceDirectories(args?: GetResourceDirectoriesArgs, opts?: pulumi.InvokeOptions): Promise<GetResourceDirectoriesResult>This data source provides the Resource Manager Resource Directories of the current Alibaba Cloud user.
NOTE: Available in 1.86.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaule = pulumi.output(alicloud.resourcemanager.getResourceDirectories({ async: true }));
export const resourceDirectoryId = defaule.directories[0].id;Function getResourceGroups
getResourceGroups(args?: GetResourceGroupsArgs, opts?: pulumi.InvokeOptions): Promise<GetResourceGroupsResult>This data source provides resource groups of the current Alibaba Cloud user.
NOTE: Available in v1.84.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = pulumi.output(alicloud.resourcemanager.getResourceGroups({
nameRegex: "tftest",
}, { async: true }));
export const firstResourceGroupId = example.groups[0].id;Function getRoles
getRoles(args?: GetRolesArgs, opts?: pulumi.InvokeOptions): Promise<GetRolesResult>This data source provides the Resource Manager Roles of the current Alibaba Cloud user.
NOTE: Available in 1.86.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = pulumi.output(alicloud.resourcemanager.getRoles({
nameRegex: "tftest",
}, { async: true }));
export const firstRoleId = example.roles[0].id;Others
interface AccountArgs
interface AccountArgsThe set of arguments for constructing a Account resource.
property displayName
displayName: pulumi.Input<string>;Member name. The length is 2 ~ 50 characters or Chinese characters, which can include Chinese characters, English letters, numbers, underscores (_), dots (.) And dashes (-).
property folderId
folderId?: pulumi.Input<string>;The ID of the parent folder.
property payerAccountId
payerAccountId?: pulumi.Input<string>;Settlement account ID. If the value is empty, the current account will be used for settlement.
interface AccountState
interface AccountStateInput properties used for looking up and filtering Account resources.
property displayName
displayName?: pulumi.Input<string>;Member name. The length is 2 ~ 50 characters or Chinese characters, which can include Chinese characters, English letters, numbers, underscores (_), dots (.) And dashes (-).
property folderId
folderId?: pulumi.Input<string>;The ID of the parent folder.
property joinMethod
joinMethod?: pulumi.Input<string>;Ways for members to join the resource directory. Valid values: invited, created.
property joinTime
joinTime?: pulumi.Input<string>;The time when the member joined the resource directory.
property modifyTime
modifyTime?: pulumi.Input<string>;The modification time of the invitation.
property payerAccountId
payerAccountId?: pulumi.Input<string>;Settlement account ID. If the value is empty, the current account will be used for settlement.
property resourceDirectoryId
resourceDirectoryId?: pulumi.Input<string>;Resource directory ID.
property status
status?: pulumi.Input<string>;Member joining status. Valid values: CreateSuccess,CreateVerifying,CreateFailed,CreateExpired,CreateCancelled,PromoteVerifying,PromoteFailed,PromoteExpired,PromoteCancelled,PromoteSuccess,InviteSuccess,Removed.
property type
type?: pulumi.Input<string>;Member type. The value of ResourceAccount indicates the resource account.
interface FolderArgs
interface FolderArgsThe set of arguments for constructing a Folder resource.
property folderName
folderName: pulumi.Input<string>;The name of the folder. The name must be 1 to 24 characters in length and can contain letters, digits, underscores (_), periods (.), and hyphens (-).
property parentFolderId
parentFolderId?: pulumi.Input<string>;The ID of the parent folder. If not set, the system default value will be used.
interface FolderState
interface FolderStateInput properties used for looking up and filtering Folder resources.
property folderName
folderName?: pulumi.Input<string>;The name of the folder. The name must be 1 to 24 characters in length and can contain letters, digits, underscores (_), periods (.), and hyphens (-).
property parentFolderId
parentFolderId?: pulumi.Input<string>;The ID of the parent folder. If not set, the system default value will be used.
interface GetAccountsArgs
interface GetAccountsArgsA collection of arguments for invoking getAccounts.
property ids
ids?: string[];A list of account IDs.
property outputFile
outputFile?: undefined | string;interface GetAccountsResult
interface GetAccountsResultA collection of values returned by getAccounts.
property accounts
accounts: GetAccountsAccount[];A list of accounts. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of account IDs.
property outputFile
outputFile?: undefined | string;interface GetFoldersArgs
interface GetFoldersArgsA collection of arguments for invoking getFolders.
property ids
ids?: string[];A list of resource manager folders IDs.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by folder name.
property outputFile
outputFile?: undefined | string;property parentFolderId
parentFolderId?: undefined | string;The ID of the parent folder.
interface GetFoldersResult
interface GetFoldersResultA collection of values returned by getFolders.
property folders
folders: GetFoldersFolder[];A list of folders. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of folder IDs.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of folder names.
property outputFile
outputFile?: undefined | string;property parentFolderId
parentFolderId?: undefined | string;interface GetHandshakesArgs
interface GetHandshakesArgsA collection of arguments for invoking getHandshakes.
property ids
ids?: string[];A list of Resource Manager Handshake IDs.
property outputFile
outputFile?: undefined | string;interface GetHandshakesResult
interface GetHandshakesResultA collection of values returned by getHandshakes.
property handshakes
handshakes: GetHandshakesHandshake[];A list of Resource Manager Handshakes. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of Resource Manager Handshake IDs.
property outputFile
outputFile?: undefined | string;interface GetPoliciesArgs
interface GetPoliciesArgsA collection of arguments for invoking getPolicies.
property ids
ids?: string[];A list of Resource Manager Policy IDs.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by policy name.
property outputFile
outputFile?: undefined | string;property policyType
policyType?: undefined | string;The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values: Custom and System.
interface GetPoliciesResult
interface GetPoliciesResultA collection of values returned by getPolicies.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of policy IDs.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of policy names.
property outputFile
outputFile?: undefined | string;property policies
policies: GetPoliciesPolicy[];A list of policies. Each element contains the following attributes:
property policyType
policyType?: undefined | string;interface GetPolicyVersionsArgs
interface GetPolicyVersionsArgsA collection of arguments for invoking getPolicyVersions.
property ids
ids?: string[];A list of policy version IDs.
property outputFile
outputFile?: undefined | string;property policyName
policyName: string;The name of the policy.
property policyType
policyType: string;The type of the policy. Valid values:Custom and System.
interface GetPolicyVersionsResult
interface GetPolicyVersionsResultA collection of values returned by getPolicyVersions.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of policy version IDs.
property outputFile
outputFile?: undefined | string;property policyName
policyName: string;property policyType
policyType: string;property versions
versions: GetPolicyVersionsVersion[];A list of policy versions. Each element contains the following attributes:
interface GetResourceDirectoriesArgs
interface GetResourceDirectoriesArgsA collection of arguments for invoking getResourceDirectories.
property outputFile
outputFile?: undefined | string;interface GetResourceDirectoriesResult
interface GetResourceDirectoriesResultA collection of values returned by getResourceDirectories.
property directories
directories: GetResourceDirectoriesDirectory[];A list of resource directories. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property outputFile
outputFile?: undefined | string;interface GetResourceGroupsArgs
interface GetResourceGroupsArgsA collection of arguments for invoking getResourceGroups.
property ids
ids?: string[];A list of resource group IDs.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by resource group name.
property outputFile
outputFile?: undefined | string;property status
status?: undefined | string;The status of the resource group. Possible values:Creating,Deleted,OK and PendingDelete.
interface GetResourceGroupsResult
interface GetResourceGroupsResultA collection of values returned by getResourceGroups.
property groups
groups: GetResourceGroupsGroup[];A list of resource groups. Each element contains the following attributes:
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of resource group IDs.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of resource group names.
property outputFile
outputFile?: undefined | string;property status
status?: undefined | string;The status of the resource group. Possible values:Creating,Deleted,OK and PendingDelete.
interface GetRolesArgs
interface GetRolesArgsA collection of arguments for invoking getRoles.
property ids
ids?: string[];A list of Resource Manager Role IDs.
property nameRegex
nameRegex?: undefined | string;A regex string to filter results by role name.
property outputFile
outputFile?: undefined | string;interface GetRolesResult
interface GetRolesResultA collection of values returned by getRoles.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];A list of role IDs.
property nameRegex
nameRegex?: undefined | string;property names
names: string[];A list of role names.
property outputFile
outputFile?: undefined | string;property roles
roles: GetRolesRole[];A list of roles. Each element contains the following attributes:
interface HandshakeArgs
interface HandshakeArgsThe set of arguments for constructing a Handshake resource.
property note
note?: pulumi.Input<string>;Remarks. The maximum length is 1024 characters.
property targetEntity
targetEntity: pulumi.Input<string>;Invited account ID or login email.
property targetType
targetType: pulumi.Input<string>;Type of account being invited. Valid values: Account, Email.
interface HandshakeState
interface HandshakeStateInput properties used for looking up and filtering Handshake resources.
property expireTime
expireTime?: pulumi.Input<string>;The expiration time of the invitation.
property masterAccountId
masterAccountId?: pulumi.Input<string>;Resource account master account ID.
property masterAccountName
masterAccountName?: pulumi.Input<string>;The name of the main account of the resource directory.
property modifyTime
modifyTime?: pulumi.Input<string>;The modification time of the invitation.
property note
note?: pulumi.Input<string>;Remarks. The maximum length is 1024 characters.
property resourceDirectoryId
resourceDirectoryId?: pulumi.Input<string>;Resource directory ID.
property status
status?: pulumi.Input<string>;Invitation status. Valid values: Pending waiting for confirmation, Accepted, Cancelled, Declined, Expired.
property targetEntity
targetEntity?: pulumi.Input<string>;Invited account ID or login email.
property targetType
targetType?: pulumi.Input<string>;Type of account being invited. Valid values: Account, Email.
interface PolicyArgs
interface PolicyArgsThe set of arguments for constructing a Policy resource.
property defaultVersion
defaultVersion?: pulumi.Input<string>;The version of the policy. Default to v1.
property description
description?: pulumi.Input<string>;The description of the policy. The description must be 1 to 1,024 characters in length.
property policyDocument
policyDocument: pulumi.Input<string>;The content of the policy. The content must be 1 to 2,048 characters in length.
property policyName
policyName: pulumi.Input<string>;The name of the policy. name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).
interface PolicyState
interface PolicyStateInput properties used for looking up and filtering Policy resources.
property createDate
createDate?: pulumi.Input<string>;The time when the policy was created.
property defaultVersion
defaultVersion?: pulumi.Input<string>;The version of the policy. Default to v1.
property description
description?: pulumi.Input<string>;The description of the policy. The description must be 1 to 1,024 characters in length.
property policyDocument
policyDocument?: pulumi.Input<string>;The content of the policy. The content must be 1 to 2,048 characters in length.
property policyName
policyName?: pulumi.Input<string>;The name of the policy. name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).
property policyType
policyType?: pulumi.Input<string>;The type of the policy. Valid values: Custom, System.
interface PolicyVersionArgs
interface PolicyVersionArgsThe set of arguments for constructing a PolicyVersion resource.
property isDefaultVersion
isDefaultVersion?: pulumi.Input<boolean>;Specifies whether to set the policy version as the default version. Default to false.
property policyDocument
policyDocument: pulumi.Input<string>;The content of the policy. The content must be 1 to 2,048 characters in length.
property policyName
policyName: pulumi.Input<string>;The name of the policy. Name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).
interface PolicyVersionState
interface PolicyVersionStateInput properties used for looking up and filtering PolicyVersion resources.
property createDate
createDate?: pulumi.Input<string>;The time when the policy version was created.
property isDefaultVersion
isDefaultVersion?: pulumi.Input<boolean>;Specifies whether to set the policy version as the default version. Default to false.
property policyDocument
policyDocument?: pulumi.Input<string>;The content of the policy. The content must be 1 to 2,048 characters in length.
property policyName
policyName?: pulumi.Input<string>;The name of the policy. Name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).
property versionId
versionId?: pulumi.Input<string>;The ID of the policy version.
interface ResourceDirectoryArgs
interface ResourceDirectoryArgsThe set of arguments for constructing a ResourceDirectory resource.
interface ResourceDirectoryState
interface ResourceDirectoryStateInput properties used for looking up and filtering ResourceDirectory resources.
property masterAccountId
masterAccountId?: pulumi.Input<string>;The ID of the master account.
property masterAccountName
masterAccountName?: pulumi.Input<string>;The name of the master account.
property rootFolderId
rootFolderId?: pulumi.Input<string>;The ID of the root folder.
interface ResourceGroupArgs
interface ResourceGroupArgsThe set of arguments for constructing a ResourceGroup resource.
property displayName
displayName: pulumi.Input<string>;The display name of the resource group. The name must be 1 to 30 characters in length and can contain letters, digits, periods (.), at signs (@), and hyphens (-).
property name
name?: pulumi.Input<string>;The unique identifier of the resource group.The identifier must be 3 to 12 characters in length and can contain letters, digits, periods (.), hyphens (-), and underscores (_). The identifier must start with a letter.
interface ResourceGroupState
interface ResourceGroupStateInput properties used for looking up and filtering ResourceGroup resources.
property accountId
accountId?: pulumi.Input<string>;The ID of the Alibaba Cloud account to which the resource group belongs.
property createDate
createDate?: pulumi.Input<string>;The time when the resource group was created.
* regionStatuses -The status of the resource group in all regions.
- regionId - The region ID.
- status - The status of the regional resource group.
property displayName
displayName?: pulumi.Input<string>;The display name of the resource group. The name must be 1 to 30 characters in length and can contain letters, digits, periods (.), at signs (@), and hyphens (-).
property name
name?: pulumi.Input<string>;The unique identifier of the resource group.The identifier must be 3 to 12 characters in length and can contain letters, digits, periods (.), hyphens (-), and underscores (_). The identifier must start with a letter.
property regionStatuses
regionStatuses?: pulumi.Input<pulumi.Input<ResourceGroupRegionStatus>[]>;property status
status?: pulumi.Input<string>;The status of the resource group.
interface RoleArgs
interface RoleArgsThe set of arguments for constructing a Role resource.
property assumeRolePolicyDocument
assumeRolePolicyDocument: pulumi.Input<string>;The content of the permissions strategy that plays a role.
property description
description?: pulumi.Input<string>;The description of the Resource Manager role.
property maxSessionDuration
maxSessionDuration?: pulumi.Input<number>;Role maximum session time. Valid values: [3600-43200]. Default to 3600.
property roleName
roleName: pulumi.Input<string>;Role Name. The length is 1 ~ 64 characters, which can include English letters, numbers, dots “.” and dashes “-”.
interface RoleState
interface RoleStateInput properties used for looking up and filtering Role resources.
property arn
arn?: pulumi.Input<string>;The resource descriptor of the role.
property assumeRolePolicyDocument
assumeRolePolicyDocument?: pulumi.Input<string>;The content of the permissions strategy that plays a role.
property createDate
createDate?: pulumi.Input<string>;Role creation time.
property description
description?: pulumi.Input<string>;The description of the Resource Manager role.
property maxSessionDuration
maxSessionDuration?: pulumi.Input<number>;Role maximum session time. Valid values: [3600-43200]. Default to 3600.
property roleId
roleId?: pulumi.Input<string>;property roleName
roleName?: pulumi.Input<string>;Role Name. The length is 1 ~ 64 characters, which can include English letters, numbers, dots “.” and dashes “-”.
property updateDate
updateDate?: pulumi.Input<string>;Role update time.