Class: AWSCDK::AppRunner::CfnVPCConnectorProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_runner/cfn_vpc_connector_props.rb

Overview

Properties for defining a CfnVpcConnector.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subnets:, security_groups: nil, tags: nil, vpc_connector_name: nil) ⇒ CfnVPCConnectorProps

Returns a new instance of CfnVPCConnectorProps.

Parameters:

  • subnets (Array<String>)

    A list of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC.

  • security_groups (Array<String, AWSCDK::Interfaces::AWSEC2::ISecurityGroupRef>, nil) (defaults to: nil)

    A list of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    A list of metadata items that you can associate with your VPC connector resource.

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

    A name for the VPC connector.



13
14
15
16
17
18
19
20
21
22
# File 'app_runner/cfn_vpc_connector_props.rb', line 13

def initialize(subnets:, security_groups: nil, tags: nil, vpc_connector_name: nil)
  @subnets = subnets
  Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "subnets")
  @security_groups = security_groups
  Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU2VjdXJpdHlHcm91cFJlZiJ9XX19LCJraW5kIjoiYXJyYXkifX0=")), "securityGroups") unless @security_groups.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @vpc_connector_name = vpc_connector_name
  Jsii::Type.check_type(@vpc_connector_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcConnectorName") unless @vpc_connector_name.nil?
end

Instance Attribute Details

#security_groupsArray<String, AWSCDK::Interfaces::AWSEC2::ISecurityGroupRef>? (readonly)

A list of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets.

If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.



39
40
41
# File 'app_runner/cfn_vpc_connector_props.rb', line 39

def security_groups
  @security_groups
end

#subnetsArray<String> (readonly)

A list of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC.

Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.

App Runner only supports subnets of IP address type IPv4 and dual stack (IPv4 and IPv6).



32
33
34
# File 'app_runner/cfn_vpc_connector_props.rb', line 32

def subnets
  @subnets
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of metadata items that you can associate with your VPC connector resource.

A tag is a key-value pair.

A VpcConnector is immutable, so you cannot update its tags. To change the tags, replace the resource. To replace a VpcConnector , you must provide a new combination of security groups.



48
49
50
# File 'app_runner/cfn_vpc_connector_props.rb', line 48

def tags
  @tags
end

#vpc_connector_nameString? (readonly)

A name for the VPC connector.

If you don't specify a name, CloudFormation generates a name for your VPC connector.



55
56
57
# File 'app_runner/cfn_vpc_connector_props.rb', line 55

def vpc_connector_name
  @vpc_connector_name
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
# File 'app_runner/cfn_vpc_connector_props.rb', line 57

def self.jsii_properties
  {
    :subnets => "subnets",
    :security_groups => "securityGroups",
    :tags => "tags",
    :vpc_connector_name => "vpcConnectorName",
  }
end

Instance Method Details

#to_jsiiObject



66
67
68
69
70
71
72
73
74
75
# File 'app_runner/cfn_vpc_connector_props.rb', line 66

def to_jsii
  result = {}
  result.merge!({
    "subnets" => @subnets,
    "securityGroups" => @security_groups,
    "tags" => @tags,
    "vpcConnectorName" => @vpc_connector_name,
  })
  result.compact
end