ram

package
v3.54.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 7 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"`
	// (Available since 1.98.0+) - The secret access key. Note that this will be written to the state file.
	// If you use this, please protect your backend state file judiciously.
	// Alternatively, you may supply a `pgpKey` instead, which will prevent the secret from being stored in plaintext,
	// at the cost of preventing the use of the secret key in automation.
	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

> **NOTE:** Available since v1.0.0+.

## Example Usage

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

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new RAM access key for user.
		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			Name:        pulumi.String("terraform-example"),
			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/v3/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new RAM access key for user.
		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			Name:        pulumi.String("terraform-example"),
			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(`mQENBFXbjPUBCADjNjCUQwfxKL+RR2GA6pv/1K+zJZ8UWIF9S0lk7cVIEfJiprzzwiMwBS5cD0da

rGin1FHvIWOZxujA7oW0O2TUuatqI3aAYDTfRYurh6iKLC+VS+F7H+/mhfFvKmgr0Y5kDCF1j0T/ 063QZ84IRGucR/X43IY7kAtmxGXH0dYOCzOe5UBX1fTn3mXGe2ImCDWBH7gOViynXmb6XNvXkP0f sF5St9jhO7mbZU9EFkv9O3t3EaURfHopsCVDOlCkFCw5ArY+DUORHRzoMX0PnkyQb5OzibkChzpg 8hQssKeVGpuskTdz5Q7PtdW71jXd4fFVzoNH8fYwRpziD2xNvi6HABEBAAG0EFZhdWx0IFRlc3Qg S2V5IDGJATgEEwECACIFAlXbjPUCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEOfLr44B HbeTo+sH/i7bapIgPnZsJ81hmxPj4W12uvunksGJiC7d4hIHsG7kmJRTJfjECi+AuTGeDwBy84TD cRaOB6e79fj65Fg6HgSahDUtKJbGxj/lWzmaBuTzlN3CEe8cMwIPqPT2kajJVdOyrvkyuFOdPFOE A7bdCH0MqgIdM2SdF8t40k/ATfuD2K1ZmumJ508I3gF39jgTnPzD4C8quswrMQ3bzfvKC3klXRlB C0yoArn+0QA3cf2B9T4zJ2qnvgotVbeK/b1OJRNj6Poeo+SsWNc/A5mw7lGScnDgL3yfwCm1gQXa QKfOt5x+7GqhWDw10q+bJpJlI10FfzAnhMF9etSqSeURBRW5AQ0EVduM9QEIAL53hJ5bZJ7oEDCn aY+SCzt9QsAfnFTAnZJQrvkvusJzrTQ088eUQmAjvxkfRqnv981fFwGnh2+I1Ktm698UAZS9Jt8y jak9wWUICKQO5QUt5k8cHwldQXNXVXFa+TpQWQR5yW1a9okjh5o/3d4cBt1yZPUJJyLKY43Wvptb 6EuEsScO2DnRkh5wSMDQ7dTooddJCmaq3LTjOleRFQbu9ij386Do6jzK69mJU56TfdcydkxkWF5N ZLGnED3lq+hQNbe+8UI5tD2oP/3r5tXKgMy1R/XPvR/zbfwvx4FAKFOP01awLq4P3d/2xOkMu4Lu 9p315E87DOleYwxk+FoTqXEAEQEAAYkCPgQYAQIACQUCVduM9QIbLgEpCRDny6+OAR23k8BdIAQZ AQIABgUCVduM9QAKCRAID0JGyHtSGmqYB/4m4rJbbWa7dBJ8VqRU7ZKnNRDR9CVhEGipBmpDGRYu lEimOPzLUX/ZXZmTZzgemeXLBaJJlWnopVUWuAsyjQuZAfdd8nHkGRHG0/DGum0l4sKTta3OPGHN C1z1dAcQ1RCr9bTD3PxjLBczdGqhzw71trkQRBRdtPiUchltPMIyjUHqVJ0xmg0hPqFic0fICsr0 YwKoz3h9+QEcZHvsjSZjgydKvfLYcm+4DDMCCqcHuJrbXJKUWmJcXR0y/+HQONGrGJ5xWdO+6eJi oPn2jVMnXCm4EKc7fcLFrz/LKmJ8seXhxjM3EdFtylBGCrx3xdK0f+JDNQaC/rhUb5V2XuX6VwoH /AtY+XsKVYRfNIupLOUcf/srsm3IXT4SXWVomOc9hjGQiJ3rraIbADsc+6bCAr4XNZS7moViAAcI PXFv3m3WfUlnG/om78UjQqyVACRZqqAGmuPq+TSkRUCpt9h+A39LQWkojHqyob3cyLgy6z9Q557O 9uK3lQozbw2gH9zC0RqnePl+rsWIUU/ga16fH6pWc1uJiEBt8UZGypQ/E56/343epmYAe0a87sHx 8iDV+dNtDVKfPRENiLOOc19MmS+phmUyrbHqI91c0pmysYcJZCD3a502X1gpjFbPZcRtiTmGnUKd OIu60YPNE4+h7u2CfYyFPu3AlUaGNMBlvy6PEpU= `),

		})
		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

func (*AccessKey) ElementType() reflect.Type

func (*AccessKey) ToAccessKeyOutput

func (i *AccessKey) ToAccessKeyOutput() AccessKeyOutput

func (*AccessKey) ToAccessKeyOutputWithContext

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 AccessKeyArray

type AccessKeyArray []AccessKeyInput

func (AccessKeyArray) ElementType

func (AccessKeyArray) ElementType() reflect.Type

func (AccessKeyArray) ToAccessKeyArrayOutput

func (i AccessKeyArray) ToAccessKeyArrayOutput() AccessKeyArrayOutput

func (AccessKeyArray) ToAccessKeyArrayOutputWithContext

func (i AccessKeyArray) ToAccessKeyArrayOutputWithContext(ctx context.Context) AccessKeyArrayOutput

type AccessKeyArrayInput

type AccessKeyArrayInput interface {
	pulumi.Input

	ToAccessKeyArrayOutput() AccessKeyArrayOutput
	ToAccessKeyArrayOutputWithContext(context.Context) AccessKeyArrayOutput
}

AccessKeyArrayInput is an input type that accepts AccessKeyArray and AccessKeyArrayOutput values. You can construct a concrete instance of `AccessKeyArrayInput` via:

AccessKeyArray{ AccessKeyArgs{...} }

type AccessKeyArrayOutput

type AccessKeyArrayOutput struct{ *pulumi.OutputState }

func (AccessKeyArrayOutput) ElementType

func (AccessKeyArrayOutput) ElementType() reflect.Type

func (AccessKeyArrayOutput) Index

func (AccessKeyArrayOutput) ToAccessKeyArrayOutput

func (o AccessKeyArrayOutput) ToAccessKeyArrayOutput() AccessKeyArrayOutput

func (AccessKeyArrayOutput) ToAccessKeyArrayOutputWithContext

func (o AccessKeyArrayOutput) ToAccessKeyArrayOutputWithContext(ctx context.Context) AccessKeyArrayOutput

type AccessKeyInput

type AccessKeyInput interface {
	pulumi.Input

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

type AccessKeyMap

type AccessKeyMap map[string]AccessKeyInput

func (AccessKeyMap) ElementType

func (AccessKeyMap) ElementType() reflect.Type

func (AccessKeyMap) ToAccessKeyMapOutput

func (i AccessKeyMap) ToAccessKeyMapOutput() AccessKeyMapOutput

func (AccessKeyMap) ToAccessKeyMapOutputWithContext

func (i AccessKeyMap) ToAccessKeyMapOutputWithContext(ctx context.Context) AccessKeyMapOutput

type AccessKeyMapInput

type AccessKeyMapInput interface {
	pulumi.Input

	ToAccessKeyMapOutput() AccessKeyMapOutput
	ToAccessKeyMapOutputWithContext(context.Context) AccessKeyMapOutput
}

AccessKeyMapInput is an input type that accepts AccessKeyMap and AccessKeyMapOutput values. You can construct a concrete instance of `AccessKeyMapInput` via:

AccessKeyMap{ "key": AccessKeyArgs{...} }

type AccessKeyMapOutput

type AccessKeyMapOutput struct{ *pulumi.OutputState }

func (AccessKeyMapOutput) ElementType

func (AccessKeyMapOutput) ElementType() reflect.Type

func (AccessKeyMapOutput) MapIndex

func (AccessKeyMapOutput) ToAccessKeyMapOutput

func (o AccessKeyMapOutput) ToAccessKeyMapOutput() AccessKeyMapOutput

func (AccessKeyMapOutput) ToAccessKeyMapOutputWithContext

func (o AccessKeyMapOutput) ToAccessKeyMapOutputWithContext(ctx context.Context) AccessKeyMapOutput

type AccessKeyOutput

type AccessKeyOutput struct{ *pulumi.OutputState }

func (AccessKeyOutput) ElementType

func (AccessKeyOutput) ElementType() reflect.Type

func (AccessKeyOutput) EncryptedSecret added in v3.27.0

func (o AccessKeyOutput) EncryptedSecret() pulumi.StringOutput

func (AccessKeyOutput) KeyFingerprint added in v3.27.0

func (o AccessKeyOutput) KeyFingerprint() pulumi.StringOutput

The fingerprint of the PGP key used to encrypt the secret

func (AccessKeyOutput) PgpKey added in v3.27.0

Either a base-64 encoded PGP public key, or a keybase username in the form `keybase:some_person_that_exists`

func (AccessKeyOutput) Secret added in v3.27.0

func (o AccessKeyOutput) Secret() pulumi.StringOutput

(Available since 1.98.0+) - The secret access key. Note that this will be written to the state file. If you use this, please protect your backend state file judiciously. Alternatively, you may supply a `pgpKey` instead, which will prevent the secret from being stored in plaintext, at the cost of preventing the use of the secret key in automation.

func (AccessKeyOutput) SecretFile added in v3.27.0

func (o AccessKeyOutput) SecretFile() pulumi.StringPtrOutput

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.

func (AccessKeyOutput) Status added in v3.27.0

Status of access key. It must be `Active` or `Inactive`. Default value is `Active`.

func (AccessKeyOutput) ToAccessKeyOutput

func (o AccessKeyOutput) ToAccessKeyOutput() AccessKeyOutput

func (AccessKeyOutput) ToAccessKeyOutputWithContext

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

func (AccessKeyOutput) UserName added in v3.27.0

func (o AccessKeyOutput) UserName() pulumi.StringPtrOutput

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.

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
	// (Available since 1.98.0+) - The secret access key. Note that this will be written to the state file.
	// If you use this, please protect your backend state file judiciously.
	// Alternatively, you may supply a `pgpKey` instead, which will prevent the secret from being stored in plaintext,
	// at the cost of preventing the use of the secret key in automation.
	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.

> **NOTE:** Available since v1.0.0.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "tfexample"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_, err := ram.NewAccountAlias(ctx, "alias", &ram.AccountAliasArgs{
			AccountAlias: pulumi.String(name),
		})
		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

func (*AccountAlias) ElementType() reflect.Type

func (*AccountAlias) ToAccountAliasOutput

func (i *AccountAlias) ToAccountAliasOutput() AccountAliasOutput

func (*AccountAlias) ToAccountAliasOutputWithContext

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 AccountAliasArray

type AccountAliasArray []AccountAliasInput

func (AccountAliasArray) ElementType

func (AccountAliasArray) ElementType() reflect.Type

func (AccountAliasArray) ToAccountAliasArrayOutput

func (i AccountAliasArray) ToAccountAliasArrayOutput() AccountAliasArrayOutput

func (AccountAliasArray) ToAccountAliasArrayOutputWithContext

func (i AccountAliasArray) ToAccountAliasArrayOutputWithContext(ctx context.Context) AccountAliasArrayOutput

type AccountAliasArrayInput

type AccountAliasArrayInput interface {
	pulumi.Input

	ToAccountAliasArrayOutput() AccountAliasArrayOutput
	ToAccountAliasArrayOutputWithContext(context.Context) AccountAliasArrayOutput
}

AccountAliasArrayInput is an input type that accepts AccountAliasArray and AccountAliasArrayOutput values. You can construct a concrete instance of `AccountAliasArrayInput` via:

AccountAliasArray{ AccountAliasArgs{...} }

type AccountAliasArrayOutput

type AccountAliasArrayOutput struct{ *pulumi.OutputState }

func (AccountAliasArrayOutput) ElementType

func (AccountAliasArrayOutput) ElementType() reflect.Type

func (AccountAliasArrayOutput) Index

func (AccountAliasArrayOutput) ToAccountAliasArrayOutput

func (o AccountAliasArrayOutput) ToAccountAliasArrayOutput() AccountAliasArrayOutput

func (AccountAliasArrayOutput) ToAccountAliasArrayOutputWithContext

func (o AccountAliasArrayOutput) ToAccountAliasArrayOutputWithContext(ctx context.Context) AccountAliasArrayOutput

type AccountAliasInput

type AccountAliasInput interface {
	pulumi.Input

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

type AccountAliasMap

type AccountAliasMap map[string]AccountAliasInput

func (AccountAliasMap) ElementType

func (AccountAliasMap) ElementType() reflect.Type

func (AccountAliasMap) ToAccountAliasMapOutput

func (i AccountAliasMap) ToAccountAliasMapOutput() AccountAliasMapOutput

func (AccountAliasMap) ToAccountAliasMapOutputWithContext

func (i AccountAliasMap) ToAccountAliasMapOutputWithContext(ctx context.Context) AccountAliasMapOutput

type AccountAliasMapInput

type AccountAliasMapInput interface {
	pulumi.Input

	ToAccountAliasMapOutput() AccountAliasMapOutput
	ToAccountAliasMapOutputWithContext(context.Context) AccountAliasMapOutput
}

AccountAliasMapInput is an input type that accepts AccountAliasMap and AccountAliasMapOutput values. You can construct a concrete instance of `AccountAliasMapInput` via:

AccountAliasMap{ "key": AccountAliasArgs{...} }

type AccountAliasMapOutput

type AccountAliasMapOutput struct{ *pulumi.OutputState }

func (AccountAliasMapOutput) ElementType

func (AccountAliasMapOutput) ElementType() reflect.Type

func (AccountAliasMapOutput) MapIndex

func (AccountAliasMapOutput) ToAccountAliasMapOutput

func (o AccountAliasMapOutput) ToAccountAliasMapOutput() AccountAliasMapOutput

func (AccountAliasMapOutput) ToAccountAliasMapOutputWithContext

func (o AccountAliasMapOutput) ToAccountAliasMapOutputWithContext(ctx context.Context) AccountAliasMapOutput

type AccountAliasOutput

type AccountAliasOutput struct{ *pulumi.OutputState }

func (AccountAliasOutput) AccountAlias added in v3.27.0

func (o AccountAliasOutput) AccountAlias() pulumi.StringOutput

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.

func (AccountAliasOutput) ElementType

func (AccountAliasOutput) ElementType() reflect.Type

func (AccountAliasOutput) ToAccountAliasOutput

func (o AccountAliasOutput) ToAccountAliasOutput() AccountAliasOutput

func (AccountAliasOutput) ToAccountAliasOutputWithContext

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"`
	// 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"`
}

## Example Usage

Empty resource sets defaults values for every property.

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewAccountPasswordPolicy(ctx, "default", nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewAccountPasswordPolicy(ctx, "corporate", &ram.AccountPasswordPolicyArgs{
			MinimumPasswordLength:      pulumi.Int(9),
			RequireLowercaseCharacters: pulumi.Bool(false),
			RequireUppercaseCharacters: pulumi.Bool(false),
			RequireNumbers:             pulumi.Bool(false),
			RequireSymbols:             pulumi.Bool(false),
			HardExpiry:                 pulumi.Bool(true),
			MaxPasswordAge:             pulumi.Int(12),
			PasswordReusePrevention:    pulumi.Int(5),
			MaxLoginAttempts:           pulumi.Int(3),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` For not specified values sets defaults.

## 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

func (*AccountPasswordPolicy) ElementType() reflect.Type

func (*AccountPasswordPolicy) ToAccountPasswordPolicyOutput

func (i *AccountPasswordPolicy) ToAccountPasswordPolicyOutput() AccountPasswordPolicyOutput

func (*AccountPasswordPolicy) ToAccountPasswordPolicyOutputWithContext

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
	// 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 AccountPasswordPolicyArray

type AccountPasswordPolicyArray []AccountPasswordPolicyInput

func (AccountPasswordPolicyArray) ElementType

func (AccountPasswordPolicyArray) ElementType() reflect.Type

func (AccountPasswordPolicyArray) ToAccountPasswordPolicyArrayOutput

func (i AccountPasswordPolicyArray) ToAccountPasswordPolicyArrayOutput() AccountPasswordPolicyArrayOutput

func (AccountPasswordPolicyArray) ToAccountPasswordPolicyArrayOutputWithContext

func (i AccountPasswordPolicyArray) ToAccountPasswordPolicyArrayOutputWithContext(ctx context.Context) AccountPasswordPolicyArrayOutput

type AccountPasswordPolicyArrayInput

type AccountPasswordPolicyArrayInput interface {
	pulumi.Input

	ToAccountPasswordPolicyArrayOutput() AccountPasswordPolicyArrayOutput
	ToAccountPasswordPolicyArrayOutputWithContext(context.Context) AccountPasswordPolicyArrayOutput
}

AccountPasswordPolicyArrayInput is an input type that accepts AccountPasswordPolicyArray and AccountPasswordPolicyArrayOutput values. You can construct a concrete instance of `AccountPasswordPolicyArrayInput` via:

AccountPasswordPolicyArray{ AccountPasswordPolicyArgs{...} }

type AccountPasswordPolicyArrayOutput

type AccountPasswordPolicyArrayOutput struct{ *pulumi.OutputState }

func (AccountPasswordPolicyArrayOutput) ElementType

func (AccountPasswordPolicyArrayOutput) Index

func (AccountPasswordPolicyArrayOutput) ToAccountPasswordPolicyArrayOutput

func (o AccountPasswordPolicyArrayOutput) ToAccountPasswordPolicyArrayOutput() AccountPasswordPolicyArrayOutput

func (AccountPasswordPolicyArrayOutput) ToAccountPasswordPolicyArrayOutputWithContext

func (o AccountPasswordPolicyArrayOutput) ToAccountPasswordPolicyArrayOutputWithContext(ctx context.Context) AccountPasswordPolicyArrayOutput

type AccountPasswordPolicyInput

type AccountPasswordPolicyInput interface {
	pulumi.Input

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

type AccountPasswordPolicyMap

type AccountPasswordPolicyMap map[string]AccountPasswordPolicyInput

func (AccountPasswordPolicyMap) ElementType

func (AccountPasswordPolicyMap) ElementType() reflect.Type

func (AccountPasswordPolicyMap) ToAccountPasswordPolicyMapOutput

func (i AccountPasswordPolicyMap) ToAccountPasswordPolicyMapOutput() AccountPasswordPolicyMapOutput

func (AccountPasswordPolicyMap) ToAccountPasswordPolicyMapOutputWithContext

func (i AccountPasswordPolicyMap) ToAccountPasswordPolicyMapOutputWithContext(ctx context.Context) AccountPasswordPolicyMapOutput

type AccountPasswordPolicyMapInput

type AccountPasswordPolicyMapInput interface {
	pulumi.Input

	ToAccountPasswordPolicyMapOutput() AccountPasswordPolicyMapOutput
	ToAccountPasswordPolicyMapOutputWithContext(context.Context) AccountPasswordPolicyMapOutput
}

AccountPasswordPolicyMapInput is an input type that accepts AccountPasswordPolicyMap and AccountPasswordPolicyMapOutput values. You can construct a concrete instance of `AccountPasswordPolicyMapInput` via:

AccountPasswordPolicyMap{ "key": AccountPasswordPolicyArgs{...} }

type AccountPasswordPolicyMapOutput

type AccountPasswordPolicyMapOutput struct{ *pulumi.OutputState }

func (AccountPasswordPolicyMapOutput) ElementType

func (AccountPasswordPolicyMapOutput) MapIndex

func (AccountPasswordPolicyMapOutput) ToAccountPasswordPolicyMapOutput

func (o AccountPasswordPolicyMapOutput) ToAccountPasswordPolicyMapOutput() AccountPasswordPolicyMapOutput

func (AccountPasswordPolicyMapOutput) ToAccountPasswordPolicyMapOutputWithContext

func (o AccountPasswordPolicyMapOutput) ToAccountPasswordPolicyMapOutputWithContext(ctx context.Context) AccountPasswordPolicyMapOutput

type AccountPasswordPolicyOutput

type AccountPasswordPolicyOutput struct{ *pulumi.OutputState }

func (AccountPasswordPolicyOutput) ElementType

func (AccountPasswordPolicyOutput) HardExpiry added in v3.27.0

Specifies if a password can expire in a hard way. Default to false.

func (AccountPasswordPolicyOutput) MaxLoginAttempts added in v3.27.0

func (o AccountPasswordPolicyOutput) MaxLoginAttempts() pulumi.IntPtrOutput

Maximum logon attempts with an incorrect password within an hour. Valid value range: [0-32]. Default to 5.

func (AccountPasswordPolicyOutput) MaxPasswordAge added in v3.27.0

func (o AccountPasswordPolicyOutput) MaxPasswordAge() pulumi.IntPtrOutput

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.

func (AccountPasswordPolicyOutput) MinimumPasswordLength added in v3.27.0

func (o AccountPasswordPolicyOutput) MinimumPasswordLength() pulumi.IntPtrOutput

Minimal required length of password for a user. Valid value range: [8-32]. Default to 12.

func (AccountPasswordPolicyOutput) PasswordReusePrevention added in v3.27.0

func (o AccountPasswordPolicyOutput) PasswordReusePrevention() pulumi.IntPtrOutput

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.

func (AccountPasswordPolicyOutput) RequireLowercaseCharacters added in v3.27.0

func (o AccountPasswordPolicyOutput) RequireLowercaseCharacters() pulumi.BoolPtrOutput

Specifies if the occurrence of a lowercase character in the password is mandatory. Default to true.

func (AccountPasswordPolicyOutput) RequireNumbers added in v3.27.0

Specifies if the occurrence of a number in the password is mandatory. Default to true.

func (AccountPasswordPolicyOutput) RequireSymbols added in v3.27.0

Specifies if the occurrence of a special character in the password is mandatory. Default to true.

func (AccountPasswordPolicyOutput) RequireUppercaseCharacters added in v3.27.0

func (o AccountPasswordPolicyOutput) RequireUppercaseCharacters() pulumi.BoolPtrOutput

Specifies if the occurrence of an uppercase character in the password is mandatory. Default to true.

func (AccountPasswordPolicyOutput) ToAccountPasswordPolicyOutput

func (o AccountPasswordPolicyOutput) ToAccountPasswordPolicyOutput() AccountPasswordPolicyOutput

func (AccountPasswordPolicyOutput) ToAccountPasswordPolicyOutputWithContext

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
	// 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

func (*Alias) ElementType() reflect.Type

func (*Alias) ToAliasOutput

func (i *Alias) ToAliasOutput() AliasOutput

func (*Alias) ToAliasOutputWithContext

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 AliasArray

type AliasArray []AliasInput

func (AliasArray) ElementType

func (AliasArray) ElementType() reflect.Type

func (AliasArray) ToAliasArrayOutput

func (i AliasArray) ToAliasArrayOutput() AliasArrayOutput

func (AliasArray) ToAliasArrayOutputWithContext

func (i AliasArray) ToAliasArrayOutputWithContext(ctx context.Context) AliasArrayOutput

type AliasArrayInput

type AliasArrayInput interface {
	pulumi.Input

	ToAliasArrayOutput() AliasArrayOutput
	ToAliasArrayOutputWithContext(context.Context) AliasArrayOutput
}

AliasArrayInput is an input type that accepts AliasArray and AliasArrayOutput values. You can construct a concrete instance of `AliasArrayInput` via:

AliasArray{ AliasArgs{...} }

type AliasArrayOutput

type AliasArrayOutput struct{ *pulumi.OutputState }

func (AliasArrayOutput) ElementType

func (AliasArrayOutput) ElementType() reflect.Type

func (AliasArrayOutput) Index

func (AliasArrayOutput) ToAliasArrayOutput

func (o AliasArrayOutput) ToAliasArrayOutput() AliasArrayOutput

func (AliasArrayOutput) ToAliasArrayOutputWithContext

func (o AliasArrayOutput) ToAliasArrayOutputWithContext(ctx context.Context) AliasArrayOutput

type AliasInput

type AliasInput interface {
	pulumi.Input

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

type AliasMap

type AliasMap map[string]AliasInput

func (AliasMap) ElementType

func (AliasMap) ElementType() reflect.Type

func (AliasMap) ToAliasMapOutput

func (i AliasMap) ToAliasMapOutput() AliasMapOutput

func (AliasMap) ToAliasMapOutputWithContext

func (i AliasMap) ToAliasMapOutputWithContext(ctx context.Context) AliasMapOutput

type AliasMapInput

type AliasMapInput interface {
	pulumi.Input

	ToAliasMapOutput() AliasMapOutput
	ToAliasMapOutputWithContext(context.Context) AliasMapOutput
}

AliasMapInput is an input type that accepts AliasMap and AliasMapOutput values. You can construct a concrete instance of `AliasMapInput` via:

AliasMap{ "key": AliasArgs{...} }

type AliasMapOutput

type AliasMapOutput struct{ *pulumi.OutputState }

func (AliasMapOutput) ElementType

func (AliasMapOutput) ElementType() reflect.Type

func (AliasMapOutput) MapIndex

func (AliasMapOutput) ToAliasMapOutput

func (o AliasMapOutput) ToAliasMapOutput() AliasMapOutput

func (AliasMapOutput) ToAliasMapOutputWithContext

func (o AliasMapOutput) ToAliasMapOutputWithContext(ctx context.Context) AliasMapOutput

type AliasOutput

type AliasOutput struct{ *pulumi.OutputState }

func (AliasOutput) AccountAlias added in v3.27.0

func (o AliasOutput) AccountAlias() pulumi.StringOutput

func (AliasOutput) ElementType

func (AliasOutput) ElementType() reflect.Type

func (AliasOutput) ToAliasOutput

func (o AliasOutput) ToAliasOutput() AliasOutput

func (AliasOutput) ToAliasOutputWithContext

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 GetAccountAliasesOutputArgs added in v3.9.0

type GetAccountAliasesOutputArgs struct {
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
}

A collection of arguments for invoking getAccountAliases.

func (GetAccountAliasesOutputArgs) ElementType added in v3.9.0

type GetAccountAliasesResult

type GetAccountAliasesResult 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 getAccountAliases.

type GetAccountAliasesResultOutput added in v3.9.0

type GetAccountAliasesResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getAccountAliases.

func GetAccountAliasesOutput added in v3.9.0

func (GetAccountAliasesResultOutput) AccountAlias added in v3.9.0

func (GetAccountAliasesResultOutput) ElementType added in v3.9.0

func (GetAccountAliasesResultOutput) Id added in v3.9.0

The provider-assigned unique ID for this managed resource.

func (GetAccountAliasesResultOutput) OutputFile added in v3.9.0

func (GetAccountAliasesResultOutput) ToGetAccountAliasesResultOutput added in v3.9.0

func (o GetAccountAliasesResultOutput) ToGetAccountAliasesResultOutput() GetAccountAliasesResultOutput

func (GetAccountAliasesResultOutput) ToGetAccountAliasesResultOutputWithContext added in v3.9.0

func (o GetAccountAliasesResultOutput) ToGetAccountAliasesResultOutputWithContext(ctx context.Context) GetAccountAliasesResultOutput

type GetGroupsArgs

type GetGroupsArgs struct {
	// A regex string to filter the returned groups by their names.
	NameRegex *string `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	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 GetGroupsOutputArgs added in v3.9.0

type GetGroupsOutputArgs struct {
	// A regex string to filter the returned groups by their names.
	NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile pulumi.StringPtrInput `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 pulumi.StringPtrInput `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 pulumi.StringPtrInput `pulumi:"policyType"`
	// Filter the results by a specific the user name.
	UserName pulumi.StringPtrInput `pulumi:"userName"`
}

A collection of arguments for invoking getGroups.

func (GetGroupsOutputArgs) ElementType added in v3.9.0

func (GetGroupsOutputArgs) ElementType() reflect.Type

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.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

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

```

type GetGroupsResultOutput added in v3.9.0

type GetGroupsResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getGroups.

func GetGroupsOutput added in v3.9.0

func GetGroupsOutput(ctx *pulumi.Context, args GetGroupsOutputArgs, opts ...pulumi.InvokeOption) GetGroupsResultOutput

func (GetGroupsResultOutput) ElementType added in v3.9.0

func (GetGroupsResultOutput) ElementType() reflect.Type

func (GetGroupsResultOutput) Groups added in v3.9.0

A list of groups. Each element contains the following attributes:

func (GetGroupsResultOutput) Id added in v3.9.0

The provider-assigned unique ID for this managed resource.

func (GetGroupsResultOutput) NameRegex added in v3.9.0

func (GetGroupsResultOutput) Names added in v3.9.0

A list of ram group names.

func (GetGroupsResultOutput) OutputFile added in v3.9.0

func (GetGroupsResultOutput) PolicyName added in v3.9.0

func (GetGroupsResultOutput) PolicyType added in v3.9.0

func (GetGroupsResultOutput) ToGetGroupsResultOutput added in v3.9.0

func (o GetGroupsResultOutput) ToGetGroupsResultOutput() GetGroupsResultOutput

func (GetGroupsResultOutput) ToGetGroupsResultOutputWithContext added in v3.9.0

func (o GetGroupsResultOutput) ToGetGroupsResultOutputWithContext(ctx context.Context) GetGroupsResultOutput

func (GetGroupsResultOutput) UserName added in v3.9.0

type GetPoliciesArgs

type GetPoliciesArgs struct {
	// Default to `true`. Set it to true can output more details.
	EnableDetails *bool `pulumi:"enableDetails"`
	// Filter results by a specific group name. Returned policies are attached to the specified group.
	GroupName *string `pulumi:"groupName"`
	// A list of ram group IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter resulting policies by name.
	NameRegex *string `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	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 GetPoliciesOutputArgs added in v3.9.0

type GetPoliciesOutputArgs struct {
	// Default to `true`. Set it to true can output more details.
	EnableDetails pulumi.BoolPtrInput `pulumi:"enableDetails"`
	// Filter results by a specific group name. Returned policies are attached to the specified group.
	GroupName pulumi.StringPtrInput `pulumi:"groupName"`
	// A list of ram group IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter resulting policies by name.
	NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
	// Filter results by a specific role name. Returned policies are attached to the specified role.
	RoleName pulumi.StringPtrInput `pulumi:"roleName"`
	// Filter results by a specific policy type. Valid values are `Custom` and `System`.
	Type pulumi.StringPtrInput `pulumi:"type"`
	// Filter results by a specific user name. Returned policies are attached to the specified user.
	UserName pulumi.StringPtrInput `pulumi:"userName"`
}

A collection of arguments for invoking getPolicies.

func (GetPoliciesOutputArgs) ElementType added in v3.9.0

func (GetPoliciesOutputArgs) ElementType() reflect.Type

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"`
	// ID of the policy.
	Id string `pulumi:"id"`
	// Name of the policy.
	Name string `pulumi:"name"`
	// Policy document of the policy.
	PolicyDocument string `pulumi:"policyDocument"`
	// Name of the policy.
	PolicyName string `pulumi:"policyName"`
	// 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"`
	// Filter results by a specific user name. Returned policies are attached to the specified user.
	UserName string `pulumi:"userName"`
	// The ID of default policy.
	VersionId string `pulumi:"versionId"`
}

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"`
	// ID of the policy.
	Id pulumi.StringInput `pulumi:"id"`
	// Name of the policy.
	Name pulumi.StringInput `pulumi:"name"`
	// Policy document of the policy.
	PolicyDocument pulumi.StringInput `pulumi:"policyDocument"`
	// Name of the policy.
	PolicyName pulumi.StringInput `pulumi:"policyName"`
	// 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"`
	// Filter results by a specific user name. Returned policies are attached to the specified user.
	UserName pulumi.StringInput `pulumi:"userName"`
	// The ID of default policy.
	VersionId pulumi.StringInput `pulumi:"versionId"`
}

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) Id

ID of the policy.

func (GetPoliciesPolicyOutput) Name

Name of the policy.

func (GetPoliciesPolicyOutput) PolicyDocument

func (o GetPoliciesPolicyOutput) PolicyDocument() pulumi.StringOutput

Policy document of the policy.

func (GetPoliciesPolicyOutput) PolicyName

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.

func (GetPoliciesPolicyOutput) UserName

Filter results by a specific user name. Returned policies are attached to the specified user.

func (GetPoliciesPolicyOutput) VersionId

The ID of default policy.

type GetPoliciesResult

type GetPoliciesResult struct {
	EnableDetails *bool   `pulumi:"enableDetails"`
	GroupName     *string `pulumi:"groupName"`
	// The provider-assigned unique ID for this managed resource.
	Id        string   `pulumi:"id"`
	Ids       []string `pulumi:"ids"`
	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"`
	// The user name of  policy.
	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.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

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

```

type GetPoliciesResultOutput added in v3.9.0

type GetPoliciesResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getPolicies.

func GetPoliciesOutput added in v3.9.0

func GetPoliciesOutput(ctx *pulumi.Context, args GetPoliciesOutputArgs, opts ...pulumi.InvokeOption) GetPoliciesResultOutput

func (GetPoliciesResultOutput) ElementType added in v3.9.0

func (GetPoliciesResultOutput) ElementType() reflect.Type

func (GetPoliciesResultOutput) EnableDetails added in v3.9.0

func (o GetPoliciesResultOutput) EnableDetails() pulumi.BoolPtrOutput

func (GetPoliciesResultOutput) GroupName added in v3.9.0

func (GetPoliciesResultOutput) Id added in v3.9.0

The provider-assigned unique ID for this managed resource.

func (GetPoliciesResultOutput) Ids added in v3.9.0

func (GetPoliciesResultOutput) NameRegex added in v3.9.0

func (GetPoliciesResultOutput) Names added in v3.9.0

A list of ram group names.

func (GetPoliciesResultOutput) OutputFile added in v3.9.0

func (GetPoliciesResultOutput) Policies added in v3.9.0

A list of policies. Each element contains the following attributes:

func (GetPoliciesResultOutput) RoleName added in v3.9.0

func (GetPoliciesResultOutput) ToGetPoliciesResultOutput added in v3.9.0

func (o GetPoliciesResultOutput) ToGetPoliciesResultOutput() GetPoliciesResultOutput

func (GetPoliciesResultOutput) ToGetPoliciesResultOutputWithContext added in v3.9.0

func (o GetPoliciesResultOutput) ToGetPoliciesResultOutputWithContext(ctx context.Context) GetPoliciesResultOutput

func (GetPoliciesResultOutput) Type added in v3.9.0

Type of the policy.

func (GetPoliciesResultOutput) UserName added in v3.9.0

The user name of policy.

type GetPolicyDocumentArgs added in v3.29.0

type GetPolicyDocumentArgs struct {
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile *string `pulumi:"outputFile"`
	// Statement of the RAM policy document. See the following `Block statement`. See `statement` below.
	Statements []GetPolicyDocumentStatement `pulumi:"statements"`
	// Version of the RAM policy document. Valid value is `1`. Default value is `1`.
	Version *string `pulumi:"version"`
}

A collection of arguments for invoking getPolicyDocument.

type GetPolicyDocumentOutputArgs added in v3.29.0

type GetPolicyDocumentOutputArgs struct {
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
	// Statement of the RAM policy document. See the following `Block statement`. See `statement` below.
	Statements GetPolicyDocumentStatementArrayInput `pulumi:"statements"`
	// Version of the RAM policy document. Valid value is `1`. Default value is `1`.
	Version pulumi.StringPtrInput `pulumi:"version"`
}

A collection of arguments for invoking getPolicyDocument.

func (GetPolicyDocumentOutputArgs) ElementType added in v3.29.0

type GetPolicyDocumentResult added in v3.29.0

type GetPolicyDocumentResult struct {
	// Standard policy document rendered based on the arguments above.
	Document string `pulumi:"document"`
	// The provider-assigned unique ID for this managed resource.
	Id         string                       `pulumi:"id"`
	OutputFile *string                      `pulumi:"outputFile"`
	Statements []GetPolicyDocumentStatement `pulumi:"statements"`
	Version    *string                      `pulumi:"version"`
}

A collection of values returned by getPolicyDocument.

func GetPolicyDocument added in v3.29.0

func GetPolicyDocument(ctx *pulumi.Context, args *GetPolicyDocumentArgs, opts ...pulumi.InvokeOption) (*GetPolicyDocumentResult, error)

This data source Generates a RAM policy document of the current Alibaba Cloud user.

> **NOTE:** Available since v1.184.0+.

## Example Usage

### Basic Example

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		basicExample, err := ram.GetPolicyDocument(ctx, &ram.GetPolicyDocumentArgs{
			Version: pulumi.StringRef("1"),
			Statements: []ram.GetPolicyDocumentStatement{
				{
					Effect: pulumi.StringRef("Allow"),
					Actions: []string{
						"oss:*",
					},
					Resources: []string{
						"acs:oss:*:*:myphotos",
						"acs:oss:*:*:myphotos/*",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = ram.NewPolicy(ctx, "default", &ram.PolicyArgs{
			PolicyName:     pulumi.String("tf-example"),
			PolicyDocument: pulumi.String(basicExample.Document),
			Force:          pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

`data.alicloud_ram_policy_document.basic_example.document` will evaluate to:

### Example Multiple Condition Keys and Values

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		multipleCondition, err := ram.GetPolicyDocument(ctx, &ram.GetPolicyDocumentArgs{
			Version: pulumi.StringRef("1"),
			Statements: pulumi.Array{
				ram.GetPolicyDocumentStatement{
					Effect: pulumi.StringRef("Allow"),
					Actions: []string{
						"oss:ListBuckets",
						"oss:GetBucketStat",
						"oss:GetBucketInfo",
						"oss:GetBucketTagging",
						"oss:GetBucketAcl",
					},
					Resources: []string{
						"acs:oss:*:*:*",
					},
				},
				ram.GetPolicyDocumentStatement{
					Effect: pulumi.StringRef("Allow"),
					Actions: []string{
						"oss:GetObject",
						"oss:GetObjectAcl",
					},
					Resources: []string{
						"acs:oss:*:*:myphotos/hangzhou/2015/*",
					},
				},
				ram.GetPolicyDocumentStatement{
					Effect: pulumi.StringRef("Allow"),
					Actions: []string{
						"oss:ListObjects",
					},
					Resources: []string{
						"acs:oss:*:*:myphotos",
					},
					Conditions: []ram.GetPolicyDocumentStatementCondition{
						{
							Operator: "StringLike",
							Variable: "oss:Delimiter",
							Values: []string{
								"/",
							},
						},
						{
							Operator: "StringLike",
							Variable: "oss:Prefix",
							Values: []string{
								"",
								"hangzhou/",
								"hangzhou/2015/*",
							},
						},
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = ram.NewPolicy(ctx, "policy", &ram.PolicyArgs{
			PolicyName:     pulumi.String("tf-example-condition"),
			PolicyDocument: pulumi.String(multipleCondition.Document),
			Force:          pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

`data.alicloud_ram_policy_document.multiple_condition.document` will evaluate to:

### Example Assume-Role Policy with RAM Principal

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ramExample, err := ram.GetPolicyDocument(ctx, &ram.GetPolicyDocumentArgs{
			Statements: []ram.GetPolicyDocumentStatement{
				{
					Effect: pulumi.StringRef("Allow"),
					Actions: []string{
						"sts:AssumeRole",
					},
					Principals: []ram.GetPolicyDocumentStatementPrincipal{
						{
							Entity: "RAM",
							Identifiers: []string{
								"acs:ram::123456789012****:root",
							},
						},
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = ram.NewRole(ctx, "role", &ram.RoleArgs{
			Name:     pulumi.String("tf-example-role-ram"),
			Document: pulumi.String(ramExample.Document),
			Force:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

`data.alicloud_ram_policy_document.ram_example.document` will evaluate to:

### Example Assume-Role Policy with Service Principal

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		serviceExample, err := ram.GetPolicyDocument(ctx, &ram.GetPolicyDocumentArgs{
			Statements: []ram.GetPolicyDocumentStatement{
				{
					Effect: pulumi.StringRef("Allow"),
					Actions: []string{
						"sts:AssumeRole",
					},
					Principals: []ram.GetPolicyDocumentStatementPrincipal{
						{
							Entity: "Service",
							Identifiers: []string{
								"ecs.aliyuncs.com",
							},
						},
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = ram.NewRole(ctx, "role", &ram.RoleArgs{
			Name:     pulumi.String("tf-example-role-service"),
			Document: pulumi.String(serviceExample.Document),
			Force:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

`data.alicloud_ram_policy_document.service_example.document` will evaluate to:

### Example Assume-Role Policy with Federated Principal

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		federatedExample, err := ram.GetPolicyDocument(ctx, &ram.GetPolicyDocumentArgs{
			Statements: []ram.GetPolicyDocumentStatement{
				{
					Effect: pulumi.StringRef("Allow"),
					Actions: []string{
						"sts:AssumeRole",
					},
					Principals: []ram.GetPolicyDocumentStatementPrincipal{
						{
							Entity: "Federated",
							Identifiers: []string{
								"acs:ram::123456789012****:saml-provider/testprovider",
							},
						},
					},
					Conditions: []ram.GetPolicyDocumentStatementCondition{
						{
							Operator: "StringEquals",
							Variable: "saml:recipient",
							Values: []string{
								"https://signin.aliyun.com/saml-role/sso",
							},
						},
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = ram.NewRole(ctx, "role", &ram.RoleArgs{
			Name:     pulumi.String("tf-example-role-federated"),
			Document: pulumi.String(federatedExample.Document),
			Force:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

`data.alicloud_ram_policy_document.federated_example.document` will evaluate to:

type GetPolicyDocumentResultOutput added in v3.29.0

type GetPolicyDocumentResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getPolicyDocument.

func GetPolicyDocumentOutput added in v3.29.0

func (GetPolicyDocumentResultOutput) Document added in v3.29.0

Standard policy document rendered based on the arguments above.

func (GetPolicyDocumentResultOutput) ElementType added in v3.29.0

func (GetPolicyDocumentResultOutput) Id added in v3.29.0

The provider-assigned unique ID for this managed resource.

func (GetPolicyDocumentResultOutput) OutputFile added in v3.29.0

func (GetPolicyDocumentResultOutput) Statements added in v3.29.0

func (GetPolicyDocumentResultOutput) ToGetPolicyDocumentResultOutput added in v3.29.0

func (o GetPolicyDocumentResultOutput) ToGetPolicyDocumentResultOutput() GetPolicyDocumentResultOutput

func (GetPolicyDocumentResultOutput) ToGetPolicyDocumentResultOutputWithContext added in v3.29.0

func (o GetPolicyDocumentResultOutput) ToGetPolicyDocumentResultOutputWithContext(ctx context.Context) GetPolicyDocumentResultOutput

func (GetPolicyDocumentResultOutput) Version added in v3.29.0

type GetPolicyDocumentStatement added in v3.29.0

type GetPolicyDocumentStatement struct {
	// Action of the RAM policy document. If you want to create a RAM role policy document, it must be `["sts:AssumeRole"]`.
	Actions []string `pulumi:"actions"`
	// Specifies the condition that are required for a policy to take effect. See `condition` below.
	Conditions []GetPolicyDocumentStatementCondition `pulumi:"conditions"`
	// This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`. Default value is `Allow`. If you want to create a RAM role policy document, it must be `Allow`.
	Effect *string `pulumi:"effect"`
	// Principal of the RAM policy document. If you want to create a RAM role policy document, it must be set. See `principal` below.
	Principals []GetPolicyDocumentStatementPrincipal `pulumi:"principals"`
	// List of specific objects which will be authorized. If you want to create a RAM policy document, it must be set.
	Resources []string `pulumi:"resources"`
}

type GetPolicyDocumentStatementArgs added in v3.29.0

type GetPolicyDocumentStatementArgs struct {
	// Action of the RAM policy document. If you want to create a RAM role policy document, it must be `["sts:AssumeRole"]`.
	Actions pulumi.StringArrayInput `pulumi:"actions"`
	// Specifies the condition that are required for a policy to take effect. See `condition` below.
	Conditions GetPolicyDocumentStatementConditionArrayInput `pulumi:"conditions"`
	// This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`. Default value is `Allow`. If you want to create a RAM role policy document, it must be `Allow`.
	Effect pulumi.StringPtrInput `pulumi:"effect"`
	// Principal of the RAM policy document. If you want to create a RAM role policy document, it must be set. See `principal` below.
	Principals GetPolicyDocumentStatementPrincipalArrayInput `pulumi:"principals"`
	// List of specific objects which will be authorized. If you want to create a RAM policy document, it must be set.
	Resources pulumi.StringArrayInput `pulumi:"resources"`
}

func (GetPolicyDocumentStatementArgs) ElementType added in v3.29.0

func (GetPolicyDocumentStatementArgs) ToGetPolicyDocumentStatementOutput added in v3.29.0

func (i GetPolicyDocumentStatementArgs) ToGetPolicyDocumentStatementOutput() GetPolicyDocumentStatementOutput

func (GetPolicyDocumentStatementArgs) ToGetPolicyDocumentStatementOutputWithContext added in v3.29.0

func (i GetPolicyDocumentStatementArgs) ToGetPolicyDocumentStatementOutputWithContext(ctx context.Context) GetPolicyDocumentStatementOutput

type GetPolicyDocumentStatementArray added in v3.29.0

type GetPolicyDocumentStatementArray []GetPolicyDocumentStatementInput

func (GetPolicyDocumentStatementArray) ElementType added in v3.29.0

func (GetPolicyDocumentStatementArray) ToGetPolicyDocumentStatementArrayOutput added in v3.29.0

func (i GetPolicyDocumentStatementArray) ToGetPolicyDocumentStatementArrayOutput() GetPolicyDocumentStatementArrayOutput

func (GetPolicyDocumentStatementArray) ToGetPolicyDocumentStatementArrayOutputWithContext added in v3.29.0

func (i GetPolicyDocumentStatementArray) ToGetPolicyDocumentStatementArrayOutputWithContext(ctx context.Context) GetPolicyDocumentStatementArrayOutput

type GetPolicyDocumentStatementArrayInput added in v3.29.0

type GetPolicyDocumentStatementArrayInput interface {
	pulumi.Input

	ToGetPolicyDocumentStatementArrayOutput() GetPolicyDocumentStatementArrayOutput
	ToGetPolicyDocumentStatementArrayOutputWithContext(context.Context) GetPolicyDocumentStatementArrayOutput
}

GetPolicyDocumentStatementArrayInput is an input type that accepts GetPolicyDocumentStatementArray and GetPolicyDocumentStatementArrayOutput values. You can construct a concrete instance of `GetPolicyDocumentStatementArrayInput` via:

GetPolicyDocumentStatementArray{ GetPolicyDocumentStatementArgs{...} }

type GetPolicyDocumentStatementArrayOutput added in v3.29.0

type GetPolicyDocumentStatementArrayOutput struct{ *pulumi.OutputState }

func (GetPolicyDocumentStatementArrayOutput) ElementType added in v3.29.0

func (GetPolicyDocumentStatementArrayOutput) Index added in v3.29.0

func (GetPolicyDocumentStatementArrayOutput) ToGetPolicyDocumentStatementArrayOutput added in v3.29.0

func (o GetPolicyDocumentStatementArrayOutput) ToGetPolicyDocumentStatementArrayOutput() GetPolicyDocumentStatementArrayOutput

func (GetPolicyDocumentStatementArrayOutput) ToGetPolicyDocumentStatementArrayOutputWithContext added in v3.29.0

func (o GetPolicyDocumentStatementArrayOutput) ToGetPolicyDocumentStatementArrayOutputWithContext(ctx context.Context) GetPolicyDocumentStatementArrayOutput

type GetPolicyDocumentStatementCondition added in v3.29.0

type GetPolicyDocumentStatementCondition struct {
	Operator string   `pulumi:"operator"`
	Values   []string `pulumi:"values"`
	Variable string   `pulumi:"variable"`
}

type GetPolicyDocumentStatementConditionArgs added in v3.29.0

type GetPolicyDocumentStatementConditionArgs struct {
	Operator pulumi.StringInput      `pulumi:"operator"`
	Values   pulumi.StringArrayInput `pulumi:"values"`
	Variable pulumi.StringInput      `pulumi:"variable"`
}

func (GetPolicyDocumentStatementConditionArgs) ElementType added in v3.29.0

func (GetPolicyDocumentStatementConditionArgs) ToGetPolicyDocumentStatementConditionOutput added in v3.29.0

func (i GetPolicyDocumentStatementConditionArgs) ToGetPolicyDocumentStatementConditionOutput() GetPolicyDocumentStatementConditionOutput

func (GetPolicyDocumentStatementConditionArgs) ToGetPolicyDocumentStatementConditionOutputWithContext added in v3.29.0

func (i GetPolicyDocumentStatementConditionArgs) ToGetPolicyDocumentStatementConditionOutputWithContext(ctx context.Context) GetPolicyDocumentStatementConditionOutput

type GetPolicyDocumentStatementConditionArray added in v3.29.0

type GetPolicyDocumentStatementConditionArray []GetPolicyDocumentStatementConditionInput

func (GetPolicyDocumentStatementConditionArray) ElementType added in v3.29.0

func (GetPolicyDocumentStatementConditionArray) ToGetPolicyDocumentStatementConditionArrayOutput added in v3.29.0

func (i GetPolicyDocumentStatementConditionArray) ToGetPolicyDocumentStatementConditionArrayOutput() GetPolicyDocumentStatementConditionArrayOutput

func (GetPolicyDocumentStatementConditionArray) ToGetPolicyDocumentStatementConditionArrayOutputWithContext added in v3.29.0

func (i GetPolicyDocumentStatementConditionArray) ToGetPolicyDocumentStatementConditionArrayOutputWithContext(ctx context.Context) GetPolicyDocumentStatementConditionArrayOutput

type GetPolicyDocumentStatementConditionArrayInput added in v3.29.0

type GetPolicyDocumentStatementConditionArrayInput interface {
	pulumi.Input

	ToGetPolicyDocumentStatementConditionArrayOutput() GetPolicyDocumentStatementConditionArrayOutput
	ToGetPolicyDocumentStatementConditionArrayOutputWithContext(context.Context) GetPolicyDocumentStatementConditionArrayOutput
}

GetPolicyDocumentStatementConditionArrayInput is an input type that accepts GetPolicyDocumentStatementConditionArray and GetPolicyDocumentStatementConditionArrayOutput values. You can construct a concrete instance of `GetPolicyDocumentStatementConditionArrayInput` via:

GetPolicyDocumentStatementConditionArray{ GetPolicyDocumentStatementConditionArgs{...} }

type GetPolicyDocumentStatementConditionArrayOutput added in v3.29.0

type GetPolicyDocumentStatementConditionArrayOutput struct{ *pulumi.OutputState }

func (GetPolicyDocumentStatementConditionArrayOutput) ElementType added in v3.29.0

func (GetPolicyDocumentStatementConditionArrayOutput) Index added in v3.29.0

func (GetPolicyDocumentStatementConditionArrayOutput) ToGetPolicyDocumentStatementConditionArrayOutput added in v3.29.0

func (o GetPolicyDocumentStatementConditionArrayOutput) ToGetPolicyDocumentStatementConditionArrayOutput() GetPolicyDocumentStatementConditionArrayOutput

func (GetPolicyDocumentStatementConditionArrayOutput) ToGetPolicyDocumentStatementConditionArrayOutputWithContext added in v3.29.0

func (o GetPolicyDocumentStatementConditionArrayOutput) ToGetPolicyDocumentStatementConditionArrayOutputWithContext(ctx context.Context) GetPolicyDocumentStatementConditionArrayOutput

type GetPolicyDocumentStatementConditionInput added in v3.29.0

type GetPolicyDocumentStatementConditionInput interface {
	pulumi.Input

	ToGetPolicyDocumentStatementConditionOutput() GetPolicyDocumentStatementConditionOutput
	ToGetPolicyDocumentStatementConditionOutputWithContext(context.Context) GetPolicyDocumentStatementConditionOutput
}

GetPolicyDocumentStatementConditionInput is an input type that accepts GetPolicyDocumentStatementConditionArgs and GetPolicyDocumentStatementConditionOutput values. You can construct a concrete instance of `GetPolicyDocumentStatementConditionInput` via:

GetPolicyDocumentStatementConditionArgs{...}

type GetPolicyDocumentStatementConditionOutput added in v3.29.0

type GetPolicyDocumentStatementConditionOutput struct{ *pulumi.OutputState }

func (GetPolicyDocumentStatementConditionOutput) ElementType added in v3.29.0

func (GetPolicyDocumentStatementConditionOutput) Operator added in v3.29.0

func (GetPolicyDocumentStatementConditionOutput) ToGetPolicyDocumentStatementConditionOutput added in v3.29.0

func (o GetPolicyDocumentStatementConditionOutput) ToGetPolicyDocumentStatementConditionOutput() GetPolicyDocumentStatementConditionOutput

func (GetPolicyDocumentStatementConditionOutput) ToGetPolicyDocumentStatementConditionOutputWithContext added in v3.29.0

func (o GetPolicyDocumentStatementConditionOutput) ToGetPolicyDocumentStatementConditionOutputWithContext(ctx context.Context) GetPolicyDocumentStatementConditionOutput

func (GetPolicyDocumentStatementConditionOutput) Values added in v3.29.0

func (GetPolicyDocumentStatementConditionOutput) Variable added in v3.29.0

type GetPolicyDocumentStatementInput added in v3.29.0

type GetPolicyDocumentStatementInput interface {
	pulumi.Input

	ToGetPolicyDocumentStatementOutput() GetPolicyDocumentStatementOutput
	ToGetPolicyDocumentStatementOutputWithContext(context.Context) GetPolicyDocumentStatementOutput
}

GetPolicyDocumentStatementInput is an input type that accepts GetPolicyDocumentStatementArgs and GetPolicyDocumentStatementOutput values. You can construct a concrete instance of `GetPolicyDocumentStatementInput` via:

GetPolicyDocumentStatementArgs{...}

type GetPolicyDocumentStatementOutput added in v3.29.0

type GetPolicyDocumentStatementOutput struct{ *pulumi.OutputState }

func (GetPolicyDocumentStatementOutput) Actions added in v3.29.0

Action of the RAM policy document. If you want to create a RAM role policy document, it must be `["sts:AssumeRole"]`.

func (GetPolicyDocumentStatementOutput) Conditions added in v3.29.0

Specifies the condition that are required for a policy to take effect. See `condition` below.

func (GetPolicyDocumentStatementOutput) Effect added in v3.29.0

This parameter indicates whether or not the `action` is allowed. Valid values are `Allow` and `Deny`. Default value is `Allow`. If you want to create a RAM role policy document, it must be `Allow`.

func (GetPolicyDocumentStatementOutput) ElementType added in v3.29.0

func (GetPolicyDocumentStatementOutput) Principals added in v3.29.0

Principal of the RAM policy document. If you want to create a RAM role policy document, it must be set. See `principal` below.

func (GetPolicyDocumentStatementOutput) Resources added in v3.29.0

List of specific objects which will be authorized. If you want to create a RAM policy document, it must be set.

func (GetPolicyDocumentStatementOutput) ToGetPolicyDocumentStatementOutput added in v3.29.0

func (o GetPolicyDocumentStatementOutput) ToGetPolicyDocumentStatementOutput() GetPolicyDocumentStatementOutput

func (GetPolicyDocumentStatementOutput) ToGetPolicyDocumentStatementOutputWithContext added in v3.29.0

func (o GetPolicyDocumentStatementOutput) ToGetPolicyDocumentStatementOutputWithContext(ctx context.Context) GetPolicyDocumentStatementOutput

type GetPolicyDocumentStatementPrincipal added in v3.29.0

type GetPolicyDocumentStatementPrincipal struct {
	Entity      string   `pulumi:"entity"`
	Identifiers []string `pulumi:"identifiers"`
}

type GetPolicyDocumentStatementPrincipalArgs added in v3.29.0

type GetPolicyDocumentStatementPrincipalArgs struct {
	Entity      pulumi.StringInput      `pulumi:"entity"`
	Identifiers pulumi.StringArrayInput `pulumi:"identifiers"`
}

func (GetPolicyDocumentStatementPrincipalArgs) ElementType added in v3.29.0

func (GetPolicyDocumentStatementPrincipalArgs) ToGetPolicyDocumentStatementPrincipalOutput added in v3.29.0

func (i GetPolicyDocumentStatementPrincipalArgs) ToGetPolicyDocumentStatementPrincipalOutput() GetPolicyDocumentStatementPrincipalOutput

func (GetPolicyDocumentStatementPrincipalArgs) ToGetPolicyDocumentStatementPrincipalOutputWithContext added in v3.29.0

func (i GetPolicyDocumentStatementPrincipalArgs) ToGetPolicyDocumentStatementPrincipalOutputWithContext(ctx context.Context) GetPolicyDocumentStatementPrincipalOutput

type GetPolicyDocumentStatementPrincipalArray added in v3.29.0

type GetPolicyDocumentStatementPrincipalArray []GetPolicyDocumentStatementPrincipalInput

func (GetPolicyDocumentStatementPrincipalArray) ElementType added in v3.29.0

func (GetPolicyDocumentStatementPrincipalArray) ToGetPolicyDocumentStatementPrincipalArrayOutput added in v3.29.0

func (i GetPolicyDocumentStatementPrincipalArray) ToGetPolicyDocumentStatementPrincipalArrayOutput() GetPolicyDocumentStatementPrincipalArrayOutput

func (GetPolicyDocumentStatementPrincipalArray) ToGetPolicyDocumentStatementPrincipalArrayOutputWithContext added in v3.29.0

func (i GetPolicyDocumentStatementPrincipalArray) ToGetPolicyDocumentStatementPrincipalArrayOutputWithContext(ctx context.Context) GetPolicyDocumentStatementPrincipalArrayOutput

type GetPolicyDocumentStatementPrincipalArrayInput added in v3.29.0

type GetPolicyDocumentStatementPrincipalArrayInput interface {
	pulumi.Input

	ToGetPolicyDocumentStatementPrincipalArrayOutput() GetPolicyDocumentStatementPrincipalArrayOutput
	ToGetPolicyDocumentStatementPrincipalArrayOutputWithContext(context.Context) GetPolicyDocumentStatementPrincipalArrayOutput
}

GetPolicyDocumentStatementPrincipalArrayInput is an input type that accepts GetPolicyDocumentStatementPrincipalArray and GetPolicyDocumentStatementPrincipalArrayOutput values. You can construct a concrete instance of `GetPolicyDocumentStatementPrincipalArrayInput` via:

GetPolicyDocumentStatementPrincipalArray{ GetPolicyDocumentStatementPrincipalArgs{...} }

type GetPolicyDocumentStatementPrincipalArrayOutput added in v3.29.0

type GetPolicyDocumentStatementPrincipalArrayOutput struct{ *pulumi.OutputState }

func (GetPolicyDocumentStatementPrincipalArrayOutput) ElementType added in v3.29.0

func (GetPolicyDocumentStatementPrincipalArrayOutput) Index added in v3.29.0

func (GetPolicyDocumentStatementPrincipalArrayOutput) ToGetPolicyDocumentStatementPrincipalArrayOutput added in v3.29.0

func (o GetPolicyDocumentStatementPrincipalArrayOutput) ToGetPolicyDocumentStatementPrincipalArrayOutput() GetPolicyDocumentStatementPrincipalArrayOutput

func (GetPolicyDocumentStatementPrincipalArrayOutput) ToGetPolicyDocumentStatementPrincipalArrayOutputWithContext added in v3.29.0

func (o GetPolicyDocumentStatementPrincipalArrayOutput) ToGetPolicyDocumentStatementPrincipalArrayOutputWithContext(ctx context.Context) GetPolicyDocumentStatementPrincipalArrayOutput

type GetPolicyDocumentStatementPrincipalInput added in v3.29.0

type GetPolicyDocumentStatementPrincipalInput interface {
	pulumi.Input

	ToGetPolicyDocumentStatementPrincipalOutput() GetPolicyDocumentStatementPrincipalOutput
	ToGetPolicyDocumentStatementPrincipalOutputWithContext(context.Context) GetPolicyDocumentStatementPrincipalOutput
}

GetPolicyDocumentStatementPrincipalInput is an input type that accepts GetPolicyDocumentStatementPrincipalArgs and GetPolicyDocumentStatementPrincipalOutput values. You can construct a concrete instance of `GetPolicyDocumentStatementPrincipalInput` via:

GetPolicyDocumentStatementPrincipalArgs{...}

type GetPolicyDocumentStatementPrincipalOutput added in v3.29.0

type GetPolicyDocumentStatementPrincipalOutput struct{ *pulumi.OutputState }

func (GetPolicyDocumentStatementPrincipalOutput) ElementType added in v3.29.0

func (GetPolicyDocumentStatementPrincipalOutput) Entity added in v3.29.0

func (GetPolicyDocumentStatementPrincipalOutput) Identifiers added in v3.29.0

func (GetPolicyDocumentStatementPrincipalOutput) ToGetPolicyDocumentStatementPrincipalOutput added in v3.29.0

func (o GetPolicyDocumentStatementPrincipalOutput) ToGetPolicyDocumentStatementPrincipalOutput() GetPolicyDocumentStatementPrincipalOutput

func (GetPolicyDocumentStatementPrincipalOutput) ToGetPolicyDocumentStatementPrincipalOutputWithContext added in v3.29.0

func (o GetPolicyDocumentStatementPrincipalOutput) ToGetPolicyDocumentStatementPrincipalOutputWithContext(ctx context.Context) GetPolicyDocumentStatementPrincipalOutput

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"`
	// File name where to save data source results (after running `pulumi preview`).
	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 GetRolesOutputArgs added in v3.9.0

type GetRolesOutputArgs struct {
	// A list of ram role IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter results by the role name.
	NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile pulumi.StringPtrInput `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 pulumi.StringPtrInput `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 pulumi.StringPtrInput `pulumi:"policyType"`
}

A collection of arguments for invoking getRoles.

func (GetRolesOutputArgs) ElementType added in v3.9.0

func (GetRolesOutputArgs) ElementType() reflect.Type

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.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

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

```

type GetRolesResultOutput added in v3.9.0

type GetRolesResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getRoles.

func GetRolesOutput added in v3.9.0

func GetRolesOutput(ctx *pulumi.Context, args GetRolesOutputArgs, opts ...pulumi.InvokeOption) GetRolesResultOutput

func (GetRolesResultOutput) ElementType added in v3.9.0

func (GetRolesResultOutput) ElementType() reflect.Type

func (GetRolesResultOutput) Id added in v3.9.0

The provider-assigned unique ID for this managed resource.

func (GetRolesResultOutput) Ids added in v3.9.0

A list of ram role IDs.

func (GetRolesResultOutput) NameRegex added in v3.9.0

func (GetRolesResultOutput) Names added in v3.9.0

A list of ram role names.

func (GetRolesResultOutput) OutputFile added in v3.9.0

func (GetRolesResultOutput) PolicyName added in v3.9.0

func (GetRolesResultOutput) PolicyType added in v3.9.0

func (GetRolesResultOutput) Roles added in v3.9.0

A list of roles. Each element contains the following attributes:

func (GetRolesResultOutput) ToGetRolesResultOutput added in v3.9.0

func (o GetRolesResultOutput) ToGetRolesResultOutput() GetRolesResultOutput

func (GetRolesResultOutput) ToGetRolesResultOutputWithContext added in v3.9.0

func (o GetRolesResultOutput) ToGetRolesResultOutputWithContext(ctx context.Context) GetRolesResultOutput

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 GetSamlProvidersArgs

type GetSamlProvidersArgs struct {
	// Default to `false`. Set it to `true` can output more details about resource attributes.
	EnableDetails *bool `pulumi:"enableDetails"`
	// A list of SAML Provider IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter results by SAML Provider name.
	NameRegex *string `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getSamlProviders.

type GetSamlProvidersOutputArgs added in v3.9.0

type GetSamlProvidersOutputArgs struct {
	// Default to `false`. Set it to `true` can output more details about resource attributes.
	EnableDetails pulumi.BoolPtrInput `pulumi:"enableDetails"`
	// A list of SAML Provider IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter results by SAML Provider name.
	NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
}

A collection of arguments for invoking getSamlProviders.

func (GetSamlProvidersOutputArgs) ElementType added in v3.9.0

func (GetSamlProvidersOutputArgs) ElementType() reflect.Type

type GetSamlProvidersProvider

type GetSamlProvidersProvider struct {
	// The Alibaba Cloud Resource Name (ARN) of the IdP.
	Arn string `pulumi:"arn"`
	// The description of SAML Provider.
	Description string `pulumi:"description"`
	// The encodedsaml metadata document.
	EncodedsamlMetadataDocument string `pulumi:"encodedsamlMetadataDocument"`
	// The ID of the SAML Provider.
	Id string `pulumi:"id"`
	// The saml provider name.
	SamlProviderName string `pulumi:"samlProviderName"`
	// The update time.
	UpdateDate string `pulumi:"updateDate"`
}

type GetSamlProvidersProviderArgs

type GetSamlProvidersProviderArgs struct {
	// The Alibaba Cloud Resource Name (ARN) of the IdP.
	Arn pulumi.StringInput `pulumi:"arn"`
	// The description of SAML Provider.
	Description pulumi.StringInput `pulumi:"description"`
	// The encodedsaml metadata document.
	EncodedsamlMetadataDocument pulumi.StringInput `pulumi:"encodedsamlMetadataDocument"`
	// The ID of the SAML Provider.
	Id pulumi.StringInput `pulumi:"id"`
	// The saml provider name.
	SamlProviderName pulumi.StringInput `pulumi:"samlProviderName"`
	// The update time.
	UpdateDate pulumi.StringInput `pulumi:"updateDate"`
}

func (GetSamlProvidersProviderArgs) ElementType

func (GetSamlProvidersProviderArgs) ToGetSamlProvidersProviderOutput

func (i GetSamlProvidersProviderArgs) ToGetSamlProvidersProviderOutput() GetSamlProvidersProviderOutput

func (GetSamlProvidersProviderArgs) ToGetSamlProvidersProviderOutputWithContext

func (i GetSamlProvidersProviderArgs) ToGetSamlProvidersProviderOutputWithContext(ctx context.Context) GetSamlProvidersProviderOutput

type GetSamlProvidersProviderArray

type GetSamlProvidersProviderArray []GetSamlProvidersProviderInput

func (GetSamlProvidersProviderArray) ElementType

func (GetSamlProvidersProviderArray) ToGetSamlProvidersProviderArrayOutput

func (i GetSamlProvidersProviderArray) ToGetSamlProvidersProviderArrayOutput() GetSamlProvidersProviderArrayOutput

func (GetSamlProvidersProviderArray) ToGetSamlProvidersProviderArrayOutputWithContext

func (i GetSamlProvidersProviderArray) ToGetSamlProvidersProviderArrayOutputWithContext(ctx context.Context) GetSamlProvidersProviderArrayOutput

type GetSamlProvidersProviderArrayInput

type GetSamlProvidersProviderArrayInput interface {
	pulumi.Input

	ToGetSamlProvidersProviderArrayOutput() GetSamlProvidersProviderArrayOutput
	ToGetSamlProvidersProviderArrayOutputWithContext(context.Context) GetSamlProvidersProviderArrayOutput
}

GetSamlProvidersProviderArrayInput is an input type that accepts GetSamlProvidersProviderArray and GetSamlProvidersProviderArrayOutput values. You can construct a concrete instance of `GetSamlProvidersProviderArrayInput` via:

GetSamlProvidersProviderArray{ GetSamlProvidersProviderArgs{...} }

type GetSamlProvidersProviderArrayOutput

type GetSamlProvidersProviderArrayOutput struct{ *pulumi.OutputState }

func (GetSamlProvidersProviderArrayOutput) ElementType

func (GetSamlProvidersProviderArrayOutput) Index

func (GetSamlProvidersProviderArrayOutput) ToGetSamlProvidersProviderArrayOutput

func (o GetSamlProvidersProviderArrayOutput) ToGetSamlProvidersProviderArrayOutput() GetSamlProvidersProviderArrayOutput

func (GetSamlProvidersProviderArrayOutput) ToGetSamlProvidersProviderArrayOutputWithContext

func (o GetSamlProvidersProviderArrayOutput) ToGetSamlProvidersProviderArrayOutputWithContext(ctx context.Context) GetSamlProvidersProviderArrayOutput

type GetSamlProvidersProviderInput

type GetSamlProvidersProviderInput interface {
	pulumi.Input

	ToGetSamlProvidersProviderOutput() GetSamlProvidersProviderOutput
	ToGetSamlProvidersProviderOutputWithContext(context.Context) GetSamlProvidersProviderOutput
}

GetSamlProvidersProviderInput is an input type that accepts GetSamlProvidersProviderArgs and GetSamlProvidersProviderOutput values. You can construct a concrete instance of `GetSamlProvidersProviderInput` via:

GetSamlProvidersProviderArgs{...}

type GetSamlProvidersProviderOutput

type GetSamlProvidersProviderOutput struct{ *pulumi.OutputState }

func (GetSamlProvidersProviderOutput) Arn

The Alibaba Cloud Resource Name (ARN) of the IdP.

func (GetSamlProvidersProviderOutput) Description

The description of SAML Provider.

func (GetSamlProvidersProviderOutput) ElementType

func (GetSamlProvidersProviderOutput) EncodedsamlMetadataDocument

func (o GetSamlProvidersProviderOutput) EncodedsamlMetadataDocument() pulumi.StringOutput

The encodedsaml metadata document.

func (GetSamlProvidersProviderOutput) Id

The ID of the SAML Provider.

func (GetSamlProvidersProviderOutput) SamlProviderName

func (o GetSamlProvidersProviderOutput) SamlProviderName() pulumi.StringOutput

The saml provider name.

func (GetSamlProvidersProviderOutput) ToGetSamlProvidersProviderOutput

func (o GetSamlProvidersProviderOutput) ToGetSamlProvidersProviderOutput() GetSamlProvidersProviderOutput

func (GetSamlProvidersProviderOutput) ToGetSamlProvidersProviderOutputWithContext

func (o GetSamlProvidersProviderOutput) ToGetSamlProvidersProviderOutputWithContext(ctx context.Context) GetSamlProvidersProviderOutput

func (GetSamlProvidersProviderOutput) UpdateDate

The update time.

type GetSamlProvidersResult

type GetSamlProvidersResult struct {
	EnableDetails *bool `pulumi:"enableDetails"`
	// The provider-assigned unique ID for this managed resource.
	Id        string   `pulumi:"id"`
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of SAML Provider names.
	Names      []string `pulumi:"names"`
	OutputFile *string  `pulumi:"outputFile"`
	// A list of Ram Saml Providers. Each element contains the following attributes:
	Providers []GetSamlProvidersProvider `pulumi:"providers"`
}

A collection of values returned by getSamlProviders.

func GetSamlProviders

func GetSamlProviders(ctx *pulumi.Context, args *GetSamlProvidersArgs, opts ...pulumi.InvokeOption) (*GetSamlProvidersResult, error)

This data source provides the Ram Saml Providers of the current Alibaba Cloud user.

> **NOTE:** Available since v1.114.0+.

## Example Usage

Basic Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := ram.GetSamlProviders(ctx, &ram.GetSamlProvidersArgs{
			Ids: []string{
				"samlProviderName",
			},
			NameRegex: pulumi.StringRef("tf-testAcc"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstRamSamlProviderId", example.Providers[0].Id)
		return nil
	})
}

```

type GetSamlProvidersResultOutput added in v3.9.0

type GetSamlProvidersResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getSamlProviders.

func GetSamlProvidersOutput added in v3.9.0

func (GetSamlProvidersResultOutput) ElementType added in v3.9.0

func (GetSamlProvidersResultOutput) EnableDetails added in v3.9.0

func (GetSamlProvidersResultOutput) Id added in v3.9.0

The provider-assigned unique ID for this managed resource.

func (GetSamlProvidersResultOutput) Ids added in v3.9.0

func (GetSamlProvidersResultOutput) NameRegex added in v3.9.0

func (GetSamlProvidersResultOutput) Names added in v3.9.0

A list of SAML Provider names.

func (GetSamlProvidersResultOutput) OutputFile added in v3.9.0

func (GetSamlProvidersResultOutput) Providers added in v3.9.0

A list of Ram Saml Providers. Each element contains the following attributes:

func (GetSamlProvidersResultOutput) ToGetSamlProvidersResultOutput added in v3.9.0

func (o GetSamlProvidersResultOutput) ToGetSamlProvidersResultOutput() GetSamlProvidersResultOutput

func (GetSamlProvidersResultOutput) ToGetSamlProvidersResultOutputWithContext added in v3.9.0

func (o GetSamlProvidersResultOutput) ToGetSamlProvidersResultOutputWithContext(ctx context.Context) GetSamlProvidersResultOutput

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"`
	// File name where to save data source results (after running `pulumi preview`).
	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 GetUsersOutputArgs added in v3.9.0

type GetUsersOutputArgs struct {
	// Filter results by a specific group name. Returned users are in the specified group.
	GroupName pulumi.StringPtrInput `pulumi:"groupName"`
	// A list of ram user IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter resulting users by their names.
	NameRegex pulumi.StringPtrInput `pulumi:"nameRegex"`
	// File name where to save data source results (after running `pulumi preview`).
	OutputFile pulumi.StringPtrInput `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 pulumi.StringPtrInput `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 pulumi.StringPtrInput `pulumi:"policyType"`
}

A collection of arguments for invoking getUsers.

func (GetUsersOutputArgs) ElementType added in v3.9.0

func (GetUsersOutputArgs) ElementType() reflect.Type

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's name.
	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.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewGroup(ctx, "default", &ram.GroupArgs{
			Name:     pulumi.String("group1"),
			Comments: pulumi.String("group comments"),
			Force:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		defaultUser, err := ram.NewUser(ctx, "default", &ram.UserArgs{
			Name:        pulumi.String("user-example"),
			DisplayName: pulumi.String("displayname"),
			Mobile:      pulumi.String("86-18888888888"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewGroupMembership(ctx, "default", &ram.GroupMembershipArgs{
			GroupName: _default.Name,
			UserNames: pulumi.StringArray{
				defaultUser.Name,
			},
		})
		if err != nil {
			return err
		}
		defaultPolicy, err := ram.NewPolicy(ctx, "default", &ram.PolicyArgs{
			PolicyName: pulumi.String("ram-policy-example"),
			PolicyDocument: pulumi.String(`			{
				"Statement": [
				 {
					"Action": [
					"oss:ListObjects",
					"oss:ListObjects"
			  		],
			  		"Effect": "Deny",
			  		"Resource": [
						"acs:oss:*:*:mybucket",
						"acs:oss:*:*:mybucket/*"
			  		]
				 }
		  		],
				"Version": "1"
			}

`),

			Description: pulumi.String("this is a policy example"),
			Force:       pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewUserPolicyAttachment(ctx, "default", &ram.UserPolicyAttachmentArgs{
			PolicyName: defaultPolicy.PolicyName,
			UserName:   defaultUser.Name,
			PolicyType: defaultPolicy.Type,
		})
		if err != nil {
			return err
		}
		usersDs := ram.GetUsersOutput(ctx, ram.GetUsersOutputArgs{
			OutputFile: pulumi.String("users.txt"),
			GroupName:  _default.Name,
			PolicyName: defaultPolicy.PolicyName,
			PolicyType: pulumi.String("Custom"),
			NameRegex:  defaultUser.Name,
		}, nil)
		ctx.Export("firstUserId", usersDs.ApplyT(func(usersDs ram.GetUsersResult) (*string, error) {
			return &usersDs.Users[0].Id, nil
		}).(pulumi.StringPtrOutput))
		return nil
	})
}

```

type GetUsersResultOutput added in v3.9.0

type GetUsersResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getUsers.

func GetUsersOutput added in v3.9.0

func GetUsersOutput(ctx *pulumi.Context, args GetUsersOutputArgs, opts ...pulumi.InvokeOption) GetUsersResultOutput

func (GetUsersResultOutput) ElementType added in v3.9.0

func (GetUsersResultOutput) ElementType() reflect.Type

func (GetUsersResultOutput) GroupName added in v3.9.0

func (GetUsersResultOutput) Id added in v3.9.0

The provider-assigned unique ID for this managed resource.

func (GetUsersResultOutput) Ids added in v3.9.0

A list of ram user IDs.

func (GetUsersResultOutput) NameRegex added in v3.9.0

func (GetUsersResultOutput) Names added in v3.9.0

A list of ram user's name.

func (GetUsersResultOutput) OutputFile added in v3.9.0

func (GetUsersResultOutput) PolicyName added in v3.9.0

func (GetUsersResultOutput) PolicyType added in v3.9.0

func (GetUsersResultOutput) ToGetUsersResultOutput added in v3.9.0

func (o GetUsersResultOutput) ToGetUsersResultOutput() GetUsersResultOutput

func (GetUsersResultOutput) ToGetUsersResultOutputWithContext added in v3.9.0

func (o GetUsersResultOutput) ToGetUsersResultOutputWithContext(ctx context.Context) GetUsersResultOutput

func (GetUsersResultOutput) Users added in v3.9.0

A list of users. Each element contains the following attributes:

type GetUsersUser

type GetUsersUser struct {
	// Creation date of the user.
	CreateDate string `pulumi:"createDate"`
	// The original id is user's name, but it is user id in 1.37.0+.
	Id string `pulumi:"id"`
	// (Removed) 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's name, but it is user id in 1.37.0+.
	Id pulumi.StringInput `pulumi:"id"`
	// (Removed) 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's name, but it is user id in 1.37.0+.

func (GetUsersUserOutput) LastLoginDate

func (o GetUsersUserOutput) LastLoginDate() pulumi.StringOutput

(Removed) 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"`
}

Provides a RAM Group resource.

> **NOTE:** When you want to destroy this resource forcefully(means remove all the relationships associated with it automatically and then destroy it) without set `force` with `true` at beginning, you need add `force = true` to configuration file and run `pulumi preview`, then you can delete resource forcefully.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new RAM Group.
		_, err := ram.NewGroup(ctx, "group", &ram.GroupArgs{
			Name:     pulumi.String("groupName"),
			Comments: pulumi.String("this is a group comments."),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## 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

func (*Group) ElementType() reflect.Type

func (*Group) ToGroupOutput

func (i *Group) ToGroupOutput() GroupOutput

func (*Group) ToGroupOutputWithContext

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 GroupArray

type GroupArray []GroupInput

func (GroupArray) ElementType

func (GroupArray) ElementType() reflect.Type

func (GroupArray) ToGroupArrayOutput

func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput

func (GroupArray) ToGroupArrayOutputWithContext

func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput

type GroupArrayInput

type GroupArrayInput interface {
	pulumi.Input

	ToGroupArrayOutput() GroupArrayOutput
	ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput
}

GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values. You can construct a concrete instance of `GroupArrayInput` via:

GroupArray{ GroupArgs{...} }

type GroupArrayOutput

type GroupArrayOutput struct{ *pulumi.OutputState }

func (GroupArrayOutput) ElementType

func (GroupArrayOutput) ElementType() reflect.Type

func (GroupArrayOutput) Index

func (GroupArrayOutput) ToGroupArrayOutput

func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput

func (GroupArrayOutput) ToGroupArrayOutputWithContext

func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput

type GroupInput

type GroupInput interface {
	pulumi.Input

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

type GroupMap

type GroupMap map[string]GroupInput

func (GroupMap) ElementType

func (GroupMap) ElementType() reflect.Type

func (GroupMap) ToGroupMapOutput

func (i GroupMap) ToGroupMapOutput() GroupMapOutput

func (GroupMap) ToGroupMapOutputWithContext

func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput

type GroupMapInput

type GroupMapInput interface {
	pulumi.Input

	ToGroupMapOutput() GroupMapOutput
	ToGroupMapOutputWithContext(context.Context) GroupMapOutput
}

GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values. You can construct a concrete instance of `GroupMapInput` via:

GroupMap{ "key": GroupArgs{...} }

type GroupMapOutput

type GroupMapOutput struct{ *pulumi.OutputState }

func (GroupMapOutput) ElementType

func (GroupMapOutput) ElementType() reflect.Type

func (GroupMapOutput) MapIndex

func (GroupMapOutput) ToGroupMapOutput

func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput

func (GroupMapOutput) ToGroupMapOutputWithContext

func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput

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.

> **NOTE:** Available since v1.0.0+.

## 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

func (*GroupMembership) ElementType() reflect.Type

func (*GroupMembership) ToGroupMembershipOutput

func (i *GroupMembership) ToGroupMembershipOutput() GroupMembershipOutput

func (*GroupMembership) ToGroupMembershipOutputWithContext

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 GroupMembershipArray

type GroupMembershipArray []GroupMembershipInput

func (GroupMembershipArray) ElementType

func (GroupMembershipArray) ElementType() reflect.Type

func (GroupMembershipArray) ToGroupMembershipArrayOutput

func (i GroupMembershipArray) ToGroupMembershipArrayOutput() GroupMembershipArrayOutput

func (GroupMembershipArray) ToGroupMembershipArrayOutputWithContext

func (i GroupMembershipArray) ToGroupMembershipArrayOutputWithContext(ctx context.Context) GroupMembershipArrayOutput

type GroupMembershipArrayInput

type GroupMembershipArrayInput interface {
	pulumi.Input

	ToGroupMembershipArrayOutput() GroupMembershipArrayOutput
	ToGroupMembershipArrayOutputWithContext(context.Context) GroupMembershipArrayOutput
}

GroupMembershipArrayInput is an input type that accepts GroupMembershipArray and GroupMembershipArrayOutput values. You can construct a concrete instance of `GroupMembershipArrayInput` via:

GroupMembershipArray{ GroupMembershipArgs{...} }

type GroupMembershipArrayOutput

type GroupMembershipArrayOutput struct{ *pulumi.OutputState }

func (GroupMembershipArrayOutput) ElementType

func (GroupMembershipArrayOutput) ElementType() reflect.Type

func (GroupMembershipArrayOutput) Index

func (GroupMembershipArrayOutput) ToGroupMembershipArrayOutput

func (o GroupMembershipArrayOutput) ToGroupMembershipArrayOutput() GroupMembershipArrayOutput

func (GroupMembershipArrayOutput) ToGroupMembershipArrayOutputWithContext

func (o GroupMembershipArrayOutput) ToGroupMembershipArrayOutputWithContext(ctx context.Context) GroupMembershipArrayOutput

type GroupMembershipInput

type GroupMembershipInput interface {
	pulumi.Input

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

type GroupMembershipMap

type GroupMembershipMap map[string]GroupMembershipInput

func (GroupMembershipMap) ElementType

func (GroupMembershipMap) ElementType() reflect.Type

func (GroupMembershipMap) ToGroupMembershipMapOutput

func (i GroupMembershipMap) ToGroupMembershipMapOutput() GroupMembershipMapOutput

func (GroupMembershipMap) ToGroupMembershipMapOutputWithContext

func (i GroupMembershipMap) ToGroupMembershipMapOutputWithContext(ctx context.Context) GroupMembershipMapOutput

type GroupMembershipMapInput

type GroupMembershipMapInput interface {
	pulumi.Input

	ToGroupMembershipMapOutput() GroupMembershipMapOutput
	ToGroupMembershipMapOutputWithContext(context.Context) GroupMembershipMapOutput
}

GroupMembershipMapInput is an input type that accepts GroupMembershipMap and GroupMembershipMapOutput values. You can construct a concrete instance of `GroupMembershipMapInput` via:

GroupMembershipMap{ "key": GroupMembershipArgs{...} }

type GroupMembershipMapOutput

type GroupMembershipMapOutput struct{ *pulumi.OutputState }

func (GroupMembershipMapOutput) ElementType

func (GroupMembershipMapOutput) ElementType() reflect.Type

func (GroupMembershipMapOutput) MapIndex

func (GroupMembershipMapOutput) ToGroupMembershipMapOutput

func (o GroupMembershipMapOutput) ToGroupMembershipMapOutput() GroupMembershipMapOutput

func (GroupMembershipMapOutput) ToGroupMembershipMapOutputWithContext

func (o GroupMembershipMapOutput) ToGroupMembershipMapOutputWithContext(ctx context.Context) GroupMembershipMapOutput

type GroupMembershipOutput

type GroupMembershipOutput struct{ *pulumi.OutputState }

func (GroupMembershipOutput) ElementType

func (GroupMembershipOutput) ElementType() reflect.Type

func (GroupMembershipOutput) GroupName added in v3.27.0

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.

func (GroupMembershipOutput) ToGroupMembershipOutput

func (o GroupMembershipOutput) ToGroupMembershipOutput() GroupMembershipOutput

func (GroupMembershipOutput) ToGroupMembershipOutputWithContext

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

func (GroupMembershipOutput) UserNames added in v3.27.0

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.

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

type GroupOutput struct{ *pulumi.OutputState }

func (GroupOutput) Comments added in v3.27.0

func (o GroupOutput) Comments() pulumi.StringPtrOutput

Comment of the RAM group. This parameter can have a string of 1 to 128 characters.

func (GroupOutput) ElementType

func (GroupOutput) ElementType() reflect.Type

func (GroupOutput) Force added in v3.27.0

func (o GroupOutput) Force() pulumi.BoolPtrOutput

This parameter is used for resource destroy. Default value is `false`.

func (GroupOutput) Name added in v3.27.0

func (o GroupOutput) Name() pulumi.StringOutput

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.

func (GroupOutput) ToGroupOutput

func (o GroupOutput) ToGroupOutput() GroupOutput

func (GroupOutput) ToGroupOutputWithContext

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.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a RAM Group Policy attachment.
		group, err := ram.NewGroup(ctx, "group", &ram.GroupArgs{
			Name:     pulumi.String("groupName"),
			Comments: pulumi.String("this is a group comments."),
		})
		if err != nil {
			return err
		}
		policy, err := ram.NewPolicy(ctx, "policy", &ram.PolicyArgs{
			Name: pulumi.String("policyName"),
			Document: pulumi.String(`    {
      "Statement": [
        {
          "Action": [
            "oss:ListObjects",
            "oss:GetObject"
          ],
          "Effect": "Allow",
          "Resource": [
            "acs:oss:*:*:mybucket",
            "acs:oss:*:*:mybucket/*"
          ]
        }
      ],
        "Version": "1"
    }

`),

			Description: pulumi.String("this is a policy test"),
		})
		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

func (*GroupPolicyAttachment) ElementType() reflect.Type

func (*GroupPolicyAttachment) ToGroupPolicyAttachmentOutput

func (i *GroupPolicyAttachment) ToGroupPolicyAttachmentOutput() GroupPolicyAttachmentOutput

func (*GroupPolicyAttachment) ToGroupPolicyAttachmentOutputWithContext

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 GroupPolicyAttachmentArray

type GroupPolicyAttachmentArray []GroupPolicyAttachmentInput

func (GroupPolicyAttachmentArray) ElementType

func (GroupPolicyAttachmentArray) ElementType() reflect.Type

func (GroupPolicyAttachmentArray) ToGroupPolicyAttachmentArrayOutput

func (i GroupPolicyAttachmentArray) ToGroupPolicyAttachmentArrayOutput() GroupPolicyAttachmentArrayOutput

func (GroupPolicyAttachmentArray) ToGroupPolicyAttachmentArrayOutputWithContext

func (i GroupPolicyAttachmentArray) ToGroupPolicyAttachmentArrayOutputWithContext(ctx context.Context) GroupPolicyAttachmentArrayOutput

type GroupPolicyAttachmentArrayInput

type GroupPolicyAttachmentArrayInput interface {
	pulumi.Input

	ToGroupPolicyAttachmentArrayOutput() GroupPolicyAttachmentArrayOutput
	ToGroupPolicyAttachmentArrayOutputWithContext(context.Context) GroupPolicyAttachmentArrayOutput
}

GroupPolicyAttachmentArrayInput is an input type that accepts GroupPolicyAttachmentArray and GroupPolicyAttachmentArrayOutput values. You can construct a concrete instance of `GroupPolicyAttachmentArrayInput` via:

GroupPolicyAttachmentArray{ GroupPolicyAttachmentArgs{...} }

type GroupPolicyAttachmentArrayOutput

type GroupPolicyAttachmentArrayOutput struct{ *pulumi.OutputState }

func (GroupPolicyAttachmentArrayOutput) ElementType

func (GroupPolicyAttachmentArrayOutput) Index

func (GroupPolicyAttachmentArrayOutput) ToGroupPolicyAttachmentArrayOutput

func (o GroupPolicyAttachmentArrayOutput) ToGroupPolicyAttachmentArrayOutput() GroupPolicyAttachmentArrayOutput

func (GroupPolicyAttachmentArrayOutput) ToGroupPolicyAttachmentArrayOutputWithContext

func (o GroupPolicyAttachmentArrayOutput) ToGroupPolicyAttachmentArrayOutputWithContext(ctx context.Context) GroupPolicyAttachmentArrayOutput

type GroupPolicyAttachmentInput

type GroupPolicyAttachmentInput interface {
	pulumi.Input

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

type GroupPolicyAttachmentMap

type GroupPolicyAttachmentMap map[string]GroupPolicyAttachmentInput

func (GroupPolicyAttachmentMap) ElementType

func (GroupPolicyAttachmentMap) ElementType() reflect.Type

func (GroupPolicyAttachmentMap) ToGroupPolicyAttachmentMapOutput

func (i GroupPolicyAttachmentMap) ToGroupPolicyAttachmentMapOutput() GroupPolicyAttachmentMapOutput

func (GroupPolicyAttachmentMap) ToGroupPolicyAttachmentMapOutputWithContext

func (i GroupPolicyAttachmentMap) ToGroupPolicyAttachmentMapOutputWithContext(ctx context.Context) GroupPolicyAttachmentMapOutput

type GroupPolicyAttachmentMapInput

type GroupPolicyAttachmentMapInput interface {
	pulumi.Input

	ToGroupPolicyAttachmentMapOutput() GroupPolicyAttachmentMapOutput
	ToGroupPolicyAttachmentMapOutputWithContext(context.Context) GroupPolicyAttachmentMapOutput
}

GroupPolicyAttachmentMapInput is an input type that accepts GroupPolicyAttachmentMap and GroupPolicyAttachmentMapOutput values. You can construct a concrete instance of `GroupPolicyAttachmentMapInput` via:

GroupPolicyAttachmentMap{ "key": GroupPolicyAttachmentArgs{...} }

type GroupPolicyAttachmentMapOutput

type GroupPolicyAttachmentMapOutput struct{ *pulumi.OutputState }

func (GroupPolicyAttachmentMapOutput) ElementType

func (GroupPolicyAttachmentMapOutput) MapIndex

func (GroupPolicyAttachmentMapOutput) ToGroupPolicyAttachmentMapOutput

func (o GroupPolicyAttachmentMapOutput) ToGroupPolicyAttachmentMapOutput() GroupPolicyAttachmentMapOutput

func (GroupPolicyAttachmentMapOutput) ToGroupPolicyAttachmentMapOutputWithContext

func (o GroupPolicyAttachmentMapOutput) ToGroupPolicyAttachmentMapOutputWithContext(ctx context.Context) GroupPolicyAttachmentMapOutput

type GroupPolicyAttachmentOutput

type GroupPolicyAttachmentOutput struct{ *pulumi.OutputState }

func (GroupPolicyAttachmentOutput) ElementType

func (GroupPolicyAttachmentOutput) GroupName added in v3.27.0

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.

func (GroupPolicyAttachmentOutput) PolicyName added in v3.27.0

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.

func (GroupPolicyAttachmentOutput) PolicyType added in v3.27.0

Type of the RAM policy. It must be `Custom` or `System`.

func (GroupPolicyAttachmentOutput) ToGroupPolicyAttachmentOutput

func (o GroupPolicyAttachmentOutput) ToGroupPolicyAttachmentOutput() GroupPolicyAttachmentOutput

func (GroupPolicyAttachmentOutput) ToGroupPolicyAttachmentOutputWithContext

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

	// Specifies whether an MFA device must be attached to the RAM user upon logon. Default value: `false`. Valid values: `true`, `false`.
	MfaBindRequired pulumi.BoolPtrOutput `pulumi:"mfaBindRequired"`
	// The logon password of the RAM user. The password must meet the password strength requirements.
	Password pulumi.StringOutput `pulumi:"password"`
	// Specifies whether the RAM user must change the password upon logon. Default value: `false`. Valid values: `true`, `false`.
	PasswordResetRequired pulumi.BoolPtrOutput `pulumi:"passwordResetRequired"`
	// The 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.

For information about RAM User Login Profile and how to use it, see [What is Login Profile](https://www.alibabacloud.com/help/en/ram/developer-reference/api-ram-2015-05-01-createloginprofile).

> **NOTE:** Available since v1.0.0.

## Example Usage

Basic Usage

```go package main

import (

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

)

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

```

## Import

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

```sh $ pulumi import alicloud:ram/loginProfile:LoginProfile example <id> ```

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

func (*LoginProfile) ElementType() reflect.Type

func (*LoginProfile) ToLoginProfileOutput

func (i *LoginProfile) ToLoginProfileOutput() LoginProfileOutput

func (*LoginProfile) ToLoginProfileOutputWithContext

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

type LoginProfileArgs

type LoginProfileArgs struct {
	// Specifies whether an MFA device must be attached to the RAM user upon logon. Default value: `false`. Valid values: `true`, `false`.
	MfaBindRequired pulumi.BoolPtrInput
	// The logon password of the RAM user. The password must meet the password strength requirements.
	Password pulumi.StringInput
	// Specifies whether the RAM user must change the password upon logon. Default value: `false`. Valid values: `true`, `false`.
	PasswordResetRequired pulumi.BoolPtrInput
	// The 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 LoginProfileArray

type LoginProfileArray []LoginProfileInput

func (LoginProfileArray) ElementType

func (LoginProfileArray) ElementType() reflect.Type

func (LoginProfileArray) ToLoginProfileArrayOutput

func (i LoginProfileArray) ToLoginProfileArrayOutput() LoginProfileArrayOutput

func (LoginProfileArray) ToLoginProfileArrayOutputWithContext

func (i LoginProfileArray) ToLoginProfileArrayOutputWithContext(ctx context.Context) LoginProfileArrayOutput

type LoginProfileArrayInput

type LoginProfileArrayInput interface {
	pulumi.Input

	ToLoginProfileArrayOutput() LoginProfileArrayOutput
	ToLoginProfileArrayOutputWithContext(context.Context) LoginProfileArrayOutput
}

LoginProfileArrayInput is an input type that accepts LoginProfileArray and LoginProfileArrayOutput values. You can construct a concrete instance of `LoginProfileArrayInput` via:

LoginProfileArray{ LoginProfileArgs{...} }

type LoginProfileArrayOutput

type LoginProfileArrayOutput struct{ *pulumi.OutputState }

func (LoginProfileArrayOutput) ElementType

func (LoginProfileArrayOutput) ElementType() reflect.Type

func (LoginProfileArrayOutput) Index

func (LoginProfileArrayOutput) ToLoginProfileArrayOutput

func (o LoginProfileArrayOutput) ToLoginProfileArrayOutput() LoginProfileArrayOutput

func (LoginProfileArrayOutput) ToLoginProfileArrayOutputWithContext

func (o LoginProfileArrayOutput) ToLoginProfileArrayOutputWithContext(ctx context.Context) LoginProfileArrayOutput

type LoginProfileInput

type LoginProfileInput interface {
	pulumi.Input

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

type LoginProfileMap

type LoginProfileMap map[string]LoginProfileInput

func (LoginProfileMap) ElementType

func (LoginProfileMap) ElementType() reflect.Type

func (LoginProfileMap) ToLoginProfileMapOutput

func (i LoginProfileMap) ToLoginProfileMapOutput() LoginProfileMapOutput

func (LoginProfileMap) ToLoginProfileMapOutputWithContext

func (i LoginProfileMap) ToLoginProfileMapOutputWithContext(ctx context.Context) LoginProfileMapOutput

type LoginProfileMapInput

type LoginProfileMapInput interface {
	pulumi.Input

	ToLoginProfileMapOutput() LoginProfileMapOutput
	ToLoginProfileMapOutputWithContext(context.Context) LoginProfileMapOutput
}

LoginProfileMapInput is an input type that accepts LoginProfileMap and LoginProfileMapOutput values. You can construct a concrete instance of `LoginProfileMapInput` via:

LoginProfileMap{ "key": LoginProfileArgs{...} }

type LoginProfileMapOutput

type LoginProfileMapOutput struct{ *pulumi.OutputState }

func (LoginProfileMapOutput) ElementType

func (LoginProfileMapOutput) ElementType() reflect.Type

func (LoginProfileMapOutput) MapIndex

func (LoginProfileMapOutput) ToLoginProfileMapOutput

func (o LoginProfileMapOutput) ToLoginProfileMapOutput() LoginProfileMapOutput

func (LoginProfileMapOutput) ToLoginProfileMapOutputWithContext

func (o LoginProfileMapOutput) ToLoginProfileMapOutputWithContext(ctx context.Context) LoginProfileMapOutput

type LoginProfileOutput

type LoginProfileOutput struct{ *pulumi.OutputState }

func (LoginProfileOutput) ElementType

func (LoginProfileOutput) ElementType() reflect.Type

func (LoginProfileOutput) MfaBindRequired added in v3.27.0

func (o LoginProfileOutput) MfaBindRequired() pulumi.BoolPtrOutput

Specifies whether an MFA device must be attached to the RAM user upon logon. Default value: `false`. Valid values: `true`, `false`.

func (LoginProfileOutput) Password added in v3.27.0

func (o LoginProfileOutput) Password() pulumi.StringOutput

The logon password of the RAM user. The password must meet the password strength requirements.

func (LoginProfileOutput) PasswordResetRequired added in v3.27.0

func (o LoginProfileOutput) PasswordResetRequired() pulumi.BoolPtrOutput

Specifies whether the RAM user must change the password upon logon. Default value: `false`. Valid values: `true`, `false`.

func (LoginProfileOutput) ToLoginProfileOutput

func (o LoginProfileOutput) ToLoginProfileOutput() LoginProfileOutput

func (LoginProfileOutput) ToLoginProfileOutputWithContext

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

func (LoginProfileOutput) UserName added in v3.27.0

func (o LoginProfileOutput) UserName() pulumi.StringOutput

The 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.

type LoginProfileState

type LoginProfileState struct {
	// Specifies whether an MFA device must be attached to the RAM user upon logon. Default value: `false`. Valid values: `true`, `false`.
	MfaBindRequired pulumi.BoolPtrInput
	// The logon password of the RAM user. The password must meet the password strength requirements.
	Password pulumi.StringPtrInput
	// Specifies whether the RAM user must change the password upon logon. Default value: `false`. Valid values: `true`, `false`.
	PasswordResetRequired pulumi.BoolPtrInput
	// The 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 LookupAccountAliasOutputArgs added in v3.9.0

type LookupAccountAliasOutputArgs struct {
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
}

A collection of arguments for invoking getAccountAlias.

func (LookupAccountAliasOutputArgs) ElementType added in v3.9.0

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 LookupAccountAliasResultOutput added in v3.9.0

type LookupAccountAliasResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getAccountAlias.

func LookupAccountAliasOutput added in v3.9.0

func (LookupAccountAliasResultOutput) AccountAlias added in v3.9.0

func (LookupAccountAliasResultOutput) ElementType added in v3.9.0

func (LookupAccountAliasResultOutput) Id added in v3.9.0

The provider-assigned unique ID for this managed resource.

func (LookupAccountAliasResultOutput) OutputFile added in v3.9.0

func (LookupAccountAliasResultOutput) ToLookupAccountAliasResultOutput added in v3.9.0

func (o LookupAccountAliasResultOutput) ToLookupAccountAliasResultOutput() LookupAccountAliasResultOutput

func (LookupAccountAliasResultOutput) ToLookupAccountAliasResultOutputWithContext added in v3.9.0

func (o LookupAccountAliasResultOutput) ToLookupAccountAliasResultOutputWithContext(ctx context.Context) LookupAccountAliasResultOutput

type Policy

type Policy struct {
	pulumi.CustomResourceState

	// The policy attachment count.
	AttachmentCount pulumi.IntOutput `pulumi:"attachmentCount"`
	// The default version of policy.
	DefaultVersion pulumi.StringOutput `pulumi:"defaultVersion"`
	// Description of the RAM policy. This name can have a string of 1 to 1024 characters.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// It has been deprecated since provider version 1.114.0 and `policyDocument` instead.
	//
	// Deprecated: Field 'document' has been deprecated from provider version 1.114.0. New field 'policy_document' instead.
	Document pulumi.StringOutput `pulumi:"document"`
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrOutput `pulumi:"force"`
	// It has been deprecated since provider version 1.114.0 and `policyName` instead.
	//
	// Deprecated: Field 'name' has been deprecated from provider version 1.114.0. New field 'policy_name' instead.
	Name pulumi.StringOutput `pulumi:"name"`
	// Document of the RAM policy. It is required when the `statement` is not specified.
	PolicyDocument pulumi.StringOutput `pulumi:"policyDocument"`
	// 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"`
	// The rotation strategy of the policy. You can use this parameter to delete an early policy version. Valid Values: `None`, `DeleteOldestNonDefaultVersionWhenLimitExceeded`. Default to `None`.
	RotateStrategy pulumi.StringOutput `pulumi:"rotateStrategy"`
	// (It has been deprecated since 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. See `statement` below.
	//
	// 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 since 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"`
	// The ID of default version policy.
	VersionId pulumi.StringOutput `pulumi:"versionId"`
}

Provides a RAM Policy resource.

> **NOTE:** When you want to destroy this resource forcefully(means remove all the relationships associated with it automatically and then destroy it) without set `force` with `true` at beginning, you need add `force = true` to configuration file and run `pulumi preview`, then you can delete resource forcefully.

> **NOTE:** Each policy can own at most 5 versions and the oldest version will be removed after its version achieves 5.

> **NOTE:** If the policy has multiple versions, all non-default versions will be deleted first when deleting policy.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new RAM Policy.
		_, err := ram.NewPolicy(ctx, "policy", &ram.PolicyArgs{
			PolicyName: pulumi.String("policyName"),
			PolicyDocument: pulumi.String(`  {
    "Statement": [
      {
        "Action": [
          "oss:ListObjects",
          "oss:GetObject"
        ],
        "Effect": "Allow",
        "Resource": [
          "acs:oss:*:*:mybucket",
          "acs:oss:*:*:mybucket/*"
        ]
      }
    ],
      "Version": "1"
  }

`),

			Description: pulumi.String("this is a policy test"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## 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

func (*Policy) ElementType() reflect.Type

func (*Policy) ToPolicyOutput

func (i *Policy) ToPolicyOutput() PolicyOutput

func (*Policy) ToPolicyOutputWithContext

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
	// It has been deprecated since provider version 1.114.0 and `policyDocument` instead.
	//
	// Deprecated: Field 'document' has been deprecated from provider version 1.114.0. New field 'policy_document' instead.
	Document pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// It has been deprecated since provider version 1.114.0 and `policyName` instead.
	//
	// Deprecated: Field 'name' has been deprecated from provider version 1.114.0. New field 'policy_name' instead.
	Name pulumi.StringPtrInput
	// Document of the RAM policy. It is required when the `statement` is not specified.
	PolicyDocument 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
	// The rotation strategy of the policy. You can use this parameter to delete an early policy version. Valid Values: `None`, `DeleteOldestNonDefaultVersionWhenLimitExceeded`. Default to `None`.
	RotateStrategy pulumi.StringPtrInput
	// (It has been deprecated since 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. See `statement` below.
	//
	// Deprecated: Field 'statement' has been deprecated from version 1.49.0, and use field 'document' to replace.
	Statements PolicyStatementArrayInput
	// (It has been deprecated since 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 PolicyArray

type PolicyArray []PolicyInput

func (PolicyArray) ElementType

func (PolicyArray) ElementType() reflect.Type

func (PolicyArray) ToPolicyArrayOutput

func (i PolicyArray) ToPolicyArrayOutput() PolicyArrayOutput

func (PolicyArray) ToPolicyArrayOutputWithContext

func (i PolicyArray) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput

type PolicyArrayInput

type PolicyArrayInput interface {
	pulumi.Input

	ToPolicyArrayOutput() PolicyArrayOutput
	ToPolicyArrayOutputWithContext(context.Context) PolicyArrayOutput
}

PolicyArrayInput is an input type that accepts PolicyArray and PolicyArrayOutput values. You can construct a concrete instance of `PolicyArrayInput` via:

PolicyArray{ PolicyArgs{...} }

type PolicyArrayOutput

type PolicyArrayOutput struct{ *pulumi.OutputState }

func (PolicyArrayOutput) ElementType

func (PolicyArrayOutput) ElementType() reflect.Type

func (PolicyArrayOutput) Index

func (PolicyArrayOutput) ToPolicyArrayOutput

func (o PolicyArrayOutput) ToPolicyArrayOutput() PolicyArrayOutput

func (PolicyArrayOutput) ToPolicyArrayOutputWithContext

func (o PolicyArrayOutput) ToPolicyArrayOutputWithContext(ctx context.Context) PolicyArrayOutput

type PolicyInput

type PolicyInput interface {
	pulumi.Input

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

type PolicyMap

type PolicyMap map[string]PolicyInput

func (PolicyMap) ElementType

func (PolicyMap) ElementType() reflect.Type

func (PolicyMap) ToPolicyMapOutput

func (i PolicyMap) ToPolicyMapOutput() PolicyMapOutput

func (PolicyMap) ToPolicyMapOutputWithContext

func (i PolicyMap) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput

type PolicyMapInput

type PolicyMapInput interface {
	pulumi.Input

	ToPolicyMapOutput() PolicyMapOutput
	ToPolicyMapOutputWithContext(context.Context) PolicyMapOutput
}

PolicyMapInput is an input type that accepts PolicyMap and PolicyMapOutput values. You can construct a concrete instance of `PolicyMapInput` via:

PolicyMap{ "key": PolicyArgs{...} }

type PolicyMapOutput

type PolicyMapOutput struct{ *pulumi.OutputState }

func (PolicyMapOutput) ElementType

func (PolicyMapOutput) ElementType() reflect.Type

func (PolicyMapOutput) MapIndex

func (PolicyMapOutput) ToPolicyMapOutput

func (o PolicyMapOutput) ToPolicyMapOutput() PolicyMapOutput

func (PolicyMapOutput) ToPolicyMapOutputWithContext

func (o PolicyMapOutput) ToPolicyMapOutputWithContext(ctx context.Context) PolicyMapOutput

type PolicyOutput

type PolicyOutput struct{ *pulumi.OutputState }

func (PolicyOutput) AttachmentCount added in v3.27.0

func (o PolicyOutput) AttachmentCount() pulumi.IntOutput

The policy attachment count.

func (PolicyOutput) DefaultVersion added in v3.27.0

func (o PolicyOutput) DefaultVersion() pulumi.StringOutput

The default version of policy.

func (PolicyOutput) Description added in v3.27.0

func (o PolicyOutput) Description() pulumi.StringPtrOutput

Description of the RAM policy. This name can have a string of 1 to 1024 characters.

func (PolicyOutput) Document deprecated added in v3.27.0

func (o PolicyOutput) Document() pulumi.StringOutput

It has been deprecated since provider version 1.114.0 and `policyDocument` instead.

Deprecated: Field 'document' has been deprecated from provider version 1.114.0. New field 'policy_document' instead.

func (PolicyOutput) ElementType

func (PolicyOutput) ElementType() reflect.Type

func (PolicyOutput) Force added in v3.27.0

func (o PolicyOutput) Force() pulumi.BoolPtrOutput

This parameter is used for resource destroy. Default value is `false`.

func (PolicyOutput) Name deprecated added in v3.27.0

func (o PolicyOutput) Name() pulumi.StringOutput

It has been deprecated since provider version 1.114.0 and `policyName` instead.

Deprecated: Field 'name' has been deprecated from provider version 1.114.0. New field 'policy_name' instead.

func (PolicyOutput) PolicyDocument added in v3.27.0

func (o PolicyOutput) PolicyDocument() pulumi.StringOutput

Document of the RAM policy. It is required when the `statement` is not specified.

func (PolicyOutput) PolicyName added in v3.27.0

func (o PolicyOutput) PolicyName() pulumi.StringOutput

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.

func (PolicyOutput) RotateStrategy added in v3.27.0

func (o PolicyOutput) RotateStrategy() pulumi.StringOutput

The rotation strategy of the policy. You can use this parameter to delete an early policy version. Valid Values: `None`, `DeleteOldestNonDefaultVersionWhenLimitExceeded`. Default to `None`.

func (PolicyOutput) Statements deprecated added in v3.27.0

(It has been deprecated since 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. See `statement` below.

Deprecated: Field 'statement' has been deprecated from version 1.49.0, and use field 'document' to replace.

func (PolicyOutput) ToPolicyOutput

func (o PolicyOutput) ToPolicyOutput() PolicyOutput

func (PolicyOutput) ToPolicyOutputWithContext

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

func (PolicyOutput) Type added in v3.27.0

func (o PolicyOutput) Type() pulumi.StringOutput

The policy type.

func (PolicyOutput) Version deprecated added in v3.27.0

func (o PolicyOutput) Version() pulumi.StringPtrOutput

(It has been deprecated since 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.

func (PolicyOutput) VersionId added in v3.27.0

func (o PolicyOutput) VersionId() pulumi.StringOutput

The ID of default version policy.

type PolicyState

type PolicyState struct {
	// The policy attachment count.
	AttachmentCount pulumi.IntPtrInput
	// The default version of policy.
	DefaultVersion pulumi.StringPtrInput
	// Description of the RAM policy. This name can have a string of 1 to 1024 characters.
	Description pulumi.StringPtrInput
	// It has been deprecated since provider version 1.114.0 and `policyDocument` instead.
	//
	// Deprecated: Field 'document' has been deprecated from provider version 1.114.0. New field 'policy_document' instead.
	Document pulumi.StringPtrInput
	// This parameter is used for resource destroy. Default value is `false`.
	Force pulumi.BoolPtrInput
	// It has been deprecated since provider version 1.114.0 and `policyName` instead.
	//
	// Deprecated: Field 'name' has been deprecated from provider version 1.114.0. New field 'policy_name' instead.
	Name pulumi.StringPtrInput
	// Document of the RAM policy. It is required when the `statement` is not specified.
	PolicyDocument 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
	// The rotation strategy of the policy. You can use this parameter to delete an early policy version. Valid Values: `None`, `DeleteOldestNonDefaultVersionWhenLimitExceeded`. Default to `None`.
	RotateStrategy pulumi.StringPtrInput
	// (It has been deprecated since 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. See `statement` below.
	//
	// 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 since 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 ID of default version policy.
	VersionId pulumi.StringPtrInput
}

func (PolicyState) ElementType

func (PolicyState) ElementType() reflect.Type

type PolicyStatement

type PolicyStatement struct {
	// (It has been deprecated since 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 since 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 since 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 since 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 since 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 since 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 since 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 since 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 since 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. **NOTE:** The `description` supports modification since V1.144.0.
	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 since 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 since 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 since 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"`
}

Provides a RAM Role resource.

> **NOTE:** When you want to destroy this resource forcefully(means remove all the relationships associated with it automatically and then destroy it) without set `force` with `true` at beginning, you need add `force = true` to configuration file and run `pulumi preview`, then you can delete resource forcefully.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new RAM Role.
		_, err := ram.NewRole(ctx, "role", &ram.RoleArgs{
			Name: pulumi.String("terraform-example"),
			Document: pulumi.String(`  {
    "Statement": [
      {
        "Action": "sts:AssumeRole",
        "Effect": "Allow",
        "Principal": {
          "Service": [
            "apigateway.aliyuncs.com",
            "ecs.aliyuncs.com"
          ]
        }
      }
    ],
    "Version": "1"
  }

`),

			Description: pulumi.String("this is a role test."),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## 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

func (*Role) ElementType() reflect.Type

func (*Role) ToRoleOutput

func (i *Role) ToRoleOutput() RoleOutput

func (*Role) ToRoleOutputWithContext

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. **NOTE:** The `description` supports modification since V1.144.0.
	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 since 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 since 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 since 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 RoleArray

type RoleArray []RoleInput

func (RoleArray) ElementType

func (RoleArray) ElementType() reflect.Type

func (RoleArray) ToRoleArrayOutput

func (i RoleArray) ToRoleArrayOutput() RoleArrayOutput

func (RoleArray) ToRoleArrayOutputWithContext

func (i RoleArray) ToRoleArrayOutputWithContext(ctx context.Context) RoleArrayOutput

type RoleArrayInput

type RoleArrayInput interface {
	pulumi.Input

	ToRoleArrayOutput() RoleArrayOutput
	ToRoleArrayOutputWithContext(context.Context) RoleArrayOutput
}

RoleArrayInput is an input type that accepts RoleArray and RoleArrayOutput values. You can construct a concrete instance of `RoleArrayInput` via:

RoleArray{ RoleArgs{...} }

type RoleArrayOutput

type RoleArrayOutput struct{ *pulumi.OutputState }

func (RoleArrayOutput) ElementType

func (RoleArrayOutput) ElementType() reflect.Type

func (RoleArrayOutput) Index

func (RoleArrayOutput) ToRoleArrayOutput

func (o RoleArrayOutput) ToRoleArrayOutput() RoleArrayOutput

func (RoleArrayOutput) ToRoleArrayOutputWithContext

func (o RoleArrayOutput) ToRoleArrayOutputWithContext(ctx context.Context) RoleArrayOutput

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.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"

) func main() { pulumi.Run(func(ctx *pulumi.Context) error { _default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{ AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"), AvailableResourceCreation: pulumi.StringRef("VSwitch"), }, nil); if err != nil { return err } defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{ AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id), CpuCoreCount: pulumi.IntRef(2), MemorySize: pulumi.Float64Ref(4), }, nil); if err != nil { return err } defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{ NameRegex: pulumi.StringRef("^ubuntu_18.*64"), MostRecent: pulumi.BoolRef(true), Owners: pulumi.StringRef("system"), }, nil); if err != nil { return err } cfg := config.New(ctx, "") name := "ecsInstanceVPCExample"; if param := cfg.Get("name"); param != ""{ name = param } defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{ VpcName: pulumi.String(name), CidrBlock: pulumi.String("172.16.0.0/16"), }) if err != nil { return err } defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{ VpcId: defaultNetwork.ID(), CidrBlock: pulumi.String("172.16.0.0/24"), ZoneId: pulumi.String(_default.Zones[0].Id), VswitchName: pulumi.String(name), }) if err != nil { return err } defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{ Name: pulumi.String(name), VpcId: defaultNetwork.ID(), }) if err != nil { return err } _, err = ecs.NewSecurityGroupRule(ctx, "default", &ecs.SecurityGroupRuleArgs{ Type: pulumi.String("ingress"), IpProtocol: pulumi.String("tcp"), NicType: pulumi.String("intranet"), Policy: pulumi.String("accept"), PortRange: pulumi.String("22/22"), Priority: pulumi.Int(1), SecurityGroupId: defaultSecurityGroup.ID(), CidrIp: pulumi.String("172.16.0.0/24"), }) if err != nil { return err } foo, err := ecs.NewInstance(ctx, "foo", &ecs.InstanceArgs{ VswitchId: defaultSwitch.ID(), ImageId: pulumi.String(defaultGetImages.Images[0].Id), InstanceType: pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id), SystemDiskCategory: pulumi.String("cloud_efficiency"), InternetChargeType: pulumi.String("PayByTraffic"), InternetMaxBandwidthOut: pulumi.Int(5), SecurityGroups: pulumi.StringArray{ defaultSecurityGroup.ID(), }, InstanceName: pulumi.String(name), }) if err != nil { return err } role, err := ram.NewRole(ctx, "role", &ram.RoleArgs{ Name: pulumi.String("terraform-example"),

Document: pulumi.String(`  {
    "Statement": [
      {
        "Action": "sts:AssumeRole",
        "Effect": "Allow",
        "Principal": {
          "Service": [
            "ecs.aliyuncs.com"
          ]
        }
      }
    ],
    "Version": "1"
  }

`), Description: pulumi.String("this is a test"), Force: pulumi.Bool(true), }) if err != nil { return err } var splat0 pulumi.StringArray for _, val0 := range %!v(PANIC=Format method: fatal: An assertion has failed: tok: ) { splat0 = append(splat0, val0.ID()) } _, err = ram.NewRoleAttachment(ctx, "attach", &ram.RoleAttachmentArgs{ RoleName: role.Name, InstanceIds: splat0, }) if err != nil { return err } return nil }) } ```

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

func (*RoleAttachment) ElementType() reflect.Type

func (*RoleAttachment) ToRoleAttachmentOutput

func (i *RoleAttachment) ToRoleAttachmentOutput() RoleAttachmentOutput

func (*RoleAttachment) ToRoleAttachmentOutputWithContext

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 RoleAttachmentArray

type RoleAttachmentArray []RoleAttachmentInput

func (RoleAttachmentArray) ElementType

func (RoleAttachmentArray) ElementType() reflect.Type

func (RoleAttachmentArray) ToRoleAttachmentArrayOutput

func (i RoleAttachmentArray) ToRoleAttachmentArrayOutput() RoleAttachmentArrayOutput

func (RoleAttachmentArray) ToRoleAttachmentArrayOutputWithContext

func (i RoleAttachmentArray) ToRoleAttachmentArrayOutputWithContext(ctx context.Context) RoleAttachmentArrayOutput

type RoleAttachmentArrayInput

type RoleAttachmentArrayInput interface {
	pulumi.Input

	ToRoleAttachmentArrayOutput() RoleAttachmentArrayOutput
	ToRoleAttachmentArrayOutputWithContext(context.Context) RoleAttachmentArrayOutput
}

RoleAttachmentArrayInput is an input type that accepts RoleAttachmentArray and RoleAttachmentArrayOutput values. You can construct a concrete instance of `RoleAttachmentArrayInput` via:

RoleAttachmentArray{ RoleAttachmentArgs{...} }

type RoleAttachmentArrayOutput

type RoleAttachmentArrayOutput struct{ *pulumi.OutputState }

func (RoleAttachmentArrayOutput) ElementType

func (RoleAttachmentArrayOutput) ElementType() reflect.Type

func (RoleAttachmentArrayOutput) Index

func (RoleAttachmentArrayOutput) ToRoleAttachmentArrayOutput

func (o RoleAttachmentArrayOutput) ToRoleAttachmentArrayOutput() RoleAttachmentArrayOutput

func (RoleAttachmentArrayOutput) ToRoleAttachmentArrayOutputWithContext

func (o RoleAttachmentArrayOutput) ToRoleAttachmentArrayOutputWithContext(ctx context.Context) RoleAttachmentArrayOutput

type RoleAttachmentInput

type RoleAttachmentInput interface {
	pulumi.Input

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

type RoleAttachmentMap

type RoleAttachmentMap map[string]RoleAttachmentInput

func (RoleAttachmentMap) ElementType

func (RoleAttachmentMap) ElementType() reflect.Type

func (RoleAttachmentMap) ToRoleAttachmentMapOutput

func (i RoleAttachmentMap) ToRoleAttachmentMapOutput() RoleAttachmentMapOutput

func (RoleAttachmentMap) ToRoleAttachmentMapOutputWithContext

func (i RoleAttachmentMap) ToRoleAttachmentMapOutputWithContext(ctx context.Context) RoleAttachmentMapOutput

type RoleAttachmentMapInput

type RoleAttachmentMapInput interface {
	pulumi.Input

	ToRoleAttachmentMapOutput() RoleAttachmentMapOutput
	ToRoleAttachmentMapOutputWithContext(context.Context) RoleAttachmentMapOutput
}

RoleAttachmentMapInput is an input type that accepts RoleAttachmentMap and RoleAttachmentMapOutput values. You can construct a concrete instance of `RoleAttachmentMapInput` via:

RoleAttachmentMap{ "key": RoleAttachmentArgs{...} }

type RoleAttachmentMapOutput

type RoleAttachmentMapOutput struct{ *pulumi.OutputState }

func (RoleAttachmentMapOutput) ElementType

func (RoleAttachmentMapOutput) ElementType() reflect.Type

func (RoleAttachmentMapOutput) MapIndex

func (RoleAttachmentMapOutput) ToRoleAttachmentMapOutput

func (o RoleAttachmentMapOutput) ToRoleAttachmentMapOutput() RoleAttachmentMapOutput

func (RoleAttachmentMapOutput) ToRoleAttachmentMapOutputWithContext

func (o RoleAttachmentMapOutput) ToRoleAttachmentMapOutputWithContext(ctx context.Context) RoleAttachmentMapOutput

type RoleAttachmentOutput

type RoleAttachmentOutput struct{ *pulumi.OutputState }

func (RoleAttachmentOutput) ElementType

func (RoleAttachmentOutput) ElementType() reflect.Type

func (RoleAttachmentOutput) InstanceIds added in v3.27.0

The list of ECS instance's IDs.

func (RoleAttachmentOutput) RoleName added in v3.27.0

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.

func (RoleAttachmentOutput) ToRoleAttachmentOutput

func (o RoleAttachmentOutput) ToRoleAttachmentOutput() RoleAttachmentOutput

func (RoleAttachmentOutput) ToRoleAttachmentOutputWithContext

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

type RoleInput interface {
	pulumi.Input

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

type RoleMap

type RoleMap map[string]RoleInput

func (RoleMap) ElementType

func (RoleMap) ElementType() reflect.Type

func (RoleMap) ToRoleMapOutput

func (i RoleMap) ToRoleMapOutput() RoleMapOutput

func (RoleMap) ToRoleMapOutputWithContext

func (i RoleMap) ToRoleMapOutputWithContext(ctx context.Context) RoleMapOutput

type RoleMapInput

type RoleMapInput interface {
	pulumi.Input

	ToRoleMapOutput() RoleMapOutput
	ToRoleMapOutputWithContext(context.Context) RoleMapOutput
}

RoleMapInput is an input type that accepts RoleMap and RoleMapOutput values. You can construct a concrete instance of `RoleMapInput` via:

RoleMap{ "key": RoleArgs{...} }

type RoleMapOutput

type RoleMapOutput struct{ *pulumi.OutputState }

func (RoleMapOutput) ElementType

func (RoleMapOutput) ElementType() reflect.Type

func (RoleMapOutput) MapIndex

func (RoleMapOutput) ToRoleMapOutput

func (o RoleMapOutput) ToRoleMapOutput() RoleMapOutput

func (RoleMapOutput) ToRoleMapOutputWithContext

func (o RoleMapOutput) ToRoleMapOutputWithContext(ctx context.Context) RoleMapOutput

type RoleOutput

type RoleOutput struct{ *pulumi.OutputState }

func (RoleOutput) Arn added in v3.27.0

func (o RoleOutput) Arn() pulumi.StringOutput

The role arn.

func (RoleOutput) Description added in v3.27.0

func (o RoleOutput) Description() pulumi.StringPtrOutput

Description of the RAM role. This name can have a string of 1 to 1024 characters. **NOTE:** The `description` supports modification since V1.144.0.

func (RoleOutput) Document added in v3.27.0

func (o RoleOutput) Document() pulumi.StringOutput

Authorization strategy of the RAM role. It is required when the `services` and `ramUsers` are not specified.

func (RoleOutput) ElementType

func (RoleOutput) ElementType() reflect.Type

func (RoleOutput) Force added in v3.27.0

func (o RoleOutput) Force() pulumi.BoolPtrOutput

This parameter is used for resource destroy. Default value is `false`.

func (RoleOutput) MaxSessionDuration added in v3.27.0

func (o RoleOutput) MaxSessionDuration() pulumi.IntPtrOutput

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.

func (RoleOutput) Name added in v3.27.0

func (o RoleOutput) Name() pulumi.StringOutput

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.

func (RoleOutput) RamUsers deprecated added in v3.27.0

func (o RoleOutput) RamUsers() pulumi.StringArrayOutput

(It has been deprecated since 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.

func (RoleOutput) RoleId added in v3.27.0

func (o RoleOutput) RoleId() pulumi.StringOutput

The role ID.

func (RoleOutput) Services deprecated added in v3.27.0

func (o RoleOutput) Services() pulumi.StringArrayOutput

(It has been deprecated since 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.

func (RoleOutput) ToRoleOutput

func (o RoleOutput) ToRoleOutput() RoleOutput

func (RoleOutput) ToRoleOutputWithContext

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

func (RoleOutput) Version deprecated added in v3.27.0

func (o RoleOutput) Version() pulumi.StringPtrOutput

(It has been deprecated since 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.

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.

> **NOTE:** Available since v1.0.0+.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a RAM Role Policy attachment.
		role, err := ram.NewRole(ctx, "role", &ram.RoleArgs{
			Name: pulumi.String("roleName"),
			Document: pulumi.String(`    {
      "Statement": [
        {
          "Action": "sts:AssumeRole",
          "Effect": "Allow",
          "Principal": {
            "Service": [
              "apigateway.aliyuncs.com",
              "ecs.aliyuncs.com"
            ]
          }
        }
      ],
      "Version": "1"
    }

`),

			Description: pulumi.String("this is a role test."),
		})
		if err != nil {
			return err
		}
		policy, err := ram.NewPolicy(ctx, "policy", &ram.PolicyArgs{
			Name: pulumi.String("policyName"),
			Document: pulumi.String(`  {
    "Statement": [
      {
        "Action": [
          "oss:ListObjects",
          "oss:GetObject"
        ],
        "Effect": "Allow",
        "Resource": [
          "acs:oss:*:*:mybucket",
          "acs:oss:*:*:mybucket/*"
        ]
      }
    ],
      "Version": "1"
  }

`),

			Description: pulumi.String("this is a policy test"),
		})
		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

func (*RolePolicyAttachment) ElementType() reflect.Type

func (*RolePolicyAttachment) ToRolePolicyAttachmentOutput

func (i *RolePolicyAttachment) ToRolePolicyAttachmentOutput() RolePolicyAttachmentOutput

func (*RolePolicyAttachment) ToRolePolicyAttachmentOutputWithContext

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 RolePolicyAttachmentArray

type RolePolicyAttachmentArray []RolePolicyAttachmentInput

func (RolePolicyAttachmentArray) ElementType

func (RolePolicyAttachmentArray) ElementType() reflect.Type

func (RolePolicyAttachmentArray) ToRolePolicyAttachmentArrayOutput

func (i RolePolicyAttachmentArray) ToRolePolicyAttachmentArrayOutput() RolePolicyAttachmentArrayOutput

func (RolePolicyAttachmentArray) ToRolePolicyAttachmentArrayOutputWithContext

func (i RolePolicyAttachmentArray) ToRolePolicyAttachmentArrayOutputWithContext(ctx context.Context) RolePolicyAttachmentArrayOutput

type RolePolicyAttachmentArrayInput

type RolePolicyAttachmentArrayInput interface {
	pulumi.Input

	ToRolePolicyAttachmentArrayOutput() RolePolicyAttachmentArrayOutput
	ToRolePolicyAttachmentArrayOutputWithContext(context.Context) RolePolicyAttachmentArrayOutput
}

RolePolicyAttachmentArrayInput is an input type that accepts RolePolicyAttachmentArray and RolePolicyAttachmentArrayOutput values. You can construct a concrete instance of `RolePolicyAttachmentArrayInput` via:

RolePolicyAttachmentArray{ RolePolicyAttachmentArgs{...} }

type RolePolicyAttachmentArrayOutput

type RolePolicyAttachmentArrayOutput struct{ *pulumi.OutputState }

func (RolePolicyAttachmentArrayOutput) ElementType

func (RolePolicyAttachmentArrayOutput) Index

func (RolePolicyAttachmentArrayOutput) ToRolePolicyAttachmentArrayOutput

func (o RolePolicyAttachmentArrayOutput) ToRolePolicyAttachmentArrayOutput() RolePolicyAttachmentArrayOutput

func (RolePolicyAttachmentArrayOutput) ToRolePolicyAttachmentArrayOutputWithContext

func (o RolePolicyAttachmentArrayOutput) ToRolePolicyAttachmentArrayOutputWithContext(ctx context.Context) RolePolicyAttachmentArrayOutput

type RolePolicyAttachmentInput

type RolePolicyAttachmentInput interface {
	pulumi.Input

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

type RolePolicyAttachmentMap

type RolePolicyAttachmentMap map[string]RolePolicyAttachmentInput

func (RolePolicyAttachmentMap) ElementType

func (RolePolicyAttachmentMap) ElementType() reflect.Type

func (RolePolicyAttachmentMap) ToRolePolicyAttachmentMapOutput

func (i RolePolicyAttachmentMap) ToRolePolicyAttachmentMapOutput() RolePolicyAttachmentMapOutput

func (RolePolicyAttachmentMap) ToRolePolicyAttachmentMapOutputWithContext

func (i RolePolicyAttachmentMap) ToRolePolicyAttachmentMapOutputWithContext(ctx context.Context) RolePolicyAttachmentMapOutput

type RolePolicyAttachmentMapInput

type RolePolicyAttachmentMapInput interface {
	pulumi.Input

	ToRolePolicyAttachmentMapOutput() RolePolicyAttachmentMapOutput
	ToRolePolicyAttachmentMapOutputWithContext(context.Context) RolePolicyAttachmentMapOutput
}

RolePolicyAttachmentMapInput is an input type that accepts RolePolicyAttachmentMap and RolePolicyAttachmentMapOutput values. You can construct a concrete instance of `RolePolicyAttachmentMapInput` via:

RolePolicyAttachmentMap{ "key": RolePolicyAttachmentArgs{...} }

type RolePolicyAttachmentMapOutput

type RolePolicyAttachmentMapOutput struct{ *pulumi.OutputState }

func (RolePolicyAttachmentMapOutput) ElementType

func (RolePolicyAttachmentMapOutput) MapIndex

func (RolePolicyAttachmentMapOutput) ToRolePolicyAttachmentMapOutput

func (o RolePolicyAttachmentMapOutput) ToRolePolicyAttachmentMapOutput() RolePolicyAttachmentMapOutput

func (RolePolicyAttachmentMapOutput) ToRolePolicyAttachmentMapOutputWithContext

func (o RolePolicyAttachmentMapOutput) ToRolePolicyAttachmentMapOutputWithContext(ctx context.Context) RolePolicyAttachmentMapOutput

type RolePolicyAttachmentOutput

type RolePolicyAttachmentOutput struct{ *pulumi.OutputState }

func (RolePolicyAttachmentOutput) ElementType

func (RolePolicyAttachmentOutput) ElementType() reflect.Type

func (RolePolicyAttachmentOutput) PolicyName added in v3.27.0

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.

func (RolePolicyAttachmentOutput) PolicyType added in v3.27.0

Type of the RAM policy. It must be `Custom` or `System`.

func (RolePolicyAttachmentOutput) RoleName added in v3.27.0

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.

func (RolePolicyAttachmentOutput) ToRolePolicyAttachmentOutput

func (o RolePolicyAttachmentOutput) ToRolePolicyAttachmentOutput() RolePolicyAttachmentOutput

func (RolePolicyAttachmentOutput) ToRolePolicyAttachmentOutputWithContext

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. **NOTE:** The `description` supports modification since V1.144.0.
	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 since 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 since 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 since 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 SamlProvider

type SamlProvider struct {
	pulumi.CustomResourceState

	// The Alibaba Cloud Resource Name (ARN) of the IdP.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The description of SAML Provider.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The metadata file, which is Base64 encoded. The file is provided by an IdP that supports SAML 2.0.
	EncodedsamlMetadataDocument pulumi.StringOutput `pulumi:"encodedsamlMetadataDocument"`
	// The name of SAML Provider.
	SamlProviderName pulumi.StringOutput `pulumi:"samlProviderName"`
	// The update time.
	UpdateDate pulumi.StringOutput `pulumi:"updateDate"`
}

Provides a RAM SAML Provider resource.

For information about RAM SAML Provider and how to use it, see [What is SAML Provider](https://www.alibabacloud.com/help/en/ram/developer-reference/api-ims-2019-08-15-createsamlprovider).

> **NOTE:** Available since v1.114.0.

## Example Usage

Basic Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewSamlProvider(ctx, "example", &ram.SamlProviderArgs{
			SamlProviderName:            pulumi.String("terraform-example"),
			EncodedsamlMetadataDocument: pulumi.String("  PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bWQ6RW50aXR5RGVzY3JpcHRvciBlbnRpdHlJRD0iaHR0cDovL2V4YW1wbGUuYWxpeXVuLmNvbS9leGFtcGxlLWlkcCIgeG1sbnM6bWQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDptZXRhZGF0YSI+PG1kOklEUFNTT0Rlc2NyaXB0b3IgV2FudEF1dGhuUmVxdWVzdHNTaWduZWQ9ImZhbHNlIiBwcm90b2NvbFN1cHBvcnRFbnVtZXJhdGlvbj0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIj48bWQ6S2V5RGVzY3JpcHRvciB1c2U9InNpZ25pbmciPjxkczpLZXlJbmZvIHhtbG5zOmRzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIj48ZHM6WDUwOURhdGE+PGRzOlg1MDlDZXJ0aWZpY2F0ZT5NSUlEL3pDQ0F1ZWdBd0lCQWdJRU1yb0tjakFOQmdrcWhraUc5dzBCQVFzRkFEQ0JnREVuTUNVR0ExVUVBeE1lClFXeHBlWFZ1SUZKQlRTQkZlR0Z0Y0d4bElFTmxjblJwWm1sallYUmxNUkF3RGdZRFZRUUxFd2RCYkdsaVlXSmgKTVJBd0RnWURWUVFLRXdkQmJHbGlZV0poTVJFd0R3WURWUVFIRXdoSVlXNW5XbWh2ZFRFUk1BOEdBMVVFQ0JNSQpXbWhsU21saGJtY3hDekFKQmdOVkJBWVRBa05PTUNBWERUSXpNVEl3TkRFeU1EY3dNRm9ZRHpJd05URXdOREl4Ck1USXdOekF3V2pDQmdERW5NQ1VHQTFVRUF4TWVRV3hwZVhWdUlGSkJUU0JGZUdGdGNHeGxJRU5sY25ScFptbGoKWVhSbE1SQXdEZ1lEVlFRTEV3ZEJiR2xpWVdKaE1SQXdEZ1lEVlFRS0V3ZEJiR2xpWVdKaE1SRXdEd1lEVlFRSApFd2hJWVc1bldtaHZkVEVSTUE4R0ExVUVDQk1JV21obFNtbGhibWN4Q3pBSkJnTlZCQVlUQWtOT01JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQW9KVGVndWc0eXFaalNzQzFQUWpzbGxreUxWZHEKcXR0UGFqNmNOYldQdVFRNThSMkF4ZHNYeng4c05lOElLYUFYbW84azdDTFhDcXFLVzNjNEpzRWtTOUcva3B2NApJWFpBOGFVcDBCeXdQUFBocmFjUXd4cmJ5dkhja0dqVUpkNEZrOEVjbVVjNjRrSE5LbjBCaVJpL0NEZlM3MXBuCjh5T3dDNUZPSUlYWXhWMGtTTnNQMnozV2tBbFBXWm1sVkZSd1dxeHhGS2xCTjVpdVhaVHA4dk5rU2htVndBTW8KcjVpb2VBaFdXd0N1L0pvdUhLa3lnbVJnSDNhRjlSRlkrOGZ4NkMzR2hjZktISUszRTFBbVVtWlpjR3NDUCtxNApXeTBuSFp4QStaZEhTeE1OYUJPMm5JbkxJSHVDWHgza096eWpGV3dUaTVGSTlwdE5vNktBay9wRThRSURBUUFCCm8zMHdlekFQQmdOVkhSTUVDREFHQVFIL0FnRURNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01CQmdnckJnRUYKQlFjREFqQUxCZ05WSFE4RUJBTUNBb1F3SFFZRFZSMFJBUUgvQkJNd0VZSUpiRzlqWVd4b2IzTjBod1IvQUFBQgpNQjBHQTFVZERnUVdCQlQ2TXluMnJjMVhEQTZqQkZYWVBOYitGaldMVmpBTkJna3Foa2lHOXcwQkFRc0ZBQU9DCkFRRUFoWHpUUzJJaHZjY3hzSVNzVVNFcldNNDJiQlZESHhTa05EemhPRmd0eGNtNUxuNHdjWXJvdkM3NHZxS1oKUWdQWmpGcWw3YUJTb1ZyNFdseWFaZlVBdHdNL3pZZytJbklUSVpBQ0dhM1VNK3h5V0NLSVhRNGpJVldnNG9QWQpxTStjNWllLzJFVlE0YmhObEQyL0lYZUVEZFd2TXMzdmFyRTFCUE5PQXJZZ2tZTmNER3lDSnA0ZmQ3d3ladWxhCllEZFFIWDdpdUJ1R0JOZFRBajlCUW5xaTJRcTc5RndMVTBrQkFvdUpVVVBPUjBpMGtwZ24vc2dSbHhvaHY1bHgKVTFwYVhtMEZRWHpUUDEvdjV5Y24wM3NVckFUekg2VkRpVlQ2N0NRQjR4MXJpOTFvUVRkWERXN1RvRkVhOGIrOApPdE8wZERMdDlnbCtNMkxYRzJTWnBZTkJoZz09PC9kczpYNTA5Q2VydGlmaWNhdGU+PC9kczpYNTA5RGF0YT48L2RzOktleUluZm8+PC9tZDpLZXlEZXNjcmlwdG9yPjxtZDpOYW1lSURGb3JtYXQ+dXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6MS4xOm5hbWVpZC1mb3JtYXQ6ZW1haWxBZGRyZXNzPC9tZDpOYW1lSURGb3JtYXQ+PG1kOk5hbWVJREZvcm1hdD51cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6bmFtZWlkLWZvcm1hdDpwZXJzaXN0ZW50PC9tZDpOYW1lSURGb3JtYXQ+PG1kOlNpbmdsZVNpZ25PblNlcnZpY2UgQmluZGluZz0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmJpbmRpbmdzOkhUVFAtUE9TVCIgTG9jYXRpb249Imh0dHA6Ly9leGFtcGxlLmFsaXl1bi5jb20vZXhhbXBsZS1pZHAvc3NvL3NhbWwiLz48bWQ6U2luZ2xlU2lnbk9uU2VydmljZSBCaW5kaW5nPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YmluZGluZ3M6SFRUUC1SZWRpcmVjdCIgTG9jYXRpb249Imh0dHA6Ly9leGFtcGxlLmFsaXl1bi5jb20vZXhhbXBsZS1pZHAvc3NvL3NhbWwiLz48L21kOklEUFNTT0Rlc2NyaXB0b3I+PC9tZDpFbnRpdHlEZXNjcmlwdG9yPg==\n"),
			Description:                 pulumi.String("For Terraform Test"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

RAM SAML Provider can be imported using the id, e.g.

```sh $ pulumi import alicloud:ram/samlProvider:SamlProvider example <saml_provider_name> ```

func GetSamlProvider

func GetSamlProvider(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SamlProviderState, opts ...pulumi.ResourceOption) (*SamlProvider, error)

GetSamlProvider gets an existing SamlProvider 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 NewSamlProvider

func NewSamlProvider(ctx *pulumi.Context,
	name string, args *SamlProviderArgs, opts ...pulumi.ResourceOption) (*SamlProvider, error)

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

func (*SamlProvider) ElementType

func (*SamlProvider) ElementType() reflect.Type

func (*SamlProvider) ToSamlProviderOutput

func (i *SamlProvider) ToSamlProviderOutput() SamlProviderOutput

func (*SamlProvider) ToSamlProviderOutputWithContext

func (i *SamlProvider) ToSamlProviderOutputWithContext(ctx context.Context) SamlProviderOutput

type SamlProviderArgs

type SamlProviderArgs struct {
	// The description of SAML Provider.
	Description pulumi.StringPtrInput
	// The metadata file, which is Base64 encoded. The file is provided by an IdP that supports SAML 2.0.
	EncodedsamlMetadataDocument pulumi.StringInput
	// The name of SAML Provider.
	SamlProviderName pulumi.StringInput
}

The set of arguments for constructing a SamlProvider resource.

func (SamlProviderArgs) ElementType

func (SamlProviderArgs) ElementType() reflect.Type

type SamlProviderArray

type SamlProviderArray []SamlProviderInput

func (SamlProviderArray) ElementType

func (SamlProviderArray) ElementType() reflect.Type

func (SamlProviderArray) ToSamlProviderArrayOutput

func (i SamlProviderArray) ToSamlProviderArrayOutput() SamlProviderArrayOutput

func (SamlProviderArray) ToSamlProviderArrayOutputWithContext

func (i SamlProviderArray) ToSamlProviderArrayOutputWithContext(ctx context.Context) SamlProviderArrayOutput

type SamlProviderArrayInput

type SamlProviderArrayInput interface {
	pulumi.Input

	ToSamlProviderArrayOutput() SamlProviderArrayOutput
	ToSamlProviderArrayOutputWithContext(context.Context) SamlProviderArrayOutput
}

SamlProviderArrayInput is an input type that accepts SamlProviderArray and SamlProviderArrayOutput values. You can construct a concrete instance of `SamlProviderArrayInput` via:

SamlProviderArray{ SamlProviderArgs{...} }

type SamlProviderArrayOutput

type SamlProviderArrayOutput struct{ *pulumi.OutputState }

func (SamlProviderArrayOutput) ElementType

func (SamlProviderArrayOutput) ElementType() reflect.Type

func (SamlProviderArrayOutput) Index

func (SamlProviderArrayOutput) ToSamlProviderArrayOutput

func (o SamlProviderArrayOutput) ToSamlProviderArrayOutput() SamlProviderArrayOutput

func (SamlProviderArrayOutput) ToSamlProviderArrayOutputWithContext

func (o SamlProviderArrayOutput) ToSamlProviderArrayOutputWithContext(ctx context.Context) SamlProviderArrayOutput

type SamlProviderInput

type SamlProviderInput interface {
	pulumi.Input

	ToSamlProviderOutput() SamlProviderOutput
	ToSamlProviderOutputWithContext(ctx context.Context) SamlProviderOutput
}

type SamlProviderMap

type SamlProviderMap map[string]SamlProviderInput

func (SamlProviderMap) ElementType

func (SamlProviderMap) ElementType() reflect.Type

func (SamlProviderMap) ToSamlProviderMapOutput

func (i SamlProviderMap) ToSamlProviderMapOutput() SamlProviderMapOutput

func (SamlProviderMap) ToSamlProviderMapOutputWithContext

func (i SamlProviderMap) ToSamlProviderMapOutputWithContext(ctx context.Context) SamlProviderMapOutput

type SamlProviderMapInput

type SamlProviderMapInput interface {
	pulumi.Input

	ToSamlProviderMapOutput() SamlProviderMapOutput
	ToSamlProviderMapOutputWithContext(context.Context) SamlProviderMapOutput
}

SamlProviderMapInput is an input type that accepts SamlProviderMap and SamlProviderMapOutput values. You can construct a concrete instance of `SamlProviderMapInput` via:

SamlProviderMap{ "key": SamlProviderArgs{...} }

type SamlProviderMapOutput

type SamlProviderMapOutput struct{ *pulumi.OutputState }

func (SamlProviderMapOutput) ElementType

func (SamlProviderMapOutput) ElementType() reflect.Type

func (SamlProviderMapOutput) MapIndex

func (SamlProviderMapOutput) ToSamlProviderMapOutput

func (o SamlProviderMapOutput) ToSamlProviderMapOutput() SamlProviderMapOutput

func (SamlProviderMapOutput) ToSamlProviderMapOutputWithContext

func (o SamlProviderMapOutput) ToSamlProviderMapOutputWithContext(ctx context.Context) SamlProviderMapOutput

type SamlProviderOutput

type SamlProviderOutput struct{ *pulumi.OutputState }

func (SamlProviderOutput) Arn added in v3.27.0

The Alibaba Cloud Resource Name (ARN) of the IdP.

func (SamlProviderOutput) Description added in v3.27.0

func (o SamlProviderOutput) Description() pulumi.StringPtrOutput

The description of SAML Provider.

func (SamlProviderOutput) ElementType

func (SamlProviderOutput) ElementType() reflect.Type

func (SamlProviderOutput) EncodedsamlMetadataDocument added in v3.27.0

func (o SamlProviderOutput) EncodedsamlMetadataDocument() pulumi.StringOutput

The metadata file, which is Base64 encoded. The file is provided by an IdP that supports SAML 2.0.

func (SamlProviderOutput) SamlProviderName added in v3.27.0

func (o SamlProviderOutput) SamlProviderName() pulumi.StringOutput

The name of SAML Provider.

func (SamlProviderOutput) ToSamlProviderOutput

func (o SamlProviderOutput) ToSamlProviderOutput() SamlProviderOutput

func (SamlProviderOutput) ToSamlProviderOutputWithContext

func (o SamlProviderOutput) ToSamlProviderOutputWithContext(ctx context.Context) SamlProviderOutput

func (SamlProviderOutput) UpdateDate added in v3.27.0

func (o SamlProviderOutput) UpdateDate() pulumi.StringOutput

The update time.

type SamlProviderState

type SamlProviderState struct {
	// The Alibaba Cloud Resource Name (ARN) of the IdP.
	Arn pulumi.StringPtrInput
	// The description of SAML Provider.
	Description pulumi.StringPtrInput
	// The metadata file, which is Base64 encoded. The file is provided by an IdP that supports SAML 2.0.
	EncodedsamlMetadataDocument pulumi.StringPtrInput
	// The name of SAML Provider.
	SamlProviderName pulumi.StringPtrInput
	// The update time.
	UpdateDate pulumi.StringPtrInput
}

func (SamlProviderState) ElementType

func (SamlProviderState) ElementType() reflect.Type

type SecurityPreference added in v3.16.0

type SecurityPreference struct {
	pulumi.CustomResourceState

	// Specifies whether RAM users can change their passwords. Valid values: `true` and `false`
	AllowUserToChangePassword pulumi.BoolOutput `pulumi:"allowUserToChangePassword"`
	// Specifies whether RAM users can manage their AccessKey pairs. Valid values: `true` and `false`
	AllowUserToManageAccessKeys pulumi.BoolOutput `pulumi:"allowUserToManageAccessKeys"`
	// Specifies whether RAM users can manage their MFA devices. Valid values: `true` and `false`
	AllowUserToManageMfaDevices pulumi.BoolOutput `pulumi:"allowUserToManageMfaDevices"`
	// Specifies whether to remember the MFA devices for seven days. Valid values: `true` and `false`
	EnableSaveMfaTicket pulumi.BoolOutput `pulumi:"enableSaveMfaTicket"`
	// Specifies whether MFA is required for all RAM users when they log on to the Alibaba Cloud Management Console by using usernames and passwords. Valid values: `true` and `false`
	EnforceMfaForLogin pulumi.BoolOutput `pulumi:"enforceMfaForLogin"`
	// The subnet mask that specifies the IP addresses from which you can log on to the Alibaba Cloud Management Console. This parameter takes effect on password-based logon and single sign-on (SSO). However, this parameter does not take effect on API calls that are authenticated by using AccessKey pairs.**NOTE:** You can specify up to 25 subnet masks. The total length of the subnet masks can be a maximum of 512 characters.
	// * If you specify a subnet mask, RAM users can use only the IP addresses in the subnet mask to log on to the Alibaba Cloud Management Console.
	// * If you do not specify a subnet mask, RAM users can use all IP addresses to log on to the Alibaba Cloud Management Console.
	// * If you need to specify multiple subnet masks, separate the subnet masks with semicolons (;). Example: 192.168.0.0/16;10.0.0.0/8.
	LoginNetworkMasks pulumi.StringPtrOutput `pulumi:"loginNetworkMasks"`
	// The validity period of the logon session of RAM users. Valid values: 6 to 24. Unit: hours. Default value: 6.
	LoginSessionDuration pulumi.IntOutput `pulumi:"loginSessionDuration"`
}

Provides a RAM Security Preference resource.

For information about RAM Security Preference and how to use it, see [What is Security Preference](https://www.alibabacloud.com/help/en/doc-detail/186694.htm).

> **NOTE:** Available since v1.152.0.

## Example Usage

Basic Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewSecurityPreference(ctx, "example", &ram.SecurityPreferenceArgs{
			EnableSaveMfaTicket:       pulumi.Bool(false),
			AllowUserToChangePassword: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

RAM Security Preference can be imported using the id, e.g.

```sh $ pulumi import alicloud:ram/securityPreference:SecurityPreference example <id> ```

func GetSecurityPreference added in v3.16.0

func GetSecurityPreference(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SecurityPreferenceState, opts ...pulumi.ResourceOption) (*SecurityPreference, error)

GetSecurityPreference gets an existing SecurityPreference 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 NewSecurityPreference added in v3.16.0

func NewSecurityPreference(ctx *pulumi.Context,
	name string, args *SecurityPreferenceArgs, opts ...pulumi.ResourceOption) (*SecurityPreference, error)

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

func (*SecurityPreference) ElementType added in v3.16.0

func (*SecurityPreference) ElementType() reflect.Type

func (*SecurityPreference) ToSecurityPreferenceOutput added in v3.16.0

func (i *SecurityPreference) ToSecurityPreferenceOutput() SecurityPreferenceOutput

func (*SecurityPreference) ToSecurityPreferenceOutputWithContext added in v3.16.0

func (i *SecurityPreference) ToSecurityPreferenceOutputWithContext(ctx context.Context) SecurityPreferenceOutput

type SecurityPreferenceArgs added in v3.16.0

type SecurityPreferenceArgs struct {
	// Specifies whether RAM users can change their passwords. Valid values: `true` and `false`
	AllowUserToChangePassword pulumi.BoolPtrInput
	// Specifies whether RAM users can manage their AccessKey pairs. Valid values: `true` and `false`
	AllowUserToManageAccessKeys pulumi.BoolPtrInput
	// Specifies whether RAM users can manage their MFA devices. Valid values: `true` and `false`
	AllowUserToManageMfaDevices pulumi.BoolPtrInput
	// Specifies whether to remember the MFA devices for seven days. Valid values: `true` and `false`
	EnableSaveMfaTicket pulumi.BoolPtrInput
	// Specifies whether MFA is required for all RAM users when they log on to the Alibaba Cloud Management Console by using usernames and passwords. Valid values: `true` and `false`
	EnforceMfaForLogin pulumi.BoolPtrInput
	// The subnet mask that specifies the IP addresses from which you can log on to the Alibaba Cloud Management Console. This parameter takes effect on password-based logon and single sign-on (SSO). However, this parameter does not take effect on API calls that are authenticated by using AccessKey pairs.**NOTE:** You can specify up to 25 subnet masks. The total length of the subnet masks can be a maximum of 512 characters.
	// * If you specify a subnet mask, RAM users can use only the IP addresses in the subnet mask to log on to the Alibaba Cloud Management Console.
	// * If you do not specify a subnet mask, RAM users can use all IP addresses to log on to the Alibaba Cloud Management Console.
	// * If you need to specify multiple subnet masks, separate the subnet masks with semicolons (;). Example: 192.168.0.0/16;10.0.0.0/8.
	LoginNetworkMasks pulumi.StringPtrInput
	// The validity period of the logon session of RAM users. Valid values: 6 to 24. Unit: hours. Default value: 6.
	LoginSessionDuration pulumi.IntPtrInput
}

The set of arguments for constructing a SecurityPreference resource.

func (SecurityPreferenceArgs) ElementType added in v3.16.0

func (SecurityPreferenceArgs) ElementType() reflect.Type

type SecurityPreferenceArray added in v3.16.0

type SecurityPreferenceArray []SecurityPreferenceInput

func (SecurityPreferenceArray) ElementType added in v3.16.0

func (SecurityPreferenceArray) ElementType() reflect.Type

func (SecurityPreferenceArray) ToSecurityPreferenceArrayOutput added in v3.16.0

func (i SecurityPreferenceArray) ToSecurityPreferenceArrayOutput() SecurityPreferenceArrayOutput

func (SecurityPreferenceArray) ToSecurityPreferenceArrayOutputWithContext added in v3.16.0

func (i SecurityPreferenceArray) ToSecurityPreferenceArrayOutputWithContext(ctx context.Context) SecurityPreferenceArrayOutput

type SecurityPreferenceArrayInput added in v3.16.0

type SecurityPreferenceArrayInput interface {
	pulumi.Input

	ToSecurityPreferenceArrayOutput() SecurityPreferenceArrayOutput
	ToSecurityPreferenceArrayOutputWithContext(context.Context) SecurityPreferenceArrayOutput
}

SecurityPreferenceArrayInput is an input type that accepts SecurityPreferenceArray and SecurityPreferenceArrayOutput values. You can construct a concrete instance of `SecurityPreferenceArrayInput` via:

SecurityPreferenceArray{ SecurityPreferenceArgs{...} }

type SecurityPreferenceArrayOutput added in v3.16.0

type SecurityPreferenceArrayOutput struct{ *pulumi.OutputState }

func (SecurityPreferenceArrayOutput) ElementType added in v3.16.0

func (SecurityPreferenceArrayOutput) Index added in v3.16.0

func (SecurityPreferenceArrayOutput) ToSecurityPreferenceArrayOutput added in v3.16.0

func (o SecurityPreferenceArrayOutput) ToSecurityPreferenceArrayOutput() SecurityPreferenceArrayOutput

func (SecurityPreferenceArrayOutput) ToSecurityPreferenceArrayOutputWithContext added in v3.16.0

func (o SecurityPreferenceArrayOutput) ToSecurityPreferenceArrayOutputWithContext(ctx context.Context) SecurityPreferenceArrayOutput

type SecurityPreferenceInput added in v3.16.0

type SecurityPreferenceInput interface {
	pulumi.Input

	ToSecurityPreferenceOutput() SecurityPreferenceOutput
	ToSecurityPreferenceOutputWithContext(ctx context.Context) SecurityPreferenceOutput
}

type SecurityPreferenceMap added in v3.16.0

type SecurityPreferenceMap map[string]SecurityPreferenceInput

func (SecurityPreferenceMap) ElementType added in v3.16.0

func (SecurityPreferenceMap) ElementType() reflect.Type

func (SecurityPreferenceMap) ToSecurityPreferenceMapOutput added in v3.16.0

func (i SecurityPreferenceMap) ToSecurityPreferenceMapOutput() SecurityPreferenceMapOutput

func (SecurityPreferenceMap) ToSecurityPreferenceMapOutputWithContext added in v3.16.0

func (i SecurityPreferenceMap) ToSecurityPreferenceMapOutputWithContext(ctx context.Context) SecurityPreferenceMapOutput

type SecurityPreferenceMapInput added in v3.16.0

type SecurityPreferenceMapInput interface {
	pulumi.Input

	ToSecurityPreferenceMapOutput() SecurityPreferenceMapOutput
	ToSecurityPreferenceMapOutputWithContext(context.Context) SecurityPreferenceMapOutput
}

SecurityPreferenceMapInput is an input type that accepts SecurityPreferenceMap and SecurityPreferenceMapOutput values. You can construct a concrete instance of `SecurityPreferenceMapInput` via:

SecurityPreferenceMap{ "key": SecurityPreferenceArgs{...} }

type SecurityPreferenceMapOutput added in v3.16.0

type SecurityPreferenceMapOutput struct{ *pulumi.OutputState }

func (SecurityPreferenceMapOutput) ElementType added in v3.16.0

func (SecurityPreferenceMapOutput) MapIndex added in v3.16.0

func (SecurityPreferenceMapOutput) ToSecurityPreferenceMapOutput added in v3.16.0

func (o SecurityPreferenceMapOutput) ToSecurityPreferenceMapOutput() SecurityPreferenceMapOutput

func (SecurityPreferenceMapOutput) ToSecurityPreferenceMapOutputWithContext added in v3.16.0

func (o SecurityPreferenceMapOutput) ToSecurityPreferenceMapOutputWithContext(ctx context.Context) SecurityPreferenceMapOutput

type SecurityPreferenceOutput added in v3.16.0

type SecurityPreferenceOutput struct{ *pulumi.OutputState }

func (SecurityPreferenceOutput) AllowUserToChangePassword added in v3.27.0

func (o SecurityPreferenceOutput) AllowUserToChangePassword() pulumi.BoolOutput

Specifies whether RAM users can change their passwords. Valid values: `true` and `false`

func (SecurityPreferenceOutput) AllowUserToManageAccessKeys added in v3.27.0

func (o SecurityPreferenceOutput) AllowUserToManageAccessKeys() pulumi.BoolOutput

Specifies whether RAM users can manage their AccessKey pairs. Valid values: `true` and `false`

func (SecurityPreferenceOutput) AllowUserToManageMfaDevices added in v3.27.0

func (o SecurityPreferenceOutput) AllowUserToManageMfaDevices() pulumi.BoolOutput

Specifies whether RAM users can manage their MFA devices. Valid values: `true` and `false`

func (SecurityPreferenceOutput) ElementType added in v3.16.0

func (SecurityPreferenceOutput) ElementType() reflect.Type

func (SecurityPreferenceOutput) EnableSaveMfaTicket added in v3.27.0

func (o SecurityPreferenceOutput) EnableSaveMfaTicket() pulumi.BoolOutput

Specifies whether to remember the MFA devices for seven days. Valid values: `true` and `false`

func (SecurityPreferenceOutput) EnforceMfaForLogin added in v3.27.0

func (o SecurityPreferenceOutput) EnforceMfaForLogin() pulumi.BoolOutput

Specifies whether MFA is required for all RAM users when they log on to the Alibaba Cloud Management Console by using usernames and passwords. Valid values: `true` and `false`

func (SecurityPreferenceOutput) LoginNetworkMasks added in v3.27.0

func (o SecurityPreferenceOutput) LoginNetworkMasks() pulumi.StringPtrOutput

The subnet mask that specifies the IP addresses from which you can log on to the Alibaba Cloud Management Console. This parameter takes effect on password-based logon and single sign-on (SSO). However, this parameter does not take effect on API calls that are authenticated by using AccessKey pairs.**NOTE:** You can specify up to 25 subnet masks. The total length of the subnet masks can be a maximum of 512 characters. * If you specify a subnet mask, RAM users can use only the IP addresses in the subnet mask to log on to the Alibaba Cloud Management Console. * If you do not specify a subnet mask, RAM users can use all IP addresses to log on to the Alibaba Cloud Management Console. * If you need to specify multiple subnet masks, separate the subnet masks with semicolons (;). Example: 192.168.0.0/16;10.0.0.0/8.

func (SecurityPreferenceOutput) LoginSessionDuration added in v3.27.0

func (o SecurityPreferenceOutput) LoginSessionDuration() pulumi.IntOutput

The validity period of the logon session of RAM users. Valid values: 6 to 24. Unit: hours. Default value: 6.

func (SecurityPreferenceOutput) ToSecurityPreferenceOutput added in v3.16.0

func (o SecurityPreferenceOutput) ToSecurityPreferenceOutput() SecurityPreferenceOutput

func (SecurityPreferenceOutput) ToSecurityPreferenceOutputWithContext added in v3.16.0

func (o SecurityPreferenceOutput) ToSecurityPreferenceOutputWithContext(ctx context.Context) SecurityPreferenceOutput

type SecurityPreferenceState added in v3.16.0

type SecurityPreferenceState struct {
	// Specifies whether RAM users can change their passwords. Valid values: `true` and `false`
	AllowUserToChangePassword pulumi.BoolPtrInput
	// Specifies whether RAM users can manage their AccessKey pairs. Valid values: `true` and `false`
	AllowUserToManageAccessKeys pulumi.BoolPtrInput
	// Specifies whether RAM users can manage their MFA devices. Valid values: `true` and `false`
	AllowUserToManageMfaDevices pulumi.BoolPtrInput
	// Specifies whether to remember the MFA devices for seven days. Valid values: `true` and `false`
	EnableSaveMfaTicket pulumi.BoolPtrInput
	// Specifies whether MFA is required for all RAM users when they log on to the Alibaba Cloud Management Console by using usernames and passwords. Valid values: `true` and `false`
	EnforceMfaForLogin pulumi.BoolPtrInput
	// The subnet mask that specifies the IP addresses from which you can log on to the Alibaba Cloud Management Console. This parameter takes effect on password-based logon and single sign-on (SSO). However, this parameter does not take effect on API calls that are authenticated by using AccessKey pairs.**NOTE:** You can specify up to 25 subnet masks. The total length of the subnet masks can be a maximum of 512 characters.
	// * If you specify a subnet mask, RAM users can use only the IP addresses in the subnet mask to log on to the Alibaba Cloud Management Console.
	// * If you do not specify a subnet mask, RAM users can use all IP addresses to log on to the Alibaba Cloud Management Console.
	// * If you need to specify multiple subnet masks, separate the subnet masks with semicolons (;). Example: 192.168.0.0/16;10.0.0.0/8.
	LoginNetworkMasks pulumi.StringPtrInput
	// The validity period of the logon session of RAM users. Valid values: 6 to 24. Unit: hours. Default value: 6.
	LoginSessionDuration pulumi.IntPtrInput
}

func (SecurityPreferenceState) ElementType added in v3.16.0

func (SecurityPreferenceState) 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: `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"`
}

Provides a RAM User resource.

For information about RAM User and how to use it, see [What is User](https://www.alibabacloud.com/help/en/ram/developer-reference/api-ram-2015-05-01-createuser).

> **NOTE:** When you want to destroy this resource forcefully(means release all the relationships associated with it automatically and then destroy it) without set `force` with `true` at beginning, you need add `force = true` to configuration file and run `pulumi preview`, then you can delete resource forcefully.

> **NOTE:** Available since v1.0.0.

## Example Usage

Basic Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new RAM user.
		_, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			Name:        pulumi.String("terraform-example"),
			DisplayName: pulumi.String("user_display_name"),
			Mobile:      pulumi.String("86-18688888888"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## 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

func (*User) ElementType() reflect.Type

func (*User) ToUserOutput

func (i *User) ToUserOutput() UserOutput

func (*User) ToUserOutputWithContext

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: `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 UserArray

type UserArray []UserInput

func (UserArray) ElementType

func (UserArray) ElementType() reflect.Type

func (UserArray) ToUserArrayOutput

func (i UserArray) ToUserArrayOutput() UserArrayOutput

func (UserArray) ToUserArrayOutputWithContext

func (i UserArray) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput

type UserArrayInput

type UserArrayInput interface {
	pulumi.Input

	ToUserArrayOutput() UserArrayOutput
	ToUserArrayOutputWithContext(context.Context) UserArrayOutput
}

UserArrayInput is an input type that accepts UserArray and UserArrayOutput values. You can construct a concrete instance of `UserArrayInput` via:

UserArray{ UserArgs{...} }

type UserArrayOutput

type UserArrayOutput struct{ *pulumi.OutputState }

func (UserArrayOutput) ElementType

func (UserArrayOutput) ElementType() reflect.Type

func (UserArrayOutput) Index

func (UserArrayOutput) ToUserArrayOutput

func (o UserArrayOutput) ToUserArrayOutput() UserArrayOutput

func (UserArrayOutput) ToUserArrayOutputWithContext

func (o UserArrayOutput) ToUserArrayOutputWithContext(ctx context.Context) UserArrayOutput

type UserInput

type UserInput interface {
	pulumi.Input

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

type UserMap

type UserMap map[string]UserInput

func (UserMap) ElementType

func (UserMap) ElementType() reflect.Type

func (UserMap) ToUserMapOutput

func (i UserMap) ToUserMapOutput() UserMapOutput

func (UserMap) ToUserMapOutputWithContext

func (i UserMap) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput

type UserMapInput

type UserMapInput interface {
	pulumi.Input

	ToUserMapOutput() UserMapOutput
	ToUserMapOutputWithContext(context.Context) UserMapOutput
}

UserMapInput is an input type that accepts UserMap and UserMapOutput values. You can construct a concrete instance of `UserMapInput` via:

UserMap{ "key": UserArgs{...} }

type UserMapOutput

type UserMapOutput struct{ *pulumi.OutputState }

func (UserMapOutput) ElementType

func (UserMapOutput) ElementType() reflect.Type

func (UserMapOutput) MapIndex

func (UserMapOutput) ToUserMapOutput

func (o UserMapOutput) ToUserMapOutput() UserMapOutput

func (UserMapOutput) ToUserMapOutputWithContext

func (o UserMapOutput) ToUserMapOutputWithContext(ctx context.Context) UserMapOutput

type UserOutput

type UserOutput struct{ *pulumi.OutputState }

func (UserOutput) Comments added in v3.27.0

func (o UserOutput) Comments() pulumi.StringPtrOutput

Comment of the RAM user. This parameter can have a string of 1 to 128 characters.

func (UserOutput) DisplayName added in v3.27.0

func (o UserOutput) DisplayName() pulumi.StringPtrOutput

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.

func (UserOutput) ElementType

func (UserOutput) ElementType() reflect.Type

func (UserOutput) Email added in v3.27.0

func (o UserOutput) Email() pulumi.StringPtrOutput

Email of the RAM user.

func (UserOutput) Force added in v3.27.0

func (o UserOutput) Force() pulumi.BoolPtrOutput

This parameter is used for resource destroy. Default value: `false`.

func (UserOutput) Mobile added in v3.27.0

func (o UserOutput) Mobile() pulumi.StringPtrOutput

Phone number of the RAM user. This number must contain an international area code prefix, just look like this: 86-18600008888.

func (UserOutput) Name added in v3.27.0

func (o UserOutput) Name() pulumi.StringOutput

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.

func (UserOutput) ToUserOutput

func (o UserOutput) ToUserOutput() UserOutput

func (UserOutput) ToUserOutputWithContext

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.

> **NOTE:** Available since v1.0.0.

## Example Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a RAM User Policy attachment.
		user, err := ram.NewUser(ctx, "user", &ram.UserArgs{
			Name:        pulumi.String("userName"),
			DisplayName: pulumi.String("user_display_name"),
			Mobile:      pulumi.String("86-18688888888"),
			Email:       pulumi.String("hello.uuu@aaa.com"),
			Comments:    pulumi.String("yoyoyo"),
		})
		if err != nil {
			return err
		}
		policy, err := ram.NewPolicy(ctx, "policy", &ram.PolicyArgs{
			Name: pulumi.String("policyName"),
			Document: pulumi.String(`  {
    "Statement": [
      {
        "Action": [
          "oss:ListObjects",
          "oss:GetObject"
        ],
        "Effect": "Allow",
        "Resource": [
          "acs:oss:*:*:mybucket",
          "acs:oss:*:*:mybucket/*"
        ]
      }
    ],
      "Version": "1"
  }

`),

			Description: pulumi.String("this is a policy test"),
		})
		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

func (*UserPolicyAttachment) ElementType() reflect.Type

func (*UserPolicyAttachment) ToUserPolicyAttachmentOutput

func (i *UserPolicyAttachment) ToUserPolicyAttachmentOutput() UserPolicyAttachmentOutput

func (*UserPolicyAttachment) ToUserPolicyAttachmentOutputWithContext

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 UserPolicyAttachmentArray

type UserPolicyAttachmentArray []UserPolicyAttachmentInput

func (UserPolicyAttachmentArray) ElementType

func (UserPolicyAttachmentArray) ElementType() reflect.Type

func (UserPolicyAttachmentArray) ToUserPolicyAttachmentArrayOutput

func (i UserPolicyAttachmentArray) ToUserPolicyAttachmentArrayOutput() UserPolicyAttachmentArrayOutput

func (UserPolicyAttachmentArray) ToUserPolicyAttachmentArrayOutputWithContext

func (i UserPolicyAttachmentArray) ToUserPolicyAttachmentArrayOutputWithContext(ctx context.Context) UserPolicyAttachmentArrayOutput

type UserPolicyAttachmentArrayInput

type UserPolicyAttachmentArrayInput interface {
	pulumi.Input

	ToUserPolicyAttachmentArrayOutput() UserPolicyAttachmentArrayOutput
	ToUserPolicyAttachmentArrayOutputWithContext(context.Context) UserPolicyAttachmentArrayOutput
}

UserPolicyAttachmentArrayInput is an input type that accepts UserPolicyAttachmentArray and UserPolicyAttachmentArrayOutput values. You can construct a concrete instance of `UserPolicyAttachmentArrayInput` via:

UserPolicyAttachmentArray{ UserPolicyAttachmentArgs{...} }

type UserPolicyAttachmentArrayOutput

type UserPolicyAttachmentArrayOutput struct{ *pulumi.OutputState }

func (UserPolicyAttachmentArrayOutput) ElementType

func (UserPolicyAttachmentArrayOutput) Index

func (UserPolicyAttachmentArrayOutput) ToUserPolicyAttachmentArrayOutput

func (o UserPolicyAttachmentArrayOutput) ToUserPolicyAttachmentArrayOutput() UserPolicyAttachmentArrayOutput

func (UserPolicyAttachmentArrayOutput) ToUserPolicyAttachmentArrayOutputWithContext

func (o UserPolicyAttachmentArrayOutput) ToUserPolicyAttachmentArrayOutputWithContext(ctx context.Context) UserPolicyAttachmentArrayOutput

type UserPolicyAttachmentInput

type UserPolicyAttachmentInput interface {
	pulumi.Input

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

type UserPolicyAttachmentMap

type UserPolicyAttachmentMap map[string]UserPolicyAttachmentInput

func (UserPolicyAttachmentMap) ElementType

func (UserPolicyAttachmentMap) ElementType() reflect.Type

func (UserPolicyAttachmentMap) ToUserPolicyAttachmentMapOutput

func (i UserPolicyAttachmentMap) ToUserPolicyAttachmentMapOutput() UserPolicyAttachmentMapOutput

func (UserPolicyAttachmentMap) ToUserPolicyAttachmentMapOutputWithContext

func (i UserPolicyAttachmentMap) ToUserPolicyAttachmentMapOutputWithContext(ctx context.Context) UserPolicyAttachmentMapOutput

type UserPolicyAttachmentMapInput

type UserPolicyAttachmentMapInput interface {
	pulumi.Input

	ToUserPolicyAttachmentMapOutput() UserPolicyAttachmentMapOutput
	ToUserPolicyAttachmentMapOutputWithContext(context.Context) UserPolicyAttachmentMapOutput
}

UserPolicyAttachmentMapInput is an input type that accepts UserPolicyAttachmentMap and UserPolicyAttachmentMapOutput values. You can construct a concrete instance of `UserPolicyAttachmentMapInput` via:

UserPolicyAttachmentMap{ "key": UserPolicyAttachmentArgs{...} }

type UserPolicyAttachmentMapOutput

type UserPolicyAttachmentMapOutput struct{ *pulumi.OutputState }

func (UserPolicyAttachmentMapOutput) ElementType

func (UserPolicyAttachmentMapOutput) MapIndex

func (UserPolicyAttachmentMapOutput) ToUserPolicyAttachmentMapOutput

func (o UserPolicyAttachmentMapOutput) ToUserPolicyAttachmentMapOutput() UserPolicyAttachmentMapOutput

func (UserPolicyAttachmentMapOutput) ToUserPolicyAttachmentMapOutputWithContext

func (o UserPolicyAttachmentMapOutput) ToUserPolicyAttachmentMapOutputWithContext(ctx context.Context) UserPolicyAttachmentMapOutput

type UserPolicyAttachmentOutput

type UserPolicyAttachmentOutput struct{ *pulumi.OutputState }

func (UserPolicyAttachmentOutput) ElementType

func (UserPolicyAttachmentOutput) ElementType() reflect.Type

func (UserPolicyAttachmentOutput) PolicyName added in v3.27.0

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.

func (UserPolicyAttachmentOutput) PolicyType added in v3.27.0

Type of the RAM policy. It must be `Custom` or `System`.

func (UserPolicyAttachmentOutput) ToUserPolicyAttachmentOutput

func (o UserPolicyAttachmentOutput) ToUserPolicyAttachmentOutput() UserPolicyAttachmentOutput

func (UserPolicyAttachmentOutput) ToUserPolicyAttachmentOutputWithContext

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

func (UserPolicyAttachmentOutput) UserName added in v3.27.0

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.

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: `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