{
  "typeName" : "AWS::BedrockAgentCore::ResourcePolicy",
  "description" : "Resource Type definition for AWS::BedrockAgentCore::ResourcePolicy",
  "properties" : {
    "ResourceArn" : {
      "type" : "string",
      "description" : "The Amazon Resource Name (ARN) of the resource for which to create or update the resource policy.",
      "minLength" : 20,
      "maxLength" : 1011,
      "pattern" : "^arn:[a-z0-9-]+:bedrock-agentcore:[a-z0-9-]*:[0-9]{12}:.+$"
    },
    "Policy" : {
      "type" : "string",
      "description" : "The resource policy to create or update.",
      "minLength" : 1,
      "maxLength" : 20480
    }
  },
  "additionalProperties" : false,
  "required" : [ "ResourceArn", "Policy" ],
  "createOnlyProperties" : [ "/properties/ResourceArn" ],
  "primaryIdentifier" : [ "/properties/ResourceArn" ],
  "tagging" : {
    "taggable" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "bedrock-agentcore:PutResourcePolicy", "bedrock-agentcore:GetResourcePolicy" ]
    },
    "read" : {
      "permissions" : [ "bedrock-agentcore:GetResourcePolicy" ]
    },
    "update" : {
      "permissions" : [ "bedrock-agentcore:PutResourcePolicy", "bedrock-agentcore:GetResourcePolicy" ]
    },
    "delete" : {
      "permissions" : [ "bedrock-agentcore:DeleteResourcePolicy", "bedrock-agentcore:GetResourcePolicy" ]
    },
    "list" : {
      "permissions" : [ "bedrock-agentcore:GetResourcePolicy" ],
      "handlerSchema" : {
        "properties" : {
          "ResourceArn" : {
            "type" : "string",
            "minLength" : 20,
            "maxLength" : 1011
          }
        },
        "required" : [ "ResourceArn" ]
      }
    }
  }
}