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

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.

See:

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

CloudformationResource:

AWS::AppRunner::Service

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import 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"
                )
            ),
            source_directory="sourceDirectory"
        ),
        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
        ),
        ip_address_type="ipAddressType"
    ),
    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"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • 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_dependency(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_depends_on(target)

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

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

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 intermediate 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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

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 resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

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.

  • type_hint (Optional[ResolutionTypeHint]) –

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

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

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

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
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. The failed service isn’t usable, and still counts towards your service quota. To troubleshoot this failure, read the failure events and logs, change any parameters that need to be fixed, and rebuild your service using UpdateService .

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

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.

health_check_configuration

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

instance_configuration

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

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.

node

The tree node.

observability_configuration

The observability configuration of your service.

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.

source_configuration

The source to deploy to the App Runner service.

stack

The stack in which this element is defined.

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

tags

Tag Manager which manages the tags for this resource.

tags_raw

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

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(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

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.

See:

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.
from aws_cdk import 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).

See:

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.

See:

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

See:

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.
from aws_cdk import 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).

See:

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.

See:

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]) – An array of key-value pairs representing the secrets and parameters that get referenced to your service as an environment variable. The supported values are either the full Amazon Resource Name (ARN) of the AWS Secrets Manager secret or the full ARN of the parameter in the AWS Systems Manager Parameter Store. .. epigraph:: - If the AWS Systems Manager Parameter Store parameter exists in the same AWS Region as the service that you’re launching, you can use either the full ARN or name of the secret. If the parameter exists in a different Region, then the full ARN must be specified. - Currently, cross account referencing of AWS Systems Manager Parameter Store parameter is not supported.

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

See:

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.
from aws_cdk import 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.

See:

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

See:

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.

See:

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

runtime_environment_secrets

An array of key-value pairs representing the secrets and parameters that get referenced to your service as an environment variable.

The supported values are either the full Amazon Resource Name (ARN) of the AWS Secrets Manager secret or the full ARN of the parameter in the AWS Systems Manager Parameter Store. .. epigraph:

- If the AWS Systems Manager Parameter Store parameter exists in the same AWS Region as the service that you're launching, you can use either the full ARN or name of the secret. If the parameter exists in a different Region, then the full ARN must be specified.
- Currently, cross account referencing of AWS Systems Manager Parameter Store parameter is not supported.
See:

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.

See:

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.

See:

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, source_directory=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.

  • source_directory (Optional[str]) – The path of the directory that stores source code and configuration files. The build and start commands also execute from here. The path is absolute from root and, if not specified, defaults to the repository root.

See:

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.
from aws_cdk import 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"
        )
    ),
    source_directory="sourceDirectory"
)

Attributes

code_configuration

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

CodeConfiguration is required only for CreateService request.

See:

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.

See:

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.

See:

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

source_directory

The path of the directory that stores source code and configuration files.

The build and start commands also execute from here. The path is absolute from root and, if not specified, defaults to the repository root.

See:

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

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 .

See:

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.
from aws_cdk import 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 .

See:

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 .

See:

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.

See:

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.
from aws_cdk import 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.

See:

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

See:

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.
from aws_cdk import 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

See:

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

See:

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: "/"

See:

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

See:

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

See:

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

See:

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]) – An array of key-value pairs representing the secrets and parameters that get referenced to your service as an environment variable. The supported values are either the full Amazon Resource Name (ARN) of the AWS Secrets Manager secret or the full ARN of the parameter in the AWS Systems Manager Parameter Store. .. epigraph:: - If the AWS Systems Manager Parameter Store parameter exists in the same AWS Region as the service that you’re launching, you can use either the full ARN or name of the secret. If the parameter exists in a different Region, then the full ARN must be specified. - Currently, cross account referencing of AWS Systems Manager Parameter Store parameter is not supported.

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

See:

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.
from aws_cdk import 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

See:

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

runtime_environment_secrets

An array of key-value pairs representing the secrets and parameters that get referenced to your service as an environment variable.

The supported values are either the full Amazon Resource Name (ARN) of the AWS Secrets Manager secret or the full ARN of the parameter in the AWS Systems Manager Parameter Store. .. epigraph:

- If the AWS Systems Manager Parameter Store parameter exists in the same AWS Region as the service that you're launching, you can use either the full ARN or name of the secret. If the parameter exists in a different Region, then the full ARN must be specified.
- Currently, cross account referencing of AWS Systems Manager Parameter Store parameter is not supported.
See:

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.

See:

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.

See:

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.

See:

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.
from aws_cdk import 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.

See:

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 .

See:

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.

See:

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 .

See:

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.
from aws_cdk import 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 .

See:

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

See:

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.
from aws_cdk import 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

See:

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.

See:

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

See:

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.

See:

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.
from aws_cdk import 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.

See:

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.

See:

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, ip_address_type=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:
  • egress_configuration (Union[IResolvable, EgressConfigurationProperty, Dict[str, Any], None]) – Network configuration settings for outbound message traffic.

  • ingress_configuration (Union[IResolvable, IngressConfigurationProperty, Dict[str, Any], None]) – Network configuration settings for inbound message traffic.

  • ip_address_type (Optional[str]) – App Runner provides you with the option to choose between Internet Protocol version 4 (IPv4) and dual stack (IPv4 and IPv6) for your incoming public network configuration. This is an optional parameter. If you do not specify an IpAddressType , it defaults to select IPv4. .. epigraph:: Currently, App Runner supports dual stack for only Public endpoint. Only IPv4 is supported for Private endpoint. If you update a service that’s using dual-stack Public endpoint to a Private endpoint, your App Runner service will default to support only IPv4 for Private endpoint and fail to receive traffic originating from IPv6 endpoint.

See:

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.
from aws_cdk import 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
    ),
    ip_address_type="ipAddressType"
)

Attributes

egress_configuration

Network configuration settings for outbound message traffic.

See:

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.

See:

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

ip_address_type

App Runner provides you with the option to choose between Internet Protocol version 4 (IPv4) and dual stack (IPv4 and IPv6) for your incoming public network configuration.

This is an optional parameter. If you do not specify an IpAddressType , it defaults to select IPv4. .. epigraph:

Currently, App Runner supports dual stack for only Public endpoint. Only IPv4 is supported for Private endpoint. If you update a service that's using dual-stack Public endpoint to a Private endpoint, your App Runner service will default to support only IPv4 for Private endpoint and fail to receive traffic originating from IPv6 endpoint.
See:

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

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

See:

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.
from aws_cdk import 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

See:

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.

See:

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.

See:

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.
from aws_cdk import 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.

See:

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.

See:

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

See:

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.
from aws_cdk import 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"
            )
        ),
        source_directory="sourceDirectory"
    ),
    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.

See:

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

See:

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

See:

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

See:

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