Interface IServiceProps
(experimental) Properties of the AppRunner Service.
Namespace: Amazon.CDK.AWS.AppRunner.Alpha
Assembly: Amazon.CDK.AWS.AppRunner.Alpha.dll
Syntax (csharp)
public interface IServiceProps
Syntax (vb)
Public Interface 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
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. |
AutoScalingConfiguration | (experimental) Specifies an App Runner Auto Scaling Configuration. |
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. |
IpAddressType | (experimental) The IP address type for your incoming public network configuration. |
KmsKey | (experimental) The customer managed key that AWS App Runner uses to encrypt copies of the source repository and service logs. |
Memory | (experimental) The amount of memory reserved for each instance of your App Runner service. |
ObservabilityConfiguration | (experimental) Settings for an App Runner observability configuration. |
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. |
Properties
AccessRole
(experimental) The IAM role that grants the App Runner service access to a source repository.
virtual IRole AccessRole { get; }
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.
virtual Nullable<bool> AutoDeploymentsEnabled { get; }
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
AutoScalingConfiguration
(experimental) Specifies an App Runner Auto Scaling Configuration.
virtual IAutoScalingConfiguration AutoScalingConfiguration { get; }
Property Value
Remarks
A default configuration is either the AWS recommended configuration, or the configuration you set as the default.
Default: - the latest revision of a default auto scaling configuration is used.
Stability: Experimental
See: https://docs.aws.amazon.com/apprunner/latest/dg/manage-autoscaling.html
Cpu
(experimental) The number of CPU units reserved for each instance of your App Runner service.
virtual Cpu Cpu { get; }
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.
virtual HealthCheck HealthCheck { get; }
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.
virtual IRole InstanceRole { get; }
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
IpAddressType
(experimental) The IP address type for your incoming public network configuration.
virtual Nullable<IpAddressType> IpAddressType { get; }
Property Value
System.Nullable<IpAddressType>
Remarks
Default: - IpAddressType.IPV4
Stability: Experimental
KmsKey
(experimental) The customer managed key that AWS App Runner uses to encrypt copies of the source repository and service logs.
virtual IKey KmsKey { get; }
Property Value
Remarks
Default: - Use an AWS managed key
Stability: Experimental
Memory
(experimental) The amount of memory reserved for each instance of your App Runner service.
virtual Memory Memory { get; }
Property Value
Remarks
Default: Memory.TWO_GB
Stability: Experimental
ObservabilityConfiguration
(experimental) Settings for an App Runner observability configuration.
virtual IObservabilityConfiguration ObservabilityConfiguration { get; }
Property Value
Remarks
Default: - no observability configuration resource is associated with the service.
Stability: Experimental
ServiceName
(experimental) Name of the service.
virtual string ServiceName { get; }
Property Value
System.String
Remarks
Default: - auto-generated if undefined.
Stability: Experimental
Source
(experimental) The source of the repository for the service.
Source Source { get; }
Property Value
Remarks
Stability: Experimental
VpcConnector
(experimental) Settings for an App Runner VPC connector to associate with the service.
virtual IVpcConnector VpcConnector { get; }
Property Value
Remarks
Default: - no VPC connector, uses the DEFAULT egress type instead
Stability: Experimental