Reference documentation and code samples for the Organization Policy V2 API class Google::Cloud::OrgPolicy::V2::CustomConstraint.
A custom constraint defined by customers which can only be applied to the given resource types and organization.
By creating a custom constraint, customers can apply policies of this custom constraint. Creating a custom constraint itself does NOT apply any policy enforcement.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#action_type
def action_type() -> ::Google::Cloud::OrgPolicy::V2::CustomConstraint::ActionType
- (::Google::Cloud::OrgPolicy::V2::CustomConstraint::ActionType) — Allow or deny type.
#action_type=
def action_type=(value) -> ::Google::Cloud::OrgPolicy::V2::CustomConstraint::ActionType
- value (::Google::Cloud::OrgPolicy::V2::CustomConstraint::ActionType) — Allow or deny type.
- (::Google::Cloud::OrgPolicy::V2::CustomConstraint::ActionType) — Allow or deny type.
#condition
def condition() -> ::String
-
(::String) — Org policy condition/expression. For example:
resource.instanceName.matches("[production|test]_.*_(\d)+")
or,resource.management.auto_upgrade == true
The max length of the condition is 1000 characters.
#condition=
def condition=(value) -> ::String
-
value (::String) — Org policy condition/expression. For example:
resource.instanceName.matches("[production|test]_.*_(\d)+")
or,resource.management.auto_upgrade == true
The max length of the condition is 1000 characters.
-
(::String) — Org policy condition/expression. For example:
resource.instanceName.matches("[production|test]_.*_(\d)+")
or,resource.management.auto_upgrade == true
The max length of the condition is 1000 characters.
#description
def description() -> ::String
- (::String) — Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
#description=
def description=(value) -> ::String
- value (::String) — Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
- (::String) — Detailed information about this custom policy constraint. The max length of the description is 2000 characters.
#display_name
def display_name() -> ::String
- (::String) — One line display name for the UI. The max length of the display_name is 200 characters.
#display_name=
def display_name=(value) -> ::String
- value (::String) — One line display name for the UI. The max length of the display_name is 200 characters.
- (::String) — One line display name for the UI. The max length of the display_name is 200 characters.
#method_types
def method_types() -> ::Array<::Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType>
- (::Array<::Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType>) — All the operations being applied for this constraint.
#method_types=
def method_types=(value) -> ::Array<::Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType>
- value (::Array<::Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType>) — All the operations being applied for this constraint.
- (::Array<::Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType>) — All the operations being applied for this constraint.
#name
def name() -> ::String
-
(::String) — Immutable. 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
The max length is 70 characters and the minimum length is 1. Note that the prefix
organizations/{organization_id}/customConstraints/
is not counted.
#name=
def name=(value) -> ::String
-
value (::String) — Immutable. 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
The max length is 70 characters and the minimum length is 1. Note that the prefix
organizations/{organization_id}/customConstraints/
is not counted.
-
(::String) — Immutable. 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
The max length is 70 characters and the minimum length is 1. Note that the prefix
organizations/{organization_id}/customConstraints/
is not counted.
#resource_types
def resource_types() -> ::Array<::String>
-
(::Array<::String>) —
Immutable. The resource instance type on which this policy applies. Format will be of the form :
<canonical service name>/<type>
Example:compute.googleapis.com/Instance
.
#resource_types=
def resource_types=(value) -> ::Array<::String>
-
value (::Array<::String>) —
Immutable. The resource instance type on which this policy applies. Format will be of the form :
<canonical service name>/<type>
Example:compute.googleapis.com/Instance
.
-
(::Array<::String>) —
Immutable. The resource instance type on which this policy applies. Format will be of the form :
<canonical service name>/<type>
Example:compute.googleapis.com/Instance
.
#update_time
def update_time() -> ::Google::Protobuf::Timestamp
-
(::Google::Protobuf::Timestamp) — Output only. The last time this custom constraint was updated. This
represents the last time that the
CreateCustomConstraint
orUpdateCustomConstraint
RPC was called