Class Policy

public sealed class Policy : IMessage<Policy>, IEquatable<Policy>, IDeepCloneable<Policy>, IBufferMessage, IMessage

Defines a Cloud Organization Policy which is used to specify Constraints for configurations of Cloud Platform resources.

Inheritance

Object > Policy

Namespace

Google.Cloud.OrgPolicy.V1

Assembly

Google.Cloud.OrgPolicy.V1.dll

Constructors

Policy()

public Policy()

Policy(Policy)

public Policy(Policy other)
Parameter
TypeNameDescription
Policyother

Properties

BooleanPolicy

public Policy.Types.BooleanPolicy BooleanPolicy { get; set; }

For boolean Constraints, whether to enforce the Constraint or not.

Property Value
TypeDescription
Policy.Types.BooleanPolicy

Constraint

public string Constraint { get; set; }

The name of the Constraint the Policy is configuring, for example, constraints/serviceuser.services.

Immutable after creation.

Property Value
TypeDescription
String

Etag

public ByteString Etag { get; set; }

An opaque tag indicating the current version of the Policy, used for concurrency control.

When the Policy is returned from either a GetPolicy or a ListOrgPolicy request, this etag indicates the version of the current Policy to use when executing a read-modify-write loop.

When the Policy is returned from a GetEffectivePolicy request, the etag will be unset.

When the Policy is used in a SetOrgPolicy method, use the etag value that was returned from a GetOrgPolicy request as part of a read-modify-write loop for concurrency control. Not setting the etagin a SetOrgPolicy request will result in an unconditional write of the Policy.

Property Value
TypeDescription
ByteString

ListPolicy

public Policy.Types.ListPolicy ListPolicy { get; set; }

List of values either allowed or disallowed.

Property Value
TypeDescription
Policy.Types.ListPolicy

PolicyTypeCase

public Policy.PolicyTypeOneofCase PolicyTypeCase { get; }
Property Value
TypeDescription
Policy.PolicyTypeOneofCase

RestoreDefault

public Policy.Types.RestoreDefault RestoreDefault { get; set; }

Restores the default behavior of the constraint; independent of Constraint type.

Property Value
TypeDescription
Policy.Types.RestoreDefault

UpdateTime

public Timestamp UpdateTime { get; set; }

The time stamp the Policy was previously updated. This is set by the server, not specified by the caller, and represents the last time a call to SetOrgPolicy was made for that Policy. Any value set by the client will be ignored.

Property Value
TypeDescription
Timestamp

Version

public int Version { get; set; }

Version of the Policy. Default version is 0;

Property Value
TypeDescription
Int32

Implements