Class GeoLocation

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.route53.GeoLocation
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:16.077Z") @Stability(Stable) public class GeoLocation extends software.amazon.jsii.JsiiObject
Routing based on geographical location.

Example:

 HostedZone myZone;
 // continent
 // continent
 ARecord.Builder.create(this, "ARecordGeoLocationContinent")
         .zone(myZone)
         .target(RecordTarget.fromIpAddresses("1.2.3.0", "5.6.7.0"))
         .geoLocation(GeoLocation.continent(Continent.EUROPE))
         .build();
 // country
 // country
 ARecord.Builder.create(this, "ARecordGeoLocationCountry")
         .zone(myZone)
         .target(RecordTarget.fromIpAddresses("1.2.3.1", "5.6.7.1"))
         .geoLocation(GeoLocation.country("DE"))
         .build();
 // subdivision
 // subdivision
 ARecord.Builder.create(this, "ARecordGeoLocationSubDividion")
         .zone(myZone)
         .target(RecordTarget.fromIpAddresses("1.2.3.2", "5.6.7.2"))
         .geoLocation(GeoLocation.subdivision("WA"))
         .build();
 // default (wildcard record if no specific record is found)
 // default (wildcard record if no specific record is found)
 ARecord.Builder.create(this, "ARecordGeoLocationDefault")
         .zone(myZone)
         .target(RecordTarget.fromIpAddresses("1.2.3.3", "5.6.7.3"))
         .geoLocation(GeoLocation.default())
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    GeoLocation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    GeoLocation(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    continent(Continent continentCode)
    Geolocation resource record based on continent code.
    country(String countryCode)
    Geolocation resource record based on country code.
    Default (wildcard) routing record if no specific geolocation record is found.
     
     
     
    subdivision(String subdivisionCode)
    Geolocation resource record based on subdivision code (e.g.
    subdivision(String subdivisionCode, String countryCode)
    Geolocation resource record based on subdivision code (e.g.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • GeoLocation

      protected GeoLocation(software.amazon.jsii.JsiiObjectRef objRef)
    • GeoLocation

      protected GeoLocation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • continent

      @Stability(Stable) @NotNull public static GeoLocation continent(@NotNull Continent continentCode)
      Geolocation resource record based on continent code.

      Parameters:
      continentCode - Continent. This parameter is required.
      Returns:
      Continent-based geolocation record
    • country

      @Stability(Stable) @NotNull public static GeoLocation country(@NotNull String countryCode)
      Geolocation resource record based on country code.

      Parameters:
      countryCode - Two-letter, uppercase country code for the country. This parameter is required.
      Returns:
      Country-based geolocation record
      See Also:
    • doDefault

      @Stability(Stable) @NotNull public static GeoLocation doDefault()
      Default (wildcard) routing record if no specific geolocation record is found.

      Returns:
      Wildcard routing record
    • subdivision

      @Stability(Stable) @NotNull public static GeoLocation subdivision(@NotNull String subdivisionCode, @Nullable String countryCode)
      Geolocation resource record based on subdivision code (e.g. state of the United States).

      Parameters:
      subdivisionCode - Code of the subdivision (e.g. state of the United States). This parameter is required.
      countryCode - Country code (ISO 3166-1-alpha-2) of this record, by default US (United States).
      See Also:
    • subdivision

      @Stability(Stable) @NotNull public static GeoLocation subdivision(@NotNull String subdivisionCode)
      Geolocation resource record based on subdivision code (e.g. state of the United States).

      Parameters:
      subdivisionCode - Code of the subdivision (e.g. state of the United States). This parameter is required.
      See Also:
    • getContinentCode

      @Stability(Stable) @Nullable public Continent getContinentCode()
    • getCountryCode

      @Stability(Stable) @Nullable public String getCountryCode()
    • getSubdivisionCode

      @Stability(Stable) @Nullable public String getSubdivisionCode()