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.113.0 (build fc68b25)",
date="2025-10-14T12:28:19.349Z")
@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
ConstructorsModifierConstructorDescriptionprotectedGeoLocation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedGeoLocation(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic GeoLocationGeolocation resource record based on continent code.static GeoLocationGeolocation resource record based on country code.static GeoLocationDefault (wildcard) routing record if no specific geolocation record is found.static GeoLocationsubdivision(String subdivisionCode) Geolocation resource record based on subdivision code (e.g.static GeoLocationsubdivision(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, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
Geolocation resource record based on continent code.- Parameters:
continentCode- Continent. This parameter is required.- Returns:
- Continent-based geolocation record
-
country
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
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
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
-
getCountryCode
-
getSubdivisionCode
-