Class: AWSCDK::CloudAssemblySchema::VPCContextQuery
- Inherits:
-
ContextLookupRoleOptions
- Object
- ContextLookupRoleOptions
- AWSCDK::CloudAssemblySchema::VPCContextQuery
- Defined in:
- cloud_assembly_schema/vpc_context_query.rb
Overview
Query input for looking up a VPC.
Instance Attribute Summary collapse
-
#account ⇒ String
readonly
Query account.
-
#assume_role_additional_options ⇒ Hash{String => Object}?
readonly
Additional options to pass to STS when assuming the lookup role.
-
#filter ⇒ Hash{String => String}
readonly
Filters to apply to the VPC.
-
#lookup_role_arn ⇒ String?
readonly
The ARN of the role that should be used to look up the missing values.
-
#lookup_role_external_id ⇒ String?
readonly
The ExternalId that needs to be supplied while assuming this role.
-
#region ⇒ String
readonly
Query region.
-
#return_asymmetric_subnets ⇒ Boolean?
readonly
Whether to populate the subnetGroups field of the
VpcContextResponse, which contains potentially asymmetric subnet groups. -
#return_vpn_gateways ⇒ Boolean?
readonly
Whether to populate the
vpnGatewayIdfield of theVpcContextResponse, which contains the VPN Gateway ID, if one exists. -
#subnet_group_name_tag ⇒ String?
readonly
Optional tag for subnet group name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(account:, region:, assume_role_additional_options: nil, lookup_role_arn: nil, lookup_role_external_id: nil, filter:, return_asymmetric_subnets: nil, return_vpn_gateways: nil, subnet_group_name_tag: nil) ⇒ VPCContextQuery
constructor
A new instance of VPCContextQuery.
- #to_jsii ⇒ Object
Constructor Details
#initialize(account:, region:, assume_role_additional_options: nil, lookup_role_arn: nil, lookup_role_external_id: nil, filter:, return_asymmetric_subnets: nil, return_vpn_gateways: nil, subnet_group_name_tag: nil) ⇒ VPCContextQuery
Returns a new instance of VPCContextQuery.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 16 def initialize(account:, region:, assume_role_additional_options: nil, lookup_role_arn: nil, lookup_role_external_id: nil, filter:, return_asymmetric_subnets: nil, return_vpn_gateways: nil, subnet_group_name_tag: nil) @account = 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 = 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? @filter = filter Jsii::Type.check_type(@filter, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "filter") @return_asymmetric_subnets = return_asymmetric_subnets Jsii::Type.check_type(@return_asymmetric_subnets, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "returnAsymmetricSubnets") unless @return_asymmetric_subnets.nil? @return_vpn_gateways = return_vpn_gateways Jsii::Type.check_type(@return_vpn_gateways, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "returnVpnGateways") unless @return_vpn_gateways.nil? @subnet_group_name_tag = subnet_group_name_tag Jsii::Type.check_type(@subnet_group_name_tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetGroupNameTag") unless @subnet_group_name_tag.nil? end |
Instance Attribute Details
#account ⇒ String (readonly)
Query account.
40 41 42 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 40 def account @account end |
#assume_role_additional_options ⇒ Hash{String => Object}? (readonly)
Default: - No additional options.
Additional options to pass to STS when assuming the lookup role.
RoleArnshould not be used. Use the dedicatedlookup_role_arnproperty instead.ExternalIdshould not be used. Use the dedicatedlookup_role_external_idinstead.
53 54 55 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 53 def @assume_role_additional_options end |
#filter ⇒ Hash{String => String} (readonly)
Filters to apply to the VPC.
Filter parameters are the same as passed to DescribeVpcs.
70 71 72 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 70 def filter @filter end |
#lookup_role_arn ⇒ String? (readonly)
Default: - None
The ARN of the role that should be used to look up the missing values.
58 59 60 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 58 def lookup_role_arn @lookup_role_arn end |
#lookup_role_external_id ⇒ String? (readonly)
Default: - No ExternalId will be supplied
The ExternalId that needs to be supplied while assuming this role.
63 64 65 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 63 def lookup_role_external_id @lookup_role_external_id end |
#region ⇒ String (readonly)
Query region.
44 45 46 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 44 def region @region end |
#return_asymmetric_subnets ⇒ Boolean? (readonly)
Default: false
Whether to populate the subnetGroups field of the VpcContextResponse, which contains potentially asymmetric subnet groups.
75 76 77 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 75 def return_asymmetric_subnets @return_asymmetric_subnets end |
#return_vpn_gateways ⇒ Boolean? (readonly)
Default: true
Whether to populate the vpnGatewayId field of the VpcContextResponse, which contains the VPN Gateway ID, if one exists.
You can explicitly disable this in order to avoid the lookup if you know the VPC does not have a VPN Gatway attached.
84 85 86 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 84 def return_vpn_gateways @return_vpn_gateways end |
#subnet_group_name_tag ⇒ String? (readonly)
Default: 'aws-cdk:subnet-name'
Optional tag for subnet group name.
If not provided, we'll look at the aws-cdk:subnet-name tag. If the subnet does not have the specified tag, we'll use its type as the name.
93 94 95 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 93 def subnet_group_name_tag @subnet_group_name_tag end |
Class Method Details
.jsii_properties ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 95 def self.jsii_properties { :account => "account", :region => "region", :assume_role_additional_options => "assumeRoleAdditionalOptions", :lookup_role_arn => "lookupRoleArn", :lookup_role_external_id => "lookupRoleExternalId", :filter => "filter", :return_asymmetric_subnets => "returnAsymmetricSubnets", :return_vpn_gateways => "returnVpnGateways", :subnet_group_name_tag => "subnetGroupNameTag", } end |
Instance Method Details
#to_jsii ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'cloud_assembly_schema/vpc_context_query.rb', line 109 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, "filter" => @filter, "returnAsymmetricSubnets" => @return_asymmetric_subnets, "returnVpnGateways" => @return_vpn_gateways, "subnetGroupNameTag" => @subnet_group_name_tag, }) result.compact end |