Class: Google::Apis::DnsV1beta2::Policy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dns_v1beta2/classes.rb,
generated/google/apis/dns_v1beta2/representations.rb,
generated/google/apis/dns_v1beta2/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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Policy

Returns a new instance of Policy.



1071
1072
1073
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1071

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

Instance Attribute Details

#alternative_name_server_configGoogle::Apis::DnsV1beta2::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



1028
1029
1030
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1028

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)


1034
1035
1036
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1034

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 will be allocated from each of the sub-networks that are bound to this policy. Corresponds to the JSON property enableInboundForwarding

Returns:

  • (Boolean)


1041
1042
1043
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1041

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)


1048
1049
1050
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1048

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)


1054
1055
1056
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1054

def id
  @id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "dns#policy". Corresponds to the JSON property kind

Returns:

  • (String)


1059
1060
1061
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1059

def kind
  @kind
end

#nameString

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

Returns:

  • (String)


1064
1065
1066
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1064

def name
  @name
end

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

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



1069
1070
1071
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1069

def networks
  @networks
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
# File 'generated/google/apis/dns_v1beta2/classes.rb', line 1076

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