{
  "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"
        }
      },
      "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"
    },
    "RoleArn" : {
      "type" : "string"
    },
    "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"
        }
      },
      "additionalProperties" : false
    },
    "S3RecordingConfig" : {
      "type" : "object",
      "properties" : {
        "BucketArn" : {
          "$ref" : "#/definitions/BucketArn"
        },
        "RoleArn" : {
          "$ref" : "#/definitions/RoleArn"
        },
        "Prefix" : {
          "$ref" : "#/definitions/S3KeyPrefix"
        }
      },
      "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"
    },
    "Id" : {
      "type" : "string"
    }
  },
  "required" : [ "Name", "ConfigData" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/Id", "/properties/Type" ],
  "primaryIdentifier" : [ "/properties/Arn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "groundstation:CreateConfig", "groundstation:TagResource" ]
    },
    "read" : {
      "permissions" : [ "groundstation:DescribeConfig", "groundstation:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "groundstation:UpdateConfig", "groundstation:ListTagsForResource", "groundstation:TagResource", "groundstation:UntagResource" ]
    },
    "delete" : {
      "permissions" : [ "groundstation:DeleteConfig" ]
    },
    "list" : {
      "permissions" : [ "groundstation:ListConfigs" ]
    }
  },
  "additionalProperties" : false
}