Module: AWSCDK::AppMesh::IMesh

Includes:
IResource, Interfaces::AWSAppmesh::IMeshRef
Included in:
Mesh
Defined in:
app_mesh/i_mesh.rb

Overview

Interface which all Mesh based classes MUST implement.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'app_mesh/i_mesh.rb', line 135

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :mesh_ref => { kind: :property, name: "meshRef", is_optional: false },
    :mesh_arn => { kind: :property, name: "meshArn", is_optional: false },
    :mesh_name => { kind: :property, name: "meshName", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :add_virtual_gateway => { kind: :method, name: "addVirtualGateway", is_optional: false },
    :add_virtual_node => { kind: :method, name: "addVirtualNode", is_optional: false },
    :add_virtual_router => { kind: :method, name: "addVirtualRouter", is_optional: false },
  }
end

Instance Method Details

#add_virtual_gateway(id, props = nil) ⇒ AWSCDK::AppMesh::VirtualGateway

Creates a new VirtualGateway in this Mesh.

Note that the Gateway is created in the same Stack that this Mesh belongs to, which might be different than the current stack.

Parameters:

Returns:



98
99
100
101
102
103
# File 'app_mesh/i_mesh.rb', line 98

def add_virtual_gateway(id, props = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  props = props.is_a?(Hash) ? ::AWSCDK::AppMesh::VirtualGatewayBaseProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5WaXJ0dWFsR2F0ZXdheUJhc2VQcm9wcyJ9")), "props") unless props.nil?
  jsii_call_method("addVirtualGateway", [id, props])
end

#add_virtual_node(id, props = nil) ⇒ AWSCDK::AppMesh::VirtualNode

Creates a new VirtualNode in this Mesh.

Note that the Node is created in the same Stack that this Mesh belongs to, which might be different than the current stack.

Parameters:

Returns:



113
114
115
116
117
118
# File 'app_mesh/i_mesh.rb', line 113

def add_virtual_node(id, props = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  props = props.is_a?(Hash) ? ::AWSCDK::AppMesh::VirtualNodeBaseProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5WaXJ0dWFsTm9kZUJhc2VQcm9wcyJ9")), "props") unless props.nil?
  jsii_call_method("addVirtualNode", [id, props])
end

#add_virtual_router(id, props = nil) ⇒ AWSCDK::AppMesh::VirtualRouter

Creates a new VirtualRouter in this Mesh.

Note that the Router is created in the same Stack that this Mesh belongs to, which might be different than the current stack.

Parameters:

Returns:



128
129
130
131
132
133
# File 'app_mesh/i_mesh.rb', line 128

def add_virtual_router(id, props = nil)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  props = props.is_a?(Hash) ? ::AWSCDK::AppMesh::VirtualRouterBaseProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5WaXJ0dWFsUm91dGVyQmFzZVByb3BzIn0=")), "props") unless props.nil?
  jsii_call_method("addVirtualRouter", [id, props])
end

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:



85
86
87
88
# File 'app_mesh/i_mesh.rb', line 85

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



27
28
29
# File 'app_mesh/i_mesh.rb', line 27

def env()
  jsii_get_property("env")
end

#mesh_arnString

The Amazon Resource Name (ARN) of the AppMesh mesh.

Returns:

  • (String)


48
49
50
# File 'app_mesh/i_mesh.rb', line 48

def mesh_arn()
  jsii_get_property("meshArn")
end

#mesh_nameString

The name of the AppMesh mesh.

Returns:

  • (String)


55
56
57
# File 'app_mesh/i_mesh.rb', line 55

def mesh_name()
  jsii_get_property("meshName")
end

#mesh_refAWSCDK::Interfaces::AWSAppmesh::MeshReference

A reference to a Mesh resource.



41
42
43
# File 'app_mesh/i_mesh.rb', line 41

def mesh_ref()
  jsii_get_property("meshRef")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


12
13
14
# File 'app_mesh/i_mesh.rb', line 12

def node()
  jsii_get_property("node")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



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

def stack()
  jsii_get_property("stack")
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



66
67
68
69
70
71
# File 'app_mesh/i_mesh.rb', line 66

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end