Google.Cloud.OrgPolicy.V1 - Class Policy (3.2.0)

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

Reference documentation and code samples for the Google.Cloud.OrgPolicy.V1 class Policy.

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

Properties

BooleanPolicy

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

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

Property Value
TypeDescription
PolicyTypesBooleanPolicy

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
PolicyTypesListPolicy

PolicyTypeCase

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

RestoreDefault

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

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

Property Value
TypeDescription
PolicyTypesRestoreDefault

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
int