Show / Hide Table of Contents

Class Policy

Allows management of Organization policies for a Google Organization. For more information see the official documentation and API.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var serialPortPolicy = new Gcp.Organizations.Policy("serialPortPolicy", new Gcp.Organizations.PolicyArgs
    {
        BooleanPolicy = new Gcp.Organizations.Inputs.PolicyBooleanPolicyArgs
        {
            Enforced = true,
        },
        Constraint = "compute.disableSerialPortAccess",
        OrgId = "123456789",
    });
}

}
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.Gcp.Organizations
Assembly: Pulumi.Gcp.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

BooleanPolicy

A boolean policy is a constraint that is either enforced or not. Structure is documented below.

Declaration
public Output<PolicyBooleanPolicy> BooleanPolicy { get; }
Property Value
Type Description
Output<PolicyBooleanPolicy>
View Source

Constraint

The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.

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

Etag

(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.

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

ListPolicy

A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.

Declaration
public Output<PolicyListPolicy> ListPolicy { get; }
Property Value
Type Description
Output<PolicyListPolicy>
View Source

OrgId

The numeric ID of the organization to set the policy for.

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

RestorePolicy

A restore policy is a constraint to restore the default policy. Structure is documented below.

Declaration
public Output<PolicyRestorePolicy> RestorePolicy { get; }
Property Value
Type Description
Output<PolicyRestorePolicy>
View Source

UpdateTime

(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".

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

Version

Version of the Policy. Default version is 0.

Declaration
public Output<int> Version { get; }
Property Value
Type Description
Output<System.Int32>

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.