Class: AWSCDK::RefactorSpaces::CfnRoute::URIPathRouteInputProperty

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

Overview

The configuration for the URI path route type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(activation_state:, append_source_path: nil, include_child_paths: nil, methods: nil, source_path: nil) ⇒ URIPathRouteInputProperty

Returns a new instance of URIPathRouteInputProperty.

Parameters:

  • activation_state (String)

    If set to ACTIVE , traffic is forwarded to this route’s service after the route is created.

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

    If set to true , this option appends the source path to the service URL endpoint.

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

    Indicates whether to match all subpaths of the given source path.

  • methods (Array<String>, nil) (defaults to: nil)

    A list of HTTP methods to match.

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

    This is the path that Refactor Spaces uses to match traffic.



682
683
684
685
686
687
688
689
690
691
692
693
# File 'refactor_spaces/cfn_route.rb', line 682

def initialize(activation_state:, append_source_path: nil, include_child_paths: nil, methods: nil, source_path: nil)
  @activation_state = activation_state
  Jsii::Type.check_type(@activation_state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "activationState")
  @append_source_path = append_source_path
  Jsii::Type.check_type(@append_source_path, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "appendSourcePath") unless @append_source_path.nil?
  @include_child_paths = include_child_paths
  Jsii::Type.check_type(@include_child_paths, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "includeChildPaths") unless @include_child_paths.nil?
  @methods = methods
  Jsii::Type.check_type(@methods, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "methods") unless @methods.nil?
  @source_path = source_path
  Jsii::Type.check_type(@source_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourcePath") unless @source_path.nil?
end

Instance Attribute Details

#activation_stateString (readonly)

If set to ACTIVE , traffic is forwarded to this route’s service after the route is created.



699
700
701
# File 'refactor_spaces/cfn_route.rb', line 699

def activation_state
  @activation_state
end

#append_source_pathBoolean, ... (readonly)

If set to true , this option appends the source path to the service URL endpoint.



704
705
706
# File 'refactor_spaces/cfn_route.rb', line 704

def append_source_path
  @append_source_path
end

#include_child_pathsBoolean, ... (readonly)

Indicates whether to match all subpaths of the given source path.

If this value is false , requests must match the source path exactly before they are forwarded to this route's service.



711
712
713
# File 'refactor_spaces/cfn_route.rb', line 711

def include_child_paths
  @include_child_paths
end

#methodsArray<String>? (readonly)

A list of HTTP methods to match.

An empty list matches all values. If a method is present, only HTTP requests using that method are forwarded to this route’s service.



718
719
720
# File 'refactor_spaces/cfn_route.rb', line 718

def methods
  @methods
end

#source_pathString? (readonly)

This is the path that Refactor Spaces uses to match traffic.

Paths must start with / and are relative to the base of the application. To use path parameters in the source path, add a variable in curly braces. For example, the resource path user represents a path parameter called 'user'.



725
726
727
# File 'refactor_spaces/cfn_route.rb', line 725

def source_path
  @source_path
end

Class Method Details

.jsii_propertiesObject



727
728
729
730
731
732
733
734
735
# File 'refactor_spaces/cfn_route.rb', line 727

def self.jsii_properties
  {
    :activation_state => "activationState",
    :append_source_path => "appendSourcePath",
    :include_child_paths => "includeChildPaths",
    :methods => "methods",
    :source_path => "sourcePath",
  }
end

Instance Method Details

#to_jsiiObject



737
738
739
740
741
742
743
744
745
746
747
# File 'refactor_spaces/cfn_route.rb', line 737

def to_jsii
  result = {}
  result.merge!({
    "activationState" => @activation_state,
    "appendSourcePath" => @append_source_path,
    "includeChildPaths" => @include_child_paths,
    "methods" => @methods,
    "sourcePath" => @source_path,
  })
  result.compact
end