Class: Google::Apis::DnsV1::Policy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dns_v1/classes.rb,
lib/google/apis/dns_v1/representations.rb,
lib/google/apis/dns_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Policy

Returns a new instance of Policy.



1588
1589
1590
# File 'lib/google/apis/dns_v1/classes.rb', line 1588

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#alternative_name_server_configGoogle::Apis::DnsV1::PolicyAlternativeNameServerConfig

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



1545
1546
1547
# File 'lib/google/apis/dns_v1/classes.rb', line 1545

def alternative_name_server_config
  @alternative_name_server_config
end

#descriptionString

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

Returns:

  • (String)


1551
1552
1553
# File 'lib/google/apis/dns_v1/classes.rb', line 1551

def description
  @description
end

#enable_inbound_forwardingBoolean Also known as: enable_inbound_forwarding?

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

Returns:

  • (Boolean)


1558
1559
1560
# File 'lib/google/apis/dns_v1/classes.rb', line 1558

def enable_inbound_forwarding
  @enable_inbound_forwarding
end

#enable_loggingBoolean Also known as: enable_logging?

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

Returns:

  • (Boolean)


1565
1566
1567
# File 'lib/google/apis/dns_v1/classes.rb', line 1565

def enable_logging
  @enable_logging
end

#idFixnum

Unique identifier for the resource; defined by the server (output only). Corresponds to the JSON property id

Returns:

  • (Fixnum)


1571
1572
1573
# File 'lib/google/apis/dns_v1/classes.rb', line 1571

def id
  @id
end

#kindString

Corresponds to the JSON property kind

Returns:

  • (String)


1576
1577
1578
# File 'lib/google/apis/dns_v1/classes.rb', line 1576

def kind
  @kind
end

#nameString

User-assigned name for this policy. Corresponds to the JSON property name

Returns:

  • (String)


1581
1582
1583
# File 'lib/google/apis/dns_v1/classes.rb', line 1581

def name
  @name
end

#networksArray<Google::Apis::DnsV1::PolicyNetwork>

List of network names specifying networks to which this policy is applied. Corresponds to the JSON property networks



1586
1587
1588
# File 'lib/google/apis/dns_v1/classes.rb', line 1586

def networks
  @networks
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
# File 'lib/google/apis/dns_v1/classes.rb', line 1593

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