{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/ServiceType",
  "/properties/ServiceDetails/Dynatrace",
  "/properties/ServiceDetails/MCPServer",
  "/properties/ServiceDetails/MCPServerSplunk",
  "/properties/ServiceDetails/MCPServerNewRelic",
  "/properties/ServiceDetails/GitLab",
  "/properties/ServiceDetails/ServiceNow",
  "/properties/ServiceDetails/PagerDuty",
  "/properties/ServiceDetails/AzureIdentity",
  "/properties/ServiceDetails/MCPServerGrafana",
  "/properties/KmsKeyArn"
 ],
 "definitions": {
  "AdditionalServiceDetails": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "MCPServer": {
       "$ref": "#/definitions/RegisteredMCPServerDetails"
      }
     },
     "required": [
      "MCPServer"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "GitLab": {
       "$ref": "#/definitions/RegisteredGitLabServiceDetails"
      }
     },
     "required": [
      "GitLab"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServerSplunk": {
       "$ref": "#/definitions/RegisteredMCPServerDetails"
      }
     },
     "required": [
      "MCPServerSplunk"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServerNewRelic": {
       "$ref": "#/definitions/RegisteredNewRelicDetails"
      }
     },
     "required": [
      "MCPServerNewRelic"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "Dynatrace": {
       "$ref": "#/definitions/RegisteredDynatraceDetails"
      }
     },
     "required": [
      "Dynatrace"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "ServiceNow": {
       "$ref": "#/definitions/RegisteredServiceNowDetails"
      }
     },
     "required": [
      "ServiceNow"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "PagerDuty": {
       "$ref": "#/definitions/RegisteredPagerDutyDetails"
      }
     },
     "required": [
      "PagerDuty"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "AzureIdentity": {
       "$ref": "#/definitions/RegisteredAzureIdentityDetails"
      }
     },
     "required": [
      "AzureIdentity"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServerSigV4": {
       "$ref": "#/definitions/RegisteredMCPServerSigV4Details"
      }
     },
     "required": [
      "MCPServerSigV4"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServerGrafana": {
       "$ref": "#/definitions/RegisteredMCPServerGrafanaDetails"
      }
     },
     "required": [
      "MCPServerGrafana"
     ]
    }
   ],
   "type": "object"
  },
  "ApiKeyDetails": {
   "additionalProperties": false,
   "properties": {
    "ApiKeyHeader": {
     "pattern": "^[a-zA-Z0-9-]+$",
     "type": "string"
    },
    "ApiKeyName": {
     "pattern": "^[a-zA-Z0-9_\\s-]+$",
     "type": "string"
    },
    "ApiKeyValue": {
     "pattern": "^[!-~]([ \\t]*[!-~])*$",
     "type": "string"
    }
   },
   "required": [
    "ApiKeyName",
    "ApiKeyValue",
    "ApiKeyHeader"
   ],
   "type": "object"
  },
  "AzureIdentityServiceDetails": {
   "additionalProperties": false,
   "properties": {
    "ClientId": {
     "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
     "type": "string"
    },
    "TenantId": {
     "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
     "type": "string"
    },
    "WebIdentityRoleArn": {
     "pattern": "^arn:aws[a-zA-Z-]*:iam::[0-9]{12}:role/.+$",
     "type": "string"
    },
    "WebIdentityTokenAudiences": {
     "items": {
      "type": "string"
     },
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "TenantId",
    "ClientId",
    "WebIdentityRoleArn",
    "WebIdentityTokenAudiences"
   ],
   "type": "object"
  },
  "BearerTokenDetails": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationHeader": {
     "default": "Authorization",
     "pattern": "^[a-zA-Z0-9-]+$",
     "type": "string"
    },
    "TokenName": {
     "pattern": "^[a-zA-Z0-9_\\s-]+$",
     "type": "string"
    },
    "TokenValue": {
     "pattern": "^[\\S]+$",
     "type": "string"
    }
   },
   "required": [
    "TokenName",
    "TokenValue"
   ],
   "type": "object"
  },
  "DynatraceAuthorizationConfig": {
   "additionalProperties": false,
   "properties": {
    "OAuthClientCredentials": {
     "$ref": "#/definitions/OAuthClientDetails"
    }
   },
   "type": "object"
  },
  "DynatraceServiceDetails": {
   "additionalProperties": false,
   "properties": {
    "AccountUrn": {
     "type": "string"
    },
    "AuthorizationConfig": {
     "$ref": "#/definitions/DynatraceAuthorizationConfig"
    }
   },
   "required": [
    "AccountUrn"
   ],
   "type": "object"
  },
  "GitLabDetails": {
   "additionalProperties": false,
   "properties": {
    "GroupId": {
     "type": "string"
    },
    "TargetUrl": {
     "pattern": "^https://[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])?(?::[0-9]{1,5})?/?$",
     "type": "string"
    },
    "TokenType": {
     "enum": [
      "personal",
      "group"
     ],
     "type": "string"
    },
    "TokenValue": {
     "pattern": "^glpat-[a-zA-Z0-9._-]+$",
     "type": "string"
    }
   },
   "required": [
    "TargetUrl",
    "TokenType",
    "TokenValue"
   ],
   "type": "object"
  },
  "MCPServerAuthorizationConfig": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "OAuthClientCredentials": {
       "$ref": "#/definitions/MCPServerOAuthClientCredentialsConfig"
      }
     },
     "required": [
      "OAuthClientCredentials"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "ApiKey": {
       "$ref": "#/definitions/ApiKeyDetails"
      }
     },
     "required": [
      "ApiKey"
     ]
    }
   ],
   "type": "object"
  },
  "MCPServerDetails": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationConfig": {
     "$ref": "#/definitions/MCPServerAuthorizationConfig"
    },
    "Description": {
     "maxLength": 500,
     "type": "string"
    },
    "Endpoint": {
     "pattern": "^https://[a-zA-Z0-9.-]+(?::[0-9]+)?(?:/.*)?$",
     "type": "string"
    },
    "Name": {
     "pattern": "^[a-zA-Z0-9_-]+$",
     "type": "string"
    }
   },
   "required": [
    "Name",
    "Endpoint",
    "AuthorizationConfig"
   ],
   "type": "object"
  },
  "MCPServerGrafanaAuthorizationConfig": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "BearerToken": {
       "$ref": "#/definitions/BearerTokenDetails"
      }
     },
     "required": [
      "BearerToken"
     ]
    }
   ],
   "type": "object"
  },
  "MCPServerGrafanaDetails": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationConfig": {
     "$ref": "#/definitions/MCPServerGrafanaAuthorizationConfig"
    },
    "Description": {
     "maxLength": 500,
     "type": "string"
    },
    "Endpoint": {
     "pattern": "^https://[a-zA-Z0-9.-]+(?::[0-9]+)?(?:/.*)?$",
     "type": "string"
    },
    "Name": {
     "pattern": "^[a-zA-Z0-9_-]+$",
     "type": "string"
    }
   },
   "required": [
    "Name",
    "Endpoint",
    "AuthorizationConfig"
   ],
   "type": "object"
  },
  "MCPServerOAuthClientCredentialsConfig": {
   "additionalProperties": false,
   "properties": {
    "ClientId": {
     "type": "string"
    },
    "ClientName": {
     "type": "string"
    },
    "ClientSecret": {
     "type": "string"
    },
    "ExchangeParameters": {
     "type": "object"
    },
    "ExchangeUrl": {
     "pattern": "^https://[a-zA-Z0-9.-]+(?::[0-9]+)?(?:/.*)?$",
     "type": "string"
    },
    "Scopes": {
     "items": {
      "type": "string"
     },
     "type": "array"
    }
   },
   "required": [
    "ClientId",
    "ClientSecret",
    "ExchangeUrl"
   ],
   "type": "object"
  },
  "MCPServerSigV4AuthorizationConfig": {
   "additionalProperties": false,
   "properties": {
    "CustomHeaders": {
     "additionalProperties": false,
     "maxProperties": 10,
     "patternProperties": {
      "^[a-zA-Z0-9-_]+$": {
       "type": "string"
      }
     },
     "type": "object"
    },
    "Region": {
     "pattern": "^(\\*|[a-z]{2,4}(-[a-z]+)+-\\d+)$",
     "type": "string"
    },
    "RoleArn": {
     "pattern": "^arn:aws:iam::\\d{12}:role/[a-zA-Z0-9+=,.@_/-]+$",
     "type": "string"
    },
    "Service": {
     "maxLength": 100,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Region",
    "Service",
    "RoleArn"
   ],
   "type": "object"
  },
  "MCPServerSigV4Details": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationConfig": {
     "$ref": "#/definitions/MCPServerSigV4AuthorizationConfig"
    },
    "Description": {
     "maxLength": 500,
     "type": "string"
    },
    "Endpoint": {
     "pattern": "^https://[a-zA-Z0-9.-]+(?::[0-9]+)?(?:/.*)?$",
     "type": "string"
    },
    "Name": {
     "pattern": "^[a-zA-Z0-9_-]+$",
     "type": "string"
    }
   },
   "required": [
    "Name",
    "Endpoint",
    "AuthorizationConfig"
   ],
   "type": "object"
  },
  "MCPServerSplunkAuthorizationConfig": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "BearerToken": {
       "$ref": "#/definitions/BearerTokenDetails"
      }
     },
     "required": [
      "BearerToken"
     ]
    }
   ],
   "type": "object"
  },
  "MCPServerSplunkDetails": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationConfig": {
     "$ref": "#/definitions/MCPServerSplunkAuthorizationConfig"
    },
    "Description": {
     "maxLength": 500,
     "type": "string"
    },
    "Endpoint": {
     "pattern": "^https://[a-zA-Z0-9.-]+(?::[0-9]+)?(?:/.*)?$",
     "type": "string"
    },
    "Name": {
     "pattern": "^[a-zA-Z0-9_-]+$",
     "type": "string"
    }
   },
   "required": [
    "Name",
    "Endpoint",
    "AuthorizationConfig"
   ],
   "type": "object"
  },
  "NewRelicApiKeyConfig": {
   "additionalProperties": false,
   "properties": {
    "AccountId": {
     "pattern": "^[0-9]+$",
     "type": "string"
    },
    "AlertPolicyIds": {
     "items": {
      "pattern": "^[0-9]+$",
      "type": "string"
     },
     "type": "array"
    },
    "ApiKey": {
     "pattern": "^NRAK-[A-Z0-9]+$",
     "type": "string"
    },
    "ApplicationIds": {
     "items": {
      "pattern": "^[0-9]+$",
      "type": "string"
     },
     "type": "array"
    },
    "EntityGuids": {
     "items": {
      "pattern": "^[a-zA-Z0-9_.-]+$",
      "type": "string"
     },
     "type": "array"
    },
    "Region": {
     "enum": [
      "US",
      "EU"
     ],
     "type": "string"
    }
   },
   "required": [
    "ApiKey",
    "AccountId",
    "Region"
   ],
   "type": "object"
  },
  "NewRelicAuthorizationConfig": {
   "additionalProperties": false,
   "properties": {
    "ApiKey": {
     "$ref": "#/definitions/NewRelicApiKeyConfig"
    }
   },
   "required": [
    "ApiKey"
   ],
   "type": "object"
  },
  "NewRelicServiceDetails": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationConfig": {
     "$ref": "#/definitions/NewRelicAuthorizationConfig"
    }
   },
   "required": [
    "AuthorizationConfig"
   ],
   "type": "object"
  },
  "OAuthClientDetails": {
   "additionalProperties": false,
   "properties": {
    "ClientId": {
     "type": "string"
    },
    "ClientName": {
     "type": "string"
    },
    "ClientSecret": {
     "type": "string"
    },
    "ExchangeParameters": {
     "type": "object"
    }
   },
   "required": [
    "ClientId",
    "ClientSecret"
   ],
   "type": "object"
  },
  "PagerDutyAuthorizationConfig": {
   "additionalProperties": false,
   "properties": {
    "OAuthClientCredentials": {
     "$ref": "#/definitions/OAuthClientDetails"
    }
   },
   "type": "object"
  },
  "PagerDutyDetails": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationConfig": {
     "$ref": "#/definitions/PagerDutyAuthorizationConfig"
    },
    "Scopes": {
     "items": {
      "type": "string"
     },
     "type": "array"
    }
   },
   "required": [
    "Scopes",
    "AuthorizationConfig"
   ],
   "type": "object"
  },
  "RegisteredAzureIdentityDetails": {
   "additionalProperties": false,
   "properties": {
    "ClientId": {
     "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
     "type": "string"
    },
    "TenantId": {
     "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
     "type": "string"
    },
    "WebIdentityRoleArn": {
     "pattern": "^arn:aws[a-zA-Z-]*:iam::[0-9]{12}:role/.+$",
     "type": "string"
    },
    "WebIdentityTokenAudiences": {
     "items": {
      "type": "string"
     },
     "type": "array"
    }
   },
   "required": [
    "TenantId",
    "ClientId",
    "WebIdentityRoleArn",
    "WebIdentityTokenAudiences"
   ],
   "type": "object"
  },
  "RegisteredDynatraceDetails": {
   "additionalProperties": false,
   "properties": {
    "AccountUrn": {
     "type": "string"
    }
   },
   "required": [
    "AccountUrn"
   ],
   "type": "object"
  },
  "RegisteredGitLabServiceDetails": {
   "additionalProperties": false,
   "properties": {
    "GroupId": {
     "type": "string"
    },
    "TargetUrl": {
     "type": "string"
    },
    "TokenType": {
     "enum": [
      "personal",
      "group"
     ],
     "type": "string"
    }
   },
   "required": [
    "TargetUrl",
    "TokenType"
   ],
   "type": "object"
  },
  "RegisteredMCPServerDetails": {
   "additionalProperties": false,
   "properties": {
    "ApiKeyHeader": {
     "type": "string"
    },
    "AuthorizationMethod": {
     "enum": [
      "oauth-client-credentials",
      "api-key",
      "bearer-token"
     ],
     "type": "string"
    },
    "Description": {
     "type": "string"
    },
    "Endpoint": {
     "type": "string"
    },
    "Name": {
     "type": "string"
    }
   },
   "required": [
    "Name",
    "Endpoint",
    "AuthorizationMethod"
   ],
   "type": "object"
  },
  "RegisteredMCPServerGrafanaDetails": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationMethod": {
     "enum": [
      "bearer-token"
     ],
     "type": "string"
    },
    "Description": {
     "type": "string"
    },
    "Endpoint": {
     "type": "string"
    },
    "Name": {
     "type": "string"
    }
   },
   "required": [
    "Endpoint",
    "AuthorizationMethod"
   ],
   "type": "object"
  },
  "RegisteredMCPServerSigV4Details": {
   "additionalProperties": false,
   "properties": {
    "CustomHeaders": {
     "additionalProperties": false,
     "patternProperties": {
      "^[a-zA-Z0-9-_]+$": {
       "type": "string"
      }
     },
     "type": "object"
    },
    "Description": {
     "type": "string"
    },
    "Endpoint": {
     "type": "string"
    },
    "Name": {
     "type": "string"
    },
    "Region": {
     "type": "string"
    },
    "RoleArn": {
     "type": "string"
    },
    "Service": {
     "type": "string"
    }
   },
   "required": [
    "Name",
    "Endpoint",
    "Region",
    "Service",
    "RoleArn"
   ],
   "type": "object"
  },
  "RegisteredNewRelicDetails": {
   "additionalProperties": false,
   "properties": {
    "AccountId": {
     "type": "string"
    },
    "Description": {
     "type": "string"
    },
    "Region": {
     "enum": [
      "US",
      "EU"
     ],
     "type": "string"
    }
   },
   "required": [
    "AccountId",
    "Region"
   ],
   "type": "object"
  },
  "RegisteredPagerDutyDetails": {
   "additionalProperties": false,
   "properties": {
    "Scopes": {
     "items": {
      "type": "string"
     },
     "type": "array"
    }
   },
   "required": [
    "Scopes"
   ],
   "type": "object"
  },
  "RegisteredServiceNowDetails": {
   "additionalProperties": false,
   "properties": {
    "InstanceUrl": {
     "type": "string"
    }
   },
   "required": [
    "InstanceUrl"
   ],
   "type": "object"
  },
  "ServiceDetails": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "Dynatrace": {
       "$ref": "#/definitions/DynatraceServiceDetails"
      }
     },
     "required": [
      "Dynatrace"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServer": {
       "$ref": "#/definitions/MCPServerDetails"
      }
     },
     "required": [
      "MCPServer"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServerSplunk": {
       "$ref": "#/definitions/MCPServerSplunkDetails"
      }
     },
     "required": [
      "MCPServerSplunk"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServerNewRelic": {
       "$ref": "#/definitions/NewRelicServiceDetails"
      }
     },
     "required": [
      "MCPServerNewRelic"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "GitLab": {
       "$ref": "#/definitions/GitLabDetails"
      }
     },
     "required": [
      "GitLab"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "ServiceNow": {
       "$ref": "#/definitions/ServiceNowServiceDetails"
      }
     },
     "required": [
      "ServiceNow"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "PagerDuty": {
       "$ref": "#/definitions/PagerDutyDetails"
      }
     },
     "required": [
      "PagerDuty"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "AzureIdentity": {
       "$ref": "#/definitions/AzureIdentityServiceDetails"
      }
     },
     "required": [
      "AzureIdentity"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServerSigV4": {
       "$ref": "#/definitions/MCPServerSigV4Details"
      }
     },
     "required": [
      "MCPServerSigV4"
     ]
    },
    {
     "additionalProperties": false,
     "properties": {
      "MCPServerGrafana": {
       "$ref": "#/definitions/MCPServerGrafanaDetails"
      }
     },
     "required": [
      "MCPServerGrafana"
     ]
    }
   ],
   "type": "object"
  },
  "ServiceId": {
   "maxLength": 255,
   "minLength": 1,
   "type": "string"
  },
  "ServiceNowAuthorizationConfig": {
   "additionalProperties": false,
   "properties": {
    "OAuthClientCredentials": {
     "$ref": "#/definitions/OAuthClientDetails"
    }
   },
   "type": "object"
  },
  "ServiceNowServiceDetails": {
   "additionalProperties": false,
   "properties": {
    "AuthorizationConfig": {
     "$ref": "#/definitions/ServiceNowAuthorizationConfig"
    },
    "InstanceUrl": {
     "pattern": "^https://[a-zA-Z0-9-]+\\.service-now\\.com/?$",
     "type": "string"
    }
   },
   "required": [
    "InstanceUrl"
   ],
   "type": "object"
  },
  "ServiceType": {
   "enum": [
    "dynatrace",
    "mcpserver",
    "mcpserversplunk",
    "mcpservernewrelic",
    "gitlab",
    "servicenow",
    "pagerduty",
    "azureidentity",
    "mcpserversigv4",
    "mcpservergrafana"
   ],
   "type": "string"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/ServiceId"
 ],
 "properties": {
  "AccessibleResources": {
   "items": {
    "patternProperties": {
     ".*": {
      "type": "string"
     }
    },
    "type": "object"
   },
   "type": "array"
  },
  "AdditionalServiceDetails": {
   "$ref": "#/definitions/AdditionalServiceDetails"
  },
  "Arn": {
   "type": "string"
  },
  "KmsKeyArn": {
   "format": "AWS::KMS::Key.Arn",
   "maxLength": 2048,
   "minLength": 1,
   "pattern": "^arn:aws[a-zA-Z-]*:kms:[a-z0-9-]+:[0-9]{12}:key/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
   "type": "string"
  },
  "ServiceDetails": {
   "$ref": "#/definitions/ServiceDetails"
  },
  "ServiceId": {
   "$ref": "#/definitions/ServiceId"
  },
  "ServiceType": {
   "$ref": "#/definitions/ServiceType"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": true
  }
 },
 "readOnlyProperties": [
  "/properties/ServiceId",
  "/properties/AccessibleResources",
  "/properties/AdditionalServiceDetails",
  "/properties/Arn"
 ],
 "required": [
  "ServiceType"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::DevOpsAgent::Service",
 "writeOnlyProperties": [
  "/properties/ServiceDetails"
 ]
}
