{
  "typeName" : "AWS::Detective::MemberInvitation",
  "description" : "Resource schema for AWS::Detective::MemberInvitation",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-detective.git",
  "properties" : {
    "GraphArn" : {
      "description" : "The ARN of the graph to which the member account will be invited",
      "type" : "string",
      "pattern" : "arn:aws(-[\\w]+)*:detective:(([a-z]+-)+[0-9]+):[0-9]{12}:graph:[0-9a-f]{32}"
    },
    "MemberId" : {
      "description" : "The AWS account ID to be invited to join the graph as a member",
      "type" : "string",
      "pattern" : "[0-9]{12}"
    },
    "MemberEmailAddress" : {
      "description" : "The root email address for the account to be invited, for validation. Updating this field has no effect.",
      "type" : "string",
      "pattern" : ".*@.*"
    },
    "DisableEmailNotification" : {
      "description" : "When set to true, invitation emails are not sent to the member accounts. Member accounts must still accept the invitation before they are added to the behavior graph. Updating this field has no effect.",
      "type" : "boolean",
      "default" : false
    },
    "Message" : {
      "description" : "A message to be included in the email invitation sent to the invited account. Updating this field has no effect.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1000
    }
  },
  "additionalProperties" : false,
  "required" : [ "GraphArn", "MemberId", "MemberEmailAddress" ],
  "primaryIdentifier" : [ "/properties/GraphArn", "/properties/MemberId" ],
  "createOnlyProperties" : [ "/properties/GraphArn", "/properties/MemberId" ],
  "writeOnlyProperties" : [ "/properties/Message", "/properties/DisableEmailNotification" ],
  "tagging" : {
    "taggable" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "detective:CreateMembers", "detective:GetMembers" ]
    },
    "read" : {
      "permissions" : [ "detective:GetMembers" ]
    },
    "update" : {
      "permissions" : [ ]
    },
    "delete" : {
      "permissions" : [ "detective:DeleteMembers" ]
    },
    "list" : {
      "permissions" : [ "detective:ListGraphs", "detective:ListMembers" ]
    }
  }
}