Class: AWSCDK::AppMesh::CfnRoute::HttpRouteProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_mesh/cfn_route.rb

Overview

An object that represents an HTTP or HTTP/2 route type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, match:, retry_policy: nil, timeout: nil) ⇒ HttpRouteProperty

Returns a new instance of HttpRouteProperty.

Parameters:



1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
# File 'app_mesh/cfn_route.rb', line 1521

def initialize(action:, match:, retry_policy: nil, timeout: nil)
  @action = action.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::HttpRouteActionProperty.new(**action.transform_keys(&:to_sym)) : action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkh0dHBSb3V0ZUFjdGlvblByb3BlcnR5In1dfX0=")), "action")
  @match = match.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::HttpRouteMatchProperty.new(**match.transform_keys(&:to_sym)) : match
  Jsii::Type.check_type(@match, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkh0dHBSb3V0ZU1hdGNoUHJvcGVydHkifV19fQ==")), "match")
  @retry_policy = retry_policy.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::HttpRetryPolicyProperty.new(**retry_policy.transform_keys(&:to_sym)) : retry_policy
  Jsii::Type.check_type(@retry_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkh0dHBSZXRyeVBvbGljeVByb3BlcnR5In1dfX0=")), "retryPolicy") unless @retry_policy.nil?
  @timeout = timeout.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::HttpTimeoutProperty.new(**timeout.transform_keys(&:to_sym)) : timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkh0dHBUaW1lb3V0UHJvcGVydHkifV19fQ==")), "timeout") unless @timeout.nil?
end

Instance Attribute Details

#actionAWSCDK::IResolvable, AWSCDK::AppMesh::CfnRoute::HttpRouteActionProperty (readonly)

An object that represents the action to take if a match is determined.



1536
1537
1538
# File 'app_mesh/cfn_route.rb', line 1536

def action
  @action
end

#matchAWSCDK::IResolvable, AWSCDK::AppMesh::CfnRoute::HttpRouteMatchProperty (readonly)

An object that represents the criteria for determining a request match.



1541
1542
1543
# File 'app_mesh/cfn_route.rb', line 1541

def match
  @match
end

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

An object that represents a retry policy.



1546
1547
1548
# File 'app_mesh/cfn_route.rb', line 1546

def retry_policy
  @retry_policy
end

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

An object that represents types of timeouts.



1551
1552
1553
# File 'app_mesh/cfn_route.rb', line 1551

def timeout
  @timeout
end

Class Method Details

.jsii_propertiesObject



1553
1554
1555
1556
1557
1558
1559
1560
# File 'app_mesh/cfn_route.rb', line 1553

def self.jsii_properties
  {
    :action => "action",
    :match => "match",
    :retry_policy => "retryPolicy",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
# File 'app_mesh/cfn_route.rb', line 1562

def to_jsii
  result = {}
  result.merge!({
    "action" => @action,
    "match" => @match,
    "retryPolicy" => @retry_policy,
    "timeout" => @timeout,
  })
  result.compact
end