Class Policy (1.1.0)

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

Assembly

Google.Cloud.OrgPolicy.V2.dll

Constructors

Policy()

public Policy()

Policy(Policy)

public Policy(Policy other)
Parameter
NameDescription
otherPolicy

Properties

Alternate

public AlternatePolicySpec Alternate { get; set; }

An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.

Property Value
TypeDescription
AlternatePolicySpec

Name

public string Name { get; set; }

Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures:

  • projects/{project_number}/policies/{constraint_name}
  • folders/{folder_id}/policies/{constraint_name}
  • organizations/{organization_id}/policies/{constraint_name}

For example, "projects/123/policies/compute.disableSerialPortAccess".

Note: projects/{project_id}/policies/{constraint_name} is also an acceptable name for API requests, but responses will return the name using the equivalent project number.

Property Value
TypeDescription
String

PolicyName

public PolicyName PolicyName { get; set; }

PolicyName-typed view over the Name resource name property.

Property Value
TypeDescription
PolicyName

Spec

public PolicySpec Spec { get; set; }

Basic information about the Organization Policy.

Property Value
TypeDescription
PolicySpec