Class ImageConfiguration
(experimental) Describes the configuration that AWS App Runner uses to run an App Runner service using an image pulled from a source image repository.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.AppRunner.Alpha
Assembly: Amazon.CDK.AWS.AppRunner.Alpha.dll
Syntax (csharp)
public class ImageConfiguration : Object, IImageConfiguration
Syntax (vb)
Public Class ImageConfiguration
Inherits Object
Implements IImageConfiguration
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.IAM;
var service = new Service(this, "Service", new ServiceProps {
Source = Source.FromEcrPublic(new EcrPublicProps {
ImageConfiguration = new ImageConfiguration { Port = 8000 },
ImageIdentifier = "public.ecr.aws/aws-containers/hello-app-runner:latest"
})
});
service.AddToRolePolicy(new PolicyStatement(new PolicyStatementProps {
Effect = Effect.ALLOW,
Actions = new [] { "s3:GetObject" },
Resources = new [] { "*" }
}));
Synopsis
Constructors
ImageConfiguration() |
Properties
Environment | (deprecated) Environment variables that are available to your running App Runner service. |
EnvironmentSecrets | (experimental) Environment secrets that are available to your running App Runner service. |
EnvironmentVariables | (experimental) Environment variables that are available to your running App Runner service. |
Port | (experimental) The port that your application listens to in the container. |
StartCommand | (experimental) An optional command that App Runner runs to start the application in the source image. |
Constructors
ImageConfiguration()
public ImageConfiguration()
Properties
Environment
(deprecated) Environment variables that are available to your running App Runner service.
public IDictionary<string, string> Environment { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - no environment variables
Stability: Deprecated
EnvironmentSecrets
(experimental) Environment secrets that are available to your running App Runner service.
public IDictionary<string, Secret> EnvironmentSecrets { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, Secret>
Remarks
Default: - no environment secrets
Stability: Experimental
EnvironmentVariables
(experimental) Environment variables that are available to your running App Runner service.
public IDictionary<string, string> EnvironmentVariables { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - no environment variables
Stability: Experimental
Port
(experimental) The port that your application listens to in the container.
public Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: 8080
Stability: Experimental
StartCommand
(experimental) An optional command that App Runner runs to start the application in the source image.
public string StartCommand { get; set; }
Property Value
System.String
Remarks
If specified, this command overrides the Docker image’s default start command.
Default: - no start command
Stability: Experimental