TlsCertificate
- class aws_cdk.aws_appmesh.TlsCertificate
Bases:
object
Represents a TLS certificate.
- ExampleMetadata:
infused
Example:
# A Virtual Node with listener TLS from an ACM provided certificate # cert: certificatemanager.Certificate # mesh: appmesh.Mesh node = appmesh.VirtualNode(self, "node", mesh=mesh, service_discovery=appmesh.ServiceDiscovery.dns("node"), listeners=[appmesh.VirtualNodeListener.grpc( port=80, tls=appmesh.ListenerTlsOptions( mode=appmesh.TlsMode.STRICT, certificate=appmesh.TlsCertificate.acm(cert) ) )] ) # A Virtual Gateway with listener TLS from a customer provided file certificate gateway = appmesh.VirtualGateway(self, "gateway", mesh=mesh, listeners=[appmesh.VirtualGatewayListener.grpc( port=8080, tls=appmesh.ListenerTlsOptions( mode=appmesh.TlsMode.STRICT, certificate=appmesh.TlsCertificate.file("path/to/certChain", "path/to/privateKey") ) )], virtual_gateway_name="gateway" ) # A Virtual Gateway with listener TLS from a SDS provided certificate gateway2 = appmesh.VirtualGateway(self, "gateway2", mesh=mesh, listeners=[appmesh.VirtualGatewayListener.http2( port=8080, tls=appmesh.ListenerTlsOptions( mode=appmesh.TlsMode.STRICT, certificate=appmesh.TlsCertificate.sds("secrete_certificate") ) )], virtual_gateway_name="gateway2" )
Methods
- abstract bind(_scope)
Returns TLS certificate based provider.
- Parameters:
_scope (
Construct
) –- Return type:
Static Methods
- classmethod acm(certificate)
Returns an ACM TLS Certificate.
- Parameters:
certificate (
ICertificate
) –- Return type:
- classmethod file(certificate_chain_path, private_key_path)
Returns an File TLS Certificate.
- Parameters:
certificate_chain_path (
str
) –private_key_path (
str
) –
- Return type:
- classmethod sds(secret_name)
Returns an SDS TLS Certificate.
- Parameters:
secret_name (
str
) –- Return type: