.define(azureAgent.getNodeName() + "IPName") .withRegion(template.getLocation()) .withExistingResourceGroup(template.getResourceGroupName()) .withLeafDomainLabel(azureAgent.getNodeName()) ).apply();
@Override public VirtualMachineImpl withNewPrimaryPublicIPAddress(String leafDnsLabel) { PublicIPAddress.DefinitionStages.WithGroup definitionWithGroup = this.networkManager.publicIPAddresses() .define(this.namer.randomName("pip", 15)) .withRegion(this.regionName()); PublicIPAddress.DefinitionStages.WithCreate definitionAfterGroup; if (this.creatableGroup != null) { definitionAfterGroup = definitionWithGroup.withNewResourceGroup(this.creatableGroup); } else { definitionAfterGroup = definitionWithGroup.withExistingResourceGroup(this.resourceGroupName()); } this.implicitPipCreatable = definitionAfterGroup.withLeafDomainLabel(leafDnsLabel); // Create NIC with creatable PIP // Creatable<NetworkInterface> nicCreatable = this.nicDefinitionWithCreate .withNewPrimaryPublicIPAddress(this.implicitPipCreatable); this.creatablePrimaryNetworkInterfaceKey = this.addDependency(nicCreatable); return this; }
@Override public VirtualMachineImpl withNewPrimaryPublicIPAddress(String leafDnsLabel) { PublicIPAddress.DefinitionStages.WithGroup definitionWithGroup = this.networkManager.publicIPAddresses() .define(this.namer.randomName("pip", 15)) .withRegion(this.regionName()); PublicIPAddress.DefinitionStages.WithCreate definitionAfterGroup; if (this.creatableGroup != null) { definitionAfterGroup = definitionWithGroup.withNewResourceGroup(this.creatableGroup); } else { definitionAfterGroup = definitionWithGroup.withExistingResourceGroup(this.resourceGroupName()); } this.implicitPipCreatable = definitionAfterGroup.withLeafDomainLabel(leafDnsLabel); // Create NIC with creatable PIP // Creatable<NetworkInterface> nicCreatable = this.nicDefinitionWithCreate .withNewPrimaryPublicIPAddress(this.implicitPipCreatable); this.creatablePrimaryNetworkInterfaceKey = this.addDependency(nicCreatable); return this; }
LoadBalancerImpl withNewPublicIPAddress(String dnsLeafLabel, String frontendName) { PublicIPAddress.DefinitionStages.WithGroup precreatablePIP = manager().publicIPAddresses().define(dnsLeafLabel) .withRegion(this.regionName()); Creatable<PublicIPAddress> creatablePip; if (super.creatableGroup == null) { creatablePip = precreatablePIP.withExistingResourceGroup(this.resourceGroupName()).withLeafDomainLabel(dnsLeafLabel); } else { creatablePip = precreatablePIP.withNewResourceGroup(super.creatableGroup).withLeafDomainLabel(dnsLeafLabel); } return withNewPublicIPAddress(creatablePip, frontendName); }
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; }
@Override public VirtualNetworkGatewayImpl withNewPublicIPAddress() { final String pipName = SdkContext.randomResourceName("pip", 9); this.creatablePip = this.manager().publicIPAddresses().define(pipName) .withRegion(this.regionName()) .withExistingResourceGroup(this.resourceGroupName()); return this; }
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; }
@Override public VirtualNetworkGatewayImpl withNewPublicIPAddress() { final String pipName = SdkContext.randomResourceName("pip", 9); this.creatablePip = this.manager().publicIPAddresses().define(pipName) .withRegion(this.regionName()) .withExistingResourceGroup(this.resourceGroupName()); return this; }
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<PublicIPAddress> prepareCreatablePublicIP(String name, String leafDnsLabel) { PublicIPAddress.DefinitionStages.WithGroup definitionWithGroup = this.networkManager.publicIPAddresses() .define(name) .withRegion(this.parent().regionName()); PublicIPAddress.DefinitionStages.WithCreate definitionAfterGroup; if (this.parent().newGroup() != null) { definitionAfterGroup = definitionWithGroup.withNewResourceGroup(this.parent().newGroup()); } else { definitionAfterGroup = definitionWithGroup.withExistingResourceGroup(this.parent().resourceGroupName()); } return definitionAfterGroup.withLeafDomainLabel(leafDnsLabel); }
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<PublicIPAddress> prepareCreatablePublicIP(String name, String leafDnsLabel) { PublicIPAddress.DefinitionStages.WithGroup definitionWithGroup = this.networkManager.publicIPAddresses() .define(name) .withRegion(this.parent().regionName()); PublicIPAddress.DefinitionStages.WithCreate definitionAfterGroup; if (this.parent().newGroup() != null) { definitionAfterGroup = definitionWithGroup.withNewResourceGroup(this.parent().newGroup()); } else { definitionAfterGroup = definitionWithGroup.withExistingResourceGroup(this.parent().resourceGroupName()); } return definitionAfterGroup.withLeafDomainLabel(leafDnsLabel); }
LoadBalancerImpl withNewPublicIPAddress(String dnsLeafLabel, String frontendName) { PublicIPAddress.DefinitionStages.WithGroup precreatablePIP = manager().publicIPAddresses().define(dnsLeafLabel) .withRegion(this.regionName()); Creatable<PublicIPAddress> creatablePip; if (super.creatableGroup == null) { creatablePip = precreatablePIP.withExistingResourceGroup(this.resourceGroupName()).withLeafDomainLabel(dnsLeafLabel); } else { creatablePip = precreatablePIP.withNewResourceGroup(super.creatableGroup).withLeafDomainLabel(dnsLeafLabel); } return withNewPublicIPAddress(creatablePip, frontendName); }