Class: AWSCDK::AppSync::AppSyncAPIKeyConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_sync/app_sync_api_key_config.rb

Overview

Configuration for API Key authorization in AppSync.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: nil, expires: nil, name: nil) ⇒ AppSyncAPIKeyConfig

Returns a new instance of AppSyncAPIKeyConfig.

Parameters:

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

    Description of API key.

  • expires (AWSCDK::Expiration, nil) (defaults to: nil)

    The time from creation time after which the API key expires.

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

    Unique name of the API Key.



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

def initialize(description: nil, expires: nil, name: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @expires = expires
  Jsii::Type.check_type(@expires, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5FeHBpcmF0aW9uIn0=")), "expires") unless @expires.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

Note:

Default: - 'Default API Key created by CDK'

Description of API key.

Returns:

  • (String, nil)


23
24
25
# File 'app_sync/app_sync_api_key_config.rb', line 23

def description
  @description
end

#expiresAWSCDK::Expiration? (readonly)

Note:

Default: - 7 days rounded down to nearest hour

The time from creation time after which the API key expires.

It must be a minimum of 1 day and a maximum of 365 days from date of creation. Rounded down to the nearest hour.

Returns:



31
32
33
# File 'app_sync/app_sync_api_key_config.rb', line 31

def expires
  @expires
end

#nameString? (readonly)

Note:

Default: - 'DefaultAPIKey'

Unique name of the API Key.

Returns:

  • (String, nil)


36
37
38
# File 'app_sync/app_sync_api_key_config.rb', line 36

def name
  @name
end

Class Method Details

.jsii_propertiesObject



38
39
40
41
42
43
44
# File 'app_sync/app_sync_api_key_config.rb', line 38

def self.jsii_properties
  {
    :description => "description",
    :expires => "expires",
    :name => "name",
  }
end

Instance Method Details

#to_jsiiObject



46
47
48
49
50
51
52
53
54
# File 'app_sync/app_sync_api_key_config.rb', line 46

def to_jsii
  result = {}
  result.merge!({
    "description" => @description,
    "expires" => @expires,
    "name" => @name,
  })
  result.compact
end