{
  "typeName" : "AWS::Lambda::CodeSigningConfig",
  "description" : "Resource Type definition for AWS::Lambda::CodeSigningConfig.",
  "additionalProperties" : false,
  "properties" : {
    "Description" : {
      "description" : "A description of the CodeSigningConfig",
      "type" : "string",
      "minLength" : 0,
      "maxLength" : 256
    },
    "AllowedPublishers" : {
      "description" : "When the CodeSigningConfig is later on attached to a function, the function code will be expected to be signed by profiles from this list",
      "$ref" : "#/definitions/AllowedPublishers"
    },
    "CodeSigningPolicies" : {
      "description" : "Policies to control how to act if a signature is invalid",
      "$ref" : "#/definitions/CodeSigningPolicies"
    },
    "CodeSigningConfigId" : {
      "description" : "A unique identifier for CodeSigningConfig resource",
      "type" : "string",
      "pattern" : "csc-[a-zA-Z0-9-_\\.]{17}"
    },
    "CodeSigningConfigArn" : {
      "description" : "A unique Arn for CodeSigningConfig resource",
      "type" : "string",
      "pattern" : "arn:(aws[a-zA-Z-]*)?:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1}:\\d{12}:code-signing-config:csc-[a-z0-9]{17}"
    },
    "Tags" : {
      "description" : "A list of tags to apply to CodeSigningConfig resource",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "definitions" : {
    "AllowedPublishers" : {
      "type" : "object",
      "description" : "When the CodeSigningConfig is later on attached to a function, the function code will be expected to be signed by profiles from this list",
      "additionalProperties" : false,
      "properties" : {
        "SigningProfileVersionArns" : {
          "type" : "array",
          "description" : "List of Signing profile version Arns",
          "minItems" : 1,
          "maxItems" : 20,
          "items" : {
            "type" : "string",
            "pattern" : "arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)",
            "minLength" : 12,
            "maxLength" : 1024
          }
        }
      },
      "required" : [ "SigningProfileVersionArns" ]
    },
    "CodeSigningPolicies" : {
      "type" : "object",
      "description" : "Policies to control how to act if a signature is invalid",
      "additionalProperties" : false,
      "properties" : {
        "UntrustedArtifactOnDeployment" : {
          "type" : "string",
          "description" : "Indicates how Lambda operations involve updating the code artifact will operate. Default to Warn if not provided",
          "default" : "Warn",
          "enum" : [ "Warn", "Enforce" ]
        }
      },
      "required" : [ "UntrustedArtifactOnDeployment" ]
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key" ]
    }
  },
  "required" : [ "AllowedPublishers" ],
  "readOnlyProperties" : [ "/properties/CodeSigningConfigId", "/properties/CodeSigningConfigArn" ],
  "primaryIdentifier" : [ "/properties/CodeSigningConfigArn" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "lambda:ListTags", "lambda:TagResource", "lambda:UntagResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "lambda:CreateCodeSigningConfig", "lambda:TagResource" ]
    },
    "read" : {
      "permissions" : [ "lambda:GetCodeSigningConfig", "lambda:ListTags" ]
    },
    "update" : {
      "permissions" : [ "lambda:UpdateCodeSigningConfig", "lambda:TagResource", "lambda:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "lambda:DeleteCodeSigningConfig" ]
    },
    "list" : {
      "permissions" : [ "lambda:ListCodeSigningConfigs" ]
    }
  }
}