interface CfnServiceProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppRunner.CfnServiceProps |
Java | software.amazon.awscdk.services.apprunner.CfnServiceProps |
Python | aws_cdk.aws_apprunner.CfnServiceProps |
TypeScript | @aws-cdk/aws-apprunner » CfnServiceProps |
Properties for defining a CfnService
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apprunner from '@aws-cdk/aws-apprunner';
const cfnServiceProps: apprunner.CfnServiceProps = {
sourceConfiguration: {
authenticationConfiguration: {
accessRoleArn: 'accessRoleArn',
connectionArn: 'connectionArn',
},
autoDeploymentsEnabled: false,
codeRepository: {
repositoryUrl: 'repositoryUrl',
sourceCodeVersion: {
type: 'type',
value: 'value',
},
// the properties below are optional
codeConfiguration: {
configurationSource: 'configurationSource',
// the properties below are optional
codeConfigurationValues: {
runtime: 'runtime',
// the properties below are optional
buildCommand: 'buildCommand',
port: 'port',
runtimeEnvironmentSecrets: [{
name: 'name',
value: 'value',
}],
runtimeEnvironmentVariables: [{
name: 'name',
value: 'value',
}],
startCommand: 'startCommand',
},
},
},
imageRepository: {
imageIdentifier: 'imageIdentifier',
imageRepositoryType: 'imageRepositoryType',
// the properties below are optional
imageConfiguration: {
port: 'port',
runtimeEnvironmentSecrets: [{
name: 'name',
value: 'value',
}],
runtimeEnvironmentVariables: [{
name: 'name',
value: 'value',
}],
startCommand: 'startCommand',
},
},
},
// the properties below are optional
autoScalingConfigurationArn: 'autoScalingConfigurationArn',
encryptionConfiguration: {
kmsKey: 'kmsKey',
},
healthCheckConfiguration: {
healthyThreshold: 123,
interval: 123,
path: 'path',
protocol: 'protocol',
timeout: 123,
unhealthyThreshold: 123,
},
instanceConfiguration: {
cpu: 'cpu',
instanceRoleArn: 'instanceRoleArn',
memory: 'memory',
},
networkConfiguration: {
egressConfiguration: {
egressType: 'egressType',
// the properties below are optional
vpcConnectorArn: 'vpcConnectorArn',
},
ingressConfiguration: {
isPubliclyAccessible: false,
},
},
observabilityConfiguration: {
observabilityEnabled: false,
// the properties below are optional
observabilityConfigurationArn: 'observabilityConfigurationArn',
},
serviceName: 'serviceName',
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
source | IResolvable | Source | The source to deploy to the App Runner service. |
auto | string | The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with your service. |
encryption | IResolvable | Encryption | An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. |
health | IResolvable | Health | The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service. |
instance | IResolvable | Instance | The runtime configuration of instances (scaling units) of your service. |
network | IResolvable | Network | Configuration settings related to network traffic of the web application that the App Runner service runs. |
observability | IResolvable | Service | The observability configuration of your service. |
service | string | A name for the App Runner service. |
tags? | Cfn [] | An optional list of metadata items that you can associate with the App Runner service resource. |
sourceConfiguration
Type:
IResolvable
|
Source
The source to deploy to the App Runner service.
It can be a code or an image repository.
autoScalingConfigurationArn?
Type:
string
(optional)
The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with your service.
If not provided, App Runner associates the latest revision of a default auto scaling configuration.
Specify an ARN with a name and a revision number to associate that revision. For example: arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/3
Specify just the name to associate the latest revision. For example: arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability
encryptionConfiguration?
Type:
IResolvable
|
Encryption
(optional)
An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs.
By default, App Runner uses an AWS managed key .
healthCheckConfiguration?
Type:
IResolvable
|
Health
(optional)
The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
instanceConfiguration?
Type:
IResolvable
|
Instance
(optional)
The runtime configuration of instances (scaling units) of your service.
networkConfiguration?
Type:
IResolvable
|
Network
(optional)
Configuration settings related to network traffic of the web application that the App Runner service runs.
observabilityConfiguration?
Type:
IResolvable
|
Service
(optional)
The observability configuration of your service.
serviceName?
Type:
string
(optional)
A name for the App Runner service.
It must be unique across all the running App Runner services in your AWS account in the AWS Region .
If you don't specify a name, AWS CloudFormation generates a name for your service.
tags?
Type:
Cfn
[]
(optional)
An optional list of metadata items that you can associate with the App Runner service resource.
A tag is a key-value pair.