Class: AWSCDK::IoT::CfnAuthorizerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_authorizer_props.rb

Overview

Properties for defining a CfnAuthorizer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorizer_function_arn:, authorizer_name: nil, enable_caching_for_http: nil, signing_disabled: nil, status: nil, tags: nil, token_key_name: nil, token_signing_public_keys: nil) ⇒ CfnAuthorizerProps

Returns a new instance of CfnAuthorizerProps.

Parameters:

  • authorizer_function_arn (String)

    The authorizer's Lambda function ARN.

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

    The authorizer name.

  • enable_caching_for_http (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    When true , the result from the authorizer's Lambda function is cached for clients that use persistent HTTP connections.

  • signing_disabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether AWS IoT validates the token signature in an authorization request.

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

    The status of the authorizer.

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

    Metadata which can be used to manage the custom authorizer.

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

    The key used to extract the token from the HTTP headers.

  • token_signing_public_keys (AWSCDK::IResolvable, Hash{String => String}, nil) (defaults to: nil)

    The public keys used to validate the token signature returned by your custom authentication service.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'io_t/cfn_authorizer_props.rb', line 17

def initialize(authorizer_function_arn:, authorizer_name: nil, enable_caching_for_http: nil, signing_disabled: nil, status: nil, tags: nil, token_key_name: nil, token_signing_public_keys: nil)
  @authorizer_function_arn = authorizer_function_arn
  Jsii::Type.check_type(@authorizer_function_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizerFunctionArn")
  @authorizer_name = authorizer_name
  Jsii::Type.check_type(@authorizer_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizerName") unless @authorizer_name.nil?
  @enable_caching_for_http = enable_caching_for_http
  Jsii::Type.check_type(@enable_caching_for_http, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableCachingForHttp") unless @enable_caching_for_http.nil?
  @signing_disabled = signing_disabled
  Jsii::Type.check_type(@signing_disabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "signingDisabled") unless @signing_disabled.nil?
  @status = status
  Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") unless @status.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?
  @token_key_name = token_key_name
  Jsii::Type.check_type(@token_key_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tokenKeyName") unless @token_key_name.nil?
  @token_signing_public_keys = token_signing_public_keys
  Jsii::Type.check_type(@token_signing_public_keys, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "tokenSigningPublicKeys") unless @token_signing_public_keys.nil?
end

Instance Attribute Details

#authorizer_function_arnString (readonly)

The authorizer's Lambda function ARN.



40
41
42
# File 'io_t/cfn_authorizer_props.rb', line 40

def authorizer_function_arn
  @authorizer_function_arn
end

#authorizer_nameString? (readonly)

The authorizer name.



45
46
47
# File 'io_t/cfn_authorizer_props.rb', line 45

def authorizer_name
  @authorizer_name
end

#enable_caching_for_httpBoolean, ... (readonly)

When true , the result from the authorizer's Lambda function is cached for clients that use persistent HTTP connections.

The results are cached for the time specified by the Lambda function in refresh_after_in_seconds . This value doesn't affect authorization of clients that use MQTT connections.



52
53
54
# File 'io_t/cfn_authorizer_props.rb', line 52

def enable_caching_for_http
  @enable_caching_for_http
end

#signing_disabledBoolean, ... (readonly)

Specifies whether AWS IoT validates the token signature in an authorization request.



57
58
59
# File 'io_t/cfn_authorizer_props.rb', line 57

def signing_disabled
  @signing_disabled
end

#statusString? (readonly)

The status of the authorizer.

Valid values: ACTIVE | INACTIVE



64
65
66
# File 'io_t/cfn_authorizer_props.rb', line 64

def status
  @status
end

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

Metadata which can be used to manage the custom authorizer.

For URI Request parameters use format: ...key1=value1&key2=value2...

For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."



75
76
77
# File 'io_t/cfn_authorizer_props.rb', line 75

def tags
  @tags
end

#token_key_nameString? (readonly)

The key used to extract the token from the HTTP headers.



80
81
82
# File 'io_t/cfn_authorizer_props.rb', line 80

def token_key_name
  @token_key_name
end

#token_signing_public_keysAWSCDK::IResolvable, ... (readonly)

The public keys used to validate the token signature returned by your custom authentication service.



85
86
87
# File 'io_t/cfn_authorizer_props.rb', line 85

def token_signing_public_keys
  @token_signing_public_keys
end

Class Method Details

.jsii_propertiesObject



87
88
89
90
91
92
93
94
95
96
97
98
# File 'io_t/cfn_authorizer_props.rb', line 87

def self.jsii_properties
  {
    :authorizer_function_arn => "authorizerFunctionArn",
    :authorizer_name => "authorizerName",
    :enable_caching_for_http => "enableCachingForHttp",
    :signing_disabled => "signingDisabled",
    :status => "status",
    :tags => "tags",
    :token_key_name => "tokenKeyName",
    :token_signing_public_keys => "tokenSigningPublicKeys",
  }
end

Instance Method Details

#to_jsiiObject



100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'io_t/cfn_authorizer_props.rb', line 100

def to_jsii
  result = {}
  result.merge!({
    "authorizerFunctionArn" => @authorizer_function_arn,
    "authorizerName" => @authorizer_name,
    "enableCachingForHttp" => @enable_caching_for_http,
    "signingDisabled" => @signing_disabled,
    "status" => @status,
    "tags" => @tags,
    "tokenKeyName" => @token_key_name,
    "tokenSigningPublicKeys" => @token_signing_public_keys,
  })
  result.compact
end