com.microsoft.azure.management.resources.fluentcore.arm.Region.findByLabelOrName()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(85)

本文整理了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

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)

相关文章

微信公众号

最新文章

更多