Class: AWSCDK::APIGatewayv2::APIKeyOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2/api_key_options.rb

Overview

The options for creating an API Key.

Direct Known Subclasses

APIKeyProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key_name: nil, description: nil, value: nil) ⇒ APIKeyOptions

Returns a new instance of APIKeyOptions.

Parameters:

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

    A name for the API key.

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

    A description of the purpose of the API key.

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

    The value of the API key.



10
11
12
13
14
15
16
17
# File 'api_gatewayv2/api_key_options.rb', line 10

def initialize(api_key_name: nil, description: nil, value: nil)
  @api_key_name = api_key_name
  Jsii::Type.check_type(@api_key_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiKeyName") unless @api_key_name.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless @value.nil?
end

Instance Attribute Details

#api_key_nameString? (readonly)

Note:

Default: automatically generated name

A name for the API key.

If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

Returns:

  • (String, nil)


25
26
27
# File 'api_gatewayv2/api_key_options.rb', line 25

def api_key_name
  @api_key_name
end

#descriptionString? (readonly)

Note:

Default: none

A description of the purpose of the API key.

Returns:

  • (String, nil)


30
31
32
# File 'api_gatewayv2/api_key_options.rb', line 30

def description
  @description
end

#valueString? (readonly)

Note:

Default: none

The value of the API key.

Must be at least 20 characters long.

Returns:

  • (String, nil)


37
38
39
# File 'api_gatewayv2/api_key_options.rb', line 37

def value
  @value
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'api_gatewayv2/api_key_options.rb', line 39

def self.jsii_properties
  {
    :api_key_name => "apiKeyName",
    :description => "description",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'api_gatewayv2/api_key_options.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "apiKeyName" => @api_key_name,
    "description" => @description,
    "value" => @value,
  })
  result.compact
end