Class: AWSCDK::IoT::CfnTopicRule::HttpActionProperty

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

Overview

Send data to an HTTPS endpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, auth: nil, batch_config: nil, confirmation_url: nil, enable_batching: nil, headers: nil) ⇒ HttpActionProperty

Returns a new instance of HttpActionProperty.

Parameters:



1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
# File 'io_t/cfn_topic_rule.rb', line 1620

def initialize(url:, auth: nil, batch_config: nil, confirmation_url: nil, enable_batching: nil, headers: nil)
  @url = url
  Jsii::Type.check_type(@url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "url")
  @auth = auth.is_a?(Hash) ? ::AWSCDK::IoT::CfnTopicRule::HttpAuthorizationProperty.new(**auth.transform_keys(&:to_sym)) : auth
  Jsii::Type.check_type(@auth, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVG9waWNSdWxlLkh0dHBBdXRob3JpemF0aW9uUHJvcGVydHkifV19fQ==")), "auth") unless @auth.nil?
  @batch_config = batch_config.is_a?(Hash) ? ::AWSCDK::IoT::CfnTopicRule::BatchConfigProperty.new(**batch_config.transform_keys(&:to_sym)) : batch_config
  Jsii::Type.check_type(@batch_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVG9waWNSdWxlLkJhdGNoQ29uZmlnUHJvcGVydHkifV19fQ==")), "batchConfig") unless @batch_config.nil?
  @confirmation_url = confirmation_url
  Jsii::Type.check_type(@confirmation_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "confirmationUrl") unless @confirmation_url.nil?
  @enable_batching = enable_batching
  Jsii::Type.check_type(@enable_batching, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableBatching") unless @enable_batching.nil?
  @headers = headers
  Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90LkNmblRvcGljUnVsZS5IdHRwQWN0aW9uSGVhZGVyUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "headers") unless @headers.nil?
end

Instance Attribute Details

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

The authentication method to use when sending data to an HTTPS endpoint.



1646
1647
1648
# File 'io_t/cfn_topic_rule.rb', line 1646

def auth
  @auth
end

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



1649
1650
1651
# File 'io_t/cfn_topic_rule.rb', line 1649

def batch_config
  @batch_config
end

#confirmation_urlString? (readonly)

The URL to which AWS IoT sends a confirmation message.

The value of the confirmation URL must be a prefix of the endpoint URL. If you do not specify a confirmation URL AWS IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL.



1656
1657
1658
# File 'io_t/cfn_topic_rule.rb', line 1656

def confirmation_url
  @confirmation_url
end

#enable_batchingBoolean, ... (readonly)



1659
1660
1661
# File 'io_t/cfn_topic_rule.rb', line 1659

def enable_batching
  @enable_batching
end

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

The HTTP headers to send with the message data.



1664
1665
1666
# File 'io_t/cfn_topic_rule.rb', line 1664

def headers
  @headers
end

#urlString (readonly)

The endpoint URL.

If substitution templates are used in the URL, you must also specify a confirmation_url . If this is a new destination, a new TopicRuleDestination is created if possible.



1641
1642
1643
# File 'io_t/cfn_topic_rule.rb', line 1641

def url
  @url
end

Class Method Details

.jsii_propertiesObject



1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
# File 'io_t/cfn_topic_rule.rb', line 1666

def self.jsii_properties
  {
    :url => "url",
    :auth => "auth",
    :batch_config => "batchConfig",
    :confirmation_url => "confirmationUrl",
    :enable_batching => "enableBatching",
    :headers => "headers",
  }
end

Instance Method Details

#to_jsiiObject



1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
# File 'io_t/cfn_topic_rule.rb', line 1677

def to_jsii
  result = {}
  result.merge!({
    "url" => @url,
    "auth" => @auth,
    "batchConfig" => @batch_config,
    "confirmationUrl" => @confirmation_url,
    "enableBatching" => @enable_batching,
    "headers" => @headers,
  })
  result.compact
end