Class: AWSCDK::Route53Targets::CloudFrontTarget
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Route53Targets::CloudFrontTarget
- Includes:
- AWSCDK::Route53::IAliasRecordTarget
- Defined in:
- route53_targets/cloud_front_target.rb
Overview
Use a CloudFront Distribution as an alias record target.
Class Method Summary collapse
-
.CLOUDFRONT_ZONE_ID ⇒ String
The hosted zone Id if using an alias record in Route53.
-
.get_hosted_zone_id(scope) ⇒ String
Get the hosted zone id for the current scope.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#bind(_record, _zone = nil) ⇒ AWSCDK::Route53::AliasRecordTargetConfig
Return hosted zone ID and DNS name, usable for Route53 alias targets.
-
#initialize(distribution) ⇒ CloudFrontTarget
constructor
A new instance of CloudFrontTarget.
Constructor Details
#initialize(distribution) ⇒ CloudFrontTarget
Returns a new instance of CloudFrontTarget.
10 11 12 13 |
# File 'route53_targets/cloud_front_target.rb', line 10 def initialize(distribution) Jsii::Type.check_type(distribution, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5JRGlzdHJpYnV0aW9uIn0=")), "distribution") Jsii::Object.instance_method(:initialize).bind(self).call(distribution) end |
Class Method Details
.CLOUDFRONT_ZONE_ID ⇒ String
The hosted zone Id if using an alias record in Route53.
This value never changes.
35 36 37 |
# File 'route53_targets/cloud_front_target.rb', line 35 def self.CLOUDFRONT_ZONE_ID() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_route53_targets.CloudFrontTarget", "CLOUDFRONT_ZONE_ID") end |
.get_hosted_zone_id(scope) ⇒ String
Get the hosted zone id for the current scope.
25 26 27 28 |
# File 'route53_targets/cloud_front_target.rb', line 25 def self.get_hosted_zone_id(scope) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "scope") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_route53_targets.CloudFrontTarget", "getHostedZoneId", [scope]) end |
.jsii_overridable_methods ⇒ Object
15 16 17 18 19 |
# File 'route53_targets/cloud_front_target.rb', line 15 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(_record, _zone = nil) ⇒ AWSCDK::Route53::AliasRecordTargetConfig
Return hosted zone ID and DNS name, usable for Route53 alias targets.
44 45 46 47 48 |
# File 'route53_targets/cloud_front_target.rb', line 44 def bind(_record, _zone = nil) Jsii::Type.check_type(_record, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5JUmVjb3JkU2V0In0=")), "_record") Jsii::Type.check_type(_zone, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5JSG9zdGVkWm9uZSJ9")), "_zone") unless _zone.nil? jsii_call_method("bind", [_record, _zone]) end |