Class: AWSCDK::AppMesh::CfnMeshProps

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

Overview

Properties for defining a CfnMesh.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mesh_name: nil, spec: nil, tags: nil) ⇒ CfnMeshProps

Returns a new instance of CfnMeshProps.

Parameters:

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

    The name to use for the service mesh.

  • spec (AWSCDK::IResolvable, AWSCDK::AppMesh::CfnMesh::MeshSpecProperty, nil) (defaults to: nil)

    The service mesh specification to apply.

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

    Optional metadata that you can apply to the service mesh to assist with categorization and organization.



12
13
14
15
16
17
18
19
# File 'app_mesh/cfn_mesh_props.rb', line 12

def initialize(mesh_name: nil, spec: nil, tags: nil)
  @mesh_name = mesh_name
  Jsii::Type.check_type(@mesh_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "meshName") unless @mesh_name.nil?
  @spec = spec.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnMesh::MeshSpecProperty.new(**spec.transform_keys(&:to_sym)) : spec
  Jsii::Type.check_type(@spec, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmbk1lc2guTWVzaFNwZWNQcm9wZXJ0eSJ9XX19")), "spec") unless @spec.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

#mesh_nameString? (readonly)

The name to use for the service mesh.



25
26
27
# File 'app_mesh/cfn_mesh_props.rb', line 25

def mesh_name
  @mesh_name
end

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

The service mesh specification to apply.



30
31
32
# File 'app_mesh/cfn_mesh_props.rb', line 30

def spec
  @spec
end

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

Optional metadata that you can apply to the service mesh to assist with categorization and organization.

Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.



37
38
39
# File 'app_mesh/cfn_mesh_props.rb', line 37

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'app_mesh/cfn_mesh_props.rb', line 39

def self.jsii_properties
  {
    :mesh_name => "meshName",
    :spec => "spec",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'app_mesh/cfn_mesh_props.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "meshName" => @mesh_name,
    "spec" => @spec,
    "tags" => @tags,
  })
  result.compact
end