{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-eks/json-schema/amazon-eks-create-capability-request-schema.json",
  "title": "CreateCapabilityRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-eks-capabilities-api-openapi.yml#/components/schemas/CreateCapabilityRequest",
  "type": "object",
  "properties": {
    "capabilityName": {
      "type": "string",
      "description": "A unique name for the capability. The name must be unique within your cluster and can contain alphanumeric characters, hyphens, and underscores."
    },
    "clusterName": {
      "type": "string",
      "description": "The name of the Amazon EKS cluster where you want to create the capability."
    },
    "clientRequestToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is valid for 24 hours after creation. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned."
    },
    "type": {
      "type": "string",
      "enum": [
        "ACK",
        "KRO",
        "ARGOCD"
      ],
      "description": "The type of capability to create. Valid values are: ACK – Amazon Web Services Controllers for Kubernetes (ACK), which lets you manage resources directly from Kubernetes. ARGOCD – Argo CD for GitOps-based continuous delivery. KRO – Kube Resource Orchestrator (KRO) for composing and managing custom Kubernetes resources."
    },
    "roleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role that the capability uses to interact with Amazon Web Services services. This role must have a trust policy that allows the EKS service principal to assume it, and it must have the necessary permissions for the capability type you're creating. For ACK capabilities, the role needs permissions to manage the resources you want to control through Kubernetes. For Argo CD capabilities, the role needs permissions to access Git repositories and Secrets Manager. For KRO capabilities, the role needs permissions based on the resources you'll be orchestrating."
    },
    "configuration": {
      "$ref": "#/$defs/CapabilityConfigurationRequest"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "deletePropagationPolicy": {
      "type": "string",
      "enum": [
        "RETAIN"
      ],
      "description": "Specifies how Kubernetes resources managed by the capability should be handled when the capability is deleted. Currently, the only supported value is RETAIN which retains all Kubernetes resources managed by the capability when the capability is deleted. Because resources are retained, all Kubernetes resources created by the capability should be deleted from the cluster before deleting the capability itself. After the capability is deleted, these resources become difficult to manage because the controller is no longer available."
    }
  },
  "required": [
    "capabilityName",
    "clusterName",
    "type",
    "roleArn",
    "deletePropagationPolicy"
  ],
  "$defs": {
    "AckConfigRequest": {
      "type": "object",
      "properties": {
        "enableCrossNamespace": {
          "type": "boolean",
          "description": "Specifies whether ACK controllers resolve resource references to resources in a different Kubernetes namespace. Set this value to true to allow references to resolve to resources in another namespace. If you don't specify this value, or you omit the ack configuration entirely, the capability is created with this value set to false and references must remain within the same namespace."
        },
        "disabledServices": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of ACK service names whose controllers are turned off for this capability, for example s3, ec2, and iam. Resources of a disabled service aren't reconciled until you re-enable the service. To keep all services enabled, omit this field or specify an empty list. An unrecognized service name is accepted and stored but turns nothing off, and DescribeCapability returns the list exactly as you supplied it. For more information, see ACK capability configuration options in the Amazon EKS User Guide."
        }
      }
    },
    "ArgoCdAwsIdcConfigRequest": {
      "type": "object",
      "properties": {
        "idcInstanceArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM Identity CenterIAM; Identity Center instance to use for authentication."
        },
        "idcRegion": {
          "type": "string",
          "description": "The Region where your IAM Identity CenterIAM; Identity Center instance is located."
        }
      },
      "required": [
        "idcInstanceArn"
      ]
    },
    "ArgoCdConfigRequest": {
      "type": "object",
      "properties": {
        "namespace": {
          "type": "string",
          "description": "The Kubernetes namespace where Argo CD resources will be created. If not specified, the default namespace is used."
        },
        "awsIdc": {
          "$ref": "#/$defs/ArgoCdAwsIdcConfigRequest"
        },
        "rbacRoleMappings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ArgoCdRoleMapping"
          },
          "description": "A list of role mappings that define which IAM Identity CenterIAM; Identity Center users or groups have which Argo CD roles. Each mapping associates an Argo CD role (ADMIN, EDITOR, or VIEWER) with one or more IAM Identity CenterIAM; Identity Center identities."
        },
        "networkAccess": {
          "$ref": "#/$defs/ArgoCdNetworkAccessConfigRequest"
        },
        "endpointPrefix": {
          "type": "string",
          "description": "An optional prefix used to construct the hostname of the Argo CD server endpoint. If not specified, Amazon EKS automatically generates the endpoint. This value can't be changed after the capability is created."
        }
      },
      "required": [
        "awsIdc"
      ]
    },
    "ArgoCdNetworkAccessConfigRequest": {
      "type": "object",
      "properties": {
        "vpceIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of VPC endpoint IDs to associate with the managed Argo CD API server endpoint. Each VPC endpoint provides private connectivity from a specific VPC to the Argo CD server. You can specify multiple VPC endpoint IDs to enable access from multiple VPCs."
        }
      }
    },
    "ArgoCdRoleMapping": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "ADMIN",
            "EDITOR",
            "VIEWER"
          ],
          "description": "The Argo CD role to assign. Valid values are: ADMIN – Full administrative access to Argo CD. EDITOR – Edit access to Argo CD resources. VIEWER – Read-only access to Argo CD resources."
        },
        "identities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SsoIdentity"
          },
          "description": "A list of IAM Identity CenterIAM; Identity Center identities (users or groups) that should be assigned this Argo CD role."
        }
      },
      "required": [
        "role",
        "identities"
      ]
    },
    "CapabilityConfigurationRequest": {
      "type": "object",
      "properties": {
        "argoCd": {
          "$ref": "#/$defs/ArgoCdConfigRequest"
        },
        "ack": {
          "$ref": "#/$defs/AckConfigRequest"
        }
      }
    },
    "SsoIdentity": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier of the IAM Identity CenterIAM; Identity Center user or group."
        },
        "type": {
          "type": "string",
          "enum": [
            "SSO_USER",
            "SSO_GROUP"
          ],
          "description": "The type of identity. Valid values are SSO_USER or SSO_GROUP."
        }
      },
      "required": [
        "id",
        "type"
      ]
    }
  }
}