def ref_redirect_configuration( self, value: ApplicationGatewayRedirectConfiguration) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/redirectConfigurations', '{self.title}', '{value.title}')]" )
def test_private_dns(self): sandbox = '654321' vnet_name = '{}_vnet'.format(sandbox) dns_name = '{}.sandbox.com'.format(sandbox) template = ARMTemplate() vnet = VirtualNetwork(vnet_name, template=template) nic = NetworkInterface('testNic') dns = DnsZone(dns_name, template=template, registrationVirtualNetworks=[SubResource(id=vnet.ref())], zoneType=ZoneType.Private.name, dependsOn=vnet) dns_a = DnsZoneA( '/'.join([dns_name, 'app1']), template=template, TTL=3600, ARecords=[ ARecord( ipv4Address= "[reference('crumbNIC').ipConfigurations[0].properties.privateIPAddress]" ) ], dependsOn=dns) j = template.to_json() print(j)
def ref_ssl_certificate( self, value: ApplicationGatewaySslCertificate) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/sslCertificates', '{self.title}', '{value.title}')]" )
def ref_health_probe(self, value: ApplicationGatewayHealthProbe) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/probes', '{self.title}', '{value.title}')]" )
def ref_url_path_map(self, value: ApplicationGatewayUrlPathMap) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/urlPathMaps', '{self.title}', '{value.title}')]" )
def ref_http_listener( self, value: ApplicationGatewayHttpListener) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/httpListeners', '{self.title}', '{value.title}')]" )
def ref_backend_http_settings( self, value: ApplicationGatewayBackendHttpSettings) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/backendHttpSettingsCollection', '{self.title}', '{value.title}')]" )
def ref_backend_address_pool(self, value: BackendAddressPool) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/backendAddressPools', '{self.title}', '{value.title}')]" )
def ref_frontend_port( self, value: ApplicationGatewayFrontendPort) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/frontendPorts', '{self.title}', '{value.title}')]" )
def ref_frontend_ip_configuration( self, value: FrontendIPConfiguration) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/frontendIPConfigurations', '{self.title}', '{value.title}')]" )
def ref_gateway_ip_configuration( self, value: ApplicationGatewayIPConfiguration) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/gatewayIPConfigurations', '{self.title}', '{value.title}')]" )
def ref_probe(self, value: Probe) -> SubResource: return SubResource( id= f"[resourceId('{self.resource_type}/probes', '{self.title}', '{value.title}')]" )