Java Code Examples for com.microsoft.azure.management.resources.fluentcore.arm.Region#fromName()
The following examples show how to use
com.microsoft.azure.management.resources.fluentcore.arm.Region#fromName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VirtualMachineImagesImpl.java From azure-libraries-for-java with MIT License | 6 votes |
@Override public VirtualMachineImage getImage(String region, String publisherName, String offerName, String skuName, String version) { if (version.equalsIgnoreCase("latest")) { List<VirtualMachineImageResourceInner> innerImages = this.client.list(region, publisherName, offerName, skuName, null, 1, "name desc"); if (innerImages != null && !innerImages.isEmpty()) { VirtualMachineImageResourceInner innerImageResource = innerImages.get(0); version = innerImageResource.name(); } } VirtualMachineImageInner innerImage = this.client.get(region, publisherName, offerName, skuName, version); return (innerImage != null) ? new VirtualMachineImageImpl(Region.fromName(region), publisherName, offerName, skuName, version, innerImage) : null; }
Example 2
Source File: ComputeSkuImpl.java From azure-libraries-for-java with MIT License | 6 votes |
@Override public Map<Region, Set<AvailabilityZoneId>> zones() { Map<Region, Set<AvailabilityZoneId>> regionToZones = new HashMap<>(); if (this.inner.locationInfo() != null) { for (ResourceSkuLocationInfo info : this.inner.locationInfo()) { if (info.location() != null) { Region region = Region.fromName(info.location()); if (!regionToZones.containsKey(region)) { regionToZones.put(region, new HashSet<AvailabilityZoneId>()); } Set<AvailabilityZoneId> availabilityZoneIds = new HashSet<>(); if (info.zones() != null) { for (String zone : info.zones()) { availabilityZoneIds.add(AvailabilityZoneId.fromString(zone)); } } regionToZones.get(region).addAll(availabilityZoneIds); } } } return regionToZones; }
Example 3
Source File: VirtualMachinePublishersImpl.java From azure-libraries-for-java with MIT License | 5 votes |
@Override protected VirtualMachinePublisherImpl wrapModel(VirtualMachineImageResourceInner inner) { if (inner == null) { return null; } return new VirtualMachinePublisherImpl(Region.fromName(inner.location()), inner.name(), this.imagesInnerCollection, this.extensionsInnerCollection); }
Example 4
Source File: SqlDatabaseImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.regionName()); }
Example 5
Source File: VirtualMachineScaleSetVMImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.regionName()); }
Example 6
Source File: TrafficManagerNestedProfileEndpointImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region sourceTrafficLocation() { return Region.fromName((inner().endpointLocation())); }
Example 7
Source File: TrafficManagerExternalEndpointImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region sourceTrafficLocation() { return Region.fromName((inner().endpointLocation())); }
Example 8
Source File: SqlEncryptionProtectorImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.inner().location()); }
Example 9
Source File: SqlFailoverGroupImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.inner().location()); }
Example 10
Source File: SqlServerKeyImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.inner().location()); }
Example 11
Source File: RegistryTaskImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.regionName()); }
Example 12
Source File: RegionCapabilitiesImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.inner().name()); }
Example 13
Source File: SqlRestorableDroppedDatabaseImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.inner().location()); }
Example 14
Source File: SqlFirewallRuleImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.inner().location()); }
Example 15
Source File: SqlElasticPoolImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.regionName()); }
Example 16
Source File: SqlDatabaseThreatDetectionPolicyImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.inner().location()); }
Example 17
Source File: LocationImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.name()); }
Example 18
Source File: ResourceGroupImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.regionName()); }
Example 19
Source File: ResourceImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.regionName()); }
Example 20
Source File: IndependentChildResourceImpl.java From azure-libraries-for-java with MIT License | 4 votes |
@Override public Region region() { return Region.fromName(this.regionName()); }