{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-apprunner-service.json",
  "title": "AWSAppRunnerServiceProperties",
  "description": "The AWS::AppRunner::Service resource specifies an AppRunner Service.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apprunner.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-apprunner-service.json",
    "sourceSha256": "ae5298600d2882cd1b40965244429b399d54bec2c4ba04e3c8ef50a1735bfbe1"
  },
  "type": "object",
  "properties": {
    "ServiceName": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 4,
          "maxLength": 40,
          "pattern": "[A-Za-z0-9][A-Za-z0-9-_]{3,39}"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The AppRunner Service Name."
    },
    "SourceConfiguration": {
      "$ref": "#/$defs/SourceConfiguration"
    },
    "InstanceConfiguration": {
      "$ref": "#/$defs/InstanceConfiguration"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "EncryptionConfiguration": {
      "$ref": "#/$defs/EncryptionConfiguration"
    },
    "HealthCheckConfiguration": {
      "$ref": "#/$defs/HealthCheckConfiguration"
    },
    "ObservabilityConfiguration": {
      "$ref": "#/$defs/ServiceObservabilityConfiguration"
    },
    "AutoScalingConfigurationArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1011,
          "pattern": "arn:aws(-[\\w]+)*:[a-z0-9-\\\\.]{0,63}:[a-z0-9-\\\\.]{0,63}:[0-9]{12}:(\\w|\\/|-){1,1011}"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Autoscaling configuration ARN"
    },
    "NetworkConfiguration": {
      "$ref": "#/$defs/NetworkConfiguration"
    }
  },
  "typeName": "AWS::AppRunner::Service",
  "$defs": {
    "SourceConfiguration": {
      "description": "Source Code configuration",
      "type": "object",
      "properties": {
        "CodeRepository": {
          "$ref": "#/$defs/CodeRepository"
        },
        "ImageRepository": {
          "$ref": "#/$defs/ImageRepository"
        },
        "AutoDeploymentsEnabled": {
          "description": "Auto Deployment enabled",
          "type": "boolean"
        },
        "AuthenticationConfiguration": {
          "$ref": "#/$defs/AuthenticationConfiguration"
        }
      },
      "title": "AWSAppRunnerServiceSourceConfigurationDefinition",
      "additionalProperties": false
    },
    "CodeRepository": {
      "description": "Source Code Repository",
      "type": "object",
      "properties": {
        "RepositoryUrl": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Repository Url"
        },
        "SourceCodeVersion": {
          "$ref": "#/$defs/SourceCodeVersion"
        },
        "CodeConfiguration": {
          "$ref": "#/$defs/CodeConfiguration"
        }
      },
      "required": [
        "RepositoryUrl",
        "SourceCodeVersion"
      ],
      "title": "AWSAppRunnerServiceCodeRepositoryDefinition",
      "additionalProperties": false
    },
    "SourceCodeVersion": {
      "description": "Source Code Version",
      "type": "object",
      "properties": {
        "Type": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "BRANCH"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Source Code Version Type"
        },
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Source Code Version Value"
        }
      },
      "required": [
        "Type",
        "Value"
      ],
      "title": "AWSAppRunnerServiceSourceCodeVersionDefinition",
      "additionalProperties": false
    },
    "CodeConfiguration": {
      "description": "Code Configuration",
      "type": "object",
      "properties": {
        "ConfigurationSource": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "REPOSITORY",
                "API"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Configuration Source"
        },
        "CodeConfigurationValues": {
          "$ref": "#/$defs/CodeConfigurationValues"
        }
      },
      "required": [
        "ConfigurationSource"
      ],
      "title": "AWSAppRunnerServiceCodeConfigurationDefinition",
      "additionalProperties": false
    },
    "CodeConfigurationValues": {
      "description": "Code Configuration Values",
      "type": "object",
      "properties": {
        "Runtime": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "PYTHON_3",
                "NODEJS_12",
                "NODEJS_14",
                "CORRETTO_8",
                "CORRETTO_11",
                "NODEJS_16",
                "GO_1",
                "DOTNET_6",
                "PHP_81",
                "RUBY_31"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Runtime"
        },
        "BuildCommand": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Build Command"
        },
        "StartCommand": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Start Command"
        },
        "Port": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Port"
        },
        "RuntimeEnvironmentVariables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyValuePair"
          }
        },
        "RuntimeEnvironmentSecrets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyValuePair"
          },
          "description": "The secrets and parameters that get referenced by your service as environment variables"
        }
      },
      "required": [
        "Runtime"
      ],
      "title": "AWSAppRunnerServiceCodeConfigurationValuesDefinition",
      "additionalProperties": false
    },
    "ImageRepository": {
      "description": "Image Repository",
      "type": "object",
      "properties": {
        "ImageIdentifier": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024,
              "pattern": "([0-9]{12}.dkr.ecr.[a-z\\-]+-[0-9]{1}.amazonaws.com\\/.*)|(^public\\.ecr\\.aws\\/.+\\/.+)"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Image Identifier"
        },
        "ImageConfiguration": {
          "$ref": "#/$defs/ImageConfiguration"
        },
        "ImageRepositoryType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "ECR",
                "ECR_PUBLIC"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Image Repository Type"
        }
      },
      "required": [
        "ImageIdentifier",
        "ImageRepositoryType"
      ],
      "title": "AWSAppRunnerServiceImageRepositoryDefinition",
      "additionalProperties": false
    },
    "ImageConfiguration": {
      "description": "Image Configuration",
      "type": "object",
      "properties": {
        "StartCommand": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Start Command"
        },
        "Port": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Port"
        },
        "RuntimeEnvironmentVariables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyValuePair"
          }
        },
        "RuntimeEnvironmentSecrets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KeyValuePair"
          },
          "description": "The secrets and parameters that get referenced by your service as environment variables"
        }
      },
      "title": "AWSAppRunnerServiceImageConfigurationDefinition",
      "additionalProperties": false
    },
    "AuthenticationConfiguration": {
      "description": "Authentication Configuration",
      "type": "object",
      "properties": {
        "ConnectionArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1011,
              "pattern": "arn:aws(-[\\w]+)*:[a-z0-9-\\\\.]{0,63}:[a-z0-9-\\\\.]{0,63}:[0-9]{12}:(\\w|\\/|-){1,1011}"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Connection Arn"
        },
        "AccessRoleArn": {
          "description": "Access Role Arn",
          "$ref": "#/$defs/RoleArn"
        }
      },
      "title": "AWSAppRunnerServiceAuthenticationConfigurationDefinition",
      "additionalProperties": false
    },
    "InstanceConfiguration": {
      "description": "Instance Configuration",
      "type": "object",
      "properties": {
        "Cpu": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 3,
              "maxLength": 9,
              "pattern": "256|512|1024|2048|4096|(0.25|0.5|1|2|4) vCPU"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "CPU"
        },
        "Memory": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 3,
              "maxLength": 6,
              "pattern": "512|1024|2048|3072|4096|6144|8192|10240|12288|(0.5|1|2|3|4|6|8|10|12) GB"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Memory"
        },
        "InstanceRoleArn": {
          "description": "Instance Role Arn",
          "$ref": "#/$defs/RoleArn"
        }
      },
      "title": "AWSAppRunnerServiceInstanceConfigurationDefinition",
      "additionalProperties": false
    },
    "RoleArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 29,
          "maxLength": 1024,
          "pattern": "arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):iam::[0-9]{12}:role/[\\w+=,.@-]{1,64}"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSAppRunnerServiceRoleArnDefinition"
    },
    "EncryptionConfiguration": {
      "description": "Encryption configuration (KMS key)",
      "type": "object",
      "properties": {
        "KmsKey": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256,
              "pattern": "arn:aws(-[\\w]+)*:kms:[a-z\\-]+-[0-9]{1}:[0-9]{12}:key\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The KMS Key"
        }
      },
      "required": [
        "KmsKey"
      ],
      "title": "AWSAppRunnerServiceEncryptionConfigurationDefinition",
      "additionalProperties": false
    },
    "HealthCheckConfiguration": {
      "description": "Health check configuration",
      "type": "object",
      "properties": {
        "Protocol": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "TCP",
                "HTTP"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Health Check Protocol"
        },
        "Path": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Health check Path"
        },
        "Interval": {
          "type": "integer",
          "description": "Health check Interval"
        },
        "Timeout": {
          "type": "integer",
          "description": "Health check Timeout",
          "minimum": 1,
          "maximum": 20
        },
        "HealthyThreshold": {
          "type": "integer",
          "description": "Health check Healthy Threshold",
          "minimum": 1,
          "maximum": 20
        },
        "UnhealthyThreshold": {
          "type": "integer",
          "description": "Health check Unhealthy Threshold",
          "minimum": 1,
          "maximum": 20
        }
      },
      "title": "AWSAppRunnerServiceHealthCheckConfigurationDefinition",
      "additionalProperties": false
    },
    "EgressConfiguration": {
      "description": "Network egress configuration",
      "type": "object",
      "properties": {
        "EgressType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "DEFAULT",
                "VPC"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Network egress type."
        },
        "VpcConnectorArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 44,
              "maxLength": 1011,
              "pattern": "arn:aws(-[\\w]+)*:[a-z0-9-\\\\.]{0,63}:[a-z0-9-\\\\.]{0,63}:[0-9]{12}:(\\w|\\/|-){1,1011}"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the App Runner VpcConnector."
        }
      },
      "required": [
        "EgressType"
      ],
      "title": "AWSAppRunnerServiceEgressConfigurationDefinition",
      "additionalProperties": false
    },
    "IngressConfiguration": {
      "description": "Network ingress configuration",
      "type": "object",
      "properties": {
        "IsPubliclyAccessible": {
          "description": "It's set to true if the Apprunner service is publicly accessible. It's set to false otherwise.",
          "type": "boolean"
        }
      },
      "required": [
        "IsPubliclyAccessible"
      ],
      "title": "AWSAppRunnerServiceIngressConfigurationDefinition",
      "additionalProperties": false
    },
    "NetworkConfiguration": {
      "description": "Network configuration",
      "type": "object",
      "properties": {
        "EgressConfiguration": {
          "$ref": "#/$defs/EgressConfiguration"
        },
        "IngressConfiguration": {
          "$ref": "#/$defs/IngressConfiguration"
        }
      },
      "title": "AWSAppRunnerServiceNetworkConfigurationDefinition",
      "additionalProperties": false
    },
    "ServiceObservabilityConfiguration": {
      "description": "Service observability configuration",
      "type": "object",
      "properties": {
        "ObservabilityEnabled": {
          "description": "Observability enabled",
          "type": "boolean"
        },
        "ObservabilityConfigurationArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1011,
              "pattern": "arn:aws(-[\\w]+)*:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[0-9]{12}:(\\w|/|-){1,1011}"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the App Runner ObservabilityConfiguration."
        }
      },
      "required": [
        "ObservabilityEnabled"
      ],
      "title": "AWSAppRunnerServiceServiceObservabilityConfigurationDefinition",
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSAppRunnerServiceTagDefinition",
      "additionalProperties": false
    },
    "KeyValuePair": {
      "type": "object",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSAppRunnerServiceKeyValuePairDefinition",
      "additionalProperties": false
    }
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apprunner.git",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/ServiceArn"
  ],
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": false,
    "cloudFormationSystemTags": false,
    "tagProperty": "/properties/Tags"
  },
  "required": [
    "SourceConfiguration"
  ],
  "createOnlyProperties": [
    "/properties/ServiceName",
    "/properties/EncryptionConfiguration",
    "/properties/Tags"
  ],
  "readOnlyProperties": [
    "/properties/ServiceArn",
    "/properties/ServiceId",
    "/properties/ServiceUrl",
    "/properties/Status"
  ],
  "writeOnlyProperties": [
    "/properties/Tags",
    "/properties/AutoScalingConfigurationArn"
  ]
}
