Class: AWSCDK::CloudAssemblySchema::HostedZoneContextQuery

Inherits:
ContextLookupRoleOptions
  • Object
show all
Defined in:
cloud_assembly_schema/hosted_zone_context_query.rb

Overview

Query to hosted zone context provider.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account:, region:, assume_role_additional_options: nil, lookup_role_arn: nil, lookup_role_external_id: nil, domain_name:, private_zone: nil, vpc_id: nil) ⇒ HostedZoneContextQuery

Returns a new instance of HostedZoneContextQuery.

Parameters:

  • account (String)

    Query account.

  • region (String)

    Query region.

  • assume_role_additional_options (Hash{String => Object}, nil) (defaults to: nil)

    Additional options to pass to STS when assuming the lookup role.

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

    The ARN of the role that should be used to look up the missing values.

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

    The ExternalId that needs to be supplied while assuming this role.

  • domain_name (String)

    The domain name e.g. example.com to lookup.

  • private_zone (Boolean, nil) (defaults to: nil)

    True if the zone you want to find is a private hosted zone.

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

    The VPC ID to that the private zone must be associated with.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 15

def initialize(account:, region:, assume_role_additional_options: nil, lookup_role_arn: nil, lookup_role_external_id: nil, domain_name:, private_zone: nil, vpc_id: nil)
  @account = 
  Jsii::Type.check_type(@account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "account")
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region")
  @assume_role_additional_options = assume_role_additional_options
  Jsii::Type.check_type(@assume_role_additional_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "assumeRoleAdditionalOptions") unless @assume_role_additional_options.nil?
  @lookup_role_arn = lookup_role_arn
  Jsii::Type.check_type(@lookup_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lookupRoleArn") unless @lookup_role_arn.nil?
  @lookup_role_external_id = lookup_role_external_id
  Jsii::Type.check_type(@lookup_role_external_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lookupRoleExternalId") unless @lookup_role_external_id.nil?
  @domain_name = domain_name
  Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName")
  @private_zone = private_zone
  Jsii::Type.check_type(@private_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "privateZone") unless @private_zone.nil?
  @vpc_id = vpc_id
  Jsii::Type.check_type(@vpc_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcId") unless @vpc_id.nil?
end

Instance Attribute Details

#accountString (readonly)

Query account.

Returns:

  • (String)


37
38
39
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 37

def 
  @account
end

#assume_role_additional_optionsHash{String => Object}? (readonly)

Note:

Default: - No additional options.

Additional options to pass to STS when assuming the lookup role.

  • RoleArn should not be used. Use the dedicated lookup_role_arn property instead.
  • ExternalId should not be used. Use the dedicated lookup_role_external_id instead.


50
51
52
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 50

def assume_role_additional_options
  @assume_role_additional_options
end

#domain_nameString (readonly)

The domain name e.g. example.com to lookup.

Returns:

  • (String)


64
65
66
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 64

def domain_name
  @domain_name
end

#lookup_role_arnString? (readonly)

Note:

Default: - None

The ARN of the role that should be used to look up the missing values.

Returns:

  • (String, nil)


55
56
57
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 55

def lookup_role_arn
  @lookup_role_arn
end

#lookup_role_external_idString? (readonly)

Note:

Default: - No ExternalId will be supplied

The ExternalId that needs to be supplied while assuming this role.

Returns:

  • (String, nil)


60
61
62
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 60

def lookup_role_external_id
  @lookup_role_external_id
end

#private_zoneBoolean? (readonly)

Note:

Default: false

True if the zone you want to find is a private hosted zone.

Returns:

  • (Boolean, nil)


69
70
71
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 69

def private_zone
  @private_zone
end

#regionString (readonly)

Query region.

Returns:

  • (String)


41
42
43
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 41

def region
  @region
end

#vpc_idString? (readonly)

Note:

Default: - Required if privateZone=true

The VPC ID to that the private zone must be associated with.

If you provide VPC ID and privateZone is false, this will return no results and raise an error.

Returns:

  • (String, nil)


77
78
79
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 77

def vpc_id
  @vpc_id
end

Class Method Details

.jsii_propertiesObject



79
80
81
82
83
84
85
86
87
88
89
90
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 79

def self.jsii_properties
  {
    :account => "account",
    :region => "region",
    :assume_role_additional_options => "assumeRoleAdditionalOptions",
    :lookup_role_arn => "lookupRoleArn",
    :lookup_role_external_id => "lookupRoleExternalId",
    :domain_name => "domainName",
    :private_zone => "privateZone",
    :vpc_id => "vpcId",
  }
end

Instance Method Details

#to_jsiiObject



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'cloud_assembly_schema/hosted_zone_context_query.rb', line 92

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "account" => @account,
    "region" => @region,
    "assumeRoleAdditionalOptions" => @assume_role_additional_options,
    "lookupRoleArn" => @lookup_role_arn,
    "lookupRoleExternalId" => @lookup_role_external_id,
    "domainName" => @domain_name,
    "privateZone" => @private_zone,
    "vpcId" => @vpc_id,
  })
  result.compact
end