Class: AWSCDK::Route53::HostedZoneGrants

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

Overview

Collection of grant methods for a INamedHostedZoneRef.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ HostedZoneGrants

Returns a new instance of HostedZoneGrants.

Raises:

  • (NoMethodError)


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

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

Class Method Details

.from_hosted_zone(hosted_zone) ⇒ AWSCDK::Route53::HostedZoneGrants

Creates grants for INamedHostedZoneRef.

Parameters:

Returns:

  • (AWSCDK::Route53::HostedZoneGrants)


22
23
24
25
# File 'route53/hosted_zone_grants.rb', line 22

def self.from_hosted_zone(hosted_zone)
  Jsii::Type.check_type(hosted_zone, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5JTmFtZWRIb3N0ZWRab25lUmVmIn0=")), "hostedZone")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_route53.HostedZoneGrants", "fromHostedZone", [hosted_zone])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'route53/hosted_zone_grants.rb', line 12

def self.jsii_overridable_methods
  {
    :delegation => { kind: :method, name: "delegation", is_optional: false },
  }
end

Instance Method Details

#delegation(grantee, delegation_options = nil) ⇒ AWSCDK::IAM::Grant

Grant permissions to add delegation records to this zone.

Parameters:

Returns:



32
33
34
35
36
37
# File 'route53/hosted_zone_grants.rb', line 32

def delegation(grantee, delegation_options = nil)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  delegation_options = delegation_options.is_a?(Hash) ? ::AWSCDK::Route53::GrantDelegationOptions.new(**delegation_options.transform_keys(&:to_sym)) : delegation_options
  Jsii::Type.check_type(delegation_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5HcmFudERlbGVnYXRpb25PcHRpb25zIn0=")), "delegationOptions") unless delegation_options.nil?
  jsii_call_method("delegation", [grantee, delegation_options])
end