{
    "version": "1.0",
    "parameters": {
        "Region": {
            "required": false,
            "type": "String",
            "builtIn": "AWS::Region",
            "documentation": "The AWS region of the service."
        },
        "Endpoint": {
            "required": false,
            "type": "String",
            "builtIn": "SDK::Endpoint",
            "documentation": "Override the endpoint used to send requests."
        }
    },
    "rules": [
        {
            "documentation": "Explicit endpoint override wins.",
            "type": "endpoint",
            "conditions": [
                {
                    "fn": "isSet",
                    "argv": [
                        {
                            "ref": "Endpoint"
                        }
                    ]
                }
            ],
            "endpoint": {
                "url": {
                    "ref": "Endpoint"
                }
            }
        },
        {
            "documentation": "Region-based production endpoint.",
            "type": "endpoint",
            "conditions": [
                {
                    "fn": "isSet",
                    "argv": [
                        {
                            "ref": "Region"
                        }
                    ]
                }
            ],
            "endpoint": {
                "url": "https://agent-registry-control.{Region}.api.aws"
            }
        },
        {
            "documentation": "Region is required to resolve an endpoint.",
            "type": "error",
            "conditions": [],
            "error": "Unable to resolve an Agent Registry Control endpoint: Region was not set and no explicit Endpoint override was provided."
        }
    ]
}