Class Policy
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 in v1.83.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var example = new AliCloud.ResourceManager.Policy("example", new AliCloud.ResourceManager.PolicyArgs
{
PolicyDocument = @" {
""Statement"": [{
""Action"": [""oss:*""],
""Effect"": ""Allow"",
""Resource"": [""acs:oss:*:*:*""]
}],
""Version"": ""1""
}
",
PolicyName = "abc12345",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.ResourceManager
Assembly: Pulumi.AliCloud.dll
Syntax
public class Policy : CustomResource
Constructors
View SourcePolicy(String, PolicyArgs, CustomResourceOptions)
Create a Policy resource with the given unique name, arguments, and options.
Declaration
public Policy(string name, PolicyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| PolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCreateDate
The time when the policy was created.
Declaration
public Output<string> CreateDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultVersion
The version of the policy. Default to v1.
Declaration
public Output<string> DefaultVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the policy. The description must be 1 to 1,024 characters in length.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyDocument
The content of the policy. The content must be 1 to 2,048 characters in length.
Declaration
public Output<string> PolicyDocument { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyName
The name of the policy. name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).
Declaration
public Output<string> PolicyName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyType
The type of the policy. Valid values: Custom, System.
Declaration
public Output<string> PolicyType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, PolicyState, CustomResourceOptions)
Get an existing Policy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Policy Get(string name, Input<string> id, PolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| PolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Policy |