{
  "typeName" : "AWS::Kinesis::ResourcePolicy",
  "description" : "Resource Type definition for AWS::Kinesis::ResourcePolicy",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-kinesis.git",
  "properties" : {
    "ResourceArn" : {
      "description" : "The ARN of the AWS Kinesis resource to which the policy applies.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048,
      "pattern" : "arn:aws.*:kinesis:.*:\\d{12}:stream/\\S+",
      "anyOf" : [ {
        "relationshipRef" : {
          "typeName" : "AWS::Kinesis::Stream",
          "propertyPath" : "/properties/Arn"
        }
      }, {
        "relationshipRef" : {
          "typeName" : "AWS::Kinesis::StreamConsumer",
          "propertyPath" : "/properties/ConsumerARN"
        }
      } ]
    },
    "ResourcePolicy" : {
      "description" : "A policy document containing permissions to add to the specified resource. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM.",
      "type" : "object"
    }
  },
  "additionalProperties" : false,
  "required" : [ "ResourceArn", "ResourcePolicy" ],
  "createOnlyProperties" : [ "/properties/ResourceArn" ],
  "primaryIdentifier" : [ "/properties/ResourceArn" ],
  "tagging" : {
    "taggable" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "kinesis:GetResourcePolicy", "kinesis:PutResourcePolicy" ]
    },
    "read" : {
      "permissions" : [ "kinesis:GetResourcePolicy" ]
    },
    "update" : {
      "permissions" : [ "kinesis:PutResourcePolicy", "kinesis:GetResourcePolicy" ]
    },
    "delete" : {
      "permissions" : [ "kinesis:DeleteResourcePolicy", "kinesis:GetResourcePolicy" ]
    }
  }
}