PolicyArgs

data class PolicyArgs(val defaultVersion: Output<String>? = null, val description: Output<String>? = null, val policyDocument: Output<String>? = null, val policyName: Output<String>? = null) : ConvertibleToJava<PolicyArgs>

Provides a Resource Manager Policy resource. For information about Resource Manager Policy and how to use it, see What is Resource Manager Policy.

NOTE: Available since v1.83.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.Policy;
import com.pulumi.alicloud.resourcemanager.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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tfexample");
var example = new Policy("example", PolicyArgs.builder()
.policyName(name)
.policyDocument("""
{
"Statement": [{
"Action": ["oss:*"],
"Effect": "Allow",
"Resource": ["acs:oss:*:*:*"]
}],
"Version": "1"
}
""")
.build());
}
}

Import

Resource Manager Policy can be imported using the id, e.g.

$ pulumi import alicloud:resourcemanager/policy:Policy example abc12345

Constructors

Link copied to clipboard
fun PolicyArgs(defaultVersion: Output<String>? = null, description: Output<String>? = null, policyDocument: Output<String>? = null, policyName: Output<String>? = null)

Functions

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

Properties

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

The version of the policy. Default to v1.

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

The description of the policy. The description must be 1 to 1,024 characters in length.

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

The content of the policy. The content must be 1 to 2,048 characters in length.

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

The name of the policy. name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).