Show / Hide Table of Contents

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""
}
",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
PolicyVersion
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.ResourceManager
Assembly: Pulumi.AliCloud.dll
Syntax
public class PolicyVersion : CustomResource

Constructors

View Source

PolicyVersion(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 Source

CreateDate

The time when the policy version was created.

Declaration
public Output<string> CreateDate { get; }
Property Value
Type Description
Output<System.String>
View Source

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>>
View Source

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>
View Source

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>
View Source

VersionId

The ID of the policy version.

Declaration
public Output<string> VersionId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.