Class: AWSCDK::AppMesh::CfnRouteProps

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

Overview

Properties for defining a CfnRoute.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mesh_name:, spec:, virtual_router_name:, mesh_owner: nil, route_name: nil, tags: nil) ⇒ CfnRouteProps

Returns a new instance of CfnRouteProps.

Parameters:

  • mesh_name (String)

    The name of the service mesh to create the route in.

  • spec (AWSCDK::IResolvable, AWSCDK::AppMesh::CfnRoute::RouteSpecProperty)

    The route specification to apply.

  • virtual_router_name (String)

    The name of the virtual router in which to create the route.

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

    The AWS IAM account ID of the service mesh owner.

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

    The name to use for the route.

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

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



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'app_mesh/cfn_route_props.rb', line 15

def initialize(mesh_name:, spec:, virtual_router_name:, mesh_owner: nil, route_name: nil, tags: nil)
  @mesh_name = mesh_name
  Jsii::Type.check_type(@mesh_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "meshName")
  @spec = spec.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::RouteSpecProperty.new(**spec.transform_keys(&:to_sym)) : spec
  Jsii::Type.check_type(@spec, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLlJvdXRlU3BlY1Byb3BlcnR5In1dfX0=")), "spec")
  @virtual_router_name = virtual_router_name
  Jsii::Type.check_type(@virtual_router_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "virtualRouterName")
  @mesh_owner = mesh_owner
  Jsii::Type.check_type(@mesh_owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "meshOwner") unless @mesh_owner.nil?
  @route_name = route_name
  Jsii::Type.check_type(@route_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "routeName") unless @route_name.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 of the service mesh to create the route in.



34
35
36
# File 'app_mesh/cfn_route_props.rb', line 34

def mesh_name
  @mesh_name
end

#mesh_ownerString? (readonly)

The AWS IAM account ID of the service mesh owner.

If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .



53
54
55
# File 'app_mesh/cfn_route_props.rb', line 53

def mesh_owner
  @mesh_owner
end

#route_nameString? (readonly)

The name to use for the route.



58
59
60
# File 'app_mesh/cfn_route_props.rb', line 58

def route_name
  @route_name
end

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

Optional metadata that you can apply to the route 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.



65
66
67
# File 'app_mesh/cfn_route_props.rb', line 65

def tags
  @tags
end

#virtual_router_nameString (readonly)

The name of the virtual router in which to create the route.

If the virtual router is in a shared mesh, then you must be the owner of the virtual router resource.



46
47
48
# File 'app_mesh/cfn_route_props.rb', line 46

def virtual_router_name
  @virtual_router_name
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
76
# File 'app_mesh/cfn_route_props.rb', line 67

def self.jsii_properties
  {
    :mesh_name => "meshName",
    :spec => "spec",
    :virtual_router_name => "virtualRouterName",
    :mesh_owner => "meshOwner",
    :route_name => "routeName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



78
79
80
81
82
83
84
85
86
87
88
89
# File 'app_mesh/cfn_route_props.rb', line 78

def to_jsii
  result = {}
  result.merge!({
    "meshName" => @mesh_name,
    "spec" => @spec,
    "virtualRouterName" => @virtual_router_name,
    "meshOwner" => @mesh_owner,
    "routeName" => @route_name,
    "tags" => @tags,
  })
  result.compact
end