Policy

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

*/

Properties

Link copied to clipboard
val attachmentCount: Output<Int>

The policy attachment count.

Link copied to clipboard
val defaultVersion: Output<String>

The default version of policy.

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

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

Link copied to clipboard
val document: Output<String>

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

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

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

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

Link copied to clipboard
val policyDocument: Output<String>

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

Link copied to clipboard
val policyName: Output<String>

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
Link copied to clipboard
Link copied to clipboard
val rotateStrategy: Output<String>?

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

(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 type: Output<String>

The policy type.

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

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

Link copied to clipboard
val versionId: Output<String>

The ID of default version policy.