CfnService

class aws_cdk.aws_apprunner.CfnService(scope, id, *, source_configuration, auto_scaling_configuration_arn=None, encryption_configuration=None, health_check_configuration=None, instance_configuration=None, network_configuration=None, observability_configuration=None, service_name=None, tags=None)

Bases: CfnResource

A CloudFormation AWS::AppRunner::Service.

Specify an AWS App Runner service by using the AWS::AppRunner::Service resource in an AWS CloudFormation template.

The AWS::AppRunner::Service resource is an AWS App Runner resource type that specifies an App Runner service.

CloudformationResource:

AWS::AppRunner::Service

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

cfn_service = apprunner.CfnService(self, "MyCfnService",
    source_configuration=apprunner.CfnService.SourceConfigurationProperty(
        authentication_configuration=apprunner.CfnService.AuthenticationConfigurationProperty(
            access_role_arn="accessRoleArn",
            connection_arn="connectionArn"
        ),
        auto_deployments_enabled=False,
        code_repository=apprunner.CfnService.CodeRepositoryProperty(
            repository_url="repositoryUrl",
            source_code_version=apprunner.CfnService.SourceCodeVersionProperty(
                type="type",
                value="value"
            ),

            # the properties below are optional
            code_configuration=apprunner.CfnService.CodeConfigurationProperty(
                configuration_source="configurationSource",

                # the properties below are optional
                code_configuration_values=apprunner.CfnService.CodeConfigurationValuesProperty(
                    runtime="runtime",

                    # the properties below are optional
                    build_command="buildCommand",
                    port="port",
                    runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
                        name="name",
                        value="value"
                    )],
                    runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
                        name="name",
                        value="value"
                    )],
                    start_command="startCommand"
                )
            )
        ),
        image_repository=apprunner.CfnService.ImageRepositoryProperty(
            image_identifier="imageIdentifier",
            image_repository_type="imageRepositoryType",

            # the properties below are optional
            image_configuration=apprunner.CfnService.ImageConfigurationProperty(
                port="port",
                runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
                    name="name",
                    value="value"
                )],
                runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
                    name="name",
                    value="value"
                )],
                start_command="startCommand"
            )
        )
    ),

    # the properties below are optional
    auto_scaling_configuration_arn="autoScalingConfigurationArn",
    encryption_configuration=apprunner.CfnService.EncryptionConfigurationProperty(
        kms_key="kmsKey"
    ),
    health_check_configuration=apprunner.CfnService.HealthCheckConfigurationProperty(
        healthy_threshold=123,
        interval=123,
        path="path",
        protocol="protocol",
        timeout=123,
        unhealthy_threshold=123
    ),
    instance_configuration=apprunner.CfnService.InstanceConfigurationProperty(
        cpu="cpu",
        instance_role_arn="instanceRoleArn",
        memory="memory"
    ),
    network_configuration=apprunner.CfnService.NetworkConfigurationProperty(
        egress_configuration=apprunner.CfnService.EgressConfigurationProperty(
            egress_type="egressType",

            # the properties below are optional
            vpc_connector_arn="vpcConnectorArn"
        ),
        ingress_configuration=apprunner.CfnService.IngressConfigurationProperty(
            is_publicly_accessible=False
        )
    ),
    observability_configuration=apprunner.CfnService.ServiceObservabilityConfigurationProperty(
        observability_enabled=False,

        # the properties below are optional
        observability_configuration_arn="observabilityConfigurationArn"
    ),
    service_name="serviceName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Create a new AWS::AppRunner::Service.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • source_configuration (Union[IResolvable, SourceConfigurationProperty, Dict[str, Any]]) – The source to deploy to the App Runner service. It can be a code or an image repository.

  • auto_scaling_configuration_arn (Optional[str]) – 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

  • encryption_configuration (Union[IResolvable, EncryptionConfigurationProperty, Dict[str, Any], None]) – 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 .

  • health_check_configuration (Union[IResolvable, HealthCheckConfigurationProperty, Dict[str, Any], None]) – The settings for the health check that AWS App Runner performs to monitor the health of the App Runner service.

  • instance_configuration (Union[IResolvable, InstanceConfigurationProperty, Dict[str, Any], None]) – The runtime configuration of instances (scaling units) of your service.

  • network_configuration (Union[IResolvable, NetworkConfigurationProperty, Dict[str, Any], None]) – Configuration settings related to network traffic of the web application that the App Runner service runs.

  • observability_configuration (Union[IResolvable, ServiceObservabilityConfigurationProperty, Dict[str, Any], None]) – The observability configuration of your service.

  • service_name (Optional[str]) – 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 (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An optional list of metadata items that you can associate with the App Runner service resource. A tag is a key-value pair.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::AppRunner::Service'
attr_service_arn

The Amazon Resource Name (ARN) of this service.

CloudformationAttribute:

ServiceArn

attr_service_id

An ID that App Runner generated for this service.

It’s unique within the AWS Region .

CloudformationAttribute:

ServiceId

attr_service_url

A subdomain URL that App Runner generated for this service.

You can use this URL to access your service web application.

CloudformationAttribute:

ServiceUrl

attr_status

The current state of the App Runner service. These particular values mean the following.

  • CREATE_FAILED – The service failed to create. To troubleshoot this failure, read the failure events and logs, change any parameters that need to be fixed, and retry the call to create the service.

The failed service isn’t usable, and still counts towards your service quota. When you’re done analyzing the failure, delete the service.

  • DELETE_FAILED – The service failed to delete and can’t be successfully recovered. Retry the service deletion call to ensure that all related resources are removed.

CloudformationAttribute:

Status

auto_scaling_configuration_arn

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-autoscalingconfigurationarn

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

encryption_configuration

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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-encryptionconfiguration

health_check_configuration

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-healthcheckconfiguration

instance_configuration

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-instanceconfiguration

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

network_configuration

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

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-networkconfiguration

node

The construct tree node associated with this construct.

observability_configuration

The observability configuration of your service.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-observabilityconfiguration

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

service_name

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-servicename

source_configuration

The source to deploy to the App Runner service.

It can be a code or an image repository.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-sourceconfiguration

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

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

A tag is a key-value pair.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apprunner-service.html#cfn-apprunner-service-tags

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AuthenticationConfigurationProperty

class CfnService.AuthenticationConfigurationProperty(*, access_role_arn=None, connection_arn=None)

Bases: object

Describes resources needed to authenticate access to some source repositories.

The specific resource depends on the repository provider.

Parameters:
  • access_role_arn (Optional[str]) – The Amazon Resource Name (ARN) of the IAM role that grants the App Runner service access to a source repository. It’s required for ECR image repositories (but not for ECR Public repositories).

  • connection_arn (Optional[str]) – The Amazon Resource Name (ARN) of the App Runner connection that enables the App Runner service to connect to a source repository. It’s required for GitHub code repositories.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-authenticationconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

authentication_configuration_property = apprunner.CfnService.AuthenticationConfigurationProperty(
    access_role_arn="accessRoleArn",
    connection_arn="connectionArn"
)

Attributes

access_role_arn

The Amazon Resource Name (ARN) of the IAM role that grants the App Runner service access to a source repository.

It’s required for ECR image repositories (but not for ECR Public repositories).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-authenticationconfiguration.html#cfn-apprunner-service-authenticationconfiguration-accessrolearn

connection_arn

The Amazon Resource Name (ARN) of the App Runner connection that enables the App Runner service to connect to a source repository.

It’s required for GitHub code repositories.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-authenticationconfiguration.html#cfn-apprunner-service-authenticationconfiguration-connectionarn

CodeConfigurationProperty

class CfnService.CodeConfigurationProperty(*, configuration_source, code_configuration_values=None)

Bases: object

Describes the configuration that AWS App Runner uses to build and run an App Runner service from a source code repository.

Parameters:
  • configuration_source (str) – The source of the App Runner configuration. Values are interpreted as follows:. - REPOSITORY – App Runner reads configuration values from the apprunner.yaml file in the source code repository and ignores CodeConfigurationValues . - API – App Runner uses configuration values provided in CodeConfigurationValues and ignores the apprunner.yaml file in the source code repository.

  • code_configuration_values (Union[IResolvable, CodeConfigurationValuesProperty, Dict[str, Any], None]) – The basic configuration for building and running the App Runner service. Use it to quickly launch an App Runner service without providing a apprunner.yaml file in the source code repository (or ignoring the file if it exists).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

code_configuration_property = apprunner.CfnService.CodeConfigurationProperty(
    configuration_source="configurationSource",

    # the properties below are optional
    code_configuration_values=apprunner.CfnService.CodeConfigurationValuesProperty(
        runtime="runtime",

        # the properties below are optional
        build_command="buildCommand",
        port="port",
        runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
            name="name",
            value="value"
        )],
        runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
            name="name",
            value="value"
        )],
        start_command="startCommand"
    )
)

Attributes

code_configuration_values

The basic configuration for building and running the App Runner service.

Use it to quickly launch an App Runner service without providing a apprunner.yaml file in the source code repository (or ignoring the file if it exists).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfiguration.html#cfn-apprunner-service-codeconfiguration-codeconfigurationvalues

configuration_source

.

  • REPOSITORY – App Runner reads configuration values from the apprunner.yaml file in the source code repository and ignores CodeConfigurationValues .

  • API – App Runner uses configuration values provided in CodeConfigurationValues and ignores the apprunner.yaml file in the source code repository.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfiguration.html#cfn-apprunner-service-codeconfiguration-configurationsource

Type:

The source of the App Runner configuration. Values are interpreted as follows

CodeConfigurationValuesProperty

class CfnService.CodeConfigurationValuesProperty(*, runtime, build_command=None, port=None, runtime_environment_secrets=None, runtime_environment_variables=None, start_command=None)

Bases: object

Describes the basic configuration needed for building and running an AWS App Runner service.

This type doesn’t support the full set of possible configuration options. Fur full configuration capabilities, use a apprunner.yaml file in the source code repository.

Parameters:
  • runtime (str) – A runtime environment type for building and running an App Runner service. It represents a programming language runtime.

  • build_command (Optional[str]) – The command App Runner runs to build your application.

  • port (Optional[str]) – The port that your application listens to in the container. Default: 8080

  • runtime_environment_secrets (Union[IResolvable, Sequence[Union[IResolvable, KeyValuePairProperty, Dict[str, Any]]], None]) – CfnService.CodeConfigurationValuesProperty.RuntimeEnvironmentSecrets.

  • runtime_environment_variables (Union[IResolvable, Sequence[Union[IResolvable, KeyValuePairProperty, Dict[str, Any]]], None]) – The environment variables that are available to your running AWS App Runner service. An array of key-value pairs.

  • start_command (Optional[str]) – The command App Runner runs to start your application.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

code_configuration_values_property = apprunner.CfnService.CodeConfigurationValuesProperty(
    runtime="runtime",

    # the properties below are optional
    build_command="buildCommand",
    port="port",
    runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
        name="name",
        value="value"
    )],
    runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
        name="name",
        value="value"
    )],
    start_command="startCommand"
)

Attributes

build_command

The command App Runner runs to build your application.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html#cfn-apprunner-service-codeconfigurationvalues-buildcommand

port

The port that your application listens to in the container.

Default: 8080

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html#cfn-apprunner-service-codeconfigurationvalues-port

runtime

A runtime environment type for building and running an App Runner service.

It represents a programming language runtime.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html#cfn-apprunner-service-codeconfigurationvalues-runtime

runtime_environment_secrets

CfnService.CodeConfigurationValuesProperty.RuntimeEnvironmentSecrets.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html#cfn-apprunner-service-codeconfigurationvalues-runtimeenvironmentsecrets

runtime_environment_variables

The environment variables that are available to your running AWS App Runner service.

An array of key-value pairs.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html#cfn-apprunner-service-codeconfigurationvalues-runtimeenvironmentvariables

start_command

The command App Runner runs to start your application.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html#cfn-apprunner-service-codeconfigurationvalues-startcommand

CodeRepositoryProperty

class CfnService.CodeRepositoryProperty(*, repository_url, source_code_version, code_configuration=None)

Bases: object

Describes a source code repository.

Parameters:
  • repository_url (str) – The location of the repository that contains the source code.

  • source_code_version (Union[IResolvable, SourceCodeVersionProperty, Dict[str, Any]]) – The version that should be used within the source code repository.

  • code_configuration (Union[IResolvable, CodeConfigurationProperty, Dict[str, Any], None]) – Configuration for building and running the service from a source code repository. .. epigraph:: CodeConfiguration is required only for CreateService request.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

code_repository_property = apprunner.CfnService.CodeRepositoryProperty(
    repository_url="repositoryUrl",
    source_code_version=apprunner.CfnService.SourceCodeVersionProperty(
        type="type",
        value="value"
    ),

    # the properties below are optional
    code_configuration=apprunner.CfnService.CodeConfigurationProperty(
        configuration_source="configurationSource",

        # the properties below are optional
        code_configuration_values=apprunner.CfnService.CodeConfigurationValuesProperty(
            runtime="runtime",

            # the properties below are optional
            build_command="buildCommand",
            port="port",
            runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
                name="name",
                value="value"
            )],
            runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
                name="name",
                value="value"
            )],
            start_command="startCommand"
        )
    )
)

Attributes

code_configuration

Configuration for building and running the service from a source code repository.

CodeConfiguration is required only for CreateService request.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html#cfn-apprunner-service-coderepository-codeconfiguration

repository_url

The location of the repository that contains the source code.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html#cfn-apprunner-service-coderepository-repositoryurl

source_code_version

The version that should be used within the source code repository.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html#cfn-apprunner-service-coderepository-sourcecodeversion

EgressConfigurationProperty

class CfnService.EgressConfigurationProperty(*, egress_type, vpc_connector_arn=None)

Bases: object

Describes configuration settings related to outbound network traffic of an AWS App Runner service.

Parameters:
  • egress_type (str) – The type of egress configuration. Set to DEFAULT for access to resources hosted on public networks. Set to VPC to associate your service to a custom VPC specified by VpcConnectorArn .

  • vpc_connector_arn (Optional[str]) – The Amazon Resource Name (ARN) of the App Runner VPC connector that you want to associate with your App Runner service. Only valid when EgressType = VPC .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-egressconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

egress_configuration_property = apprunner.CfnService.EgressConfigurationProperty(
    egress_type="egressType",

    # the properties below are optional
    vpc_connector_arn="vpcConnectorArn"
)

Attributes

egress_type

The type of egress configuration.

Set to DEFAULT for access to resources hosted on public networks.

Set to VPC to associate your service to a custom VPC specified by VpcConnectorArn .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-egressconfiguration.html#cfn-apprunner-service-egressconfiguration-egresstype

vpc_connector_arn

The Amazon Resource Name (ARN) of the App Runner VPC connector that you want to associate with your App Runner service.

Only valid when EgressType = VPC .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-egressconfiguration.html#cfn-apprunner-service-egressconfiguration-vpcconnectorarn

EncryptionConfigurationProperty

class CfnService.EncryptionConfigurationProperty(*, kms_key)

Bases: object

Describes a custom encryption key that AWS App Runner uses to encrypt copies of the source repository and service logs.

Parameters:

kms_key (str) – The ARN of the KMS key that’s used for encryption.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-encryptionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

encryption_configuration_property = apprunner.CfnService.EncryptionConfigurationProperty(
    kms_key="kmsKey"
)

Attributes

kms_key

The ARN of the KMS key that’s used for encryption.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-encryptionconfiguration.html#cfn-apprunner-service-encryptionconfiguration-kmskey

HealthCheckConfigurationProperty

class CfnService.HealthCheckConfigurationProperty(*, healthy_threshold=None, interval=None, path=None, protocol=None, timeout=None, unhealthy_threshold=None)

Bases: object

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

Parameters:
  • healthy_threshold (Union[int, float, None]) – The number of consecutive checks that must succeed before App Runner decides that the service is healthy. Default: 1

  • interval (Union[int, float, None]) – The time interval, in seconds, between health checks. Default: 5

  • path (Optional[str]) – The URL that health check requests are sent to. Path is only applicable when you set Protocol to HTTP . Default: "/"

  • protocol (Optional[str]) – The IP protocol that App Runner uses to perform health checks for your service. If you set Protocol to HTTP , App Runner sends health check requests to the HTTP path specified by Path . Default: TCP

  • timeout (Union[int, float, None]) – The time, in seconds, to wait for a health check response before deciding it failed. Default: 2

  • unhealthy_threshold (Union[int, float, None]) – The number of consecutive checks that must fail before App Runner decides that the service is unhealthy. Default: 5

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-healthcheckconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

health_check_configuration_property = apprunner.CfnService.HealthCheckConfigurationProperty(
    healthy_threshold=123,
    interval=123,
    path="path",
    protocol="protocol",
    timeout=123,
    unhealthy_threshold=123
)

Attributes

healthy_threshold

The number of consecutive checks that must succeed before App Runner decides that the service is healthy.

Default: 1

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-healthcheckconfiguration.html#cfn-apprunner-service-healthcheckconfiguration-healthythreshold

interval

The time interval, in seconds, between health checks.

Default: 5

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-healthcheckconfiguration.html#cfn-apprunner-service-healthcheckconfiguration-interval

path

The URL that health check requests are sent to.

Path is only applicable when you set Protocol to HTTP .

Default: "/"

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-healthcheckconfiguration.html#cfn-apprunner-service-healthcheckconfiguration-path

protocol

The IP protocol that App Runner uses to perform health checks for your service.

If you set Protocol to HTTP , App Runner sends health check requests to the HTTP path specified by Path .

Default: TCP

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-healthcheckconfiguration.html#cfn-apprunner-service-healthcheckconfiguration-protocol

timeout

The time, in seconds, to wait for a health check response before deciding it failed.

Default: 2

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-healthcheckconfiguration.html#cfn-apprunner-service-healthcheckconfiguration-timeout

unhealthy_threshold

The number of consecutive checks that must fail before App Runner decides that the service is unhealthy.

Default: 5

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-healthcheckconfiguration.html#cfn-apprunner-service-healthcheckconfiguration-unhealthythreshold

ImageConfigurationProperty

class CfnService.ImageConfigurationProperty(*, port=None, runtime_environment_secrets=None, runtime_environment_variables=None, start_command=None)

Bases: object

Describes the configuration that AWS App Runner uses to run an App Runner service using an image pulled from a source image repository.

Parameters:
  • port (Optional[str]) – The port that your application listens to in the container. Default: 8080

  • runtime_environment_secrets (Union[IResolvable, Sequence[Union[IResolvable, KeyValuePairProperty, Dict[str, Any]]], None]) – CfnService.ImageConfigurationProperty.RuntimeEnvironmentSecrets.

  • runtime_environment_variables (Union[IResolvable, Sequence[Union[IResolvable, KeyValuePairProperty, Dict[str, Any]]], None]) – Environment variables that are available to your running App Runner service. An array of key-value pairs.

  • start_command (Optional[str]) – An optional command that App Runner runs to start the application in the source image. If specified, this command overrides the Docker image’s default start command.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

image_configuration_property = apprunner.CfnService.ImageConfigurationProperty(
    port="port",
    runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
        name="name",
        value="value"
    )],
    runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
        name="name",
        value="value"
    )],
    start_command="startCommand"
)

Attributes

port

The port that your application listens to in the container.

Default: 8080

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-port

runtime_environment_secrets

CfnService.ImageConfigurationProperty.RuntimeEnvironmentSecrets.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-runtimeenvironmentsecrets

runtime_environment_variables

Environment variables that are available to your running App Runner service.

An array of key-value pairs.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-runtimeenvironmentvariables

start_command

An optional command that App Runner runs to start the application in the source image.

If specified, this command overrides the Docker image’s default start command.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-startcommand

ImageRepositoryProperty

class CfnService.ImageRepositoryProperty(*, image_identifier, image_repository_type, image_configuration=None)

Bases: object

Describes a source image repository.

Parameters:
  • image_identifier (str) – The identifier of an image. For an image in Amazon Elastic Container Registry (Amazon ECR), this is an image name. For the image name format, see Pulling an image in the Amazon ECR User Guide .

  • image_repository_type (str) – The type of the image repository. This reflects the repository provider and whether the repository is private or public.

  • image_configuration (Union[IResolvable, ImageConfigurationProperty, Dict[str, Any], None]) – Configuration for running the identified image.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imagerepository.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

image_repository_property = apprunner.CfnService.ImageRepositoryProperty(
    image_identifier="imageIdentifier",
    image_repository_type="imageRepositoryType",

    # the properties below are optional
    image_configuration=apprunner.CfnService.ImageConfigurationProperty(
        port="port",
        runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
            name="name",
            value="value"
        )],
        runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
            name="name",
            value="value"
        )],
        start_command="startCommand"
    )
)

Attributes

image_configuration

Configuration for running the identified image.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imagerepository.html#cfn-apprunner-service-imagerepository-imageconfiguration

image_identifier

The identifier of an image.

For an image in Amazon Elastic Container Registry (Amazon ECR), this is an image name. For the image name format, see Pulling an image in the Amazon ECR User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imagerepository.html#cfn-apprunner-service-imagerepository-imageidentifier

image_repository_type

The type of the image repository.

This reflects the repository provider and whether the repository is private or public.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imagerepository.html#cfn-apprunner-service-imagerepository-imagerepositorytype

IngressConfigurationProperty

class CfnService.IngressConfigurationProperty(*, is_publicly_accessible)

Bases: object

Network configuration settings for inbound network traffic.

Parameters:

is_publicly_accessible (Union[bool, IResolvable]) – Specifies whether your App Runner service is publicly accessible. To make the service publicly accessible set it to True . To make the service privately accessible, from only within an Amazon VPC set it to False .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-ingressconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

ingress_configuration_property = apprunner.CfnService.IngressConfigurationProperty(
    is_publicly_accessible=False
)

Attributes

is_publicly_accessible

Specifies whether your App Runner service is publicly accessible.

To make the service publicly accessible set it to True . To make the service privately accessible, from only within an Amazon VPC set it to False .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-ingressconfiguration.html#cfn-apprunner-service-ingressconfiguration-ispubliclyaccessible

InstanceConfigurationProperty

class CfnService.InstanceConfigurationProperty(*, cpu=None, instance_role_arn=None, memory=None)

Bases: object

Describes the runtime configuration of an AWS App Runner service instance (scaling unit).

Parameters:
  • cpu (Optional[str]) – The number of CPU units reserved for each instance of your App Runner service. Default: 1 vCPU

  • instance_role_arn (Optional[str]) – The Amazon Resource Name (ARN) of an IAM role that provides permissions to your App Runner service. These are permissions that your code needs when it calls any AWS APIs.

  • memory (Optional[str]) – The amount of memory, in MB or GB, reserved for each instance of your App Runner service. Default: 2 GB

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-instanceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

instance_configuration_property = apprunner.CfnService.InstanceConfigurationProperty(
    cpu="cpu",
    instance_role_arn="instanceRoleArn",
    memory="memory"
)

Attributes

cpu

The number of CPU units reserved for each instance of your App Runner service.

Default: 1 vCPU

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-instanceconfiguration.html#cfn-apprunner-service-instanceconfiguration-cpu

instance_role_arn

The Amazon Resource Name (ARN) of an IAM role that provides permissions to your App Runner service.

These are permissions that your code needs when it calls any AWS APIs.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-instanceconfiguration.html#cfn-apprunner-service-instanceconfiguration-instancerolearn

memory

The amount of memory, in MB or GB, reserved for each instance of your App Runner service.

Default: 2 GB

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-instanceconfiguration.html#cfn-apprunner-service-instanceconfiguration-memory

KeyValuePairProperty

class CfnService.KeyValuePairProperty(*, name=None, value=None)

Bases: object

Describes a key-value pair, which is a string-to-string mapping.

Parameters:
  • name (Optional[str]) – The key name string to map to a value.

  • value (Optional[str]) – The value string to which the key name is mapped.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-keyvaluepair.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

key_value_pair_property = apprunner.CfnService.KeyValuePairProperty(
    name="name",
    value="value"
)

Attributes

name

The key name string to map to a value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-keyvaluepair.html#cfn-apprunner-service-keyvaluepair-name

value

The value string to which the key name is mapped.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-keyvaluepair.html#cfn-apprunner-service-keyvaluepair-value

NetworkConfigurationProperty

class CfnService.NetworkConfigurationProperty(*, egress_configuration=None, ingress_configuration=None)

Bases: object

Describes configuration settings related to network traffic of an AWS App Runner service.

Consists of embedded objects for each configurable network feature.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-networkconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

network_configuration_property = apprunner.CfnService.NetworkConfigurationProperty(
    egress_configuration=apprunner.CfnService.EgressConfigurationProperty(
        egress_type="egressType",

        # the properties below are optional
        vpc_connector_arn="vpcConnectorArn"
    ),
    ingress_configuration=apprunner.CfnService.IngressConfigurationProperty(
        is_publicly_accessible=False
    )
)

Attributes

egress_configuration

Network configuration settings for outbound message traffic.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-networkconfiguration.html#cfn-apprunner-service-networkconfiguration-egressconfiguration

ingress_configuration

Network configuration settings for inbound message traffic.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-networkconfiguration.html#cfn-apprunner-service-networkconfiguration-ingressconfiguration

ServiceObservabilityConfigurationProperty

class CfnService.ServiceObservabilityConfigurationProperty(*, observability_enabled, observability_configuration_arn=None)

Bases: object

Describes the observability configuration of an AWS App Runner service.

These are additional observability features, like tracing, that you choose to enable. They’re configured in a separate resource that you associate with your service.

Parameters:
  • observability_enabled (Union[bool, IResolvable]) – When true , an observability configuration resource is associated with the service, and an ObservabilityConfigurationArn is specified.

  • observability_configuration_arn (Optional[str]) – The Amazon Resource Name (ARN) of the observability configuration that is associated with the service. Specified only when ObservabilityEnabled is true . Specify an ARN with a name and a revision number to associate that revision. For example: arn:aws:apprunner:us-east-1:123456789012:observabilityconfiguration/xray-tracing/3 Specify just the name to associate the latest revision. For example: arn:aws:apprunner:us-east-1:123456789012:observabilityconfiguration/xray-tracing

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-serviceobservabilityconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

service_observability_configuration_property = apprunner.CfnService.ServiceObservabilityConfigurationProperty(
    observability_enabled=False,

    # the properties below are optional
    observability_configuration_arn="observabilityConfigurationArn"
)

Attributes

observability_configuration_arn

The Amazon Resource Name (ARN) of the observability configuration that is associated with the service.

Specified only when ObservabilityEnabled is true .

Specify an ARN with a name and a revision number to associate that revision. For example: arn:aws:apprunner:us-east-1:123456789012:observabilityconfiguration/xray-tracing/3

Specify just the name to associate the latest revision. For example: arn:aws:apprunner:us-east-1:123456789012:observabilityconfiguration/xray-tracing

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-serviceobservabilityconfiguration.html#cfn-apprunner-service-serviceobservabilityconfiguration-observabilityconfigurationarn

observability_enabled

When true , an observability configuration resource is associated with the service, and an ObservabilityConfigurationArn is specified.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-serviceobservabilityconfiguration.html#cfn-apprunner-service-serviceobservabilityconfiguration-observabilityenabled

SourceCodeVersionProperty

class CfnService.SourceCodeVersionProperty(*, type, value)

Bases: object

Identifies a version of code that AWS App Runner refers to within a source code repository.

Parameters:
  • type (str) – The type of version identifier. For a git-based repository, branches represent versions.

  • value (str) – A source code version. For a git-based repository, a branch name maps to a specific version. App Runner uses the most recent commit to the branch.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-sourcecodeversion.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

source_code_version_property = apprunner.CfnService.SourceCodeVersionProperty(
    type="type",
    value="value"
)

Attributes

type

The type of version identifier.

For a git-based repository, branches represent versions.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-sourcecodeversion.html#cfn-apprunner-service-sourcecodeversion-type

value

A source code version.

For a git-based repository, a branch name maps to a specific version. App Runner uses the most recent commit to the branch.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-sourcecodeversion.html#cfn-apprunner-service-sourcecodeversion-value

SourceConfigurationProperty

class CfnService.SourceConfigurationProperty(*, authentication_configuration=None, auto_deployments_enabled=None, code_repository=None, image_repository=None)

Bases: object

Describes the source deployed to an AWS App Runner service.

It can be a code or an image repository.

Parameters:
  • authentication_configuration (Union[IResolvable, AuthenticationConfigurationProperty, Dict[str, Any], None]) – Describes the resources that are needed to authenticate access to some source repositories.

  • auto_deployments_enabled (Union[bool, IResolvable, None]) – 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. 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).

  • code_repository (Union[IResolvable, CodeRepositoryProperty, Dict[str, Any], None]) – The description of a source code repository. You must provide either this member or ImageRepository (but not both).

  • image_repository (Union[IResolvable, ImageRepositoryProperty, Dict[str, Any], None]) – The description of a source image repository. You must provide either this member or CodeRepository (but not both).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-sourceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apprunner as apprunner

source_configuration_property = apprunner.CfnService.SourceConfigurationProperty(
    authentication_configuration=apprunner.CfnService.AuthenticationConfigurationProperty(
        access_role_arn="accessRoleArn",
        connection_arn="connectionArn"
    ),
    auto_deployments_enabled=False,
    code_repository=apprunner.CfnService.CodeRepositoryProperty(
        repository_url="repositoryUrl",
        source_code_version=apprunner.CfnService.SourceCodeVersionProperty(
            type="type",
            value="value"
        ),

        # the properties below are optional
        code_configuration=apprunner.CfnService.CodeConfigurationProperty(
            configuration_source="configurationSource",

            # the properties below are optional
            code_configuration_values=apprunner.CfnService.CodeConfigurationValuesProperty(
                runtime="runtime",

                # the properties below are optional
                build_command="buildCommand",
                port="port",
                runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
                    name="name",
                    value="value"
                )],
                runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
                    name="name",
                    value="value"
                )],
                start_command="startCommand"
            )
        )
    ),
    image_repository=apprunner.CfnService.ImageRepositoryProperty(
        image_identifier="imageIdentifier",
        image_repository_type="imageRepositoryType",

        # the properties below are optional
        image_configuration=apprunner.CfnService.ImageConfigurationProperty(
            port="port",
            runtime_environment_secrets=[apprunner.CfnService.KeyValuePairProperty(
                name="name",
                value="value"
            )],
            runtime_environment_variables=[apprunner.CfnService.KeyValuePairProperty(
                name="name",
                value="value"
            )],
            start_command="startCommand"
        )
    )
)

Attributes

authentication_configuration

Describes the resources that are needed to authenticate access to some source repositories.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-sourceconfiguration.html#cfn-apprunner-service-sourceconfiguration-authenticationconfiguration

auto_deployments_enabled

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.

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).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-sourceconfiguration.html#cfn-apprunner-service-sourceconfiguration-autodeploymentsenabled

code_repository

The description of a source code repository.

You must provide either this member or ImageRepository (but not both).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-sourceconfiguration.html#cfn-apprunner-service-sourceconfiguration-coderepository

image_repository

The description of a source image repository.

You must provide either this member or CodeRepository (but not both).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-sourceconfiguration.html#cfn-apprunner-service-sourceconfiguration-imagerepository