{
  "typeName" : "AWS::GroundStation::Config",
  "description" : "AWS Ground Station config resource type for CloudFormation.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-ground-station.git",
  "definitions" : {
    "JsonString" : {
      "type" : "string",
      "pattern" : "^[{}\\[\\]:.,\"0-9A-z\\-_\\s]{1,8192}$"
    },
    "ConfigData" : {
      "type" : "object",
      "minProperties" : 1,
      "maxProperties" : 1,
      "properties" : {
        "AntennaDownlinkConfig" : {
          "$ref" : "#/definitions/AntennaDownlinkConfig"
        },
        "TrackingConfig" : {
          "$ref" : "#/definitions/TrackingConfig"
        },
        "DataflowEndpointConfig" : {
          "$ref" : "#/definitions/DataflowEndpointConfig"
        },
        "AntennaDownlinkDemodDecodeConfig" : {
          "$ref" : "#/definitions/AntennaDownlinkDemodDecodeConfig"
        },
        "AntennaUplinkConfig" : {
          "$ref" : "#/definitions/AntennaUplinkConfig"
        },
        "UplinkEchoConfig" : {
          "$ref" : "#/definitions/UplinkEchoConfig"
        },
        "S3RecordingConfig" : {
          "$ref" : "#/definitions/S3RecordingConfig"
        },
        "TelemetrySinkConfig" : {
          "$ref" : "#/definitions/TelemetrySinkConfig"
        }
      },
      "additionalProperties" : false
    },
    "EirpUnits" : {
      "type" : "string",
      "enum" : [ "dBW" ]
    },
    "Eirp" : {
      "type" : "object",
      "properties" : {
        "Value" : {
          "type" : "number"
        },
        "Units" : {
          "$ref" : "#/definitions/EirpUnits"
        }
      },
      "additionalProperties" : false
    },
    "FrequencyUnits" : {
      "type" : "string",
      "enum" : [ "GHz", "MHz", "kHz" ]
    },
    "BandwidthUnits" : {
      "type" : "string",
      "enum" : [ "GHz", "MHz", "kHz" ]
    },
    "FrequencyBandwidth" : {
      "type" : "object",
      "properties" : {
        "Value" : {
          "type" : "number"
        },
        "Units" : {
          "$ref" : "#/definitions/BandwidthUnits"
        }
      },
      "additionalProperties" : false
    },
    "Frequency" : {
      "type" : "object",
      "properties" : {
        "Value" : {
          "type" : "number"
        },
        "Units" : {
          "$ref" : "#/definitions/FrequencyUnits"
        }
      },
      "additionalProperties" : false
    },
    "Polarization" : {
      "type" : "string",
      "enum" : [ "LEFT_HAND", "RIGHT_HAND", "NONE" ]
    },
    "S3KeyPrefix" : {
      "type" : "string",
      "pattern" : "^([a-zA-Z0-9_\\-=/]|\\{satellite_id\\}|\\{config\\-name}|\\{s3\\-config-id}|\\{year\\}|\\{month\\}|\\{day\\}){1,900}$"
    },
    "BucketArn" : {
      "type" : "string",
      "pattern" : "^arn:aws[A-Za-z0-9-]{0,64}:s3:::[A-Za-z0-9-]{1,64}$"
    },
    "RoleArn" : {
      "type" : "string",
      "pattern" : "^arn:[^:\\n]+:iam::[^:\\n]+:role\\/.+$"
    },
    "KinesisDataStreamArn" : {
      "type" : "string",
      "pattern" : "^arn:[a-z0-9-.]{1,63}:kinesis:[-a-z0-9]{1,50}:[0-9]{12}:stream/[a-zA-Z0-9_.-]{1,128}$"
    },
    "UplinkSpectrumConfig" : {
      "type" : "object",
      "properties" : {
        "CenterFrequency" : {
          "$ref" : "#/definitions/Frequency"
        },
        "Polarization" : {
          "$ref" : "#/definitions/Polarization"
        }
      },
      "additionalProperties" : false
    },
    "SpectrumConfig" : {
      "type" : "object",
      "properties" : {
        "CenterFrequency" : {
          "$ref" : "#/definitions/Frequency"
        },
        "Bandwidth" : {
          "$ref" : "#/definitions/FrequencyBandwidth"
        },
        "Polarization" : {
          "$ref" : "#/definitions/Polarization"
        }
      },
      "additionalProperties" : false
    },
    "AntennaDownlinkConfig" : {
      "type" : "object",
      "properties" : {
        "SpectrumConfig" : {
          "$ref" : "#/definitions/SpectrumConfig"
        }
      },
      "additionalProperties" : false
    },
    "TrackingConfig" : {
      "type" : "object",
      "properties" : {
        "Autotrack" : {
          "type" : "string",
          "enum" : [ "REQUIRED", "PREFERRED", "REMOVED" ]
        }
      },
      "additionalProperties" : false
    },
    "DataflowEndpointConfig" : {
      "type" : "object",
      "properties" : {
        "DataflowEndpointName" : {
          "type" : "string"
        },
        "DataflowEndpointRegion" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "DemodulationConfig" : {
      "type" : "object",
      "properties" : {
        "UnvalidatedJSON" : {
          "$ref" : "#/definitions/JsonString"
        }
      },
      "additionalProperties" : false
    },
    "DecodeConfig" : {
      "type" : "object",
      "properties" : {
        "UnvalidatedJSON" : {
          "$ref" : "#/definitions/JsonString"
        }
      },
      "additionalProperties" : false
    },
    "AntennaDownlinkDemodDecodeConfig" : {
      "type" : "object",
      "properties" : {
        "SpectrumConfig" : {
          "$ref" : "#/definitions/SpectrumConfig"
        },
        "DemodulationConfig" : {
          "$ref" : "#/definitions/DemodulationConfig"
        },
        "DecodeConfig" : {
          "$ref" : "#/definitions/DecodeConfig"
        }
      },
      "additionalProperties" : false
    },
    "AntennaUplinkConfig" : {
      "type" : "object",
      "properties" : {
        "SpectrumConfig" : {
          "$ref" : "#/definitions/UplinkSpectrumConfig"
        },
        "TargetEirp" : {
          "$ref" : "#/definitions/Eirp"
        },
        "TransmitDisabled" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "UplinkEchoConfig" : {
      "type" : "object",
      "properties" : {
        "Enabled" : {
          "type" : "boolean"
        },
        "AntennaUplinkConfigArn" : {
          "type" : "string",
          "pattern" : "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$"
        }
      },
      "additionalProperties" : false
    },
    "S3RecordingConfig" : {
      "type" : "object",
      "properties" : {
        "BucketArn" : {
          "$ref" : "#/definitions/BucketArn"
        },
        "RoleArn" : {
          "$ref" : "#/definitions/RoleArn"
        },
        "Prefix" : {
          "$ref" : "#/definitions/S3KeyPrefix"
        }
      },
      "additionalProperties" : false
    },
    "TelemetrySinkType" : {
      "type" : "string",
      "enum" : [ "KINESIS_DATA_STREAM" ]
    },
    "KinesisDataStreamData" : {
      "type" : "object",
      "properties" : {
        "KinesisRoleArn" : {
          "$ref" : "#/definitions/RoleArn"
        },
        "KinesisDataStreamArn" : {
          "$ref" : "#/definitions/KinesisDataStreamArn"
        }
      },
      "required" : [ "KinesisRoleArn", "KinesisDataStreamArn" ],
      "additionalProperties" : false
    },
    "TelemetrySinkData" : {
      "type" : "object",
      "oneOf" : [ {
        "required" : [ "KinesisDataStreamData" ]
      } ],
      "properties" : {
        "KinesisDataStreamData" : {
          "$ref" : "#/definitions/KinesisDataStreamData"
        }
      },
      "additionalProperties" : false
    },
    "TelemetrySinkConfig" : {
      "type" : "object",
      "properties" : {
        "TelemetrySinkType" : {
          "$ref" : "#/definitions/TelemetrySinkType"
        },
        "TelemetrySinkData" : {
          "$ref" : "#/definitions/TelemetrySinkData"
        }
      },
      "required" : [ "TelemetrySinkType", "TelemetrySinkData" ],
      "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
    }
  },
  "properties" : {
    "Name" : {
      "type" : "string",
      "pattern" : "^[ a-zA-Z0-9_:-]{1,256}$"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "Type" : {
      "type" : "string"
    },
    "ConfigData" : {
      "$ref" : "#/definitions/ConfigData"
    },
    "Arn" : {
      "type" : "string",
      "pattern" : "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$"
    },
    "Id" : {
      "type" : "string"
    }
  },
  "required" : [ "Name", "ConfigData" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/Id", "/properties/Type" ],
  "primaryIdentifier" : [ "/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:CreateConfig", "groundstation:TagResource", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "groundstation:GetConfig", "groundstation:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "groundstation:UpdateConfig", "groundstation:ListTagsForResource", "groundstation:TagResource", "groundstation:UntagResource", "iam:PassRole" ]
    },
    "delete" : {
      "permissions" : [ "groundstation:DeleteConfig" ]
    },
    "list" : {
      "permissions" : [ "groundstation:ListConfigs" ]
    }
  },
  "additionalProperties" : false
}