class Google::Apis::DnsV1::Policy

A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.

Attributes

alternative_name_server_config[RW]

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as . internal are not available when an alternative name server is specified. Corresponds to the JSON property `alternativeNameServerConfig` @return [Google::Apis::DnsV1::PolicyAlternativeNameServerConfig]

description[RW]

A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the policy's function. Corresponds to the JSON property `description` @return [String]

enable_inbound_forwarding[RW]

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address is allocated from each of the subnetworks that are bound to this policy. Corresponds to the JSON property `enableInboundForwarding` @return [Boolean]

enable_inbound_forwarding?[RW]

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address is allocated from each of the subnetworks that are bound to this policy. Corresponds to the JSON property `enableInboundForwarding` @return [Boolean]

enable_logging[RW]

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set. Corresponds to the JSON property `enableLogging` @return [Boolean]

enable_logging?[RW]

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set. Corresponds to the JSON property `enableLogging` @return [Boolean]

id[RW]

Unique identifier for the resource; defined by the server (output only). Corresponds to the JSON property `id` @return [Fixnum]

kind[RW]

Corresponds to the JSON property `kind` @return [String]

name[RW]

User-assigned name for this policy. Corresponds to the JSON property `name` @return [String]

networks[RW]

List of network names specifying networks to which this policy is applied. Corresponds to the JSON property `networks` @return [Array<Google::Apis::DnsV1::PolicyNetwork>]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/dns_v1/classes.rb, line 1627
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/dns_v1/classes.rb, line 1632
def update!(**args)
  @alternative_name_server_config = args[:alternative_name_server_config] if args.key?(:alternative_name_server_config)
  @description = args[:description] if args.key?(:description)
  @enable_inbound_forwarding = args[:enable_inbound_forwarding] if args.key?(:enable_inbound_forwarding)
  @enable_logging = args[:enable_logging] if args.key?(:enable_logging)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @networks = args[:networks] if args.key?(:networks)
end