{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-resilience-hub/json-schema/amazon-resilience-hub-add-draft-app-version-resource-mappings-response-schema.json",
  "title": "AddDraftAppVersionResourceMappingsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-resilience-hub-resource-management-api-openapi.yml#/components/schemas/AddDraftAppVersionResourceMappingsResponse",
  "type": "object",
  "properties": {
    "appArn": {
      "type": "string",
      "description": "Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide."
    },
    "appVersion": {
      "type": "string",
      "description": "The version of the application."
    },
    "resourceMappings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResourceMapping"
      },
      "description": "List of sources that are used to map a logical resource from the template to a physical resource. You can use sources such as CloudFormation, Terraform state files, AppRegistry applications, or Amazon EKS."
    }
  },
  "required": [
    "appArn",
    "appVersion",
    "resourceMappings"
  ],
  "$defs": {
    "PhysicalResourceId": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string",
          "description": "Identifier of the physical resource."
        },
        "type": {
          "type": "string",
          "enum": [
            "Arn",
            "Native"
          ],
          "description": "Specifies the type of physical resource identifier. Arn The resource identifier is an Amazon Resource Name (ARN) and it can identify the following list of resources: AWS::ECS::Service AWS::EFS::FileSystem AWS::ElasticLoadBalancingV2::LoadBalancer AWS::Lambda::Function AWS::SNS::Topic Native The resource identifier is an Resilience Hub-native identifier and it can identify the following list of resources: AWS::ApiGateway::RestApi AWS::ApiGatewayV2::Api AWS::AutoScaling::AutoScalingGroup AWS::DocDB::DBCluster AWS::DocDB::DBGlobalCluster AWS::DocDB::DBInstance AWS::DynamoDB::GlobalTable AWS::Dyna"
        },
        "awsRegion": {
          "type": "string",
          "description": "The Amazon Web Services Region that the physical resource is located in."
        },
        "awsAccountId": {
          "type": "string",
          "description": "The Amazon Web Services account that owns the physical resource."
        }
      },
      "required": [
        "identifier",
        "type"
      ]
    },
    "ResourceMapping": {
      "type": "object",
      "properties": {
        "resourceName": {
          "type": "string",
          "description": "Name of the resource that this resource is mapped to when the mappingType is Resource."
        },
        "logicalStackName": {
          "type": "string",
          "description": "Name of the CloudFormation stack this resource is mapped to when the mappingType is CfnStack."
        },
        "appRegistryAppName": {
          "type": "string",
          "description": "Name of the application this resource is mapped to when the mappingType is AppRegistryApp."
        },
        "resourceGroupName": {
          "type": "string",
          "description": "Name of the Resource Groups that this resource is mapped to when the mappingType is ResourceGroup."
        },
        "mappingType": {
          "type": "string",
          "enum": [
            "CfnStack",
            "Resource",
            "AppRegistryApp",
            "ResourceGroup",
            "Terraform",
            "EKS"
          ],
          "description": "Specifies the type of resource mapping."
        },
        "physicalResourceId": {
          "$ref": "#/$defs/PhysicalResourceId"
        },
        "terraformSourceName": {
          "type": "string",
          "description": "Name of the Terraform source that this resource is mapped to when the mappingType is Terraform."
        },
        "eksSourceName": {
          "type": "string",
          "description": "Name of the Amazon Elastic Kubernetes Service cluster and namespace that this resource is mapped to when the mappingType is EKS. This parameter accepts values in \"eks-cluster/namespace\" format."
        }
      },
      "required": [
        "mappingType",
        "physicalResourceId"
      ]
    }
  }
}