Show / Hide Table of Contents

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

}
Inheritance
System.Object
Resource
CustomResource
Policy
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 Policy : CustomResource

Constructors

View Source

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

CreateDate

The time when the policy was created.

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

DefaultVersion

The version of the policy. Default to v1.

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

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

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 Source

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