@Override public LoadBalancerFrontendImpl withNewPublicIPAddress() { String dnsLabel = SdkContext.randomResourceName("fe", 20); return this.withNewPublicIPAddress(dnsLabel); }
@Override public LoadBalancerInboundNatRuleImpl fromNewPublicIPAddress() { String dnsLabel = SdkContext.randomResourceName("fe", 20); return this.fromNewPublicIPAddress(dnsLabel); }
@Override public LoadBalancerInboundNatPoolImpl fromNewPublicIPAddress() { String dnsLabel = SdkContext.randomResourceName("fe", 20); return this.fromNewPublicIPAddress(dnsLabel); }
protected ApplicationGatewayBackendImpl ensureUniqueBackend() { String name = SdkContext.randomResourceName("backend", 20); ApplicationGatewayBackendImpl backend = this.defineBackend(name); backend.attach(); return backend; }
protected LoadBalancerFrontendImpl ensureUniqueFrontend() { String name = SdkContext.randomResourceName("frontend", 20); LoadBalancerFrontendImpl frontend = this.defineFrontend(name); frontend.attach(); return frontend; }
@Override public LoadBalancingRuleImpl fromNewPublicIPAddress(Creatable<PublicIPAddress> pipDefinition) { String frontendName = SdkContext.randomResourceName("fe", 20); this.parent().withNewPublicIPAddress(pipDefinition, frontendName); return fromFrontend(frontendName); }
@Override public LoadBalancerInboundNatRuleImpl fromNewPublicIPAddress(String leafDnsLabel) { String frontendName = SdkContext.randomResourceName("fe", 20); this.parent().withNewPublicIPAddress(leafDnsLabel, frontendName); this.fromFrontend(frontendName); return this; }
protected ApplicationGatewayFrontendImpl ensureDefaultPrivateFrontend() { ApplicationGatewayFrontendImpl frontend = (ApplicationGatewayFrontendImpl) defaultPrivateFrontend(); if (frontend != null) { return frontend; } else { String name = SdkContext.randomResourceName("frontend", 14); frontend = this.defineFrontend(name); frontend.attach(); this.defaultPrivateFrontend = frontend; return frontend; } }
protected ApplicationGatewayFrontendImpl ensureDefaultPublicFrontend() { ApplicationGatewayFrontendImpl frontend = (ApplicationGatewayFrontendImpl) defaultPublicFrontend(); if (frontend != null) { return frontend; } else { String name = SdkContext.randomResourceName("frontend", 14); frontend = this.defineFrontend(name); frontend.attach(); this.defaultPublicFrontend = frontend; return frontend; } }
@Override public LoadBalancingRuleImpl fromNewPublicIPAddress(String leafDnsLabel) { String frontendName = SdkContext.randomResourceName("fe", 20); this.parent().withNewPublicIPAddress(leafDnsLabel, frontendName); return fromFrontend(frontendName); }
@Override public LoadBalancerInboundNatPoolImpl fromNewPublicIPAddress(String leafDnsLabel) { String frontendName = SdkContext.randomResourceName("fe", 20); this.parent().withNewPublicIPAddress(leafDnsLabel, frontendName); return fromFrontend(frontendName); }
@Override public LoadBalancerInboundNatRuleImpl fromNewPublicIPAddress(Creatable<PublicIPAddress> pipDefinition) { String frontendName = SdkContext.randomResourceName("fe", 20); this.parent().withNewPublicIPAddress(pipDefinition, frontendName); this.fromFrontend(frontendName); return this; }
private ApplicationGatewayIPConfigurationImpl ensureDefaultIPConfig() { ApplicationGatewayIPConfigurationImpl ipConfig = (ApplicationGatewayIPConfigurationImpl) defaultIPConfiguration(); if (ipConfig == null) { String name = SdkContext.randomResourceName("ipcfg", 11); ipConfig = this.defineIPConfiguration(name); ipConfig.attach(); } return ipConfig; }
private VirtualNetworkGatewayIPConfigurationImpl ensureDefaultIPConfig() { VirtualNetworkGatewayIPConfigurationImpl ipConfig = (VirtualNetworkGatewayIPConfigurationImpl) defaultIPConfiguration(); if (ipConfig == null) { String name = SdkContext.randomResourceName("ipcfg", 11); ipConfig = this.defineIPConfiguration(name); ipConfig.attach(); } return ipConfig; }
@Override public LoadBalancerInboundNatPoolImpl fromNewPublicIPAddress(Creatable<PublicIPAddress> pipDefinition) { String frontendName = SdkContext.randomResourceName("fe", 20); this.parent().withNewPublicIPAddress(pipDefinition, frontendName); return fromFrontend(frontendName); }
private String generateUniqueEndpointName(String endpointNamePrefix) { String endpointName; CheckNameAvailabilityResult result; do { endpointName = SdkContext.randomResourceName(endpointNamePrefix, 50); result = this.parent().checkEndpointNameAvailability(endpointName); } while (!result.nameAvailable()); return endpointName; } }
private ApplicationGatewayListenerImpl ensureListener() { ApplicationGatewayListenerImpl listener = this.listener(); if (listener == null) { final String name = SdkContext.randomResourceName("listener", 13); listener = this.parent().defineListener(name); listener.attach(); this.fromListener(name); } return listener; }
@Override public ApplicationGatewayListenerImpl withFrontendPort(int portNumber) { // Attempt to find an existing port referencing this port number String portName = this.parent().frontendPortNameFromNumber(portNumber); if (portName == null) { // Existing frontend port with this number not found so create one portName = SdkContext.randomResourceName("port", 9); this.parent().withFrontendPort(portNumber, portName); } return this.withFrontendPort(portName); }
private Creatable<PublicIPAddress> ensureDefaultPipDefinition() { if (this.creatablePip == null) { final String pipName = SdkContext.randomResourceName("pip", 9); this.creatablePip = this.manager().publicIPAddresses().define(pipName) .withRegion(this.regionName()) .withExistingResourceGroup(this.resourceGroupName()); } return this.creatablePip; }
private Creatable<Network> ensureDefaultNetworkDefinition() { if (this.creatableNetwork == null) { final String vnetName = SdkContext.randomResourceName("vnet", 10); this.creatableNetwork = this.manager().networks().define(vnetName) .withRegion(this.region()) .withExistingResourceGroup(this.resourceGroupName()) .withAddressSpace("10.0.0.0/24") .withSubnet(DEFAULT, "10.0.0.0/25") .withSubnet("apps", "10.0.0.128/25"); } return this.creatableNetwork; }