ram

package
v2.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKey

type AccessKey struct {
	pulumi.CustomResourceState

	EncryptedSecret pulumi.StringOutput `pulumi:"encryptedSecret"`
	// The fingerprint of the PGP key used to encrypt the secret
	KeyFingerprint pulumi.StringOutput `pulumi:"keyFingerprint"`
	// Either a base-64 encoded PGP public key, or a keybase username in the form `keybase:some_person_that_exists`
	PgpKey pulumi.StringPtrOutput `pulumi:"pgpKey"`
	Secret pulumi.StringOutput    `pulumi:"secret"`
	// The name of file that can save access key id and access key secret. Strongly suggest you to specified it when you creating access key, otherwise, you wouldn't get its secret ever.
	SecretFile pulumi.StringPtrOutput `pulumi:"secretFile"`
	// Status of access key. It must be `Active` or `Inactive`. Default value is `Active`.
	Status pulumi.StringPtrOutput `pulumi:"status"`
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringPtrOutput `pulumi:"userName"`
}

Provides a RAM User access key resource.

> **NOTE:** You should set the `secretFile` if you want to get the access key.

> **NOTE:** From version 1.98.0, if not set `pgpKey`, the resource will output the access key secret to field `secret` and please protect your backend state file judiciously

## Example Usage

Output the secret to a file. ```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			DisplayName: pulumi.String("user_display_name"),
			Mobile:      pulumi.String("86-18688888888"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewAccessKey(ctx, "ak", &ram.AccessKeyArgs{
			UserName:   user.Name,
			SecretFile: pulumi.String("/xxx/xxx/xxx.txt"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

Using `pgpKey` to encrypt the secret. ```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			DisplayName: pulumi.String("user_display_name"),
			Mobile:      pulumi.String("86-18688888888"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		encrypt, err := ram.NewAccessKey(ctx, "encrypt", &ram.AccessKeyArgs{
			UserName: user.Name,
			PgpKey:   pulumi.String("keybase:some_person_that_exists"),
		})
		if err != nil {
			return err
		}
		ctx.Export("secret", encrypt.EncryptedSecret)
		return nil
	})
}

```

func GetAccessKey

func GetAccessKey(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AccessKeyState, opts ...pulumi.ResourceOption) (*AccessKey, error)

GetAccessKey gets an existing AccessKey resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAccessKey

func NewAccessKey(ctx *pulumi.Context,
	name string, args *AccessKeyArgs, opts ...pulumi.ResourceOption) (*AccessKey, error)

NewAccessKey registers a new resource with the given unique name, arguments, and options.

func (AccessKey) ElementType added in v2.25.1

func (AccessKey) ElementType() reflect.Type

func (AccessKey) ToAccessKeyOutput added in v2.25.1

func (i AccessKey) ToAccessKeyOutput() AccessKeyOutput

func (AccessKey) ToAccessKeyOutputWithContext added in v2.25.1

func (i AccessKey) ToAccessKeyOutputWithContext(ctx context.Context) AccessKeyOutput

type AccessKeyArgs

type AccessKeyArgs struct {
	// Either a base-64 encoded PGP public key, or a keybase username in the form `keybase:some_person_that_exists`
	PgpKey pulumi.StringPtrInput
	// The name of file that can save access key id and access key secret. Strongly suggest you to specified it when you creating access key, otherwise, you wouldn't get its secret ever.
	SecretFile pulumi.StringPtrInput
	// Status of access key. It must be `Active` or `Inactive`. Default value is `Active`.
	Status pulumi.StringPtrInput
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringPtrInput
}

The set of arguments for constructing a AccessKey resource.

func (AccessKeyArgs) ElementType

func (AccessKeyArgs) ElementType() reflect.Type

type AccessKeyInput added in v2.25.1

type AccessKeyInput interface {
	pulumi.Input

	ToAccessKeyOutput() AccessKeyOutput
	ToAccessKeyOutputWithContext(ctx context.Context) AccessKeyOutput
}

type AccessKeyOutput added in v2.25.1

type AccessKeyOutput struct {
	*pulumi.OutputState
}

func (AccessKeyOutput) ElementType added in v2.25.1

func (AccessKeyOutput) ElementType() reflect.Type

func (AccessKeyOutput) ToAccessKeyOutput added in v2.25.1

func (o AccessKeyOutput) ToAccessKeyOutput() AccessKeyOutput

func (AccessKeyOutput) ToAccessKeyOutputWithContext added in v2.25.1

func (o AccessKeyOutput) ToAccessKeyOutputWithContext(ctx context.Context) AccessKeyOutput

type AccessKeyState

type AccessKeyState struct {
	EncryptedSecret pulumi.StringPtrInput
	// The fingerprint of the PGP key used to encrypt the secret
	KeyFingerprint pulumi.StringPtrInput
	// Either a base-64 encoded PGP public key, or a keybase username in the form `keybase:some_person_that_exists`
	PgpKey pulumi.StringPtrInput
	Secret pulumi.StringPtrInput
	// The name of file that can save access key id and access key secret. Strongly suggest you to specified it when you creating access key, otherwise, you wouldn't get its secret ever.
	SecretFile pulumi.StringPtrInput
	// Status of access key. It must be `Active` or `Inactive`. Default value is `Active`.
	Status pulumi.StringPtrInput
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringPtrInput
}

func (AccessKeyState) ElementType

func (AccessKeyState) ElementType() reflect.Type

type AccountAlias

type AccountAlias struct {
	pulumi.CustomResourceState

	// Alias of cloud account. This name can have a string of 3 to 32 characters, must contain only alphanumeric characters or hyphens, such as "-", and must not begin with a hyphen.
	AccountAlias pulumi.StringOutput `pulumi:"accountAlias"`
}

Provides a RAM cloud account alias.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewAccountAlias(ctx, "alias", &ram.AccountAliasArgs{
			AccountAlias: pulumi.String("hallo"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

RAM account alias can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ram/accountAlias:AccountAlias example my-alias

```

func GetAccountAlias

func GetAccountAlias(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AccountAliasState, opts ...pulumi.ResourceOption) (*AccountAlias, error)

GetAccountAlias gets an existing AccountAlias resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAccountAlias

func NewAccountAlias(ctx *pulumi.Context,
	name string, args *AccountAliasArgs, opts ...pulumi.ResourceOption) (*AccountAlias, error)

NewAccountAlias registers a new resource with the given unique name, arguments, and options.

func (AccountAlias) ElementType added in v2.25.1

func (AccountAlias) ElementType() reflect.Type

func (AccountAlias) ToAccountAliasOutput added in v2.25.1

func (i AccountAlias) ToAccountAliasOutput() AccountAliasOutput

func (AccountAlias) ToAccountAliasOutputWithContext added in v2.25.1

func (i AccountAlias) ToAccountAliasOutputWithContext(ctx context.Context) AccountAliasOutput

type AccountAliasArgs

type AccountAliasArgs struct {
	// Alias of cloud account. This name can have a string of 3 to 32 characters, must contain only alphanumeric characters or hyphens, such as "-", and must not begin with a hyphen.
	AccountAlias pulumi.StringInput
}

The set of arguments for constructing a AccountAlias resource.

func (AccountAliasArgs) ElementType

func (AccountAliasArgs) ElementType() reflect.Type

type AccountAliasInput added in v2.25.1

type AccountAliasInput interface {
	pulumi.Input

	ToAccountAliasOutput() AccountAliasOutput
	ToAccountAliasOutputWithContext(ctx context.Context) AccountAliasOutput
}

type AccountAliasOutput added in v2.25.1

type AccountAliasOutput struct {
	*pulumi.OutputState
}

func (AccountAliasOutput) ElementType added in v2.25.1

func (AccountAliasOutput) ElementType() reflect.Type

func (AccountAliasOutput) ToAccountAliasOutput added in v2.25.1

func (o AccountAliasOutput) ToAccountAliasOutput() AccountAliasOutput

func (AccountAliasOutput) ToAccountAliasOutputWithContext added in v2.25.1

func (o AccountAliasOutput) ToAccountAliasOutputWithContext(ctx context.Context) AccountAliasOutput

type AccountAliasState

type AccountAliasState struct {
	// Alias of cloud account. This name can have a string of 3 to 32 characters, must contain only alphanumeric characters or hyphens, such as "-", and must not begin with a hyphen.
	AccountAlias pulumi.StringPtrInput
}

func (AccountAliasState) ElementType

func (AccountAliasState) ElementType() reflect.Type

type AccountPasswordPolicy

type AccountPasswordPolicy struct {
	pulumi.CustomResourceState

	// Specifies if a password can expire in a hard way. Default to false.
	HardExpiry pulumi.BoolPtrOutput `pulumi:"hardExpiry"`
	// Maximum logon attempts with an incorrect password within an hour. Valid value range: [0-32]. Default to 5.
	MaxLoginAttempts pulumi.IntPtrOutput `pulumi:"maxLoginAttempts"`
	// The number of days after which password expires. A value of 0 indicates that the password never expires. Valid value range: [0-1095]. Default to 0.
	MaxPasswordAge pulumi.IntPtrOutput `pulumi:"maxPasswordAge"`
	// Minimal required length of password for a user. Valid value range: [8-32]. Default to 12.
	MinimumPasswordLength pulumi.IntPtrOutput `pulumi:"minimumPasswordLength"`
	// User is not allowed to use the latest number of passwords specified in this parameter. A value of 0 indicates the password history check policy is disabled. Valid value range: [0-24]. Default to 0.
	PasswordReusePrevention pulumi.IntPtrOutput `pulumi:"passwordReusePrevention"`
	// Specifies if the occurrence of a lowercase character in the password is mandatory. Default to true.
	RequireLowercaseCharacters pulumi.BoolPtrOutput `pulumi:"requireLowercaseCharacters"`
	// Specifies if the occurrence of a number in the password is mandatory. Default to true.
	RequireNumbers pulumi.BoolPtrOutput `pulumi:"requireNumbers"`
	// (Optional Specifies if the occurrence of a special character in the password is mandatory. Default to true.
	RequireSymbols pulumi.BoolPtrOutput `pulumi:"requireSymbols"`
	// Specifies if the occurrence of an uppercase character in the password is mandatory. Default to true.
	RequireUppercaseCharacters pulumi.BoolPtrOutput `pulumi:"requireUppercaseCharacters"`
}

## Import

RAM account password policy can be imported using the `id`, e.g. bash

```sh

$ pulumi import alicloud:ram/accountPasswordPolicy:AccountPasswordPolicy example ram-account-password-policy

```

func GetAccountPasswordPolicy

func GetAccountPasswordPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AccountPasswordPolicyState, opts ...pulumi.ResourceOption) (*AccountPasswordPolicy, error)

GetAccountPasswordPolicy gets an existing AccountPasswordPolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAccountPasswordPolicy

func NewAccountPasswordPolicy(ctx *pulumi.Context,
	name string, args *AccountPasswordPolicyArgs, opts ...pulumi.ResourceOption) (*AccountPasswordPolicy, error)

NewAccountPasswordPolicy registers a new resource with the given unique name, arguments, and options.

func (AccountPasswordPolicy) ElementType added in v2.25.1

func (AccountPasswordPolicy) ElementType() reflect.Type

func (AccountPasswordPolicy) ToAccountPasswordPolicyOutput added in v2.25.1

func (i AccountPasswordPolicy) ToAccountPasswordPolicyOutput() AccountPasswordPolicyOutput

func (AccountPasswordPolicy) ToAccountPasswordPolicyOutputWithContext added in v2.25.1

func (i AccountPasswordPolicy) ToAccountPasswordPolicyOutputWithContext(ctx context.Context) AccountPasswordPolicyOutput

type AccountPasswordPolicyArgs

type AccountPasswordPolicyArgs struct {
	// Specifies if a password can expire in a hard way. Default to false.
	HardExpiry pulumi.BoolPtrInput
	// Maximum logon attempts with an incorrect password within an hour. Valid value range: [0-32]. Default to 5.
	MaxLoginAttempts pulumi.IntPtrInput
	// The number of days after which password expires. A value of 0 indicates that the password never expires. Valid value range: [0-1095]. Default to 0.
	MaxPasswordAge pulumi.IntPtrInput
	// Minimal required length of password for a user. Valid value range: [8-32]. Default to 12.
	MinimumPasswordLength pulumi.IntPtrInput
	// User is not allowed to use the latest number of passwords specified in this parameter. A value of 0 indicates the password history check policy is disabled. Valid value range: [0-24]. Default to 0.
	PasswordReusePrevention pulumi.IntPtrInput
	// Specifies if the occurrence of a lowercase character in the password is mandatory. Default to true.
	RequireLowercaseCharacters pulumi.BoolPtrInput
	// Specifies if the occurrence of a number in the password is mandatory. Default to true.
	RequireNumbers pulumi.BoolPtrInput
	// (Optional Specifies if the occurrence of a special character in the password is mandatory. Default to true.
	RequireSymbols pulumi.BoolPtrInput
	// Specifies if the occurrence of an uppercase character in the password is mandatory. Default to true.
	RequireUppercaseCharacters pulumi.BoolPtrInput
}

The set of arguments for constructing a AccountPasswordPolicy resource.

func (AccountPasswordPolicyArgs) ElementType

func (AccountPasswordPolicyArgs) ElementType() reflect.Type

type AccountPasswordPolicyInput added in v2.25.1

type AccountPasswordPolicyInput interface {
	pulumi.Input

	ToAccountPasswordPolicyOutput() AccountPasswordPolicyOutput
	ToAccountPasswordPolicyOutputWithContext(ctx context.Context) AccountPasswordPolicyOutput
}

type AccountPasswordPolicyOutput added in v2.25.1

type AccountPasswordPolicyOutput struct {
	*pulumi.OutputState
}

func (AccountPasswordPolicyOutput) ElementType added in v2.25.1

func (AccountPasswordPolicyOutput) ToAccountPasswordPolicyOutput added in v2.25.1

func (o AccountPasswordPolicyOutput) ToAccountPasswordPolicyOutput() AccountPasswordPolicyOutput

func (AccountPasswordPolicyOutput) ToAccountPasswordPolicyOutputWithContext added in v2.25.1

func (o AccountPasswordPolicyOutput) ToAccountPasswordPolicyOutputWithContext(ctx context.Context) AccountPasswordPolicyOutput

type AccountPasswordPolicyState

type AccountPasswordPolicyState struct {
	// Specifies if a password can expire in a hard way. Default to false.
	HardExpiry pulumi.BoolPtrInput
	// Maximum logon attempts with an incorrect password within an hour. Valid value range: [0-32]. Default to 5.
	MaxLoginAttempts pulumi.IntPtrInput
	// The number of days after which password expires. A value of 0 indicates that the password never expires. Valid value range: [0-1095]. Default to 0.
	MaxPasswordAge pulumi.IntPtrInput
	// Minimal required length of password for a user. Valid value range: [8-32]. Default to 12.
	MinimumPasswordLength pulumi.IntPtrInput
	// User is not allowed to use the latest number of passwords specified in this parameter. A value of 0 indicates the password history check policy is disabled. Valid value range: [0-24]. Default to 0.
	PasswordReusePrevention pulumi.IntPtrInput
	// Specifies if the occurrence of a lowercase character in the password is mandatory. Default to true.
	RequireLowercaseCharacters pulumi.BoolPtrInput
	// Specifies if the occurrence of a number in the password is mandatory. Default to true.
	RequireNumbers pulumi.BoolPtrInput
	// (Optional Specifies if the occurrence of a special character in the password is mandatory. Default to true.
	RequireSymbols pulumi.BoolPtrInput
	// Specifies if the occurrence of an uppercase character in the password is mandatory. Default to true.
	RequireUppercaseCharacters pulumi.BoolPtrInput
}

func (AccountPasswordPolicyState) ElementType

func (AccountPasswordPolicyState) ElementType() reflect.Type

type Alias

type Alias struct {
	pulumi.CustomResourceState

	AccountAlias pulumi.StringOutput `pulumi:"accountAlias"`
}

func GetAlias

func GetAlias(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AliasState, opts ...pulumi.ResourceOption) (*Alias, error)

GetAlias gets an existing Alias resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewAlias

func NewAlias(ctx *pulumi.Context,
	name string, args *AliasArgs, opts ...pulumi.ResourceOption) (*Alias, error)

NewAlias registers a new resource with the given unique name, arguments, and options.

func (Alias) ElementType added in v2.25.1

func (Alias) ElementType() reflect.Type

func (Alias) ToAliasOutput added in v2.25.1

func (i Alias) ToAliasOutput() AliasOutput

func (Alias) ToAliasOutputWithContext added in v2.25.1

func (i Alias) ToAliasOutputWithContext(ctx context.Context) AliasOutput

type AliasArgs

type AliasArgs struct {
	AccountAlias pulumi.StringInput
}

The set of arguments for constructing a Alias resource.

func (AliasArgs) ElementType

func (AliasArgs) ElementType() reflect.Type

type AliasInput added in v2.25.1

type AliasInput interface {
	pulumi.Input

	ToAliasOutput() AliasOutput
	ToAliasOutputWithContext(ctx context.Context) AliasOutput
}

type AliasOutput added in v2.25.1

type AliasOutput struct {
	*pulumi.OutputState
}

func (AliasOutput) ElementType added in v2.25.1

func (AliasOutput) ElementType() reflect.Type

func (AliasOutput) ToAliasOutput added in v2.25.1

func (o AliasOutput) ToAliasOutput() AliasOutput

func (AliasOutput) ToAliasOutputWithContext added in v2.25.1

func (o AliasOutput) ToAliasOutputWithContext(ctx context.Context) AliasOutput

type AliasState

type AliasState struct {
	AccountAlias pulumi.StringPtrInput
}

func (AliasState) ElementType

func (AliasState) ElementType() reflect.Type

type GetAccountAliasesArgs

type GetAccountAliasesArgs struct {
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getAccountAliases.

type GetAccountAliasesResult

type GetAccountAliasesResult struct {
	// Alias of the account.
	AccountAlias string `pulumi:"accountAlias"`
	// The provider-assigned unique ID for this managed resource.
	Id         string  `pulumi:"id"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of values returned by getAccountAliases.

func GetAccountAliases

func GetAccountAliases(ctx *pulumi.Context, args *GetAccountAliasesArgs, opts ...pulumi.InvokeOption) (*GetAccountAliasesResult, error)

This data source provides an alias for the Alibaba Cloud account.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "alias.txt"
		aliasDs, err := ram.GetAccountAliases(ctx, &ram.GetAccountAliasesArgs{
			OutputFile: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("accountAlias", aliasDs.AccountAlias)
		return nil
	})
}

```

type GetGroupsArgs

type GetGroupsArgs struct {
	// A regex string to filter the returned groups by their names.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// Filter the results by a specific policy name. If you set this parameter without setting `policyType`, it will be automatically set to `System`.
	PolicyName *string `pulumi:"policyName"`
	// Filter the results by a specific policy type. Valid items are `Custom` and `System`. If you set this parameter, you must set `policyName` as well.
	PolicyType *string `pulumi:"policyType"`
	// Filter the results by a specific the user name.
	UserName *string `pulumi:"userName"`
}

A collection of arguments for invoking getGroups.

type GetGroupsGroup

type GetGroupsGroup struct {
	// Comments of the group.
	Comments string `pulumi:"comments"`
	// Name of the group.
	Name string `pulumi:"name"`
}

type GetGroupsGroupArgs

type GetGroupsGroupArgs struct {
	// Comments of the group.
	Comments pulumi.StringInput `pulumi:"comments"`
	// Name of the group.
	Name pulumi.StringInput `pulumi:"name"`
}

func (GetGroupsGroupArgs) ElementType

func (GetGroupsGroupArgs) ElementType() reflect.Type

func (GetGroupsGroupArgs) ToGetGroupsGroupOutput

func (i GetGroupsGroupArgs) ToGetGroupsGroupOutput() GetGroupsGroupOutput

func (GetGroupsGroupArgs) ToGetGroupsGroupOutputWithContext

func (i GetGroupsGroupArgs) ToGetGroupsGroupOutputWithContext(ctx context.Context) GetGroupsGroupOutput

type GetGroupsGroupArray

type GetGroupsGroupArray []GetGroupsGroupInput

func (GetGroupsGroupArray) ElementType

func (GetGroupsGroupArray) ElementType() reflect.Type

func (GetGroupsGroupArray) ToGetGroupsGroupArrayOutput

func (i GetGroupsGroupArray) ToGetGroupsGroupArrayOutput() GetGroupsGroupArrayOutput

func (GetGroupsGroupArray) ToGetGroupsGroupArrayOutputWithContext

func (i GetGroupsGroupArray) ToGetGroupsGroupArrayOutputWithContext(ctx context.Context) GetGroupsGroupArrayOutput

type GetGroupsGroupArrayInput

type GetGroupsGroupArrayInput interface {
	pulumi.Input

	ToGetGroupsGroupArrayOutput() GetGroupsGroupArrayOutput
	ToGetGroupsGroupArrayOutputWithContext(context.Context) GetGroupsGroupArrayOutput
}

GetGroupsGroupArrayInput is an input type that accepts GetGroupsGroupArray and GetGroupsGroupArrayOutput values. You can construct a concrete instance of `GetGroupsGroupArrayInput` via:

GetGroupsGroupArray{ GetGroupsGroupArgs{...} }

type GetGroupsGroupArrayOutput

type GetGroupsGroupArrayOutput struct{ *pulumi.OutputState }

func (GetGroupsGroupArrayOutput) ElementType

func (GetGroupsGroupArrayOutput) ElementType() reflect.Type

func (GetGroupsGroupArrayOutput) Index

func (GetGroupsGroupArrayOutput) ToGetGroupsGroupArrayOutput

func (o GetGroupsGroupArrayOutput) ToGetGroupsGroupArrayOutput() GetGroupsGroupArrayOutput

func (GetGroupsGroupArrayOutput) ToGetGroupsGroupArrayOutputWithContext

func (o GetGroupsGroupArrayOutput) ToGetGroupsGroupArrayOutputWithContext(ctx context.Context) GetGroupsGroupArrayOutput

type GetGroupsGroupInput

type GetGroupsGroupInput interface {
	pulumi.Input

	ToGetGroupsGroupOutput() GetGroupsGroupOutput
	ToGetGroupsGroupOutputWithContext(context.Context) GetGroupsGroupOutput
}

GetGroupsGroupInput is an input type that accepts GetGroupsGroupArgs and GetGroupsGroupOutput values. You can construct a concrete instance of `GetGroupsGroupInput` via:

GetGroupsGroupArgs{...}

type GetGroupsGroupOutput

type GetGroupsGroupOutput struct{ *pulumi.OutputState }

func (GetGroupsGroupOutput) Comments

Comments of the group.

func (GetGroupsGroupOutput) ElementType

func (GetGroupsGroupOutput) ElementType() reflect.Type

func (GetGroupsGroupOutput) Name

Name of the group.

func (GetGroupsGroupOutput) ToGetGroupsGroupOutput

func (o GetGroupsGroupOutput) ToGetGroupsGroupOutput() GetGroupsGroupOutput

func (GetGroupsGroupOutput) ToGetGroupsGroupOutputWithContext

func (o GetGroupsGroupOutput) ToGetGroupsGroupOutputWithContext(ctx context.Context) GetGroupsGroupOutput

type GetGroupsResult

type GetGroupsResult struct {
	// A list of groups. Each element contains the following attributes:
	Groups []GetGroupsGroup `pulumi:"groups"`
	// The provider-assigned unique ID for this managed resource.
	Id        string  `pulumi:"id"`
	NameRegex *string `pulumi:"nameRegex"`
	// A list of ram group names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	PolicyName *string  `pulumi:"policyName"`
	PolicyType *string  `pulumi:"policyType"`
	UserName   *string  `pulumi:"userName"`
}

A collection of values returned by getGroups.

func GetGroups

func GetGroups(ctx *pulumi.Context, args *GetGroupsArgs, opts ...pulumi.InvokeOption) (*GetGroupsResult, error)

This data source provides a list of RAM Groups in an Alibaba Cloud account according to the specified filters.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "^group[0-9]*"
		opt1 := "groups.txt"
		opt2 := "user1"
		groupsDs, err := ram.GetGroups(ctx, &ram.GetGroupsArgs{
			NameRegex:  &opt0,
			OutputFile: &opt1,
			UserName:   &opt2,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstGroupName", groupsDs.Groups[0].Name)
		return nil
	})
}

```

type GetPoliciesArgs

type GetPoliciesArgs struct {
	// Filter results by a specific group name. Returned policies are attached to the specified group.
	GroupName *string `pulumi:"groupName"`
	// A regex string to filter resulting policies by name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// Filter results by a specific role name. Returned policies are attached to the specified role.
	RoleName *string `pulumi:"roleName"`
	// Filter results by a specific policy type. Valid values are `Custom` and `System`.
	Type *string `pulumi:"type"`
	// Filter results by a specific user name. Returned policies are attached to the specified user.
	UserName *string `pulumi:"userName"`
}

A collection of arguments for invoking getPolicies.

type GetPoliciesPolicy

type GetPoliciesPolicy struct {
	// Attachment count of the policy.
	AttachmentCount int `pulumi:"attachmentCount"`
	// Creation date of the policy.
	CreateDate string `pulumi:"createDate"`
	// Default version of the policy.
	DefaultVersion string `pulumi:"defaultVersion"`
	// Description of the policy.
	Description string `pulumi:"description"`
	// Policy document of the policy.
	Document string `pulumi:"document"`
	// Name of the policy.
	Name string `pulumi:"name"`
	// Filter results by a specific policy type. Valid values are `Custom` and `System`.
	Type string `pulumi:"type"`
	// Update date of the policy.
	UpdateDate string `pulumi:"updateDate"`
}

type GetPoliciesPolicyArgs

type GetPoliciesPolicyArgs struct {
	// Attachment count of the policy.
	AttachmentCount pulumi.IntInput `pulumi:"attachmentCount"`
	// Creation date of the policy.
	CreateDate pulumi.StringInput `pulumi:"createDate"`
	// Default version of the policy.
	DefaultVersion pulumi.StringInput `pulumi:"defaultVersion"`
	// Description of the policy.
	Description pulumi.StringInput `pulumi:"description"`
	// Policy document of the policy.
	Document pulumi.StringInput `pulumi:"document"`
	// Name of the policy.
	Name pulumi.StringInput `pulumi:"name"`
	// Filter results by a specific policy type. Valid values are `Custom` and `System`.
	Type pulumi.StringInput `pulumi:"type"`
	// Update date of the policy.
	UpdateDate pulumi.StringInput `pulumi:"updateDate"`
}

func (GetPoliciesPolicyArgs) ElementType

func (GetPoliciesPolicyArgs) ElementType() reflect.Type

func (GetPoliciesPolicyArgs) ToGetPoliciesPolicyOutput

func (i GetPoliciesPolicyArgs) ToGetPoliciesPolicyOutput() GetPoliciesPolicyOutput

func (GetPoliciesPolicyArgs) ToGetPoliciesPolicyOutputWithContext

func (i GetPoliciesPolicyArgs) ToGetPoliciesPolicyOutputWithContext(ctx context.Context) GetPoliciesPolicyOutput

type GetPoliciesPolicyArray

type GetPoliciesPolicyArray []GetPoliciesPolicyInput

func (GetPoliciesPolicyArray) ElementType

func (GetPoliciesPolicyArray) ElementType() reflect.Type

func (GetPoliciesPolicyArray) ToGetPoliciesPolicyArrayOutput

func (i GetPoliciesPolicyArray) ToGetPoliciesPolicyArrayOutput() GetPoliciesPolicyArrayOutput

func (GetPoliciesPolicyArray) ToGetPoliciesPolicyArrayOutputWithContext

func (i GetPoliciesPolicyArray) ToGetPoliciesPolicyArrayOutputWithContext(ctx context.Context) GetPoliciesPolicyArrayOutput

type GetPoliciesPolicyArrayInput

type GetPoliciesPolicyArrayInput interface {
	pulumi.Input

	ToGetPoliciesPolicyArrayOutput() GetPoliciesPolicyArrayOutput
	ToGetPoliciesPolicyArrayOutputWithContext(context.Context) GetPoliciesPolicyArrayOutput
}

GetPoliciesPolicyArrayInput is an input type that accepts GetPoliciesPolicyArray and GetPoliciesPolicyArrayOutput values. You can construct a concrete instance of `GetPoliciesPolicyArrayInput` via:

GetPoliciesPolicyArray{ GetPoliciesPolicyArgs{...} }

type GetPoliciesPolicyArrayOutput

type GetPoliciesPolicyArrayOutput struct{ *pulumi.OutputState }

func (GetPoliciesPolicyArrayOutput) ElementType

func (GetPoliciesPolicyArrayOutput) Index

func (GetPoliciesPolicyArrayOutput) ToGetPoliciesPolicyArrayOutput

func (o GetPoliciesPolicyArrayOutput) ToGetPoliciesPolicyArrayOutput() GetPoliciesPolicyArrayOutput

func (GetPoliciesPolicyArrayOutput) ToGetPoliciesPolicyArrayOutputWithContext

func (o GetPoliciesPolicyArrayOutput) ToGetPoliciesPolicyArrayOutputWithContext(ctx context.Context) GetPoliciesPolicyArrayOutput

type GetPoliciesPolicyInput

type GetPoliciesPolicyInput interface {
	pulumi.Input

	ToGetPoliciesPolicyOutput() GetPoliciesPolicyOutput
	ToGetPoliciesPolicyOutputWithContext(context.Context) GetPoliciesPolicyOutput
}

GetPoliciesPolicyInput is an input type that accepts GetPoliciesPolicyArgs and GetPoliciesPolicyOutput values. You can construct a concrete instance of `GetPoliciesPolicyInput` via:

GetPoliciesPolicyArgs{...}

type GetPoliciesPolicyOutput

type GetPoliciesPolicyOutput struct{ *pulumi.OutputState }

func (GetPoliciesPolicyOutput) AttachmentCount

func (o GetPoliciesPolicyOutput) AttachmentCount() pulumi.IntOutput

Attachment count of the policy.

func (GetPoliciesPolicyOutput) CreateDate

Creation date of the policy.

func (GetPoliciesPolicyOutput) DefaultVersion

func (o GetPoliciesPolicyOutput) DefaultVersion() pulumi.StringOutput

Default version of the policy.

func (GetPoliciesPolicyOutput) Description

Description of the policy.

func (GetPoliciesPolicyOutput) Document

Policy document of the policy.

func (GetPoliciesPolicyOutput) ElementType

func (GetPoliciesPolicyOutput) ElementType() reflect.Type

func (GetPoliciesPolicyOutput) Name

Name of the policy.

func (GetPoliciesPolicyOutput) ToGetPoliciesPolicyOutput

func (o GetPoliciesPolicyOutput) ToGetPoliciesPolicyOutput() GetPoliciesPolicyOutput

func (GetPoliciesPolicyOutput) ToGetPoliciesPolicyOutputWithContext

func (o GetPoliciesPolicyOutput) ToGetPoliciesPolicyOutputWithContext(ctx context.Context) GetPoliciesPolicyOutput

func (GetPoliciesPolicyOutput) Type

Filter results by a specific policy type. Valid values are `Custom` and `System`.

func (GetPoliciesPolicyOutput) UpdateDate

Update date of the policy.

type GetPoliciesResult

type GetPoliciesResult struct {
	GroupName *string `pulumi:"groupName"`
	// The provider-assigned unique ID for this managed resource.
	Id        string  `pulumi:"id"`
	NameRegex *string `pulumi:"nameRegex"`
	// A list of ram group names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// A list of policies. Each element contains the following attributes:
	Policies []GetPoliciesPolicy `pulumi:"policies"`
	RoleName *string             `pulumi:"roleName"`
	// Type of the policy.
	Type     *string `pulumi:"type"`
	UserName *string `pulumi:"userName"`
}

A collection of values returned by getPolicies.

func GetPolicies

func GetPolicies(ctx *pulumi.Context, args *GetPoliciesArgs, opts ...pulumi.InvokeOption) (*GetPoliciesResult, error)

This data source provides a list of RAM policies in an Alibaba Cloud account according to the specified filters.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "group1"
		opt1 := "policies.txt"
		opt2 := "System"
		opt3 := "user1"
		policiesDs, err := ram.GetPolicies(ctx, &ram.GetPoliciesArgs{
			GroupName:  &opt0,
			OutputFile: &opt1,
			Type:       &opt2,
			UserName:   &opt3,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstPolicyName", policiesDs.Policies[0].Name)
		return nil
	})
}

```

type GetRolesArgs

type GetRolesArgs struct {
	// - A list of ram role IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter results by the role name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// Filter results by a specific policy name. If you set this parameter without setting `policyType`, the later will be automatically set to `System`. The resulting roles will be attached to the specified policy.
	PolicyName *string `pulumi:"policyName"`
	// Filter results by a specific policy type. Valid values are `Custom` and `System`. If you set this parameter, you must set `policyName` as well.
	PolicyType *string `pulumi:"policyType"`
}

A collection of arguments for invoking getRoles.

type GetRolesResult

type GetRolesResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of ram role IDs.
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of ram role names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	PolicyName *string  `pulumi:"policyName"`
	PolicyType *string  `pulumi:"policyType"`
	// A list of roles. Each element contains the following attributes:
	Roles []GetRolesRole `pulumi:"roles"`
}

A collection of values returned by getRoles.

func GetRoles

func GetRoles(ctx *pulumi.Context, args *GetRolesArgs, opts ...pulumi.InvokeOption) (*GetRolesResult, error)

This data source provides a list of RAM Roles in an Alibaba Cloud account according to the specified filters.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := ".*test.*"
		opt1 := "roles.txt"
		opt2 := "AliyunACSDefaultAccess"
		opt3 := "Custom"
		rolesDs, err := ram.GetRoles(ctx, &ram.GetRolesArgs{
			NameRegex:  &opt0,
			OutputFile: &opt1,
			PolicyName: &opt2,
			PolicyType: &opt3,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstRoleId", rolesDs.Roles[0].Id)
		return nil
	})
}

```

type GetRolesRole

type GetRolesRole struct {
	// Resource descriptor of the role.
	Arn string `pulumi:"arn"`
	// Authorization strategy of the role. This parameter is deprecated and replaced by `document`.
	AssumeRolePolicyDocument string `pulumi:"assumeRolePolicyDocument"`
	// Creation date of the role.
	CreateDate string `pulumi:"createDate"`
	// Description of the role.
	Description string `pulumi:"description"`
	// Authorization strategy of the role.
	Document string `pulumi:"document"`
	// Id of the role.
	Id string `pulumi:"id"`
	// Name of the role.
	Name string `pulumi:"name"`
	// Update date of the role.
	UpdateDate string `pulumi:"updateDate"`
}

type GetRolesRoleArgs

type GetRolesRoleArgs struct {
	// Resource descriptor of the role.
	Arn pulumi.StringInput `pulumi:"arn"`
	// Authorization strategy of the role. This parameter is deprecated and replaced by `document`.
	AssumeRolePolicyDocument pulumi.StringInput `pulumi:"assumeRolePolicyDocument"`
	// Creation date of the role.
	CreateDate pulumi.StringInput `pulumi:"createDate"`
	// Description of the role.
	Description pulumi.StringInput `pulumi:"description"`
	// Authorization strategy of the role.
	Document pulumi.StringInput `pulumi:"document"`
	// Id of the role.
	Id pulumi.StringInput `pulumi:"id"`
	// Name of the role.
	Name pulumi.StringInput `pulumi:"name"`
	// Update date of the role.
	UpdateDate pulumi.StringInput `pulumi:"updateDate"`
}

func (GetRolesRoleArgs) ElementType

func (GetRolesRoleArgs) ElementType() reflect.Type

func (GetRolesRoleArgs) ToGetRolesRoleOutput

func (i GetRolesRoleArgs) ToGetRolesRoleOutput() GetRolesRoleOutput

func (GetRolesRoleArgs) ToGetRolesRoleOutputWithContext

func (i GetRolesRoleArgs) ToGetRolesRoleOutputWithContext(ctx context.Context) GetRolesRoleOutput

type GetRolesRoleArray

type GetRolesRoleArray []GetRolesRoleInput

func (GetRolesRoleArray) ElementType

func (GetRolesRoleArray) ElementType() reflect.Type

func (GetRolesRoleArray) ToGetRolesRoleArrayOutput

func (i GetRolesRoleArray) ToGetRolesRoleArrayOutput() GetRolesRoleArrayOutput

func (GetRolesRoleArray) ToGetRolesRoleArrayOutputWithContext

func (i GetRolesRoleArray) ToGetRolesRoleArrayOutputWithContext(ctx context.Context) GetRolesRoleArrayOutput

type GetRolesRoleArrayInput

type GetRolesRoleArrayInput interface {
	pulumi.Input

	ToGetRolesRoleArrayOutput() GetRolesRoleArrayOutput
	ToGetRolesRoleArrayOutputWithContext(context.Context) GetRolesRoleArrayOutput
}

GetRolesRoleArrayInput is an input type that accepts GetRolesRoleArray and GetRolesRoleArrayOutput values. You can construct a concrete instance of `GetRolesRoleArrayInput` via:

GetRolesRoleArray{ GetRolesRoleArgs{...} }

type GetRolesRoleArrayOutput

type GetRolesRoleArrayOutput struct{ *pulumi.OutputState }

func (GetRolesRoleArrayOutput) ElementType

func (GetRolesRoleArrayOutput) ElementType() reflect.Type

func (GetRolesRoleArrayOutput) Index

func (GetRolesRoleArrayOutput) ToGetRolesRoleArrayOutput

func (o GetRolesRoleArrayOutput) ToGetRolesRoleArrayOutput() GetRolesRoleArrayOutput

func (GetRolesRoleArrayOutput) ToGetRolesRoleArrayOutputWithContext

func (o GetRolesRoleArrayOutput) ToGetRolesRoleArrayOutputWithContext(ctx context.Context) GetRolesRoleArrayOutput

type GetRolesRoleInput

type GetRolesRoleInput interface {
	pulumi.Input

	ToGetRolesRoleOutput() GetRolesRoleOutput
	ToGetRolesRoleOutputWithContext(context.Context) GetRolesRoleOutput
}

GetRolesRoleInput is an input type that accepts GetRolesRoleArgs and GetRolesRoleOutput values. You can construct a concrete instance of `GetRolesRoleInput` via:

GetRolesRoleArgs{...}

type GetRolesRoleOutput

type GetRolesRoleOutput struct{ *pulumi.OutputState }

func (GetRolesRoleOutput) Arn

Resource descriptor of the role.

func (GetRolesRoleOutput) AssumeRolePolicyDocument

func (o GetRolesRoleOutput) AssumeRolePolicyDocument() pulumi.StringOutput

Authorization strategy of the role. This parameter is deprecated and replaced by `document`.

func (GetRolesRoleOutput) CreateDate

func (o GetRolesRoleOutput) CreateDate() pulumi.StringOutput

Creation date of the role.

func (GetRolesRoleOutput) Description

func (o GetRolesRoleOutput) Description() pulumi.StringOutput

Description of the role.

func (GetRolesRoleOutput) Document

func (o GetRolesRoleOutput) Document() pulumi.StringOutput

Authorization strategy of the role.

func (GetRolesRoleOutput) ElementType

func (GetRolesRoleOutput) ElementType() reflect.Type

func (GetRolesRoleOutput) Id

Id of the role.

func (GetRolesRoleOutput) Name

Name of the role.

func (GetRolesRoleOutput) ToGetRolesRoleOutput

func (o GetRolesRoleOutput) ToGetRolesRoleOutput() GetRolesRoleOutput

func (GetRolesRoleOutput) ToGetRolesRoleOutputWithContext

func (o GetRolesRoleOutput) ToGetRolesRoleOutputWithContext(ctx context.Context) GetRolesRoleOutput

func (GetRolesRoleOutput) UpdateDate

func (o GetRolesRoleOutput) UpdateDate() pulumi.StringOutput

Update date of the role.

type GetUsersArgs

type GetUsersArgs struct {
	// Filter results by a specific group name. Returned users are in the specified group.
	GroupName *string `pulumi:"groupName"`
	// - A list of ram user IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter resulting users by their names.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
	// Filter results by a specific policy name. If you set this parameter without setting `policyType`, the later will be automatically set to `System`. Returned users are attached to the specified policy.
	PolicyName *string `pulumi:"policyName"`
	// Filter results by a specific policy type. Valid values are `Custom` and `System`. If you set this parameter, you must set `policyName` as well.
	PolicyType *string `pulumi:"policyType"`
}

A collection of arguments for invoking getUsers.

type GetUsersResult

type GetUsersResult struct {
	GroupName *string `pulumi:"groupName"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of ram user IDs.
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of ram user names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	PolicyName *string  `pulumi:"policyName"`
	PolicyType *string  `pulumi:"policyType"`
	// A list of users. Each element contains the following attributes:
	Users []GetUsersUser `pulumi:"users"`
}

A collection of values returned by getUsers.

func GetUsers

func GetUsers(ctx *pulumi.Context, args *GetUsersArgs, opts ...pulumi.InvokeOption) (*GetUsersResult, error)

This data source provides a list of RAM users in an Alibaba Cloud account according to the specified filters.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "group1"
		opt1 := "^user"
		opt2 := "users.txt"
		opt3 := "AliyunACSDefaultAccess"
		opt4 := "Custom"
		usersDs, err := ram.GetUsers(ctx, &ram.GetUsersArgs{
			GroupName:  &opt0,
			NameRegex:  &opt1,
			OutputFile: &opt2,
			PolicyName: &opt3,
			PolicyType: &opt4,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstUserId", usersDs.Users[0].Id)
		return nil
	})
}

```

type GetUsersUser

type GetUsersUser struct {
	// Creation date of the user.
	CreateDate string `pulumi:"createDate"`
	// The original id is user name, but it is user id in 1.37.0+.
	Id string `pulumi:"id"`
	// Last login date of the user. Removed from version 1.79.0.
	LastLoginDate string `pulumi:"lastLoginDate"`
	// Name of the user.
	Name string `pulumi:"name"`
}

type GetUsersUserArgs

type GetUsersUserArgs struct {
	// Creation date of the user.
	CreateDate pulumi.StringInput `pulumi:"createDate"`
	// The original id is user name, but it is user id in 1.37.0+.
	Id pulumi.StringInput `pulumi:"id"`
	// Last login date of the user. Removed from version 1.79.0.
	LastLoginDate pulumi.StringInput `pulumi:"lastLoginDate"`
	// Name of the user.
	Name pulumi.StringInput `pulumi:"name"`
}

func (GetUsersUserArgs) ElementType

func (GetUsersUserArgs) ElementType() reflect.Type

func (GetUsersUserArgs) ToGetUsersUserOutput

func (i GetUsersUserArgs) ToGetUsersUserOutput() GetUsersUserOutput

func (GetUsersUserArgs) ToGetUsersUserOutputWithContext

func (i GetUsersUserArgs) ToGetUsersUserOutputWithContext(ctx context.Context) GetUsersUserOutput

type GetUsersUserArray

type GetUsersUserArray []GetUsersUserInput

func (GetUsersUserArray) ElementType

func (GetUsersUserArray) ElementType() reflect.Type

func (GetUsersUserArray) ToGetUsersUserArrayOutput

func (i GetUsersUserArray) ToGetUsersUserArrayOutput() GetUsersUserArrayOutput

func (GetUsersUserArray) ToGetUsersUserArrayOutputWithContext

func (i GetUsersUserArray) ToGetUsersUserArrayOutputWithContext(ctx context.Context) GetUsersUserArrayOutput

type GetUsersUserArrayInput

type GetUsersUserArrayInput interface {
	pulumi.Input

	ToGetUsersUserArrayOutput() GetUsersUserArrayOutput
	ToGetUsersUserArrayOutputWithContext(context.Context) GetUsersUserArrayOutput
}

GetUsersUserArrayInput is an input type that accepts GetUsersUserArray and GetUsersUserArrayOutput values. You can construct a concrete instance of `GetUsersUserArrayInput` via:

GetUsersUserArray{ GetUsersUserArgs{...} }

type GetUsersUserArrayOutput

type GetUsersUserArrayOutput struct{ *pulumi.OutputState }

func (GetUsersUserArrayOutput) ElementType

func (GetUsersUserArrayOutput) ElementType() reflect.Type

func (GetUsersUserArrayOutput) Index

func (GetUsersUserArrayOutput) ToGetUsersUserArrayOutput

func (o GetUsersUserArrayOutput) ToGetUsersUserArrayOutput() GetUsersUserArrayOutput

func (GetUsersUserArrayOutput) ToGetUsersUserArrayOutputWithContext

func (o GetUsersUserArrayOutput) ToGetUsersUserArrayOutputWithContext(ctx context.Context) GetUsersUserArrayOutput

type GetUsersUserInput

type GetUsersUserInput interface {
	pulumi.Input

	ToGetUsersUserOutput() GetUsersUserOutput
	ToGetUsersUserOutputWithContext(context.Context) GetUsersUserOutput
}

GetUsersUserInput is an input type that accepts GetUsersUserArgs and GetUsersUserOutput values. You can construct a concrete instance of `GetUsersUserInput` via:

GetUsersUserArgs{...}

type GetUsersUserOutput

type GetUsersUserOutput struct{ *pulumi.OutputState }

func (GetUsersUserOutput) CreateDate

func (o GetUsersUserOutput) CreateDate() pulumi.StringOutput

Creation date of the user.

func (GetUsersUserOutput) ElementType

func (GetUsersUserOutput) ElementType() reflect.Type

func (GetUsersUserOutput) Id

The original id is user name, but it is user id in 1.37.0+.

func (GetUsersUserOutput) LastLoginDate

func (o GetUsersUserOutput) LastLoginDate() pulumi.StringOutput

Last login date of the user. Removed from version 1.79.0.

func (GetUsersUserOutput) Name

Name of the user.

func (GetUsersUserOutput) ToGetUsersUserOutput

func (o GetUsersUserOutput) ToGetUsersUserOutput() GetUsersUserOutput

func (GetUsersUserOutput) ToGetUsersUserOutputWithContext

func (o GetUsersUserOutput) ToGetUsersUserOutputWithContext(ctx context.Context) GetUsersUserOutput

type Group

type Group struct {
	pulumi.CustomResourceState

	// Comment of the RAM group. This parameter can have a string of 1 to 128 characters.
	Comments pulumi.StringPtrOutput `pulumi:"comments"`
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// Name of the RAM group. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	Name pulumi.StringOutput `pulumi:"name"`
}

## Import

RAM group can be imported using the id or name, e.g.

```sh

$ pulumi import alicloud:ram/group:Group example my-group

```

func GetGroup

func GetGroup(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error)

GetGroup gets an existing Group resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewGroup

func NewGroup(ctx *pulumi.Context,
	name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error)

NewGroup registers a new resource with the given unique name, arguments, and options.

func (Group) ElementType added in v2.25.1

func (Group) ElementType() reflect.Type

func (Group) ToGroupOutput added in v2.25.1

func (i Group) ToGroupOutput() GroupOutput

func (Group) ToGroupOutputWithContext added in v2.25.1

func (i Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput

type GroupArgs

type GroupArgs struct {
	// Comment of the RAM group. This parameter can have a string of 1 to 128 characters.
	Comments pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// Name of the RAM group. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	Name pulumi.StringPtrInput
}

The set of arguments for constructing a Group resource.

func (GroupArgs) ElementType

func (GroupArgs) ElementType() reflect.Type

type GroupInput added in v2.25.1

type GroupInput interface {
	pulumi.Input

	ToGroupOutput() GroupOutput
	ToGroupOutputWithContext(ctx context.Context) GroupOutput
}

type GroupMembership

type GroupMembership struct {
	pulumi.CustomResourceState

	// Name of the RAM group. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	GroupName pulumi.StringOutput `pulumi:"groupName"`
	// Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserNames pulumi.StringArrayOutput `pulumi:"userNames"`
}

Provides a RAM Group membership resource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		group, err := ram.NewGroup(ctx, "group", &ram.GroupArgs{
			Comments: pulumi.String("this is a group comments."),
			Force:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			DisplayName: pulumi.String("user_display_name"),
			Mobile:      pulumi.String("86-18688888888"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		user1, err := ram.NewUser(ctx, "user1", &ram.UserArgs{
			DisplayName: pulumi.String("user_display_name1"),
			Mobile:      pulumi.String("86-18688888889"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewGroupMembership(ctx, "membership", &ram.GroupMembershipArgs{
			GroupName: group.Name,
			UserNames: pulumi.StringArray{
				user.Name,
				user1.Name,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

RAM Group membership can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ram/groupMembership:GroupMembership example my-group

```

func GetGroupMembership

func GetGroupMembership(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *GroupMembershipState, opts ...pulumi.ResourceOption) (*GroupMembership, error)

GetGroupMembership gets an existing GroupMembership resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewGroupMembership

func NewGroupMembership(ctx *pulumi.Context,
	name string, args *GroupMembershipArgs, opts ...pulumi.ResourceOption) (*GroupMembership, error)

NewGroupMembership registers a new resource with the given unique name, arguments, and options.

func (GroupMembership) ElementType added in v2.25.1

func (GroupMembership) ElementType() reflect.Type

func (GroupMembership) ToGroupMembershipOutput added in v2.25.1

func (i GroupMembership) ToGroupMembershipOutput() GroupMembershipOutput

func (GroupMembership) ToGroupMembershipOutputWithContext added in v2.25.1

func (i GroupMembership) ToGroupMembershipOutputWithContext(ctx context.Context) GroupMembershipOutput

type GroupMembershipArgs

type GroupMembershipArgs struct {
	// Name of the RAM group. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	GroupName pulumi.StringInput
	// Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserNames pulumi.StringArrayInput
}

The set of arguments for constructing a GroupMembership resource.

func (GroupMembershipArgs) ElementType

func (GroupMembershipArgs) ElementType() reflect.Type

type GroupMembershipInput added in v2.25.1

type GroupMembershipInput interface {
	pulumi.Input

	ToGroupMembershipOutput() GroupMembershipOutput
	ToGroupMembershipOutputWithContext(ctx context.Context) GroupMembershipOutput
}

type GroupMembershipOutput added in v2.25.1

type GroupMembershipOutput struct {
	*pulumi.OutputState
}

func (GroupMembershipOutput) ElementType added in v2.25.1

func (GroupMembershipOutput) ElementType() reflect.Type

func (GroupMembershipOutput) ToGroupMembershipOutput added in v2.25.1

func (o GroupMembershipOutput) ToGroupMembershipOutput() GroupMembershipOutput

func (GroupMembershipOutput) ToGroupMembershipOutputWithContext added in v2.25.1

func (o GroupMembershipOutput) ToGroupMembershipOutputWithContext(ctx context.Context) GroupMembershipOutput

type GroupMembershipState

type GroupMembershipState struct {
	// Name of the RAM group. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	GroupName pulumi.StringPtrInput
	// Set of user name which will be added to group. Each name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserNames pulumi.StringArrayInput
}

func (GroupMembershipState) ElementType

func (GroupMembershipState) ElementType() reflect.Type

type GroupOutput added in v2.25.1

type GroupOutput struct {
	*pulumi.OutputState
}

func (GroupOutput) ElementType added in v2.25.1

func (GroupOutput) ElementType() reflect.Type

func (GroupOutput) ToGroupOutput added in v2.25.1

func (o GroupOutput) ToGroupOutput() GroupOutput

func (GroupOutput) ToGroupOutputWithContext added in v2.25.1

func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput

type GroupPolicyAttachment

type GroupPolicyAttachment struct {
	pulumi.CustomResourceState

	// Name of the RAM group. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	GroupName pulumi.StringOutput `pulumi:"groupName"`
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringOutput `pulumi:"policyName"`
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringOutput `pulumi:"policyType"`
}

Provides a RAM Group Policy attachment resource.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		group, err := ram.NewGroup(ctx, "group", &ram.GroupArgs{
			Comments: pulumi.String("this is a group comments."),
			Force:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		policy, err := ram.NewPolicy(ctx, "policy", &ram.PolicyArgs{
			Document:    pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "    {\n", "      \"Statement\": [\n", "        {\n", "          \"Action\": [\n", "            \"oss:ListObjects\",\n", "            \"oss:GetObject\"\n", "          ],\n", "          \"Effect\": \"Allow\",\n", "          \"Resource\": [\n", "            \"acs:oss:*:*:mybucket\",\n", "            \"acs:oss:*:*:mybucket/*\"\n", "          ]\n", "        }\n", "      ],\n", "        \"Version\": \"1\"\n", "    }\n")),
			Description: pulumi.String("this is a policy test"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewGroupPolicyAttachment(ctx, "attach", &ram.GroupPolicyAttachmentArgs{
			PolicyName: policy.Name,
			PolicyType: policy.Type,
			GroupName:  group.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

RAM Group Policy attachment can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ram/groupPolicyAttachment:GroupPolicyAttachment example group:my-policy:Custom:my-group

```

func GetGroupPolicyAttachment

func GetGroupPolicyAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *GroupPolicyAttachmentState, opts ...pulumi.ResourceOption) (*GroupPolicyAttachment, error)

GetGroupPolicyAttachment gets an existing GroupPolicyAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewGroupPolicyAttachment

func NewGroupPolicyAttachment(ctx *pulumi.Context,
	name string, args *GroupPolicyAttachmentArgs, opts ...pulumi.ResourceOption) (*GroupPolicyAttachment, error)

NewGroupPolicyAttachment registers a new resource with the given unique name, arguments, and options.

func (GroupPolicyAttachment) ElementType added in v2.25.1

func (GroupPolicyAttachment) ElementType() reflect.Type

func (GroupPolicyAttachment) ToGroupPolicyAttachmentOutput added in v2.25.1

func (i GroupPolicyAttachment) ToGroupPolicyAttachmentOutput() GroupPolicyAttachmentOutput

func (GroupPolicyAttachment) ToGroupPolicyAttachmentOutputWithContext added in v2.25.1

func (i GroupPolicyAttachment) ToGroupPolicyAttachmentOutputWithContext(ctx context.Context) GroupPolicyAttachmentOutput

type GroupPolicyAttachmentArgs

type GroupPolicyAttachmentArgs struct {
	// Name of the RAM group. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	GroupName pulumi.StringInput
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringInput
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringInput
}

The set of arguments for constructing a GroupPolicyAttachment resource.

func (GroupPolicyAttachmentArgs) ElementType

func (GroupPolicyAttachmentArgs) ElementType() reflect.Type

type GroupPolicyAttachmentInput added in v2.25.1

type GroupPolicyAttachmentInput interface {
	pulumi.Input

	ToGroupPolicyAttachmentOutput() GroupPolicyAttachmentOutput
	ToGroupPolicyAttachmentOutputWithContext(ctx context.Context) GroupPolicyAttachmentOutput
}

type GroupPolicyAttachmentOutput added in v2.25.1

type GroupPolicyAttachmentOutput struct {
	*pulumi.OutputState
}

func (GroupPolicyAttachmentOutput) ElementType added in v2.25.1

func (GroupPolicyAttachmentOutput) ToGroupPolicyAttachmentOutput added in v2.25.1

func (o GroupPolicyAttachmentOutput) ToGroupPolicyAttachmentOutput() GroupPolicyAttachmentOutput

func (GroupPolicyAttachmentOutput) ToGroupPolicyAttachmentOutputWithContext added in v2.25.1

func (o GroupPolicyAttachmentOutput) ToGroupPolicyAttachmentOutputWithContext(ctx context.Context) GroupPolicyAttachmentOutput

type GroupPolicyAttachmentState

type GroupPolicyAttachmentState struct {
	// Name of the RAM group. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	GroupName pulumi.StringPtrInput
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringPtrInput
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringPtrInput
}

func (GroupPolicyAttachmentState) ElementType

func (GroupPolicyAttachmentState) ElementType() reflect.Type

type GroupState

type GroupState struct {
	// Comment of the RAM group. This parameter can have a string of 1 to 128 characters.
	Comments pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// Name of the RAM group. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	Name pulumi.StringPtrInput
}

func (GroupState) ElementType

func (GroupState) ElementType() reflect.Type

type LoginProfile

type LoginProfile struct {
	pulumi.CustomResourceState

	// This parameter indicates whether the MFA needs to be bind when the user first logs in. Default value is `false`.
	MfaBindRequired pulumi.BoolPtrOutput `pulumi:"mfaBindRequired"`
	// Password of the RAM user.
	Password pulumi.StringOutput `pulumi:"password"`
	// This parameter indicates whether the password needs to be reset when the user first logs in. Default value is `false`.
	PasswordResetRequired pulumi.BoolPtrOutput `pulumi:"passwordResetRequired"`
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringOutput `pulumi:"userName"`
}

Provides a RAM User Login Profile resource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			DisplayName: pulumi.String("user_display_name"),
			Mobile:      pulumi.String("86-18688888888"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewLoginProfile(ctx, "profile", &ram.LoginProfileArgs{
			UserName: user.Name,
			Password: pulumi.String("Yourpassword1234"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

RAM login profile can be imported using the id or user name, e.g.

```sh

$ pulumi import alicloud:ram/loginProfile:LoginProfile example my-login

```

func GetLoginProfile

func GetLoginProfile(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LoginProfileState, opts ...pulumi.ResourceOption) (*LoginProfile, error)

GetLoginProfile gets an existing LoginProfile resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewLoginProfile

func NewLoginProfile(ctx *pulumi.Context,
	name string, args *LoginProfileArgs, opts ...pulumi.ResourceOption) (*LoginProfile, error)

NewLoginProfile registers a new resource with the given unique name, arguments, and options.

func (LoginProfile) ElementType added in v2.25.1

func (LoginProfile) ElementType() reflect.Type

func (LoginProfile) ToLoginProfileOutput added in v2.25.1

func (i LoginProfile) ToLoginProfileOutput() LoginProfileOutput

func (LoginProfile) ToLoginProfileOutputWithContext added in v2.25.1

func (i LoginProfile) ToLoginProfileOutputWithContext(ctx context.Context) LoginProfileOutput

type LoginProfileArgs

type LoginProfileArgs struct {
	// This parameter indicates whether the MFA needs to be bind when the user first logs in. Default value is `false`.
	MfaBindRequired pulumi.BoolPtrInput
	// Password of the RAM user.
	Password pulumi.StringInput
	// This parameter indicates whether the password needs to be reset when the user first logs in. Default value is `false`.
	PasswordResetRequired pulumi.BoolPtrInput
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringInput
}

The set of arguments for constructing a LoginProfile resource.

func (LoginProfileArgs) ElementType

func (LoginProfileArgs) ElementType() reflect.Type

type LoginProfileInput added in v2.25.1

type LoginProfileInput interface {
	pulumi.Input

	ToLoginProfileOutput() LoginProfileOutput
	ToLoginProfileOutputWithContext(ctx context.Context) LoginProfileOutput
}

type LoginProfileOutput added in v2.25.1

type LoginProfileOutput struct {
	*pulumi.OutputState
}

func (LoginProfileOutput) ElementType added in v2.25.1

func (LoginProfileOutput) ElementType() reflect.Type

func (LoginProfileOutput) ToLoginProfileOutput added in v2.25.1

func (o LoginProfileOutput) ToLoginProfileOutput() LoginProfileOutput

func (LoginProfileOutput) ToLoginProfileOutputWithContext added in v2.25.1

func (o LoginProfileOutput) ToLoginProfileOutputWithContext(ctx context.Context) LoginProfileOutput

type LoginProfileState

type LoginProfileState struct {
	// This parameter indicates whether the MFA needs to be bind when the user first logs in. Default value is `false`.
	MfaBindRequired pulumi.BoolPtrInput
	// Password of the RAM user.
	Password pulumi.StringPtrInput
	// This parameter indicates whether the password needs to be reset when the user first logs in. Default value is `false`.
	PasswordResetRequired pulumi.BoolPtrInput
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringPtrInput
}

func (LoginProfileState) ElementType

func (LoginProfileState) ElementType() reflect.Type

type LookupAccountAliasArgs

type LookupAccountAliasArgs struct {
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getAccountAlias.

type LookupAccountAliasResult

type LookupAccountAliasResult struct {
	AccountAlias string `pulumi:"accountAlias"`
	// The provider-assigned unique ID for this managed resource.
	Id         string  `pulumi:"id"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of values returned by getAccountAlias.

type Policy

type Policy struct {
	pulumi.CustomResourceState

	// The policy attachment count.
	AttachmentCount pulumi.IntOutput `pulumi:"attachmentCount"`
	// Description of the RAM policy. This name can have a string of 1 to 1024 characters.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Document of the RAM policy. It is required when the `statement` is not specified.
	Document pulumi.StringOutput `pulumi:"document"`
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	Name pulumi.StringOutput `pulumi:"name"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Statements of the RAM policy document. It is required when the `document` is not specified.
	//
	// Deprecated: Field 'statement' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Statements PolicyStatementArrayOutput `pulumi:"statements"`
	// The policy type.
	Type pulumi.StringOutput `pulumi:"type"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Version of the RAM policy document. Valid value is `1`. Default value is `1`.
	//
	// Deprecated: Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Version pulumi.StringPtrOutput `pulumi:"version"`
}

## Import

RAM policy can be imported using the id or name, e.g.

```sh

$ pulumi import alicloud:ram/policy:Policy example my-policy

```

func GetPolicy

func GetPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *PolicyState, opts ...pulumi.ResourceOption) (*Policy, error)

GetPolicy gets an existing Policy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewPolicy

func NewPolicy(ctx *pulumi.Context,
	name string, args *PolicyArgs, opts ...pulumi.ResourceOption) (*Policy, error)

NewPolicy registers a new resource with the given unique name, arguments, and options.

func (Policy) ElementType added in v2.25.1

func (Policy) ElementType() reflect.Type

func (Policy) ToPolicyOutput added in v2.25.1

func (i Policy) ToPolicyOutput() PolicyOutput

func (Policy) ToPolicyOutputWithContext added in v2.25.1

func (i Policy) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput

type PolicyArgs

type PolicyArgs struct {
	// Description of the RAM policy. This name can have a string of 1 to 1024 characters.
	Description pulumi.StringPtrInput
	// Document of the RAM policy. It is required when the `statement` is not specified.
	Document pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	Name pulumi.StringPtrInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Statements of the RAM policy document. It is required when the `document` is not specified.
	//
	// Deprecated: Field 'statement' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Statements PolicyStatementArrayInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Version of the RAM policy document. Valid value is `1`. Default value is `1`.
	//
	// Deprecated: Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Version pulumi.StringPtrInput
}

The set of arguments for constructing a Policy resource.

func (PolicyArgs) ElementType

func (PolicyArgs) ElementType() reflect.Type

type PolicyInput added in v2.25.1

type PolicyInput interface {
	pulumi.Input

	ToPolicyOutput() PolicyOutput
	ToPolicyOutputWithContext(ctx context.Context) PolicyOutput
}

type PolicyOutput added in v2.25.1

type PolicyOutput struct {
	*pulumi.OutputState
}

func (PolicyOutput) ElementType added in v2.25.1

func (PolicyOutput) ElementType() reflect.Type

func (PolicyOutput) ToPolicyOutput added in v2.25.1

func (o PolicyOutput) ToPolicyOutput() PolicyOutput

func (PolicyOutput) ToPolicyOutputWithContext added in v2.25.1

func (o PolicyOutput) ToPolicyOutputWithContext(ctx context.Context) PolicyOutput

type PolicyState

type PolicyState struct {
	// The policy attachment count.
	AttachmentCount pulumi.IntPtrInput
	// Description of the RAM policy. This name can have a string of 1 to 1024 characters.
	Description pulumi.StringPtrInput
	// Document of the RAM policy. It is required when the `statement` is not specified.
	Document pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	Name pulumi.StringPtrInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Statements of the RAM policy document. It is required when the `document` is not specified.
	//
	// Deprecated: Field 'statement' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Statements PolicyStatementArrayInput
	// The policy type.
	Type pulumi.StringPtrInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Version of the RAM policy document. Valid value is `1`. Default value is `1`.
	//
	// Deprecated: Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Version pulumi.StringPtrInput
}

func (PolicyState) ElementType

func (PolicyState) ElementType() reflect.Type

type PolicyStatement

type PolicyStatement struct {
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of operations for the `resource`. The format of each item in this list is `${service}:${action_name}`, such as `oss:ListBuckets` and `ecs:Describe*`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${action_name}` refers to the name of an api interface which related to the `${service}`.
	Actions []string `pulumi:"actions"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`.
	Effect string `pulumi:"effect"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of specific objects which will be authorized. The format of each item in this list is `acs:${service}:${region}:${account_id}:${relative_id}`, such as `acs:ecs:*:*:instance/inst-002` and `acs:oss:*:1234567890000:mybucket`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${region}` is the region info which can use `*` replace when it is not supplied, the `${account_id}` refers to someone's Alicloud account id or you can use `*` to replace, the `${relative_id}` is the resource description section which related to the `${service}`.
	Resources []string `pulumi:"resources"`
}

type PolicyStatementArgs

type PolicyStatementArgs struct {
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of operations for the `resource`. The format of each item in this list is `${service}:${action_name}`, such as `oss:ListBuckets` and `ecs:Describe*`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${action_name}` refers to the name of an api interface which related to the `${service}`.
	Actions pulumi.StringArrayInput `pulumi:"actions"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`.
	Effect pulumi.StringInput `pulumi:"effect"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of specific objects which will be authorized. The format of each item in this list is `acs:${service}:${region}:${account_id}:${relative_id}`, such as `acs:ecs:*:*:instance/inst-002` and `acs:oss:*:1234567890000:mybucket`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${region}` is the region info which can use `*` replace when it is not supplied, the `${account_id}` refers to someone's Alicloud account id or you can use `*` to replace, the `${relative_id}` is the resource description section which related to the `${service}`.
	Resources pulumi.StringArrayInput `pulumi:"resources"`
}

func (PolicyStatementArgs) ElementType

func (PolicyStatementArgs) ElementType() reflect.Type

func (PolicyStatementArgs) ToPolicyStatementOutput

func (i PolicyStatementArgs) ToPolicyStatementOutput() PolicyStatementOutput

func (PolicyStatementArgs) ToPolicyStatementOutputWithContext

func (i PolicyStatementArgs) ToPolicyStatementOutputWithContext(ctx context.Context) PolicyStatementOutput

type PolicyStatementArray

type PolicyStatementArray []PolicyStatementInput

func (PolicyStatementArray) ElementType

func (PolicyStatementArray) ElementType() reflect.Type

func (PolicyStatementArray) ToPolicyStatementArrayOutput

func (i PolicyStatementArray) ToPolicyStatementArrayOutput() PolicyStatementArrayOutput

func (PolicyStatementArray) ToPolicyStatementArrayOutputWithContext

func (i PolicyStatementArray) ToPolicyStatementArrayOutputWithContext(ctx context.Context) PolicyStatementArrayOutput

type PolicyStatementArrayInput

type PolicyStatementArrayInput interface {
	pulumi.Input

	ToPolicyStatementArrayOutput() PolicyStatementArrayOutput
	ToPolicyStatementArrayOutputWithContext(context.Context) PolicyStatementArrayOutput
}

PolicyStatementArrayInput is an input type that accepts PolicyStatementArray and PolicyStatementArrayOutput values. You can construct a concrete instance of `PolicyStatementArrayInput` via:

PolicyStatementArray{ PolicyStatementArgs{...} }

type PolicyStatementArrayOutput

type PolicyStatementArrayOutput struct{ *pulumi.OutputState }

func (PolicyStatementArrayOutput) ElementType

func (PolicyStatementArrayOutput) ElementType() reflect.Type

func (PolicyStatementArrayOutput) Index

func (PolicyStatementArrayOutput) ToPolicyStatementArrayOutput

func (o PolicyStatementArrayOutput) ToPolicyStatementArrayOutput() PolicyStatementArrayOutput

func (PolicyStatementArrayOutput) ToPolicyStatementArrayOutputWithContext

func (o PolicyStatementArrayOutput) ToPolicyStatementArrayOutputWithContext(ctx context.Context) PolicyStatementArrayOutput

type PolicyStatementInput

type PolicyStatementInput interface {
	pulumi.Input

	ToPolicyStatementOutput() PolicyStatementOutput
	ToPolicyStatementOutputWithContext(context.Context) PolicyStatementOutput
}

PolicyStatementInput is an input type that accepts PolicyStatementArgs and PolicyStatementOutput values. You can construct a concrete instance of `PolicyStatementInput` via:

PolicyStatementArgs{...}

type PolicyStatementOutput

type PolicyStatementOutput struct{ *pulumi.OutputState }

func (PolicyStatementOutput) Actions

(It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of operations for the `resource`. The format of each item in this list is `${service}:${action_name}`, such as `oss:ListBuckets` and `ecs:Describe*`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${action_name}` refers to the name of an api interface which related to the `${service}`.

func (PolicyStatementOutput) Effect

(It has been deprecated from version 1.49.0, and use field 'document' to replace.) This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`.

func (PolicyStatementOutput) ElementType

func (PolicyStatementOutput) ElementType() reflect.Type

func (PolicyStatementOutput) Resources

(It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of specific objects which will be authorized. The format of each item in this list is `acs:${service}:${region}:${account_id}:${relative_id}`, such as `acs:ecs:*:*:instance/inst-002` and `acs:oss:*:1234567890000:mybucket`. The `${service}` can be `ecs`, `oss`, `ots` and so on, the `${region}` is the region info which can use `*` replace when it is not supplied, the `${account_id}` refers to someone's Alicloud account id or you can use `*` to replace, the `${relative_id}` is the resource description section which related to the `${service}`.

func (PolicyStatementOutput) ToPolicyStatementOutput

func (o PolicyStatementOutput) ToPolicyStatementOutput() PolicyStatementOutput

func (PolicyStatementOutput) ToPolicyStatementOutputWithContext

func (o PolicyStatementOutput) ToPolicyStatementOutputWithContext(ctx context.Context) PolicyStatementOutput

type Role

type Role struct {
	pulumi.CustomResourceState

	// The role arn.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Description of the RAM role. This name can have a string of 1 to 1024 characters.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Authorization strategy of the RAM role. It is required when the `services` and `ramUsers` are not specified.
	Document pulumi.StringOutput `pulumi:"document"`
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// The maximum session duration of the RAM role. Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. The default value is used if the parameter is not specified.
	MaxSessionDuration pulumi.IntPtrOutput `pulumi:"maxSessionDuration"`
	// Name of the RAM role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	Name pulumi.StringOutput `pulumi:"name"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of ram users who can assume the RAM role. The format of each item in this list is `acs:ram::${account_id}:root` or `acs:ram::${account_id}:user/${user_name}`, such as `acs:ram::1234567890000:root` and `acs:ram::1234567890001:user/Mary`. The `${user_name}` is the name of a RAM user which must exists in the Alicloud account indicated by the `${account_id}`.
	//
	// Deprecated: Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.
	RamUsers pulumi.StringArrayOutput `pulumi:"ramUsers"`
	// The role ID.
	RoleId pulumi.StringOutput `pulumi:"roleId"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of services which can assume the RAM role. The format of each item in this list is `${service}.aliyuncs.com` or `${account_id}@${service}.aliyuncs.com`, such as `ecs.aliyuncs.com` and `1234567890000@ots.aliyuncs.com`. The `${service}` can be `ecs`, `log`, `apigateway` and so on, the `${account_id}` refers to someone's Alicloud account id.
	//
	// Deprecated: Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Services pulumi.StringArrayOutput `pulumi:"services"`
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Version of the RAM role policy document. Valid value is `1`. Default value is `1`.
	//
	// Deprecated: Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Version pulumi.StringPtrOutput `pulumi:"version"`
}

## Import

RAM role can be imported using the id or name, e.g.

```sh

$ pulumi import alicloud:ram/role:Role example my-role

```

func GetRole

func GetRole(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RoleState, opts ...pulumi.ResourceOption) (*Role, error)

GetRole gets an existing Role resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewRole

func NewRole(ctx *pulumi.Context,
	name string, args *RoleArgs, opts ...pulumi.ResourceOption) (*Role, error)

NewRole registers a new resource with the given unique name, arguments, and options.

func (Role) ElementType added in v2.25.1

func (Role) ElementType() reflect.Type

func (Role) ToRoleOutput added in v2.25.1

func (i Role) ToRoleOutput() RoleOutput

func (Role) ToRoleOutputWithContext added in v2.25.1

func (i Role) ToRoleOutputWithContext(ctx context.Context) RoleOutput

type RoleArgs

type RoleArgs struct {
	// Description of the RAM role. This name can have a string of 1 to 1024 characters.
	Description pulumi.StringPtrInput
	// Authorization strategy of the RAM role. It is required when the `services` and `ramUsers` are not specified.
	Document pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// The maximum session duration of the RAM role. Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. The default value is used if the parameter is not specified.
	MaxSessionDuration pulumi.IntPtrInput
	// Name of the RAM role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	Name pulumi.StringPtrInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of ram users who can assume the RAM role. The format of each item in this list is `acs:ram::${account_id}:root` or `acs:ram::${account_id}:user/${user_name}`, such as `acs:ram::1234567890000:root` and `acs:ram::1234567890001:user/Mary`. The `${user_name}` is the name of a RAM user which must exists in the Alicloud account indicated by the `${account_id}`.
	//
	// Deprecated: Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.
	RamUsers pulumi.StringArrayInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of services which can assume the RAM role. The format of each item in this list is `${service}.aliyuncs.com` or `${account_id}@${service}.aliyuncs.com`, such as `ecs.aliyuncs.com` and `1234567890000@ots.aliyuncs.com`. The `${service}` can be `ecs`, `log`, `apigateway` and so on, the `${account_id}` refers to someone's Alicloud account id.
	//
	// Deprecated: Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Services pulumi.StringArrayInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Version of the RAM role policy document. Valid value is `1`. Default value is `1`.
	//
	// Deprecated: Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Version pulumi.StringPtrInput
}

The set of arguments for constructing a Role resource.

func (RoleArgs) ElementType

func (RoleArgs) ElementType() reflect.Type

type RoleAttachment

type RoleAttachment struct {
	pulumi.CustomResourceState

	// The list of ECS instance's IDs.
	InstanceIds pulumi.StringArrayOutput `pulumi:"instanceIds"`
	// The name of role used to bind. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	RoleName pulumi.StringOutput `pulumi:"roleName"`
}

Provides a RAM role attachment resource to bind role for several ECS instances.

func GetRoleAttachment

func GetRoleAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RoleAttachmentState, opts ...pulumi.ResourceOption) (*RoleAttachment, error)

GetRoleAttachment gets an existing RoleAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewRoleAttachment

func NewRoleAttachment(ctx *pulumi.Context,
	name string, args *RoleAttachmentArgs, opts ...pulumi.ResourceOption) (*RoleAttachment, error)

NewRoleAttachment registers a new resource with the given unique name, arguments, and options.

func (RoleAttachment) ElementType added in v2.25.1

func (RoleAttachment) ElementType() reflect.Type

func (RoleAttachment) ToRoleAttachmentOutput added in v2.25.1

func (i RoleAttachment) ToRoleAttachmentOutput() RoleAttachmentOutput

func (RoleAttachment) ToRoleAttachmentOutputWithContext added in v2.25.1

func (i RoleAttachment) ToRoleAttachmentOutputWithContext(ctx context.Context) RoleAttachmentOutput

type RoleAttachmentArgs

type RoleAttachmentArgs struct {
	// The list of ECS instance's IDs.
	InstanceIds pulumi.StringArrayInput
	// The name of role used to bind. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	RoleName pulumi.StringInput
}

The set of arguments for constructing a RoleAttachment resource.

func (RoleAttachmentArgs) ElementType

func (RoleAttachmentArgs) ElementType() reflect.Type

type RoleAttachmentInput added in v2.25.1

type RoleAttachmentInput interface {
	pulumi.Input

	ToRoleAttachmentOutput() RoleAttachmentOutput
	ToRoleAttachmentOutputWithContext(ctx context.Context) RoleAttachmentOutput
}

type RoleAttachmentOutput added in v2.25.1

type RoleAttachmentOutput struct {
	*pulumi.OutputState
}

func (RoleAttachmentOutput) ElementType added in v2.25.1

func (RoleAttachmentOutput) ElementType() reflect.Type

func (RoleAttachmentOutput) ToRoleAttachmentOutput added in v2.25.1

func (o RoleAttachmentOutput) ToRoleAttachmentOutput() RoleAttachmentOutput

func (RoleAttachmentOutput) ToRoleAttachmentOutputWithContext added in v2.25.1

func (o RoleAttachmentOutput) ToRoleAttachmentOutputWithContext(ctx context.Context) RoleAttachmentOutput

type RoleAttachmentState

type RoleAttachmentState struct {
	// The list of ECS instance's IDs.
	InstanceIds pulumi.StringArrayInput
	// The name of role used to bind. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	RoleName pulumi.StringPtrInput
}

func (RoleAttachmentState) ElementType

func (RoleAttachmentState) ElementType() reflect.Type

type RoleInput added in v2.25.1

type RoleInput interface {
	pulumi.Input

	ToRoleOutput() RoleOutput
	ToRoleOutputWithContext(ctx context.Context) RoleOutput
}

type RoleOutput added in v2.25.1

type RoleOutput struct {
	*pulumi.OutputState
}

func (RoleOutput) ElementType added in v2.25.1

func (RoleOutput) ElementType() reflect.Type

func (RoleOutput) ToRoleOutput added in v2.25.1

func (o RoleOutput) ToRoleOutput() RoleOutput

func (RoleOutput) ToRoleOutputWithContext added in v2.25.1

func (o RoleOutput) ToRoleOutputWithContext(ctx context.Context) RoleOutput

type RolePolicyAttachment

type RolePolicyAttachment struct {
	pulumi.CustomResourceState

	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringOutput `pulumi:"policyName"`
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringOutput `pulumi:"policyType"`
	// Name of the RAM Role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	RoleName pulumi.StringOutput `pulumi:"roleName"`
}

Provides a RAM Role attachment resource.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		role, err := ram.NewRole(ctx, "role", &ram.RoleArgs{
			Document:    pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "    {\n", "      \"Statement\": [\n", "        {\n", "          \"Action\": \"sts:AssumeRole\",\n", "          \"Effect\": \"Allow\",\n", "          \"Principal\": {\n", "            \"Service\": [\n", "              \"apigateway.aliyuncs.com\", \n", "              \"ecs.aliyuncs.com\"\n", "            ]\n", "          }\n", "        }\n", "      ],\n", "      \"Version\": \"1\"\n", "    }\n")),
			Description: pulumi.String("this is a role test."),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		policy, err := ram.NewPolicy(ctx, "policy", &ram.PolicyArgs{
			Document:    pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "  {\n", "    \"Statement\": [\n", "      {\n", "        \"Action\": [\n", "          \"oss:ListObjects\",\n", "          \"oss:GetObject\"\n", "        ],\n", "        \"Effect\": \"Allow\",\n", "        \"Resource\": [\n", "          \"acs:oss:*:*:mybucket\",\n", "          \"acs:oss:*:*:mybucket/*\"\n", "        ]\n", "      }\n", "    ],\n", "      \"Version\": \"1\"\n", "  }\n")),
			Description: pulumi.String("this is a policy test"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewRolePolicyAttachment(ctx, "attach", &ram.RolePolicyAttachmentArgs{
			PolicyName: policy.Name,
			PolicyType: policy.Type,
			RoleName:   role.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

RAM Role Policy attachment can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ram/rolePolicyAttachment:RolePolicyAttachment example role:my-policy:Custom:my-role

```

func GetRolePolicyAttachment

func GetRolePolicyAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RolePolicyAttachmentState, opts ...pulumi.ResourceOption) (*RolePolicyAttachment, error)

GetRolePolicyAttachment gets an existing RolePolicyAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewRolePolicyAttachment

func NewRolePolicyAttachment(ctx *pulumi.Context,
	name string, args *RolePolicyAttachmentArgs, opts ...pulumi.ResourceOption) (*RolePolicyAttachment, error)

NewRolePolicyAttachment registers a new resource with the given unique name, arguments, and options.

func (RolePolicyAttachment) ElementType added in v2.25.1

func (RolePolicyAttachment) ElementType() reflect.Type

func (RolePolicyAttachment) ToRolePolicyAttachmentOutput added in v2.25.1

func (i RolePolicyAttachment) ToRolePolicyAttachmentOutput() RolePolicyAttachmentOutput

func (RolePolicyAttachment) ToRolePolicyAttachmentOutputWithContext added in v2.25.1

func (i RolePolicyAttachment) ToRolePolicyAttachmentOutputWithContext(ctx context.Context) RolePolicyAttachmentOutput

type RolePolicyAttachmentArgs

type RolePolicyAttachmentArgs struct {
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringInput
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringInput
	// Name of the RAM Role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	RoleName pulumi.StringInput
}

The set of arguments for constructing a RolePolicyAttachment resource.

func (RolePolicyAttachmentArgs) ElementType

func (RolePolicyAttachmentArgs) ElementType() reflect.Type

type RolePolicyAttachmentInput added in v2.25.1

type RolePolicyAttachmentInput interface {
	pulumi.Input

	ToRolePolicyAttachmentOutput() RolePolicyAttachmentOutput
	ToRolePolicyAttachmentOutputWithContext(ctx context.Context) RolePolicyAttachmentOutput
}

type RolePolicyAttachmentOutput added in v2.25.1

type RolePolicyAttachmentOutput struct {
	*pulumi.OutputState
}

func (RolePolicyAttachmentOutput) ElementType added in v2.25.1

func (RolePolicyAttachmentOutput) ElementType() reflect.Type

func (RolePolicyAttachmentOutput) ToRolePolicyAttachmentOutput added in v2.25.1

func (o RolePolicyAttachmentOutput) ToRolePolicyAttachmentOutput() RolePolicyAttachmentOutput

func (RolePolicyAttachmentOutput) ToRolePolicyAttachmentOutputWithContext added in v2.25.1

func (o RolePolicyAttachmentOutput) ToRolePolicyAttachmentOutputWithContext(ctx context.Context) RolePolicyAttachmentOutput

type RolePolicyAttachmentState

type RolePolicyAttachmentState struct {
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringPtrInput
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringPtrInput
	// Name of the RAM Role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	RoleName pulumi.StringPtrInput
}

func (RolePolicyAttachmentState) ElementType

func (RolePolicyAttachmentState) ElementType() reflect.Type

type RoleState

type RoleState struct {
	// The role arn.
	Arn pulumi.StringPtrInput
	// Description of the RAM role. This name can have a string of 1 to 1024 characters.
	Description pulumi.StringPtrInput
	// Authorization strategy of the RAM role. It is required when the `services` and `ramUsers` are not specified.
	Document pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// The maximum session duration of the RAM role. Valid values: 3600 to 43200. Unit: seconds. Default value: 3600. The default value is used if the parameter is not specified.
	MaxSessionDuration pulumi.IntPtrInput
	// Name of the RAM role. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-", "_", and must not begin with a hyphen.
	Name pulumi.StringPtrInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of ram users who can assume the RAM role. The format of each item in this list is `acs:ram::${account_id}:root` or `acs:ram::${account_id}:user/${user_name}`, such as `acs:ram::1234567890000:root` and `acs:ram::1234567890001:user/Mary`. The `${user_name}` is the name of a RAM user which must exists in the Alicloud account indicated by the `${account_id}`.
	//
	// Deprecated: Field 'ram_users' has been deprecated from version 1.49.0, and use field 'document' to replace.
	RamUsers pulumi.StringArrayInput
	// The role ID.
	RoleId pulumi.StringPtrInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) List of services which can assume the RAM role. The format of each item in this list is `${service}.aliyuncs.com` or `${account_id}@${service}.aliyuncs.com`, such as `ecs.aliyuncs.com` and `1234567890000@ots.aliyuncs.com`. The `${service}` can be `ecs`, `log`, `apigateway` and so on, the `${account_id}` refers to someone's Alicloud account id.
	//
	// Deprecated: Field 'services' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Services pulumi.StringArrayInput
	// (It has been deprecated from version 1.49.0, and use field 'document' to replace.) Version of the RAM role policy document. Valid value is `1`. Default value is `1`.
	//
	// Deprecated: Field 'version' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Version pulumi.StringPtrInput
}

func (RoleState) ElementType

func (RoleState) ElementType() reflect.Type

type User

type User struct {
	pulumi.CustomResourceState

	// Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
	Comments pulumi.StringPtrOutput `pulumi:"comments"`
	// Name of the RAM user which for display. This name can have a string of 1 to 128 characters or Chinese characters, must contain only alphanumeric characters or Chinese characters or hyphens, such as "-",".", and must not end with a hyphen.
	DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
	// Email of the RAM user.
	Email pulumi.StringPtrOutput `pulumi:"email"`
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
	Mobile pulumi.StringPtrOutput `pulumi:"mobile"`
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	Name pulumi.StringOutput `pulumi:"name"`
}

## Import

RAM user can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ram/user:User example 123456789xxx

```

func GetUser

func GetUser(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *UserState, opts ...pulumi.ResourceOption) (*User, error)

GetUser gets an existing User resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewUser

func NewUser(ctx *pulumi.Context,
	name string, args *UserArgs, opts ...pulumi.ResourceOption) (*User, error)

NewUser registers a new resource with the given unique name, arguments, and options.

func (User) ElementType added in v2.25.1

func (User) ElementType() reflect.Type

func (User) ToUserOutput added in v2.25.1

func (i User) ToUserOutput() UserOutput

func (User) ToUserOutputWithContext added in v2.25.1

func (i User) ToUserOutputWithContext(ctx context.Context) UserOutput

type UserArgs

type UserArgs struct {
	// Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
	Comments pulumi.StringPtrInput
	// Name of the RAM user which for display. This name can have a string of 1 to 128 characters or Chinese characters, must contain only alphanumeric characters or Chinese characters or hyphens, such as "-",".", and must not end with a hyphen.
	DisplayName pulumi.StringPtrInput
	// Email of the RAM user.
	Email pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
	Mobile pulumi.StringPtrInput
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	Name pulumi.StringPtrInput
}

The set of arguments for constructing a User resource.

func (UserArgs) ElementType

func (UserArgs) ElementType() reflect.Type

type UserInput added in v2.25.1

type UserInput interface {
	pulumi.Input

	ToUserOutput() UserOutput
	ToUserOutputWithContext(ctx context.Context) UserOutput
}

type UserOutput added in v2.25.1

type UserOutput struct {
	*pulumi.OutputState
}

func (UserOutput) ElementType added in v2.25.1

func (UserOutput) ElementType() reflect.Type

func (UserOutput) ToUserOutput added in v2.25.1

func (o UserOutput) ToUserOutput() UserOutput

func (UserOutput) ToUserOutputWithContext added in v2.25.1

func (o UserOutput) ToUserOutputWithContext(ctx context.Context) UserOutput

type UserPolicyAttachment

type UserPolicyAttachment struct {
	pulumi.CustomResourceState

	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringOutput `pulumi:"policyName"`
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringOutput `pulumi:"policyType"`
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringOutput `pulumi:"userName"`
}

Provides a RAM User Policy attachment resource.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			DisplayName: pulumi.String("user_display_name"),
			Mobile:      pulumi.String("86-18688888888"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		policy, err := ram.NewPolicy(ctx, "policy", &ram.PolicyArgs{
			Document:    pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "  {\n", "    \"Statement\": [\n", "      {\n", "        \"Action\": [\n", "          \"oss:ListObjects\",\n", "          \"oss:GetObject\"\n", "        ],\n", "        \"Effect\": \"Allow\",\n", "        \"Resource\": [\n", "          \"acs:oss:*:*:mybucket\",\n", "          \"acs:oss:*:*:mybucket/*\"\n", "        ]\n", "      }\n", "    ],\n", "      \"Version\": \"1\"\n", "  }\n")),
			Description: pulumi.String("this is a policy test"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewUserPolicyAttachment(ctx, "attach", &ram.UserPolicyAttachmentArgs{
			PolicyName: policy.Name,
			PolicyType: policy.Type,
			UserName:   user.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

RAM User Policy attachment can be imported using the id, e.g.

```sh

$ pulumi import alicloud:ram/userPolicyAttachment:UserPolicyAttachment example user:my-policy:Custom:my-user

```

func GetUserPolicyAttachment

func GetUserPolicyAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *UserPolicyAttachmentState, opts ...pulumi.ResourceOption) (*UserPolicyAttachment, error)

GetUserPolicyAttachment gets an existing UserPolicyAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewUserPolicyAttachment

func NewUserPolicyAttachment(ctx *pulumi.Context,
	name string, args *UserPolicyAttachmentArgs, opts ...pulumi.ResourceOption) (*UserPolicyAttachment, error)

NewUserPolicyAttachment registers a new resource with the given unique name, arguments, and options.

func (UserPolicyAttachment) ElementType added in v2.25.1

func (UserPolicyAttachment) ElementType() reflect.Type

func (UserPolicyAttachment) ToUserPolicyAttachmentOutput added in v2.25.1

func (i UserPolicyAttachment) ToUserPolicyAttachmentOutput() UserPolicyAttachmentOutput

func (UserPolicyAttachment) ToUserPolicyAttachmentOutputWithContext added in v2.25.1

func (i UserPolicyAttachment) ToUserPolicyAttachmentOutputWithContext(ctx context.Context) UserPolicyAttachmentOutput

type UserPolicyAttachmentArgs

type UserPolicyAttachmentArgs struct {
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringInput
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringInput
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringInput
}

The set of arguments for constructing a UserPolicyAttachment resource.

func (UserPolicyAttachmentArgs) ElementType

func (UserPolicyAttachmentArgs) ElementType() reflect.Type

type UserPolicyAttachmentInput added in v2.25.1

type UserPolicyAttachmentInput interface {
	pulumi.Input

	ToUserPolicyAttachmentOutput() UserPolicyAttachmentOutput
	ToUserPolicyAttachmentOutputWithContext(ctx context.Context) UserPolicyAttachmentOutput
}

type UserPolicyAttachmentOutput added in v2.25.1

type UserPolicyAttachmentOutput struct {
	*pulumi.OutputState
}

func (UserPolicyAttachmentOutput) ElementType added in v2.25.1

func (UserPolicyAttachmentOutput) ElementType() reflect.Type

func (UserPolicyAttachmentOutput) ToUserPolicyAttachmentOutput added in v2.25.1

func (o UserPolicyAttachmentOutput) ToUserPolicyAttachmentOutput() UserPolicyAttachmentOutput

func (UserPolicyAttachmentOutput) ToUserPolicyAttachmentOutputWithContext added in v2.25.1

func (o UserPolicyAttachmentOutput) ToUserPolicyAttachmentOutputWithContext(ctx context.Context) UserPolicyAttachmentOutput

type UserPolicyAttachmentState

type UserPolicyAttachmentState struct {
	// Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen.
	PolicyName pulumi.StringPtrInput
	// Type of the RAM policy. It must be `Custom` or `System`.
	PolicyType pulumi.StringPtrInput
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	UserName pulumi.StringPtrInput
}

func (UserPolicyAttachmentState) ElementType

func (UserPolicyAttachmentState) ElementType() reflect.Type

type UserState

type UserState struct {
	// Comment of the RAM user. This parameter can have a string of 1 to 128 characters.
	Comments pulumi.StringPtrInput
	// Name of the RAM user which for display. This name can have a string of 1 to 128 characters or Chinese characters, must contain only alphanumeric characters or Chinese characters or hyphens, such as "-",".", and must not end with a hyphen.
	DisplayName pulumi.StringPtrInput
	// Email of the RAM user.
	Email pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.
	Mobile pulumi.StringPtrInput
	// Name of the RAM user. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen.
	Name pulumi.StringPtrInput
}

func (UserState) ElementType

func (UserState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL