本文整理了Java中com.microsoft.azure.management.resources.fluentcore.arm.Region
类的一些代码示例,展示了Region
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Region
类的具体详情如下:
包路径:com.microsoft.azure.management.resources.fluentcore.arm.Region
类名称:Region
[英]Enumeration of the Azure datacenter regions. See https://azure.microsoft.com/regions/
[中]Azure数据中心区域的枚举。看见https://azure.microsoft.com/regions/
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@JsonValue
@Override
public String toString() {
return name();
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Override
public Region region() {
return Region.fromName(this.name());
}
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
/**
* Specifies the region for the resource.
* @param region The location for the resource
* @return the next stage of the definition
*/
public final FluentModelImplT withRegion(Region region) {
return this.withRegion(region.toString());
}
代码示例来源: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: 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-maven-plugins
@Override
protected Region getRegion() throws MojoExecutionException {
if (StringUtils.isEmpty(mojo.getRegion())) {
return Region.EUROPE_WEST;
}
if (!Arrays.asList(Region.values()).contains(Region.fromName(mojo.getRegion()))) {
throw new MojoExecutionException("The value of <region> is not correct, please correct it in pom.xml.");
}
return Region.fromName(mojo.getRegion());
}
代码示例来源:origin: Azure/azure-libraries-for-java
private String getCertificateUniqueName(String thumbprint, Region region) {
return String.format("%s##%s#", thumbprint, region.label());
}
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public Region region() {
return Region.findByLabelOrName(this.regionName());
}
代码示例来源:origin: jenkinsci/azure-vm-agents-plugin
public ListBoxModel doFillAvailabilitySetItems(
@RelativePath("../..") @QueryParameter String azureCredentialsId,
@RelativePath("../..") @QueryParameter String resourceGroupReferenceType,
@RelativePath("../..") @QueryParameter String newResourceGroupName,
@RelativePath("../..") @QueryParameter String existingResourceGroupName,
@RelativePath("..") @QueryParameter String location) {
ListBoxModel model = new ListBoxModel();
model.add("--- Select Availability Set in current resource group and location ---", "");
if (StringUtils.isBlank(azureCredentialsId)) {
return model;
}
//resourceGroupReferenceType passed wrong value in 2.60.1-LTS, we won't use this value until bug resolved.
resourceGroupReferenceType = null;
try {
Azure azureClient = AzureClientHolder.get(azureCredentialsId);
String resourceGroupName = AzureVMCloud.getResourceGroupName(
resourceGroupReferenceType, newResourceGroupName, existingResourceGroupName);
PagedList<AvailabilitySet> availabilitySets = azureClient.availabilitySets()
.listByResourceGroup(resourceGroupName);
for (AvailabilitySet set : availabilitySets) {
String label = set.region().label();
if (label.equals(location)) {
model.add(set.name());
}
}
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Cannot list availability set: ", e);
}
return model;
}
代码示例来源: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: Azure/azure-libraries-for-java
@JsonValue
@Override
public String toString() {
return name();
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public DefinitionStages.Platform withLocation(Region location) {
this.inner.withLocation(location.toString());
return this;
}
代码示例来源:origin: Azure/azure-libraries-for-java
@Override
public Region region() {
return Region.fromName(this.name());
}
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-cosmosdb
@Override
public void offlineRegion(Region region) {
this.manager().inner().databaseAccounts().offlineRegion(this.resourceGroupName(), this.name(), region.label());
}
代码示例来源: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)
代码示例来源:origin: com.microsoft.azure/azure-mgmt-compute
@Override
public Observable<VirtualMachineExtensionImage> listByRegionAsync(Region region) {
return listByRegionAsync(region.name());
}
代码示例来源:origin: Azure/azure-libraries-for-java
/**
* Specifies the region for the resource.
* @param region The location for the resource
* @return the next stage of the definition
*/
public final FluentModelImplT withRegion(Region region) {
return this.withRegion(region.toString());
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-resources
@Override
public Region region() {
return Region.fromName(this.regionName());
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-cosmosdb
@Override
public void onlineRegion(Region region) {
this.manager().inner().databaseAccounts().onlineRegion(this.resourceGroupName(), this.name(), region.label());
}
代码示例来源:origin: com.microsoft.azure/azure-mgmt-network
@Override
public Observable<NetworkUsage> listByRegionAsync(Region region) {
return listByRegionAsync(region.name());
}
内容来源于网络,如有侵权,请联系作者删除!