Class ServiceProps
(experimental) Properties of the AppRunner Service.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.AppRunner.Alpha
Assembly: Amazon.CDK.AWS.AppRunner.Alpha.dll
Syntax (csharp)
public class ServiceProps : Object, IServiceProps
Syntax (vb)
Public Class ServiceProps
Inherits Object
Implements IServiceProps
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
ServiceProps() |
Properties
AccessRole | (experimental) The IAM role that grants the App Runner service access to a source repository. |
AutoDeploymentsEnabled | (experimental) Specifies whether to enable continuous integration from the source repository. |
Cpu | (experimental) The number of CPU units reserved for each instance of your App Runner service. |
HealthCheck | (experimental) Settings for the health check that AWS App Runner performs to monitor the health of a service. |
InstanceRole | (experimental) The IAM role that provides permissions to your App Runner service. |
Memory | (experimental) The amount of memory reserved for each instance of your App Runner service. |
ServiceName | (experimental) Name of the service. |
Source | (experimental) The source of the repository for the service. |
VpcConnector | (experimental) Settings for an App Runner VPC connector to associate with the service. |
Constructors
ServiceProps()
public ServiceProps()
Properties
AccessRole
(experimental) The IAM role that grants the App Runner service access to a source repository.
public IRole AccessRole { get; set; }
Property Value
Remarks
It's required for ECR image repositories (but not for ECR Public repositories).
The role must be assumable by the 'build.apprunner.amazonaws.com' service principal.
Default: - generate a new access role.
Stability: Experimental
AutoDeploymentsEnabled
(experimental) Specifies whether to enable continuous integration from the source repository.
public Nullable<bool> AutoDeploymentsEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
If true, continuous integration from the source repository is enabled for the App Runner service. Each repository change (including any source code commit or new image version) starts a deployment. By default, App Runner sets to false for a source image that uses an ECR Public repository or an ECR repository that's in an AWS account other than the one that the service is in. App Runner sets to true in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).
Default: - no value will be passed.
Stability: Experimental
Cpu
(experimental) The number of CPU units reserved for each instance of your App Runner service.
public Cpu Cpu { get; set; }
Property Value
Remarks
Default: Cpu.ONE_VCPU
Stability: Experimental
HealthCheck
(experimental) Settings for the health check that AWS App Runner performs to monitor the health of a service.
public HealthCheck HealthCheck { get; set; }
Property Value
Remarks
You can specify it by static methods HealthCheck.http
or HealthCheck.tcp
.
Default: - no health check configuration
Stability: Experimental
InstanceRole
(experimental) The IAM role that provides permissions to your App Runner service.
public IRole InstanceRole { get; set; }
Property Value
Remarks
These are permissions that your code needs when it calls any AWS APIs.
The role must be assumable by the 'tasks.apprunner.amazonaws.com' service principal.
Default: - generate a new instance role.
Stability: Experimental
Memory
(experimental) The amount of memory reserved for each instance of your App Runner service.
public Memory Memory { get; set; }
Property Value
Remarks
Default: Memory.TWO_GB
Stability: Experimental
ServiceName
(experimental) Name of the service.
public string ServiceName { get; set; }
Property Value
System.String
Remarks
Default: - auto-generated if undefined.
Stability: Experimental
Source
(experimental) The source of the repository for the service.
public Source Source { get; set; }
Property Value
Remarks
Stability: Experimental
VpcConnector
(experimental) Settings for an App Runner VPC connector to associate with the service.
public IVpcConnector VpcConnector { get; set; }
Property Value
Remarks
Default: - no VPC connector, uses the DEFAULT egress type instead
Stability: Experimental