{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-mediaconnect-flowentitlement.json",
  "title": "AWSMediaConnectFlowEntitlementProperties",
  "description": "Resource schema for AWS::MediaConnect::FlowEntitlement. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-mediaconnect.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-mediaconnect-flowentitlement.json",
    "sourceSha256": "2e6ad40d3fdf7192a657077330a7c7f2d41d9b5a488060e2b71074c60a0e25b4"
  },
  "type": "object",
  "properties": {
    "FlowArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of the flow."
    },
    "DataTransferSubscriberFeePercent": {
      "type": "integer",
      "default": 0,
      "description": "Percentage from 0-100 of the data transfer cost to be billed to the subscriber."
    },
    "Description": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A description of the entitlement."
    },
    "Encryption": {
      "$ref": "#/$defs/Encryption",
      "description": "The type of encryption that will be used on the output that is associated with this entitlement."
    },
    "EntitlementStatus": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": " An indication of whether the entitlement is enabled."
    },
    "Name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the entitlement."
    },
    "Subscribers": {
      "type": "array",
      "description": "The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.",
      "items": {
        "type": "string"
      }
    }
  },
  "typeName": "AWS::MediaConnect::FlowEntitlement",
  "primaryIdentifier": [
    "/properties/EntitlementArn"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-mediaconnect.git",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/EntitlementArn"
  ],
  "$defs": {
    "Encryption": {
      "type": "object",
      "description": "Information about the encryption of the flow.",
      "properties": {
        "Algorithm": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "aes128",
                "aes192",
                "aes256"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256)."
        },
        "ConstantInitializationVector": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption."
        },
        "DeviceId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption."
        },
        "KeyType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "speke",
                "static-key"
              ],
              "default": "static-key"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key)."
        },
        "Region": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption."
        },
        "ResourceId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption."
        },
        "RoleArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity)."
        },
        "SecretArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": " The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption."
        },
        "Url": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption."
        }
      },
      "title": "AWSMediaConnectFlowEntitlementEncryptionDefinition",
      "required": [
        "Algorithm",
        "RoleArn"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "FlowArn",
    "Name",
    "Subscribers",
    "Description"
  ],
  "createOnlyProperties": [
    "/properties/DataTransferSubscriberFeePercent",
    "/properties/Name"
  ]
}
