# Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::FirewallPolicy (v3.7.0)

3.7.0 (latest) 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.22.0 2.21.1 2.20.0 2.19.1 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.2 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.10.0 1.9.0 1.8.0 1.7.1 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.5.0 Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::FirewallPolicy.

Represents a Firewall Policy resource.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #associations

    def associations() -> ::Array<::Google::Cloud::Compute::V1::FirewallPolicyAssociation>

**Returns**

- (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyAssociation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyAssociation)\>) --- A list of associations that belong to this firewall policy.

### #associations=

    def associations=(value) -> ::Array<::Google::Cloud::Compute::V1::FirewallPolicyAssociation>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyAssociation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyAssociation)\>) --- A list of associations that belong to this firewall policy.
**Returns**

- (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyAssociation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyAssociation)\>) --- A list of associations that belong to this firewall policy.

### #creation_timestamp

    def creation_timestamp() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] Creation timestamp inRFC3339 text format.

### #creation_timestamp=

    def creation_timestamp=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] Creation timestamp inRFC3339 text format.
**Returns**

- (::String) --- Output only. \[Output Only\] Creation timestamp inRFC3339 text format.

### #description

    def description() -> ::String

**Returns**

- (::String) --- An optional description of this resource. Provide this property when you create the resource.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- An optional description of this resource. Provide this property when you create the resource.
**Returns**

- (::String) --- An optional description of this resource. Provide this property when you create the resource.

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
**Returns**

- (::String) --- Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

### #fingerprint

    def fingerprint() -> ::String

**Returns**

- (::String) --- Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error412 conditionNotMet.

  To see the latest fingerprint, make get() request to the
  firewall policy.

### #fingerprint=

    def fingerprint=(value) -> ::String

**Parameter**

- **value** (::String) --- Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error412 conditionNotMet.


  To see the latest fingerprint, make get() request to the
  firewall policy.
**Returns**

- (::String) --- Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error412 conditionNotMet.

  To see the latest fingerprint, make get() request to the
  firewall policy.

### #id

    def id() -> ::Integer

**Returns**

- (::Integer) --- \[Output Only\] The unique identifier for the resource. This identifier is defined by the server.

### #id=

    def id=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- \[Output Only\] The unique identifier for the resource. This identifier is defined by the server.
**Returns**

- (::Integer) --- \[Output Only\] The unique identifier for the resource. This identifier is defined by the server.

### #kind

    def kind() -> ::String

**Returns**

- (::String) --- Output only. \[Output only\] Type of the resource. Alwayscompute#firewallPolicyfor firewall policies

### #kind=

    def kind=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output only\] Type of the resource. Alwayscompute#firewallPolicyfor firewall policies
**Returns**

- (::String) --- Output only. \[Output only\] Type of the resource. Alwayscompute#firewallPolicyfor firewall policies

### #name

    def name() -> ::String

**Returns**

- (::String) --- Name of the resource. For Organization Firewall Policies it's a \[Output Only\] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Name of the resource. For Organization Firewall Policies it's a \[Output Only\] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
**Returns**

- (::String) --- Name of the resource. For Organization Firewall Policies it's a \[Output Only\] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.

### #packet_mirroring_rules

    def packet_mirroring_rules() -> ::Array<::Google::Cloud::Compute::V1::FirewallPolicyRule>

**Returns**

- (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyRule)\>) --- A list of packet mirroring rules that belong to this policy.

### #packet_mirroring_rules=

    def packet_mirroring_rules=(value) -> ::Array<::Google::Cloud::Compute::V1::FirewallPolicyRule>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyRule)\>) --- A list of packet mirroring rules that belong to this policy.
**Returns**

- (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyRule)\>) --- A list of packet mirroring rules that belong to this policy.

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] The parent of the firewall policy. This field is not applicable to network firewall policies.

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] The parent of the firewall policy. This field is not applicable to network firewall policies.
**Returns**

- (::String) --- Output only. \[Output Only\] The parent of the firewall policy. This field is not applicable to network firewall policies.

### #policy_type

    def policy_type() -> ::String

**Returns**

- (::String) --- The type of the firewall policy. This field can be one of VPC_POLICY, RDMA_ROCE_POLICY or ULL_POLICY.

  Note: if not specified then VPC_POLICY will be used.
  Check the PolicyType enum for the list of possible values.

### #policy_type=

    def policy_type=(value) -> ::String

**Parameter**

- **value** (::String) --- The type of the firewall policy. This field can be one of VPC_POLICY, RDMA_ROCE_POLICY or ULL_POLICY.


  Note: if not specified then VPC_POLICY will be used.
  Check the PolicyType enum for the list of possible values.
**Returns**

- (::String) --- The type of the firewall policy. This field can be one of VPC_POLICY, RDMA_ROCE_POLICY or ULL_POLICY.

  Note: if not specified then VPC_POLICY will be used.
  Check the PolicyType enum for the list of possible values.

### #region

    def region() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

### #region=

    def region=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
**Returns**

- (::String) --- Output only. \[Output Only\] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

### #rule_tuple_count

    def rule_tuple_count() -> ::Integer

**Returns**

- (::Integer) --- Output only. \[Output Only\] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.

### #rule_tuple_count=

    def rule_tuple_count=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Output only. \[Output Only\] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
**Returns**

- (::Integer) --- Output only. \[Output Only\] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.

### #rules

    def rules() -> ::Array<::Google::Cloud::Compute::V1::FirewallPolicyRule>

**Returns**

- (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyRule)\>) --- A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "\*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.

### #rules=

    def rules=(value) -> ::Array<::Google::Cloud::Compute::V1::FirewallPolicyRule>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyRule)\>) --- A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "\*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
**Returns**

- (::Array\<[::Google::Cloud::Compute::V1::FirewallPolicyRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-FirewallPolicyRule)\>) --- A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "\*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.

### #self_link

    def self_link() -> ::String

**Returns**

- (::String) --- \[Output Only\] Server-defined URL for the resource.

### #self_link=

    def self_link=(value) -> ::String

**Parameter**

- **value** (::String) --- \[Output Only\] Server-defined URL for the resource.
**Returns**

- (::String) --- \[Output Only\] Server-defined URL for the resource.

### #self_link_with_id

    def self_link_with_id() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] Server-defined URL for this resource with the resource id.

### #self_link_with_id=

    def self_link_with_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] Server-defined URL for this resource with the resource id.
**Returns**

- (::String) --- Output only. \[Output Only\] Server-defined URL for this resource with the resource id.

### #short_name

    def short_name() -> ::String

**Returns**

- (::String) --- User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

### #short_name=

    def short_name=(value) -> ::String

**Parameter**

- **value** (::String) --- User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
**Returns**

- (::String) --- User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.