GroupPolicyAttachmentArgs

data class GroupPolicyAttachmentArgs(val groupName: Output<String>? = null, val policyName: Output<String>? = null, val policyType: Output<String>? = null) : ConvertibleToJava<GroupPolicyAttachmentArgs>

Provides a RAM Group Policy attachment resource.

NOTE: Available since v1.0.0+.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.Group;
import com.pulumi.alicloud.ram.GroupArgs;
import com.pulumi.alicloud.ram.Policy;
import com.pulumi.alicloud.ram.PolicyArgs;
import com.pulumi.alicloud.ram.GroupPolicyAttachment;
import com.pulumi.alicloud.ram.GroupPolicyAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var group = new Group("group", GroupArgs.builder()
.comments("this is a group comments.")
.build());
var policy = new Policy("policy", PolicyArgs.builder()
.document("""
{
"Statement": [
{
"Action": [
"oss:ListObjects",
"oss:GetObject"
],
"Effect": "Allow",
"Resource": [
"acs:oss:*:*:mybucket",
"acs:oss:*:*:mybucket/*"
]
}
],
"Version": "1"
}
""")
.description("this is a policy test")
.build());
var attach = new GroupPolicyAttachment("attach", GroupPolicyAttachmentArgs.builder()
.policyName(policy.name())
.policyType(policy.type())
.groupName(group.name())
.build());
}
}

Import

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

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

Constructors

Link copied to clipboard
fun GroupPolicyAttachmentArgs(groupName: Output<String>? = null, policyName: Output<String>? = null, policyType: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): GroupPolicyAttachmentArgs

Properties

Link copied to clipboard
val groupName: Output<String>? = null

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.

Link copied to clipboard
val policyName: Output<String>? = null

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.

Link copied to clipboard
val policyType: Output<String>? = null

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