// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// This is a generated file from the original deployment recipe. It contains properties for
// all of the settings defined in the recipe file. It is recommended to not modify this file in order
// to allow easy updates to the file when the original recipe that this project was created from has updates.
// This class is marked as a partial class. If you add new settings to the recipe file, those settings should be
// added to partial versions of this class outside of the Generated folder for example in the Configuration folder.
using System.Collections.Generic;
namespace AspNetAppAppRunner.Configurations
{
public partial class Configuration
{
///
/// The Identity and Access Management Role that provides AWS credentials to the application to access AWS services
///
public IAMRoleConfiguration ApplicationIAMRole { get; set; }
///
/// App Runner requires this resource when you want to associate your App Runner service to a custom Amazon Virtual Private Cloud (Amazon VPC).
///
public VPCConnectorConfiguration VPCConnector { get; set; }
///
/// The Identity and Access Management (IAM) role that provides the AWS App Runner service access to pull the container image from ECR.
///
public IAMRoleConfiguration ServiceAccessIAMRole { get; set; }
///
/// The name of the AppRunner service.
///
public string ServiceName { get; set; }
///
/// The port that your application listens to in the container. Defaults to port 80.
///
public int Port { get; set; } = 80;
///
/// 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.
///
public string? StartCommand { get; set; }
///
/// The ARN of the KMS key that's used for encryption.
///
public string? EncryptionKmsKey { get; set; }
///
/// The number of consecutive checks that must succeed before App Runner decides that the service is healthy.
///
public double? HealthCheckHealthyThreshold { get; set; }
///
/// The time interval, in seconds, between health checks.
///
public int? HealthCheckInterval { get; set; }
///
/// The URL that health check requests are sent to.
///
public string? HealthCheckPath { get; set; }
///
/// The IP protocol that App Runner uses to perform health checks for your service.
///
public string HealthCheckProtocol { get; set; } = "TCP";
///
/// The time, in seconds, to wait for a health check response before deciding it failed.
///
public int? HealthCheckTimeout { get; set; }
///
/// The number of consecutive checks that must fail before App Runner decides that the service is unhealthy.
///
public int? HealthCheckUnhealthyThreshold { get; set; }
///
/// The number of CPU units reserved for each instance of your App Runner service.
///
public string Cpu { get; set; }
///
/// The amount of memory, in MB or GB, reserved for each instance of your App Runner service.
///
public string Memory { get; set; }
///
/// The environment variables that are set for the AppRunner environment.
///
public Dictionary AppRunnerEnvironmentVariables { get; set; } = new Dictionary { };
/// A parameterless constructor is needed for
/// or the classes will fail to initialize.
/// The warnings are disabled since a parameterless constructor will allow non-nullable properties to be initialized with null values.
#nullable disable warnings
public Configuration()
{
}
#nullable restore warnings
public Configuration(
IAMRoleConfiguration applicationIAMRole,
VPCConnectorConfiguration vpcConnector,
IAMRoleConfiguration serviceAccessIAMRole,
string serviceName,
int? port,
string healthCheckProtocol,
string cpu,
string memory,
Dictionary appRunnerEnvironmentVariables)
{
ApplicationIAMRole = applicationIAMRole;
VPCConnector = vpcConnector;
ServiceAccessIAMRole = serviceAccessIAMRole;
ServiceName = serviceName;
Port = port ?? 80;
HealthCheckProtocol = healthCheckProtocol;
Cpu = cpu;
Memory = memory;
AppRunnerEnvironmentVariables = appRunnerEnvironmentVariables;
}
}
}