PolicyArgs

data class PolicyArgs(val description: Output<String>? = null, val document: Output<String>? = null, val force: Output<Boolean>? = null, val name: Output<String>? = null, val policyDocument: Output<String>? = null, val policyName: Output<String>? = null, val rotateStrategy: Output<String>? = null, val statements: Output<List<PolicyStatementArgs>>? = null, val version: Output<String>? = null) : ConvertibleToJava<PolicyArgs>

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.Policy;
import com.pulumi.alicloud.ram.PolicyArgs;
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 policy = new Policy("policy", PolicyArgs.builder()
.description("this is a policy test")
.force(true)
.policyDocument("""
{
"Statement": [
{
"Action": [
"oss:ListObjects",
"oss:GetObject"
],
"Effect": "Allow",
"Resource": [
"acs:oss:*:*:mybucket",
"acs:oss:*:*:mybucket/*"
]
}
],
"Version": "1"
}
""")
.policyName("policyName")
.build());
}
}

Import

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

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

Constructors

Link copied to clipboard
fun PolicyArgs(description: Output<String>? = null, document: Output<String>? = null, force: Output<Boolean>? = null, name: Output<String>? = null, policyDocument: Output<String>? = null, policyName: Output<String>? = null, rotateStrategy: Output<String>? = null, statements: Output<List<PolicyStatementArgs>>? = null, version: Output<String>? = null)

Functions

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

Properties

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

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

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

It has been deprecated from provider version 1.114.0 and policy_document instead.

Link copied to clipboard
val force: Output<Boolean>? = null

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

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

It has been deprecated from provider version 1.114.0 and policy_name instead.

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

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

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 rotateStrategy: Output<String>? = null

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

Link copied to clipboard
val statements: Output<List<PolicyStatementArgs>>? = null

(It has been deprecated from version 1.49.0, and use field 'document' to replace.) Statements of the RAM policy document. It is required when the document is not specified.

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

(It has been deprecated from version 1.49.0, and use field 'document' to replace.) Version of the RAM policy document. Valid value is 1. Default value is 1. */