Class: AWSCDK::Route53::GeoLocation

Inherits:
Jsii::Object
  • Object
show all
Defined in:
route53/geo_location.rb

Overview

Routing based on geographical location.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ GeoLocation

Returns a new instance of GeoLocation.

Raises:

  • (NoMethodError)


8
9
10
# File 'route53/geo_location.rb', line 8

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_route53.GeoLocation does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.continent(continent_code) ⇒ AWSCDK::Route53::GeoLocation

Geolocation resource record based on continent code.

Parameters:

Returns:

  • (AWSCDK::Route53::GeoLocation)

    Continent-based geolocation record



24
25
26
27
# File 'route53/geo_location.rb', line 24

def self.continent(continent_code)
  Jsii::Type.check_type(continent_code, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5Db250aW5lbnQifQ==")), "continentCode")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_route53.GeoLocation", "continent", [continent_code])
end

.country(country_code) ⇒ AWSCDK::Route53::GeoLocation

Geolocation resource record based on country code.

Parameters:

  • country_code (String)

    Two-letter, uppercase country code for the country.

Returns:

  • (AWSCDK::Route53::GeoLocation)

    Country-based geolocation record

See Also:



34
35
36
37
# File 'route53/geo_location.rb', line 34

def self.country(country_code)
  Jsii::Type.check_type(country_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "countryCode")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_route53.GeoLocation", "country", [country_code])
end

.defaultAWSCDK::Route53::GeoLocation

Default (wildcard) routing record if no specific geolocation record is found.

Returns:

  • (AWSCDK::Route53::GeoLocation)

    Wildcard routing record



42
43
44
# File 'route53/geo_location.rb', line 42

def self.default()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_route53.GeoLocation", "default", [])
end

.jsii_overridable_methodsObject



12
13
14
15
16
17
18
# File 'route53/geo_location.rb', line 12

def self.jsii_overridable_methods
  {
    :continent_code => { kind: :property, name: "continentCode", is_optional: true },
    :country_code => { kind: :property, name: "countryCode", is_optional: true },
    :subdivision_code => { kind: :property, name: "subdivisionCode", is_optional: true },
  }
end

.subdivision(subdivision_code, country_code = nil) ⇒ AWSCDK::Route53::GeoLocation

Geolocation resource record based on subdivision code (e.g. state of the United States).

Parameters:

  • subdivision_code (String)

    Code of the subdivision (e.g. state of the United States).

  • country_code (String, nil) (defaults to: nil)

    Country code (ISO 3166-1-alpha-2) of this record, by default US (United States).

Returns:

  • (AWSCDK::Route53::GeoLocation)

See Also:



52
53
54
55
56
# File 'route53/geo_location.rb', line 52

def self.subdivision(subdivision_code, country_code = nil)
  Jsii::Type.check_type(subdivision_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subdivisionCode")
  Jsii::Type.check_type(country_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "countryCode") unless country_code.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_route53.GeoLocation", "subdivision", [subdivision_code, country_code])
end

Instance Method Details

#continent_codeAWSCDK::Route53::Continent?

Returns:



59
60
61
# File 'route53/geo_location.rb', line 59

def continent_code()
  jsii_get_property("continentCode")
end

#country_codeString?

Returns:

  • (String, nil)


64
65
66
# File 'route53/geo_location.rb', line 64

def country_code()
  jsii_get_property("countryCode")
end

#subdivision_codeString?

Returns:

  • (String, nil)


69
70
71
# File 'route53/geo_location.rb', line 69

def subdivision_code()
  jsii_get_property("subdivisionCode")
end