aws-cdk-lib.aws_apprunner.CfnServiceProps

interface CfnServiceProps

LanguageType name
.NETAmazon.CDK.AWS.AppRunner.CfnServiceProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapprunner#CfnServiceProps
Javasoftware.amazon.awscdk.services.apprunner.CfnServiceProps
Pythonaws_cdk.aws_apprunner.CfnServiceProps
TypeScript aws-cdk-lib » 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 { aws_apprunner as apprunner } from 'aws-cdk-lib';
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

NameTypeDescription
sourceConfigurationIResolvable | SourceConfigurationPropertyThe source to deploy to the App Runner service.
autoScalingConfigurationArn?stringThe Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with your service.
encryptionConfiguration?IResolvable | EncryptionConfigurationPropertyAn optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs.
healthCheckConfiguration?IResolvable | HealthCheckConfigurationPropertyThe settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.
instanceConfiguration?IResolvable | InstanceConfigurationPropertyThe runtime configuration of instances (scaling units) of your service.
networkConfiguration?IResolvable | NetworkConfigurationPropertyConfiguration settings related to network traffic of the web application that the App Runner service runs.
observabilityConfiguration?IResolvable | ServiceObservabilityConfigurationPropertyThe observability configuration of your service.
serviceName?stringA name for the App Runner service.
tags?CfnTag[]An optional list of metadata items that you can associate with the App Runner service resource.

sourceConfiguration

Type: IResolvable | SourceConfigurationProperty

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 | EncryptionConfigurationProperty (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 | HealthCheckConfigurationProperty (optional)

The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.


instanceConfiguration?

Type: IResolvable | InstanceConfigurationProperty (optional)

The runtime configuration of instances (scaling units) of your service.


networkConfiguration?

Type: IResolvable | NetworkConfigurationProperty (optional)

Configuration settings related to network traffic of the web application that the App Runner service runs.


observabilityConfiguration?

Type: IResolvable | ServiceObservabilityConfigurationProperty (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: CfnTag[] (optional)

An optional list of metadata items that you can associate with the App Runner service resource.

A tag is a key-value pair.