Class: AWSCDK::GlobalAccelerator::AcceleratorProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
global_accelerator/accelerator_props.rb

Overview

Construct properties of the Accelerator.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(accelerator_name: nil, enabled: nil, ip_addresses: nil, ip_address_type: nil) ⇒ AcceleratorProps

Returns a new instance of AcceleratorProps.

Parameters:

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

    The name of the accelerator.

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

    Indicates whether the accelerator is enabled.

  • ip_addresses (Array<String>, nil) (defaults to: nil)

    IP addresses associated with the accelerator.

  • ip_address_type (AWSCDK::GlobalAccelerator::IPAddressType, nil) (defaults to: nil)

    The IP address type that an accelerator supports.



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

def initialize(accelerator_name: nil, enabled: nil, ip_addresses: nil, ip_address_type: nil)
  @accelerator_name = accelerator_name
  Jsii::Type.check_type(@accelerator_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "acceleratorName") unless @accelerator_name.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil?
  @ip_addresses = ip_addresses
  Jsii::Type.check_type(@ip_addresses, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "ipAddresses") unless @ip_addresses.nil?
  @ip_address_type = ip_address_type
  Jsii::Type.check_type(@ip_address_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2xvYmFsYWNjZWxlcmF0b3IuSXBBZGRyZXNzVHlwZSJ9")), "ipAddressType") unless @ip_address_type.nil?
end

Instance Attribute Details

#accelerator_nameString? (readonly)

Note:

Default: - resource ID

The name of the accelerator.

Returns:

  • (String, nil)


26
27
28
# File 'global_accelerator/accelerator_props.rb', line 26

def accelerator_name
  @accelerator_name
end

#enabledBoolean? (readonly)

Note:

Default: true

Indicates whether the accelerator is enabled.

Returns:

  • (Boolean, nil)


31
32
33
# File 'global_accelerator/accelerator_props.rb', line 31

def enabled
  @enabled
end

#ip_address_typeAWSCDK::GlobalAccelerator::IPAddressType? (readonly)

Note:

Default: - "IPV4"

The IP address type that an accelerator supports.

For a standard accelerator, the value can be IPV4 or DUAL_STACK.



54
55
56
# File 'global_accelerator/accelerator_props.rb', line 54

def ip_address_type
  @ip_address_type
end

#ip_addressesArray<String>? (readonly)

Note:

Default: - undefined. IP addresses will be from Amazon's pool of IP addresses.

IP addresses associated with the accelerator.

Optionally, if you've added your own IP address pool to Global Accelerator (BYOIP), you can choose IP addresses from your own pool to use for the accelerator's static IP addresses when you create an accelerator. You can specify one or two addresses, separated by a comma. Do not include the /32 suffix.

Only one IP address from each of your IP address ranges can be used for each accelerator. If you specify only one IP address from your IP address range, Global Accelerator assigns a second static IP address for the accelerator from the AWS IP address pool.

Note that you can't update IP addresses for an existing accelerator. To change them, you must create a new accelerator with the new addresses.

Returns:

  • (Array<String>, nil)


47
48
49
# File 'global_accelerator/accelerator_props.rb', line 47

def ip_addresses
  @ip_addresses
end

Class Method Details

.jsii_propertiesObject



56
57
58
59
60
61
62
63
# File 'global_accelerator/accelerator_props.rb', line 56

def self.jsii_properties
  {
    :accelerator_name => "acceleratorName",
    :enabled => "enabled",
    :ip_addresses => "ipAddresses",
    :ip_address_type => "ipAddressType",
  }
end

Instance Method Details

#to_jsiiObject



65
66
67
68
69
70
71
72
73
74
# File 'global_accelerator/accelerator_props.rb', line 65

def to_jsii
  result = {}
  result.merge!({
    "acceleratorName" => @accelerator_name,
    "enabled" => @enabled,
    "ipAddresses" => @ip_addresses,
    "ipAddressType" => @ip_address_type,
  })
  result.compact
end