Class: AWSCDK::Location::CfnMapProps

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

Overview

Properties for defining a CfnMap.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration:, map_name:, description: nil, pricing_plan: nil, tags: nil) ⇒ CfnMapProps

Returns a new instance of CfnMapProps.

Parameters:

  • configuration (AWSCDK::IResolvable, AWSCDK::Location::CfnMap::MapConfigurationProperty)

    Specifies the MapConfiguration , including the map style, for the map resource that you create.

  • map_name (String)

    The name for the map resource.

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

    An optional description for the map 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)

    Applies one or more tags to the map resource.



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

def initialize(configuration:, map_name:, description: nil, pricing_plan: nil, tags: nil)
  @configuration = configuration.is_a?(Hash) ? ::AWSCDK::Location::CfnMap::MapConfigurationProperty.new(**configuration.transform_keys(&:to_sym)) : configuration
  Jsii::Type.check_type(@configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sb2NhdGlvbi5DZm5NYXAuTWFwQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "configuration")
  @map_name = map_name
  Jsii::Type.check_type(@map_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mapName")
  @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

#configurationAWSCDK::IResolvable, AWSCDK::Location::CfnMap::MapConfigurationProperty (readonly)

Specifies the MapConfiguration , including the map style, for the map resource that you create.

The map style defines the look of maps and the data provider for your map resource.



33
34
35
# File 'location/cfn_map_props.rb', line 33

def configuration
  @configuration
end

#descriptionString? (readonly)

An optional description for the map resource.



49
50
51
# File 'location/cfn_map_props.rb', line 49

def description
  @description
end

#map_nameString (readonly)

The name for the map resource.

Requirements:

  • Must contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
  • Must be a unique map resource name.
  • No spaces allowed. For example, ExampleMap .


44
45
46
# File 'location/cfn_map_props.rb', line 44

def map_name
  @map_name
end

#pricing_planString? (readonly)

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

Allowed Values : RequestBasedUsage



56
57
58
# File 'location/cfn_map_props.rb', line 56

def pricing_plan
  @pricing_plan
end

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

Applies one or more tags to the map resource.

A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

Format: "key" : "value"

Restrictions:

  • Maximum 50 tags per resource
  • Each resource tag must be unique with a maximum of one value.
  • Maximum key length: 128 Unicode characters in UTF-8
  • Maximum value length: 256 Unicode characters in UTF-8
  • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : /


73
74
75
# File 'location/cfn_map_props.rb', line 73

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :configuration => "configuration",
    :map_name => "mapName",
    :description => "description",
    :pricing_plan => "pricingPlan",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "configuration" => @configuration,
    "mapName" => @map_name,
    "description" => @description,
    "pricingPlan" => @pricing_plan,
    "tags" => @tags,
  })
  result.compact
end