本文整理了Java中com.microsoft.azure.management.resources.fluentcore.arm.Region.findByLabelOrName
方法的一些代码示例,展示了Region.findByLabelOrName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Region.findByLabelOrName
方法的具体详情如下:
包路径:com.microsoft.azure.management.resources.fluentcore.arm.Region
类名称:Region
方法名:findByLabelOrName
[英]Finds a region based on a label or name.
A region name is lower-cased label with spaces removed.
[中]根据标签或名称查找区域。
区域名称是小写的标签,删除了空格。
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public Region region() {
return Region.findByLabelOrName(this.regionName());
}
代码示例来源:origin: jenkinsci/azure-vm-agents-plugin
/**
* Gets a final location name from a display name location.
*
* @param location
* @return
*/
private static String getLocationName(String location) {
try {
return Region.findByLabelOrName(location).name();
} catch (Exception e) {
return null;
}
}
代码示例来源:origin: gradle.plugin.com.intershop.gradle.plugin.azure/azurePlugin
private Region getRegion(String label)
{
Region region = Region.findByLabelOrName(label);
if (region == null)
{
String msg = new StringBuffer()
.append("invalid azure region: ")
.append(label)
.toString();
project.getLogger().error(msg);
throw new GradleException(msg);
}
return (region);
}
代码示例来源:origin: Microsoft/azure-maven-plugins
@Override
protected Region getRegion() throws MojoExecutionException {
final String region = mojo.getRegion();
if (!StringUtils.isEmpty(region) && Region.findByLabelOrName(region) == null) {
throw new MojoExecutionException("The value of <region> is not supported, please correct it in pom.xml.");
}
return Region.fromName(region);
}
代码示例来源:origin: Microsoft/azure-tools-for-java
.withRegion(Region.findByLabelOrName(model.getLocationName()))
.withNewResourceGroup(model.getResourceGroupName())
.withPricingTier(pricingTier)
.withOperatingSystem(OperatingSystem.LINUX);
app = webAppDefinition
.withRegion(Region.findByLabelOrName(model.getLocationName()))
.withNewResourceGroup(model.getResourceGroupName())
.withNewLinuxPlan(asp)
.withRegion(Region.findByLabelOrName(model.getLocationName()))
.withExistingResourceGroup(model.getResourceGroupName())
.withPricingTier(pricingTier)
.withOperatingSystem(OperatingSystem.LINUX);
app = webAppDefinition
.withRegion(Region.findByLabelOrName(model.getLocationName()))
.withExistingResourceGroup(model.getResourceGroupName())
.withNewLinuxPlan(asp)
内容来源于网络,如有侵权,请联系作者删除!