Class PolicyVersion
Provides a Resource Manager Policy Version resource. For information about Resource Manager Policy Version and how to use it, see What is Resource Manager Policy Version.
NOTE: Available in v1.84.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var examplePolicy = new AliCloud.ResourceManager.Policy("examplePolicy", new AliCloud.ResourceManager.PolicyArgs
{
PolicyName = "tftest",
PolicyDocument = @" {
""Statement"": [{
""Action"": [""oss:*""],
""Effect"": ""Allow"",
""Resource"": [""acs:oss:*:*:*""]
}],
""Version"": ""1""
}
",
});
var examplePolicyVersion = new AliCloud.ResourceManager.PolicyVersion("examplePolicyVersion", new AliCloud.ResourceManager.PolicyVersionArgs
{
PolicyName = examplePolicy.PolicyName,
PolicyDocument = @" {
""Statement"": [{
""Action"": [""oss:*""],
""Effect"": ""Allow"",
""Resource"": [""acs:oss:*:*:myphotos""]
}],
""Version"": ""1""
}
",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.ResourceManager
Assembly: Pulumi.AliCloud.dll
Syntax
public class PolicyVersion : CustomResource
Constructors
View SourcePolicyVersion(String, PolicyVersionArgs, CustomResourceOptions)
Create a PolicyVersion resource with the given unique name, arguments, and options.
Declaration
public PolicyVersion(string name, PolicyVersionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| PolicyVersionArgs | 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 version was created.
Declaration
public Output<string> CreateDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IsDefaultVersion
Specifies whether to set the policy version as the default version. Default to false.
Declaration
public Output<bool?> IsDefaultVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
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> |
VersionId
The ID of the policy version.
Declaration
public Output<string> VersionId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, PolicyVersionState, CustomResourceOptions)
Get an existing PolicyVersion resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static PolicyVersion Get(string name, Input<string> id, PolicyVersionState 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. |
| PolicyVersionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| PolicyVersion |