CreateApplicationInstance

valid {
    input.Body.ApplicationInstanceIdToReplace == STRING
    input.Body.DefaultRuntimeContextDevice == STRING
    input.Body.Description == STRING
    input.Body.ManifestOverridesPayload.PayloadData == STRING
    input.Body.ManifestPayload.PayloadData == STRING
    input.Body.Name == STRING
    input.Body.RuntimeRoleArn == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateJobForDevices

enum_JobType := [ "OTA", "REBOOT" ]

valid {
    input.Body.DeviceIds[_] == STRING
    input.Body.DeviceJobConfig.OTAJobConfig.AllowMajorVersionUpdate == BOOLEAN
    input.Body.DeviceJobConfig.OTAJobConfig.ImageVersion == STRING
    input.Body.JobType == enum_JobType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateNodeFromTemplateJob

enum_JobResourceType := [ "PACKAGE" ]
enum_TemplateType := [ "RTSP_CAMERA_STREAM" ]

valid {
    input.Body.JobTags[_].ResourceType == enum_JobResourceType[_]
    input.Body.JobTags[_].Tags.STRING == STRING
    input.Body.NodeDescription == STRING
    input.Body.NodeName == STRING
    input.Body.OutputPackageName == STRING
    input.Body.OutputPackageVersion == STRING
    input.Body.TemplateParameters.STRING == STRING
    input.Body.TemplateType == enum_TemplateType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreatePackage

valid {
    input.Body.PackageName == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreatePackageImportJob

enum_JobResourceType := [ "PACKAGE" ]
enum_PackageImportJobType := [ "NODE_PACKAGE_VERSION", "MARKETPLACE_NODE_PACKAGE_VERSION" ]

valid {
    input.Body.ClientToken == STRING
    input.Body.InputConfig.PackageVersionInputConfig.S3Location.BucketName == STRING
    input.Body.InputConfig.PackageVersionInputConfig.S3Location.ObjectKey == STRING
    input.Body.InputConfig.PackageVersionInputConfig.S3Location.Region == STRING
    input.Body.JobTags[_].ResourceType == enum_JobResourceType[_]
    input.Body.JobTags[_].Tags.STRING == STRING
    input.Body.JobType == enum_PackageImportJobType[_]
    input.Body.OutputConfig.PackageVersionOutputConfig.MarkLatest == BOOLEAN
    input.Body.OutputConfig.PackageVersionOutputConfig.PackageName == STRING
    input.Body.OutputConfig.PackageVersionOutputConfig.PackageVersion == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteDevice

valid {
    input.ReqMap.DeviceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeletePackage

valid {
    input.ReqMap.PackageId == STRING
    input.Qs.ForceDelete == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeregisterPackageVersion

valid {
    input.ReqMap.PackageId == STRING
    input.ReqMap.PackageVersion == STRING
    input.ReqMap.PatchVersion == STRING
    input.Qs.OwnerAccount == STRING
    input.Qs.UpdatedLatestPatchVersion == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeApplicationInstance

valid {
    input.ReqMap.ApplicationInstanceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeApplicationInstanceDetails

valid {
    input.ReqMap.ApplicationInstanceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeDevice

valid {
    input.ReqMap.DeviceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeDeviceJob

valid {
    input.ReqMap.JobId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeNode

valid {
    input.ReqMap.NodeId == STRING
    input.Qs.OwnerAccount == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeNodeFromTemplateJob

valid {
    input.ReqMap.JobId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribePackage

valid {
    input.ReqMap.PackageId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribePackageImportJob

valid {
    input.ReqMap.JobId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribePackageVersion

valid {
    input.ReqMap.PackageId == STRING
    input.ReqMap.PackageVersion == STRING
    input.Qs.OwnerAccount == STRING
    input.Qs.PatchVersion == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListApplicationInstanceDependencies

valid {
    input.ReqMap.ApplicationInstanceId == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListApplicationInstanceNodeInstances

valid {
    input.ReqMap.ApplicationInstanceId == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListApplicationInstances

enum_StatusFilter := [ "DEPLOYMENT_SUCCEEDED", "DEPLOYMENT_ERROR", "REMOVAL_SUCCEEDED", "REMOVAL_FAILED", "PROCESSING_DEPLOYMENT", "PROCESSING_REMOVAL", "DEPLOYMENT_FAILED" ]

valid {
    input.Qs.deviceId == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.statusFilter == enum_StatusFilter[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDevices

enum_DeviceAggregatedStatus := [ "ERROR", "AWAITING_PROVISIONING", "PENDING", "FAILED", "DELETING", "ONLINE", "OFFLINE", "LEASE_EXPIRED", "UPDATE_NEEDED", "REBOOTING" ]
enum_ListDevicesSortBy := [ "DEVICE_ID", "CREATED_TIME", "NAME", "DEVICE_AGGREGATED_STATUS" ]
enum_SortOrder := [ "ASCENDING", "DESCENDING" ]

valid {
    input.Qs.DeviceAggregatedStatusFilter == enum_DeviceAggregatedStatus[_]
    input.Qs.MaxResults == INTEGER
    input.Qs.NameFilter == STRING
    input.Qs.NextToken == STRING
    input.Qs.SortBy == enum_ListDevicesSortBy[_]
    input.Qs.SortOrder == enum_SortOrder[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDevicesJobs

valid {
    input.Qs.DeviceId == STRING
    input.Qs.MaxResults == INTEGER
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListNodeFromTemplateJobs

valid {
    input.Qs.MaxResults == INTEGER
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListNodes

enum_NodeCategory := [ "BUSINESS_LOGIC", "ML_MODEL", "MEDIA_SOURCE", "MEDIA_SINK" ]

valid {
    input.Qs.category == enum_NodeCategory[_]
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.ownerAccount == STRING
    input.Qs.packageName == STRING
    input.Qs.packageVersion == STRING
    input.Qs.patchVersion == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListPackageImportJobs

valid {
    input.Qs.MaxResults == INTEGER
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListPackages

valid {
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

valid {
    input.ReqMap.ResourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ProvisionDevice

enum_ConnectionType := [ "STATIC_IP", "DHCP" ]

valid {
    input.Body.Description == STRING
    input.Body.Name == STRING
    input.Body.NetworkingConfiguration.Ethernet0.ConnectionType == enum_ConnectionType[_]
    input.Body.NetworkingConfiguration.Ethernet0.StaticIpConnectionInfo.DefaultGateway == STRING
    input.Body.NetworkingConfiguration.Ethernet0.StaticIpConnectionInfo.Dns[_] == STRING
    input.Body.NetworkingConfiguration.Ethernet0.StaticIpConnectionInfo.IpAddress == STRING
    input.Body.NetworkingConfiguration.Ethernet0.StaticIpConnectionInfo.Mask == STRING
    input.Body.NetworkingConfiguration.Ethernet1.ConnectionType == enum_ConnectionType[_]
    input.Body.NetworkingConfiguration.Ethernet1.StaticIpConnectionInfo.DefaultGateway == STRING
    input.Body.NetworkingConfiguration.Ethernet1.StaticIpConnectionInfo.Dns[_] == STRING
    input.Body.NetworkingConfiguration.Ethernet1.StaticIpConnectionInfo.IpAddress == STRING
    input.Body.NetworkingConfiguration.Ethernet1.StaticIpConnectionInfo.Mask == STRING
    input.Body.NetworkingConfiguration.Ntp.NtpServers[_] == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RegisterPackageVersion

valid {
    input.Body.MarkLatest == BOOLEAN
    input.Body.OwnerAccount == STRING
    input.ReqMap.PackageId == STRING
    input.ReqMap.PackageVersion == STRING
    input.ReqMap.PatchVersion == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RemoveApplicationInstance

valid {
    input.ReqMap.ApplicationInstanceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SignalApplicationInstanceNodeInstances

enum_NodeSignalValue := [ "PAUSE", "RESUME" ]

valid {
    input.Body.NodeSignals[_].NodeInstanceId == STRING
    input.Body.NodeSignals[_].Signal == enum_NodeSignalValue[_]
    input.ReqMap.ApplicationInstanceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.Tags.STRING == STRING
    input.ReqMap.ResourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.ReqMap.ResourceArn == STRING
    input.Qs.tagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDeviceMetadata

valid {
    input.Body.Description == STRING
    input.ReqMap.DeviceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}