{
  "typeName" : "AWS::GroundStation::MissionProfile",
  "description" : "AWS Ground Station Mission Profile resource type for CloudFormation.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ground-station.git",
  "definitions" : {
    "DataflowEdge" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "type" : "string"
        },
        "Destination" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "Tag" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "pattern" : "^[ a-zA-Z0-9\\+\\-=._:/@]{1,128}$"
        },
        "Value" : {
          "type" : "string",
          "pattern" : "^[ a-zA-Z0-9\\+\\-=._:/@]{1,256}$"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Key", "Value" ]
    },
    "StreamsKmsKey" : {
      "type" : "object",
      "properties" : {
        "KmsKeyArn" : {
          "type" : "string",
          "pattern" : "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$"
        },
        "KmsAliasArn" : {
          "type" : "string",
          "pattern" : "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$"
        },
        "KmsAliasName" : {
          "type" : "string",
          "pattern" : "^alias/[a-zA-Z0-9:/_-]+$"
        }
      },
      "oneOf" : [ {
        "required" : [ "KmsKeyArn" ]
      }, {
        "required" : [ "KmsAliasArn" ]
      }, {
        "required" : [ "KmsAliasName" ]
      } ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "Name" : {
      "description" : "A name used to identify a mission profile.",
      "type" : "string",
      "pattern" : "^[ a-zA-Z0-9_:-]{1,256}$"
    },
    "ContactPrePassDurationSeconds" : {
      "description" : "Pre-pass time needed before the contact.",
      "type" : "integer"
    },
    "ContactPostPassDurationSeconds" : {
      "description" : "Post-pass time needed after the contact.",
      "type" : "integer"
    },
    "MinimumViableContactDurationSeconds" : {
      "description" : "Visibilities with shorter duration than the specified minimum viable contact duration will be ignored when searching for available contacts.",
      "type" : "integer"
    },
    "StreamsKmsKey" : {
      "description" : "The ARN of a KMS Key used for encrypting data during transmission from the source to destination locations.",
      "$ref" : "#/definitions/StreamsKmsKey"
    },
    "StreamsKmsRole" : {
      "description" : "The ARN of the KMS Key or Alias Key role used to define permissions on KMS Key usage.",
      "type" : "string"
    },
    "TelemetrySinkConfigArn" : {
      "description" : "ARN of a Config resource of type TelemetrySinkConfig used for telemetry data sink configuration.",
      "type" : "string",
      "pattern" : "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$"
    },
    "DataflowEdges" : {
      "description" : "",
      "type" : "array",
      "minItems" : 1,
      "items" : {
        "$ref" : "#/definitions/DataflowEdge"
      }
    },
    "TrackingConfigArn" : {
      "type" : "string",
      "pattern" : "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "Id" : {
      "type" : "string"
    },
    "Arn" : {
      "type" : "string",
      "pattern" : "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$"
    },
    "Region" : {
      "type" : "string"
    }
  },
  "required" : [ "Name", "MinimumViableContactDurationSeconds", "DataflowEdges", "TrackingConfigArn" ],
  "readOnlyProperties" : [ "/properties/Id", "/properties/Arn", "/properties/Region" ],
  "primaryIdentifier" : [ "/properties/Id", "/properties/Arn" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "groundstation:TagResource", "groundstation:UntagResource", "groundstation:ListTagsForResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "groundstation:CreateMissionProfile", "groundstation:GetMissionProfile", "groundstation:TagResource", "iam:PassRole", "kms:DescribeKey", "kms:CreateGrant" ]
    },
    "read" : {
      "permissions" : [ "groundstation:GetMissionProfile", "groundstation:ListTagsForResource", "kms:DescribeKey", "kms:CreateGrant" ]
    },
    "update" : {
      "permissions" : [ "groundstation:UpdateMissionProfile", "groundstation:GetMissionProfile", "groundstation:ListTagsForResource", "groundstation:TagResource", "groundstation:UntagResource", "iam:PassRole", "kms:DescribeKey", "kms:CreateGrant" ]
    },
    "delete" : {
      "permissions" : [ "groundstation:DeleteMissionProfile", "groundstation:GetMissionProfile" ]
    },
    "list" : {
      "permissions" : [ "groundstation:ListMissionProfiles" ]
    }
  },
  "additionalProperties" : false
}