Class: AWSCDK::Location::CfnRouteCalculatorProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
location/cfn_route_calculator_props.rb

Overview

Properties for defining a CfnRouteCalculator.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(calculator_name:, data_source:, description: nil, pricing_plan: nil, tags: nil) ⇒ CfnRouteCalculatorProps

Returns a new instance of CfnRouteCalculatorProps.

Parameters:

  • calculator_name (String)

    The name of the route calculator resource.

  • data_source (String)

    Specifies the data provider of traffic and road network data.

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

    The optional description for the route calculator resource.

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

    No longer used. If included, the only allowed value is RequestBasedUsage .

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

    An array of key-value pairs to apply to this resource.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'location/cfn_route_calculator_props.rb', line 14

def initialize(calculator_name:, data_source:, description: nil, pricing_plan: nil, tags: nil)
  @calculator_name = calculator_name
  Jsii::Type.check_type(@calculator_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "calculatorName")
  @data_source = data_source
  Jsii::Type.check_type(@data_source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataSource")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @pricing_plan = pricing_plan
  Jsii::Type.check_type(@pricing_plan, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pricingPlan") unless @pricing_plan.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?
end

Instance Attribute Details

#calculator_nameString (readonly)

The name of the route calculator resource.

Requirements:

  • Can use alphanumeric characters (A–Z, a–z, 0–9) , hyphens (-), periods (.), and underscores (_).
  • Must be a unique Route calculator resource name.
  • No spaces allowed. For example, ExampleRouteCalculator .


37
38
39
# File 'location/cfn_route_calculator_props.rb', line 37

def calculator_name
  @calculator_name
end

#data_sourceString (readonly)

Specifies the data provider of traffic and road network data.

This field is case-sensitive. Enter the valid values as shown. For example, entering HERE returns an error.

Valid values include:

Route calculators that use Esri as a data source only calculate routes that are shorter than 400 km.

For additional information , see Data providers on the Amazon Location Service Developer Guide .



55
56
57
# File 'location/cfn_route_calculator_props.rb', line 55

def data_source
  @data_source
end

#descriptionString? (readonly)

The optional description for the route calculator resource.



60
61
62
# File 'location/cfn_route_calculator_props.rb', line 60

def description
  @description
end

#pricing_planString? (readonly)

No longer used. If included, the only allowed value is RequestBasedUsage .

Allowed Values : RequestBasedUsage



67
68
69
# File 'location/cfn_route_calculator_props.rb', line 67

def pricing_plan
  @pricing_plan
end

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

An array of key-value pairs to apply to this resource.



72
73
74
# File 'location/cfn_route_calculator_props.rb', line 72

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



74
75
76
77
78
79
80
81
82
# File 'location/cfn_route_calculator_props.rb', line 74

def self.jsii_properties
  {
    :calculator_name => "calculatorName",
    :data_source => "dataSource",
    :description => "description",
    :pricing_plan => "pricingPlan",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



84
85
86
87
88
89
90
91
92
93
94
# File 'location/cfn_route_calculator_props.rb', line 84

def to_jsii
  result = {}
  result.merge!({
    "calculatorName" => @calculator_name,
    "dataSource" => @data_source,
    "description" => @description,
    "pricingPlan" => @pricing_plan,
    "tags" => @tags,
  })
  result.compact
end