{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-vpc-lattice/json-schema/amazon-vpc-lattice-create-resource-configuration-request-schema.json",
  "title": "CreateResourceConfigurationRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-vpc-lattice-createresourceconfiguration-api-openapi.yml#/components/schemas/CreateResourceConfigurationRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the resource configuration. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen."
    },
    "type": {
      "type": "string",
      "enum": [
        "GROUP",
        "CHILD",
        "SINGLE",
        "ARN",
        "CIDR"
      ],
      "description": "The type of resource configuration. A resource configuration can be one of the following types: SINGLE - A single resource. GROUP - A group of resources. You must create a group resource configuration before you create a child resource configuration. CHILD - A single resource that is part of a group resource configuration. ARN - An Amazon Web Services resource. CIDR - A network segment, expressed as a range of IP addresses (a CIDR block). Use this type to share a portion of your network rather than an individual resource. A consumer accesses the resources within the CIDR range through a Tunnel"
    },
    "portRanges": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "(SINGLE, GROUP, CHILD, CIDR) The port ranges that a consumer can use to access a resource configuration (for example: 1-65535). You can separate port ranges using commas (for example: 1,2,22-30). To resolve DNS through a CIDR resource configuration, include port 53 in the port ranges."
    },
    "protocol": {
      "type": "string",
      "enum": [
        "TCP",
        "TCP_UDP"
      ],
      "description": "(SINGLE, GROUP, CIDR) The protocol accepted by the resource configuration. The default is TCP. TCP_UDP is supported only for CIDR resource configurations; specify it for a CIDR resource configuration to allow DNS resolution, which uses UDP."
    },
    "resourceGatewayIdentifier": {
      "type": "string",
      "description": "(SINGLE, GROUP, ARN, CIDR) The ID or ARN of the resource gateway used to connect to the resource configuration. For a child resource configuration, this value is inherited from the parent resource configuration. For a CIDR resource configuration, the associated resource gateway must have its DNS resolution set to IN_VPC so that DNS queries resolve in the context of your VPC."
    },
    "resourceConfigurationGroupIdentifier": {
      "type": "string",
      "description": "(CHILD) The ID or ARN of the parent resource configuration of type GROUP. This is used to associate a child resource configuration with a group resource configuration."
    },
    "resourceConfigurationDefinition": {
      "$ref": "#/$defs/ResourceConfigurationDefinition"
    },
    "allowAssociationToShareableServiceNetwork": {
      "type": "boolean",
      "description": "(SINGLE, GROUP, ARN) Specifies whether the resource configuration can be associated with a sharable service network. The default is false."
    },
    "customDomainName": {
      "type": "string",
      "description": "A custom domain name for your resource configuration. Additionally, provide a DomainVerificationID to prove your ownership of a domain."
    },
    "groupDomain": {
      "type": "string",
      "description": "(GROUP) The group domain for a group resource configuration. Any domains that you create for the child resource are subdomains of the group domain. Child resources inherit the verification status of the domain."
    },
    "domainVerificationIdentifier": {
      "type": "string",
      "description": "The domain verification ID of your verified custom domain name. If you don't provide an ID, you must configure the DNS settings yourself."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags for the resource configuration."
    }
  },
  "required": [
    "name",
    "type"
  ],
  "$defs": {
    "ArnResource": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the resource."
        }
      }
    },
    "CidrResource": {
      "type": "object",
      "properties": {
        "cidrRanges": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The CIDR ranges of the network segment, for example, 10.0.0.0/16."
        }
      }
    },
    "DnsResource": {
      "type": "object",
      "properties": {
        "domainName": {
          "type": "string",
          "description": "The domain name of the resource."
        },
        "ipAddressType": {
          "type": "string",
          "description": "The type of IP address. Dualstack is currently not supported."
        }
      }
    },
    "IpResource": {
      "type": "object",
      "properties": {
        "ipAddress": {
          "type": "string",
          "description": "The IP address of the IP resource."
        }
      }
    },
    "ResourceConfigurationDefinition": {
      "type": "object",
      "properties": {
        "dnsResource": {
          "$ref": "#/$defs/DnsResource"
        },
        "ipResource": {
          "$ref": "#/$defs/IpResource"
        },
        "arnResource": {
          "$ref": "#/$defs/ArnResource"
        },
        "cidrResource": {
          "$ref": "#/$defs/CidrResource"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}