AcceptInboundCrossClusterSearchConnection

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

AddTags

valid {
    input.Body.ARN == STRING
    input.Body.TagList[_].Key == STRING
    input.Body.TagList[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

AssociatePackage

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

AuthorizeVpcEndpointAccess

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

CancelDomainConfigChange

valid {
    input.Body.DryRun == BOOLEAN
    input.ReqMap.DomainName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CancelElasticsearchServiceSoftwareUpdate

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

CreateElasticsearchDomain

enum_AutoTuneDesiredState := [ "ENABLED", "DISABLED" ]
enum_ESPartitionInstanceType := [ "m3.medium.elasticsearch", "m3.large.elasticsearch", "m3.xlarge.elasticsearch", "m3.2xlarge.elasticsearch", "m4.large.elasticsearch", "m4.xlarge.elasticsearch", "m4.2xlarge.elasticsearch", "m4.4xlarge.elasticsearch", "m4.10xlarge.elasticsearch", "m5.large.elasticsearch", "m5.xlarge.elasticsearch", "m5.2xlarge.elasticsearch", "m5.4xlarge.elasticsearch", "m5.12xlarge.elasticsearch", "r5.large.elasticsearch", "r5.xlarge.elasticsearch", "r5.2xlarge.elasticsearch", "r5.4xlarge.elasticsearch", "r5.12xlarge.elasticsearch", "c5.large.elasticsearch", "c5.xlarge.elasticsearch", "c5.2xlarge.elasticsearch", "c5.4xlarge.elasticsearch", "c5.9xlarge.elasticsearch", "c5.18xlarge.elasticsearch", "ultrawarm1.medium.elasticsearch", "ultrawarm1.large.elasticsearch", "t2.micro.elasticsearch", "t2.small.elasticsearch", "t2.medium.elasticsearch", "r3.large.elasticsearch", "r3.xlarge.elasticsearch", "r3.2xlarge.elasticsearch", "r3.4xlarge.elasticsearch", "r3.8xlarge.elasticsearch", "i2.xlarge.elasticsearch", "i2.2xlarge.elasticsearch", "d2.xlarge.elasticsearch", "d2.2xlarge.elasticsearch", "d2.4xlarge.elasticsearch", "d2.8xlarge.elasticsearch", "c4.large.elasticsearch", "c4.xlarge.elasticsearch", "c4.2xlarge.elasticsearch", "c4.4xlarge.elasticsearch", "c4.8xlarge.elasticsearch", "r4.large.elasticsearch", "r4.xlarge.elasticsearch", "r4.2xlarge.elasticsearch", "r4.4xlarge.elasticsearch", "r4.8xlarge.elasticsearch", "r4.16xlarge.elasticsearch", "i3.large.elasticsearch", "i3.xlarge.elasticsearch", "i3.2xlarge.elasticsearch", "i3.4xlarge.elasticsearch", "i3.8xlarge.elasticsearch", "i3.16xlarge.elasticsearch" ]
enum_ESWarmPartitionInstanceType := [ "ultrawarm1.medium.elasticsearch", "ultrawarm1.large.elasticsearch" ]
enum_TLSSecurityPolicy := [ "Policy-Min-TLS-1-0-2019-07", "Policy-Min-TLS-1-2-2019-07", "Policy-Min-TLS-1-2-PFS-2023-10" ]
enum_TimeUnit := [ "HOURS" ]
enum_VolumeType := [ "standard", "gp2", "io1", "gp3" ]

valid {
    input.Body.DomainName == STRING
    input.Body.ElasticsearchVersion == STRING
    input.Body.ElasticsearchClusterConfig.InstanceType == enum_ESPartitionInstanceType[_]
    input.Body.ElasticsearchClusterConfig.InstanceCount == INTEGER
    input.Body.ElasticsearchClusterConfig.DedicatedMasterEnabled == BOOLEAN
    input.Body.ElasticsearchClusterConfig.ZoneAwarenessEnabled == BOOLEAN
    input.Body.ElasticsearchClusterConfig.ZoneAwarenessConfig.AvailabilityZoneCount == INTEGER
    input.Body.ElasticsearchClusterConfig.DedicatedMasterType == enum_ESPartitionInstanceType[_]
    input.Body.ElasticsearchClusterConfig.DedicatedMasterCount == INTEGER
    input.Body.ElasticsearchClusterConfig.WarmEnabled == BOOLEAN
    input.Body.ElasticsearchClusterConfig.WarmType == enum_ESWarmPartitionInstanceType[_]
    input.Body.ElasticsearchClusterConfig.WarmCount == INTEGER
    input.Body.ElasticsearchClusterConfig.ColdStorageOptions.Enabled == BOOLEAN
    input.Body.EBSOptions.EBSEnabled == BOOLEAN
    input.Body.EBSOptions.VolumeType == enum_VolumeType[_]
    input.Body.EBSOptions.VolumeSize == INTEGER
    input.Body.EBSOptions.Iops == INTEGER
    input.Body.EBSOptions.Throughput == INTEGER
    input.Body.AccessPolicies == STRING
    input.Body.SnapshotOptions.AutomatedSnapshotStartHour == INTEGER
    input.Body.VPCOptions.SubnetIds[_] == STRING
    input.Body.VPCOptions.SecurityGroupIds[_] == STRING
    input.Body.CognitoOptions.Enabled == BOOLEAN
    input.Body.CognitoOptions.UserPoolId == STRING
    input.Body.CognitoOptions.IdentityPoolId == STRING
    input.Body.CognitoOptions.RoleArn == STRING
    input.Body.EncryptionAtRestOptions.Enabled == BOOLEAN
    input.Body.EncryptionAtRestOptions.KmsKeyId == STRING
    input.Body.NodeToNodeEncryptionOptions.Enabled == BOOLEAN
    input.Body.AdvancedOptions.STRING == STRING
    input.Body.LogPublishingOptions.INDEX_SLOW_LOGS.CloudWatchLogsLogGroupArn == STRING
    input.Body.LogPublishingOptions.INDEX_SLOW_LOGS.Enabled == BOOLEAN
    input.Body.LogPublishingOptions.SEARCH_SLOW_LOGS.CloudWatchLogsLogGroupArn == STRING
    input.Body.LogPublishingOptions.SEARCH_SLOW_LOGS.Enabled == BOOLEAN
    input.Body.LogPublishingOptions.ES_APPLICATION_LOGS.CloudWatchLogsLogGroupArn == STRING
    input.Body.LogPublishingOptions.ES_APPLICATION_LOGS.Enabled == BOOLEAN
    input.Body.LogPublishingOptions.AUDIT_LOGS.CloudWatchLogsLogGroupArn == STRING
    input.Body.LogPublishingOptions.AUDIT_LOGS.Enabled == BOOLEAN
    input.Body.DomainEndpointOptions.EnforceHTTPS == BOOLEAN
    input.Body.DomainEndpointOptions.TLSSecurityPolicy == enum_TLSSecurityPolicy[_]
    input.Body.DomainEndpointOptions.CustomEndpointEnabled == BOOLEAN
    input.Body.DomainEndpointOptions.CustomEndpoint == STRING
    input.Body.DomainEndpointOptions.CustomEndpointCertificateArn == STRING
    input.Body.AdvancedSecurityOptions.Enabled == BOOLEAN
    input.Body.AdvancedSecurityOptions.InternalUserDatabaseEnabled == BOOLEAN
    input.Body.AdvancedSecurityOptions.MasterUserOptions.MasterUserARN == STRING
    input.Body.AdvancedSecurityOptions.MasterUserOptions.MasterUserName == STRING
    input.Body.AdvancedSecurityOptions.MasterUserOptions.MasterUserPassword == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.Enabled == BOOLEAN
    input.Body.AdvancedSecurityOptions.SAMLOptions.Idp.MetadataContent == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.Idp.EntityId == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.MasterUserName == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.MasterBackendRole == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.SubjectKey == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.RolesKey == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.SessionTimeoutMinutes == INTEGER
    input.Body.AdvancedSecurityOptions.AnonymousAuthEnabled == BOOLEAN
    input.Body.AutoTuneOptions.DesiredState == enum_AutoTuneDesiredState[_]
    input.Body.AutoTuneOptions.MaintenanceSchedules[_].StartAt == TIMESTAMP
    input.Body.AutoTuneOptions.MaintenanceSchedules[_].Duration.Value == LONG
    input.Body.AutoTuneOptions.MaintenanceSchedules[_].Duration.Unit == enum_TimeUnit[_]
    input.Body.AutoTuneOptions.MaintenanceSchedules[_].CronExpressionForRecurrence == STRING
    input.Body.TagList[_].Key == STRING
    input.Body.TagList[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateOutboundCrossClusterSearchConnection

valid {
    input.Body.SourceDomainInfo.OwnerId == STRING
    input.Body.SourceDomainInfo.DomainName == STRING
    input.Body.SourceDomainInfo.Region == STRING
    input.Body.DestinationDomainInfo.OwnerId == STRING
    input.Body.DestinationDomainInfo.DomainName == STRING
    input.Body.DestinationDomainInfo.Region == STRING
    input.Body.ConnectionAlias == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreatePackage

enum_PackageType := [ "TXT-DICTIONARY" ]

valid {
    input.Body.PackageName == STRING
    input.Body.PackageType == enum_PackageType[_]
    input.Body.PackageDescription == STRING
    input.Body.PackageSource.S3BucketName == STRING
    input.Body.PackageSource.S3Key == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateVpcEndpoint

valid {
    input.Body.DomainArn == STRING
    input.Body.VpcOptions.SubnetIds[_] == STRING
    input.Body.VpcOptions.SecurityGroupIds[_] == STRING
    input.Body.ClientToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteElasticsearchDomain

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

DeleteElasticsearchServiceRole

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

DeleteInboundCrossClusterSearchConnection

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

DeleteOutboundCrossClusterSearchConnection

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

DeletePackage

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

DeleteVpcEndpoint

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

DescribeDomainAutoTunes

valid {
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ReqMap.DomainName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeDomainChangeProgress

valid {
    input.ReqMap.DomainName == STRING
    input.Qs.changeid == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeElasticsearchDomain

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

DescribeElasticsearchDomainConfig

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

DescribeElasticsearchDomains

valid {
    input.Body.DomainNames[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeElasticsearchInstanceTypeLimits

enum_ESPartitionInstanceType := [ "m3.medium.elasticsearch", "m3.large.elasticsearch", "m3.xlarge.elasticsearch", "m3.2xlarge.elasticsearch", "m4.large.elasticsearch", "m4.xlarge.elasticsearch", "m4.2xlarge.elasticsearch", "m4.4xlarge.elasticsearch", "m4.10xlarge.elasticsearch", "m5.large.elasticsearch", "m5.xlarge.elasticsearch", "m5.2xlarge.elasticsearch", "m5.4xlarge.elasticsearch", "m5.12xlarge.elasticsearch", "r5.large.elasticsearch", "r5.xlarge.elasticsearch", "r5.2xlarge.elasticsearch", "r5.4xlarge.elasticsearch", "r5.12xlarge.elasticsearch", "c5.large.elasticsearch", "c5.xlarge.elasticsearch", "c5.2xlarge.elasticsearch", "c5.4xlarge.elasticsearch", "c5.9xlarge.elasticsearch", "c5.18xlarge.elasticsearch", "ultrawarm1.medium.elasticsearch", "ultrawarm1.large.elasticsearch", "t2.micro.elasticsearch", "t2.small.elasticsearch", "t2.medium.elasticsearch", "r3.large.elasticsearch", "r3.xlarge.elasticsearch", "r3.2xlarge.elasticsearch", "r3.4xlarge.elasticsearch", "r3.8xlarge.elasticsearch", "i2.xlarge.elasticsearch", "i2.2xlarge.elasticsearch", "d2.xlarge.elasticsearch", "d2.2xlarge.elasticsearch", "d2.4xlarge.elasticsearch", "d2.8xlarge.elasticsearch", "c4.large.elasticsearch", "c4.xlarge.elasticsearch", "c4.2xlarge.elasticsearch", "c4.4xlarge.elasticsearch", "c4.8xlarge.elasticsearch", "r4.large.elasticsearch", "r4.xlarge.elasticsearch", "r4.2xlarge.elasticsearch", "r4.4xlarge.elasticsearch", "r4.8xlarge.elasticsearch", "r4.16xlarge.elasticsearch", "i3.large.elasticsearch", "i3.xlarge.elasticsearch", "i3.2xlarge.elasticsearch", "i3.4xlarge.elasticsearch", "i3.8xlarge.elasticsearch", "i3.16xlarge.elasticsearch" ]

valid {
    input.ReqMap.InstanceType == enum_ESPartitionInstanceType[_]
    input.ReqMap.ElasticsearchVersion == STRING
    input.Qs.domainName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeInboundCrossClusterSearchConnections

valid {
    input.Body.Filters[_].Name == STRING
    input.Body.Filters[_].Values[_] == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeOutboundCrossClusterSearchConnections

valid {
    input.Body.Filters[_].Name == STRING
    input.Body.Filters[_].Values[_] == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribePackages

enum_DescribePackagesFilterName := [ "PackageID", "PackageName", "PackageStatus" ]

valid {
    input.Body.Filters[_].Name == enum_DescribePackagesFilterName[_]
    input.Body.Filters[_].Value[_] == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeReservedElasticsearchInstanceOfferings

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

DescribeReservedElasticsearchInstances

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

DescribeVpcEndpoints

valid {
    input.Body.VpcEndpointIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DissociatePackage

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

GetCompatibleElasticsearchVersions

valid {
    input.Qs.domainName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetPackageVersionHistory

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

GetUpgradeHistory

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

GetUpgradeStatus

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

ListDomainNames

enum_EngineType := [ "OpenSearch", "Elasticsearch" ]

valid {
    input.Qs.engineType == enum_EngineType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListDomainsForPackage

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

ListElasticsearchInstanceTypes

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

ListElasticsearchVersions

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

ListPackagesForDomain

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

ListTags

valid {
    input.Qs.arn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListVpcEndpointAccess

valid {
    input.ReqMap.DomainName == STRING
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListVpcEndpoints

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

ListVpcEndpointsForDomain

valid {
    input.ReqMap.DomainName == STRING
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PurchaseReservedElasticsearchInstanceOffering

valid {
    input.Body.ReservedElasticsearchInstanceOfferingId == STRING
    input.Body.ReservationName == STRING
    input.Body.InstanceCount == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RejectInboundCrossClusterSearchConnection

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

RemoveTags

valid {
    input.Body.ARN == STRING
    input.Body.TagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RevokeVpcEndpointAccess

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

StartElasticsearchServiceSoftwareUpdate

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

UpdateElasticsearchDomainConfig

enum_AutoTuneDesiredState := [ "ENABLED", "DISABLED" ]
enum_ESPartitionInstanceType := [ "m3.medium.elasticsearch", "m3.large.elasticsearch", "m3.xlarge.elasticsearch", "m3.2xlarge.elasticsearch", "m4.large.elasticsearch", "m4.xlarge.elasticsearch", "m4.2xlarge.elasticsearch", "m4.4xlarge.elasticsearch", "m4.10xlarge.elasticsearch", "m5.large.elasticsearch", "m5.xlarge.elasticsearch", "m5.2xlarge.elasticsearch", "m5.4xlarge.elasticsearch", "m5.12xlarge.elasticsearch", "r5.large.elasticsearch", "r5.xlarge.elasticsearch", "r5.2xlarge.elasticsearch", "r5.4xlarge.elasticsearch", "r5.12xlarge.elasticsearch", "c5.large.elasticsearch", "c5.xlarge.elasticsearch", "c5.2xlarge.elasticsearch", "c5.4xlarge.elasticsearch", "c5.9xlarge.elasticsearch", "c5.18xlarge.elasticsearch", "ultrawarm1.medium.elasticsearch", "ultrawarm1.large.elasticsearch", "t2.micro.elasticsearch", "t2.small.elasticsearch", "t2.medium.elasticsearch", "r3.large.elasticsearch", "r3.xlarge.elasticsearch", "r3.2xlarge.elasticsearch", "r3.4xlarge.elasticsearch", "r3.8xlarge.elasticsearch", "i2.xlarge.elasticsearch", "i2.2xlarge.elasticsearch", "d2.xlarge.elasticsearch", "d2.2xlarge.elasticsearch", "d2.4xlarge.elasticsearch", "d2.8xlarge.elasticsearch", "c4.large.elasticsearch", "c4.xlarge.elasticsearch", "c4.2xlarge.elasticsearch", "c4.4xlarge.elasticsearch", "c4.8xlarge.elasticsearch", "r4.large.elasticsearch", "r4.xlarge.elasticsearch", "r4.2xlarge.elasticsearch", "r4.4xlarge.elasticsearch", "r4.8xlarge.elasticsearch", "r4.16xlarge.elasticsearch", "i3.large.elasticsearch", "i3.xlarge.elasticsearch", "i3.2xlarge.elasticsearch", "i3.4xlarge.elasticsearch", "i3.8xlarge.elasticsearch", "i3.16xlarge.elasticsearch" ]
enum_ESWarmPartitionInstanceType := [ "ultrawarm1.medium.elasticsearch", "ultrawarm1.large.elasticsearch" ]
enum_RollbackOnDisable := [ "NO_ROLLBACK", "DEFAULT_ROLLBACK" ]
enum_TLSSecurityPolicy := [ "Policy-Min-TLS-1-0-2019-07", "Policy-Min-TLS-1-2-2019-07", "Policy-Min-TLS-1-2-PFS-2023-10" ]
enum_TimeUnit := [ "HOURS" ]
enum_VolumeType := [ "standard", "gp2", "io1", "gp3" ]

valid {
    input.Body.ElasticsearchClusterConfig.InstanceType == enum_ESPartitionInstanceType[_]
    input.Body.ElasticsearchClusterConfig.InstanceCount == INTEGER
    input.Body.ElasticsearchClusterConfig.DedicatedMasterEnabled == BOOLEAN
    input.Body.ElasticsearchClusterConfig.ZoneAwarenessEnabled == BOOLEAN
    input.Body.ElasticsearchClusterConfig.ZoneAwarenessConfig.AvailabilityZoneCount == INTEGER
    input.Body.ElasticsearchClusterConfig.DedicatedMasterType == enum_ESPartitionInstanceType[_]
    input.Body.ElasticsearchClusterConfig.DedicatedMasterCount == INTEGER
    input.Body.ElasticsearchClusterConfig.WarmEnabled == BOOLEAN
    input.Body.ElasticsearchClusterConfig.WarmType == enum_ESWarmPartitionInstanceType[_]
    input.Body.ElasticsearchClusterConfig.WarmCount == INTEGER
    input.Body.ElasticsearchClusterConfig.ColdStorageOptions.Enabled == BOOLEAN
    input.Body.EBSOptions.EBSEnabled == BOOLEAN
    input.Body.EBSOptions.VolumeType == enum_VolumeType[_]
    input.Body.EBSOptions.VolumeSize == INTEGER
    input.Body.EBSOptions.Iops == INTEGER
    input.Body.EBSOptions.Throughput == INTEGER
    input.Body.SnapshotOptions.AutomatedSnapshotStartHour == INTEGER
    input.Body.VPCOptions.SubnetIds[_] == STRING
    input.Body.VPCOptions.SecurityGroupIds[_] == STRING
    input.Body.CognitoOptions.Enabled == BOOLEAN
    input.Body.CognitoOptions.UserPoolId == STRING
    input.Body.CognitoOptions.IdentityPoolId == STRING
    input.Body.CognitoOptions.RoleArn == STRING
    input.Body.AdvancedOptions.STRING == STRING
    input.Body.AccessPolicies == STRING
    input.Body.LogPublishingOptions.INDEX_SLOW_LOGS.CloudWatchLogsLogGroupArn == STRING
    input.Body.LogPublishingOptions.INDEX_SLOW_LOGS.Enabled == BOOLEAN
    input.Body.LogPublishingOptions.SEARCH_SLOW_LOGS.CloudWatchLogsLogGroupArn == STRING
    input.Body.LogPublishingOptions.SEARCH_SLOW_LOGS.Enabled == BOOLEAN
    input.Body.LogPublishingOptions.ES_APPLICATION_LOGS.CloudWatchLogsLogGroupArn == STRING
    input.Body.LogPublishingOptions.ES_APPLICATION_LOGS.Enabled == BOOLEAN
    input.Body.LogPublishingOptions.AUDIT_LOGS.CloudWatchLogsLogGroupArn == STRING
    input.Body.LogPublishingOptions.AUDIT_LOGS.Enabled == BOOLEAN
    input.Body.DomainEndpointOptions.EnforceHTTPS == BOOLEAN
    input.Body.DomainEndpointOptions.TLSSecurityPolicy == enum_TLSSecurityPolicy[_]
    input.Body.DomainEndpointOptions.CustomEndpointEnabled == BOOLEAN
    input.Body.DomainEndpointOptions.CustomEndpoint == STRING
    input.Body.DomainEndpointOptions.CustomEndpointCertificateArn == STRING
    input.Body.AdvancedSecurityOptions.Enabled == BOOLEAN
    input.Body.AdvancedSecurityOptions.InternalUserDatabaseEnabled == BOOLEAN
    input.Body.AdvancedSecurityOptions.MasterUserOptions.MasterUserARN == STRING
    input.Body.AdvancedSecurityOptions.MasterUserOptions.MasterUserName == STRING
    input.Body.AdvancedSecurityOptions.MasterUserOptions.MasterUserPassword == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.Enabled == BOOLEAN
    input.Body.AdvancedSecurityOptions.SAMLOptions.Idp.MetadataContent == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.Idp.EntityId == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.MasterUserName == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.MasterBackendRole == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.SubjectKey == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.RolesKey == STRING
    input.Body.AdvancedSecurityOptions.SAMLOptions.SessionTimeoutMinutes == INTEGER
    input.Body.AdvancedSecurityOptions.AnonymousAuthEnabled == BOOLEAN
    input.Body.NodeToNodeEncryptionOptions.Enabled == BOOLEAN
    input.Body.EncryptionAtRestOptions.Enabled == BOOLEAN
    input.Body.EncryptionAtRestOptions.KmsKeyId == STRING
    input.Body.AutoTuneOptions.DesiredState == enum_AutoTuneDesiredState[_]
    input.Body.AutoTuneOptions.RollbackOnDisable == enum_RollbackOnDisable[_]
    input.Body.AutoTuneOptions.MaintenanceSchedules[_].StartAt == TIMESTAMP
    input.Body.AutoTuneOptions.MaintenanceSchedules[_].Duration.Value == LONG
    input.Body.AutoTuneOptions.MaintenanceSchedules[_].Duration.Unit == enum_TimeUnit[_]
    input.Body.AutoTuneOptions.MaintenanceSchedules[_].CronExpressionForRecurrence == STRING
    input.Body.DryRun == BOOLEAN
    input.ReqMap.DomainName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdatePackage

valid {
    input.Body.PackageID == STRING
    input.Body.PackageSource.S3BucketName == STRING
    input.Body.PackageSource.S3Key == STRING
    input.Body.PackageDescription == STRING
    input.Body.CommitMessage == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateVpcEndpoint

valid {
    input.Body.VpcEndpointId == STRING
    input.Body.VpcOptions.SubnetIds[_] == STRING
    input.Body.VpcOptions.SecurityGroupIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpgradeElasticsearchDomain

valid {
    input.Body.DomainName == STRING
    input.Body.TargetVersion == STRING
    input.Body.PerformCheckOnly == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}