1.9.0 (latest) 1.8.0 1.7.0 1.6.1 1.5.0 1.4.1 1.3.1 1.2.0 1.1.0 1.0.2 0.32.0 0.31.0 0.30.0 0.29.3 0.28.1 0.27.0 0.26.1 0.25.0 0.24.0 0.23.0 0.22.0 0.21.1 0.20.1 0.19.0 0.18.0 0.17.3 Reference documentation and code samples for the Cloud Asset V1 API class Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint.

The definition of a custom constraint.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #action_type

    def action_type() -> ::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType

**Returns**

- ([::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-Asset-V1-AnalyzerOrgPolicyConstraint-CustomConstraint-ActionType)) --- Allow or deny type.

### #action_type=

    def action_type=(value) -> ::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType

**Parameter**

- **value** ([::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-Asset-V1-AnalyzerOrgPolicyConstraint-CustomConstraint-ActionType)) --- Allow or deny type.
**Returns**

- ([::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::ActionType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-Asset-V1-AnalyzerOrgPolicyConstraint-CustomConstraint-ActionType)) --- Allow or deny type.

### #condition

    def condition() -> ::String

**Returns**

- (::String) --- Organization Policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or, `resource.management.auto_upgrade == true`

### #condition=

    def condition=(value) -> ::String

**Parameter**

- **value** (::String) --- Organization Policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or, `resource.management.auto_upgrade == true`
**Returns**

- (::String) --- Organization Policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or, `resource.management.auto_upgrade == true`

### #description

    def description() -> ::String

**Returns**

- (::String) --- Detailed information about this custom policy constraint.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Detailed information about this custom policy constraint.
**Returns**

- (::String) --- Detailed information about this custom policy constraint.

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- One line display name for the UI.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- One line display name for the UI.
**Returns**

- (::String) --- One line display name for the UI.

### #method_types

    def method_types() -> ::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType>

**Returns**

- (::Array\<[::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-Asset-V1-AnalyzerOrgPolicyConstraint-CustomConstraint-MethodType)\>) --- All the operations being applied for this constraint.

### #method_types=

    def method_types=(value) -> ::Array<::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-Asset-V1-AnalyzerOrgPolicyConstraint-CustomConstraint-MethodType)\>) --- All the operations being applied for this constraint.
**Returns**

- (::Array\<[::Google::Cloud::Asset::V1::AnalyzerOrgPolicyConstraint::CustomConstraint::MethodType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-Asset-V1-AnalyzerOrgPolicyConstraint-CustomConstraint-MethodType)\>) --- All the operations being applied for this constraint.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Name of the constraint. This is unique within the organization. Format of the name should be

  - `organizations/{organization_id}/customConstraints/{custom_constraint_id}`

  Example :
  "organizations/123/customConstraints/custom.createOnlyE2TypeVms"

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Name of the constraint. This is unique within the organization. Format of the name should be


  - `organizations/{organization_id}/customConstraints/{custom_constraint_id}`

  Example :
  "organizations/123/customConstraints/custom.createOnlyE2TypeVms"
**Returns**

- (::String) --- Name of the constraint. This is unique within the organization. Format of the name should be

  - `organizations/{organization_id}/customConstraints/{custom_constraint_id}`

  Example :
  "organizations/123/customConstraints/custom.createOnlyE2TypeVms"

### #resource_types

    def resource_types() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- The Resource Instance type on which this policy applies to. Format will
  be of the form : "


  - `compute.googleapis.com/Instance`.

### #resource_types=

    def resource_types=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) ---

  The Resource Instance type on which this policy applies to. Format will
  be of the form : "


  - `compute.googleapis.com/Instance`.
**Returns**

- (::Array\<::String\>) --- The Resource Instance type on which this policy applies to. Format will
  be of the form : "


  - `compute.googleapis.com/Instance`.