{
  "typeName" : "AWS::Signer::SigningProfile",
  "description" : "A signing profile is a signing template that can be used to carry out a pre-defined signing job.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "definitions" : {
    "PlatformId" : {
      "type" : "string",
      "enum" : [ "AWSLambda-SHA384-ECDSA", "Notation-OCI-SHA384-ECDSA" ]
    },
    "Arn" : {
      "type" : "string",
      "pattern" : "^arn:aws(-[a-z]{1,4}){0,2}:[a-z-]+:(([a-z]+-)+[0-9])?:([0-9]{12})?:[^.]+$"
    },
    "ProfileName" : {
      "type" : "string",
      "minLength" : 2,
      "maxLength" : 64,
      "pattern" : "^[0-9a-zA-Z_]{2,64}$"
    },
    "ProfileVersion" : {
      "type" : "string",
      "pattern" : "^[0-9a-zA-Z]{10}$"
    },
    "SignatureValidityPeriod" : {
      "type" : "object",
      "properties" : {
        "Value" : {
          "type" : "integer"
        },
        "Type" : {
          "type" : "string",
          "enum" : [ "DAYS", "MONTHS", "YEARS" ]
        }
      },
      "additionalProperties" : false
    },
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 127,
          "pattern" : "^(?!aws:)[a-zA-Z+-=._:/]+$"
        },
        "Value" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 255
        }
      },
      "additionalProperties" : false
    }
  },
  "properties" : {
    "ProfileName" : {
      "description" : "A name for the signing profile. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the signing profile name. ",
      "$ref" : "#/definitions/ProfileName"
    },
    "ProfileVersion" : {
      "description" : "A version for the signing profile. AWS Signer generates a unique version for each profile of the same profile name.",
      "$ref" : "#/definitions/ProfileVersion"
    },
    "Arn" : {
      "description" : "The Amazon Resource Name (ARN) of the specified signing profile.",
      "$ref" : "#/definitions/Arn"
    },
    "ProfileVersionArn" : {
      "description" : "The Amazon Resource Name (ARN) of the specified signing profile version.",
      "$ref" : "#/definitions/Arn"
    },
    "SignatureValidityPeriod" : {
      "description" : "Signature validity period of the profile.",
      "$ref" : "#/definitions/SignatureValidityPeriod"
    },
    "PlatformId" : {
      "description" : "The ID of the target signing platform.",
      "$ref" : "#/definitions/PlatformId"
    },
    "Tags" : {
      "type" : "array",
      "description" : "A list of tags associated with the signing profile.",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "additionalProperties" : false,
  "required" : [ "PlatformId" ],
  "createOnlyProperties" : [ "/properties/ProfileName", "/properties/PlatformId", "/properties/SignatureValidityPeriod" ],
  "readOnlyProperties" : [ "/properties/ProfileName", "/properties/ProfileVersion", "/properties/Arn", "/properties/ProfileVersionArn" ],
  "primaryIdentifier" : [ "/properties/Arn" ],
  "additionalIdentifiers" : [ [ "/properties/ProfileName" ], [ "/properties/ProfileVersionArn" ] ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "signer:TagResource", "signer:UntagResource", "signer:ListTagsForResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "signer:PutSigningProfile", "signer:TagResource" ]
    },
    "read" : {
      "permissions" : [ "signer:GetSigningProfile" ]
    },
    "delete" : {
      "permissions" : [ "signer:CancelSigningProfile", "signer:GetSigningProfile" ]
    },
    "list" : {
      "permissions" : [ "signer:ListSigningProfiles" ]
    },
    "update" : {
      "permissions" : [ "signer:TagResource", "signer:UntagResource", "signer:GetSigningProfile" ]
    }
  }
}