Class: AWSCDK::EC2::ClientVpnAuthorizationRuleProps

Inherits:
ClientVpnAuthorizationRuleOptions
  • Object
show all
Defined in:
ec2/client_vpn_authorization_rule_props.rb

Overview

Properties for a ClientVpnAuthorizationRule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cidr:, description: nil, group_id: nil, client_vpn_endpoint: nil) ⇒ ClientVpnAuthorizationRuleProps

Returns a new instance of ClientVpnAuthorizationRuleProps.

Parameters:

  • cidr (String)

    The IPv4 address range, in CIDR notation, of the network for which access is being authorized.

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

    A brief description of the authorization rule.

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

    The ID of the group to grant access to, for example, the Active Directory group or identity provider (IdP) group.

  • client_vpn_endpoint (AWSCDK::Interfaces::AWSEC2::IClientVpnEndpointRef, nil) (defaults to: nil)

    The client VPN endpoint to which to add the rule.



11
12
13
14
15
16
17
18
19
20
# File 'ec2/client_vpn_authorization_rule_props.rb', line 11

def initialize(cidr:, description: nil, group_id: nil, client_vpn_endpoint: nil)
  @cidr = cidr
  Jsii::Type.check_type(@cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @group_id = group_id
  Jsii::Type.check_type(@group_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupId") unless @group_id.nil?
  @client_vpn_endpoint = client_vpn_endpoint
  Jsii::Type.check_type(@client_vpn_endpoint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSUNsaWVudFZwbkVuZHBvaW50UmVmIn0=")), "clientVpnEndpoint") unless @client_vpn_endpoint.nil?
end

Instance Attribute Details

#cidrString (readonly)

The IPv4 address range, in CIDR notation, of the network for which access is being authorized.

Returns:

  • (String)


25
26
27
# File 'ec2/client_vpn_authorization_rule_props.rb', line 25

def cidr
  @cidr
end

#client_vpn_endpointAWSCDK::Interfaces::AWSEC2::IClientVpnEndpointRef? (readonly)

Note:

Default: clientVpnEndpoint is required

The client VPN endpoint to which to add the rule.



40
41
42
# File 'ec2/client_vpn_authorization_rule_props.rb', line 40

def client_vpn_endpoint
  @client_vpn_endpoint
end

#descriptionString? (readonly)

Note:

Default: - no description

A brief description of the authorization rule.

Returns:

  • (String, nil)


30
31
32
# File 'ec2/client_vpn_authorization_rule_props.rb', line 30

def description
  @description
end

#group_idString? (readonly)

Note:

Default: - authorize all groups

The ID of the group to grant access to, for example, the Active Directory group or identity provider (IdP) group.

Returns:

  • (String, nil)


35
36
37
# File 'ec2/client_vpn_authorization_rule_props.rb', line 35

def group_id
  @group_id
end

Class Method Details

.jsii_propertiesObject



42
43
44
45
46
47
48
49
# File 'ec2/client_vpn_authorization_rule_props.rb', line 42

def self.jsii_properties
  {
    :cidr => "cidr",
    :description => "description",
    :group_id => "groupId",
    :client_vpn_endpoint => "clientVpnEndpoint",
  }
end

Instance Method Details

#to_jsiiObject



51
52
53
54
55
56
57
58
59
60
61
# File 'ec2/client_vpn_authorization_rule_props.rb', line 51

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "cidr" => @cidr,
    "description" => @description,
    "groupId" => @group_id,
    "clientVpnEndpoint" => @client_vpn_endpoint,
  })
  result.compact
end