AssociateAppBlockBuilderAppBlock

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

AssociateApplicationFleet

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

AssociateApplicationToEntitlement

valid {
    input.Body.StackName == STRING
    input.Body.EntitlementName == STRING
    input.Body.ApplicationIdentifier == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

AssociateFleet

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

BatchAssociateUserStack

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]

valid {
    input.Body.UserStackAssociations[_].StackName == STRING
    input.Body.UserStackAssociations[_].UserName == STRING
    input.Body.UserStackAssociations[_].AuthenticationType == enum_AuthenticationType[_]
    input.Body.UserStackAssociations[_].SendEmailNotification == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

BatchDisassociateUserStack

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]

valid {
    input.Body.UserStackAssociations[_].StackName == STRING
    input.Body.UserStackAssociations[_].UserName == STRING
    input.Body.UserStackAssociations[_].AuthenticationType == enum_AuthenticationType[_]
    input.Body.UserStackAssociations[_].SendEmailNotification == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CopyImage

valid {
    input.Body.SourceImageName == STRING
    input.Body.DestinationImageName == STRING
    input.Body.DestinationRegion == STRING
    input.Body.DestinationImageDescription == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateAppBlock

enum_PackagingType := [ "CUSTOM", "APPSTREAM2" ]

valid {
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.DisplayName == STRING
    input.Body.SourceS3Location.S3Bucket == STRING
    input.Body.SourceS3Location.S3Key == STRING
    input.Body.SetupScriptDetails.ScriptS3Location.S3Bucket == STRING
    input.Body.SetupScriptDetails.ScriptS3Location.S3Key == STRING
    input.Body.SetupScriptDetails.ExecutablePath == STRING
    input.Body.SetupScriptDetails.ExecutableParameters == STRING
    input.Body.SetupScriptDetails.TimeoutInSeconds == INTEGER
    input.Body.Tags.STRING == STRING
    input.Body.PostSetupScriptDetails.ScriptS3Location.S3Bucket == STRING
    input.Body.PostSetupScriptDetails.ScriptS3Location.S3Key == STRING
    input.Body.PostSetupScriptDetails.ExecutablePath == STRING
    input.Body.PostSetupScriptDetails.ExecutableParameters == STRING
    input.Body.PostSetupScriptDetails.TimeoutInSeconds == INTEGER
    input.Body.PackagingType == enum_PackagingType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateAppBlockBuilder

enum_AccessEndpointType := [ "STREAMING" ]
enum_AppBlockBuilderPlatformType := [ "WINDOWS_SERVER_2019" ]

valid {
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.DisplayName == STRING
    input.Body.Tags.STRING == STRING
    input.Body.Platform == enum_AppBlockBuilderPlatformType[_]
    input.Body.InstanceType == STRING
    input.Body.VpcConfig.SubnetIds[_] == STRING
    input.Body.VpcConfig.SecurityGroupIds[_] == STRING
    input.Body.EnableDefaultInternetAccess == BOOLEAN
    input.Body.IamRoleArn == STRING
    input.Body.AccessEndpoints[_].EndpointType == enum_AccessEndpointType[_]
    input.Body.AccessEndpoints[_].VpceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateAppBlockBuilderStreamingURL

valid {
    input.Body.AppBlockBuilderName == STRING
    input.Body.Validity == LONG
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateApplication

enum_PlatformType := [ "WINDOWS", "WINDOWS_SERVER_2016", "WINDOWS_SERVER_2019", "WINDOWS_SERVER_2022", "AMAZON_LINUX2", "RHEL8", "ROCKY_LINUX8" ]

valid {
    input.Body.Name == STRING
    input.Body.DisplayName == STRING
    input.Body.Description == STRING
    input.Body.IconS3Location.S3Bucket == STRING
    input.Body.IconS3Location.S3Key == STRING
    input.Body.LaunchPath == STRING
    input.Body.WorkingDirectory == STRING
    input.Body.LaunchParameters == STRING
    input.Body.Platforms[_] == enum_PlatformType[_]
    input.Body.InstanceFamilies[_] == STRING
    input.Body.AppBlockArn == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDirectoryConfig

enum_CertificateBasedAuthStatus := [ "DISABLED", "ENABLED", "ENABLED_NO_DIRECTORY_LOGIN_FALLBACK" ]

valid {
    input.Body.DirectoryName == STRING
    input.Body.OrganizationalUnitDistinguishedNames[_] == STRING
    input.Body.ServiceAccountCredentials.AccountName == STRING
    input.Body.ServiceAccountCredentials.AccountPassword == STRING
    input.Body.CertificateBasedAuthProperties.Status == enum_CertificateBasedAuthStatus[_]
    input.Body.CertificateBasedAuthProperties.CertificateAuthorityArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateEntitlement

enum_AppVisibility := [ "ALL", "ASSOCIATED" ]

valid {
    input.Body.Name == STRING
    input.Body.StackName == STRING
    input.Body.Description == STRING
    input.Body.AppVisibility == enum_AppVisibility[_]
    input.Body.Attributes[_].Name == STRING
    input.Body.Attributes[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateFleet

enum_FleetType := [ "ALWAYS_ON", "ON_DEMAND", "ELASTIC" ]
enum_PlatformType := [ "WINDOWS", "WINDOWS_SERVER_2016", "WINDOWS_SERVER_2019", "WINDOWS_SERVER_2022", "AMAZON_LINUX2", "RHEL8", "ROCKY_LINUX8" ]
enum_StreamView := [ "APP", "DESKTOP" ]

valid {
    input.Body.Name == STRING
    input.Body.ImageName == STRING
    input.Body.ImageArn == STRING
    input.Body.InstanceType == STRING
    input.Body.FleetType == enum_FleetType[_]
    input.Body.ComputeCapacity.DesiredInstances == INTEGER
    input.Body.ComputeCapacity.DesiredSessions == INTEGER
    input.Body.VpcConfig.SubnetIds[_] == STRING
    input.Body.VpcConfig.SecurityGroupIds[_] == STRING
    input.Body.MaxUserDurationInSeconds == INTEGER
    input.Body.DisconnectTimeoutInSeconds == INTEGER
    input.Body.Description == STRING
    input.Body.DisplayName == STRING
    input.Body.EnableDefaultInternetAccess == BOOLEAN
    input.Body.DomainJoinInfo.DirectoryName == STRING
    input.Body.DomainJoinInfo.OrganizationalUnitDistinguishedName == STRING
    input.Body.Tags.STRING == STRING
    input.Body.IdleDisconnectTimeoutInSeconds == INTEGER
    input.Body.IamRoleArn == STRING
    input.Body.StreamView == enum_StreamView[_]
    input.Body.Platform == enum_PlatformType[_]
    input.Body.MaxConcurrentSessions == INTEGER
    input.Body.UsbDeviceFilterStrings[_] == STRING
    input.Body.SessionScriptS3Location.S3Bucket == STRING
    input.Body.SessionScriptS3Location.S3Key == STRING
    input.Body.MaxSessionsPerInstance == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateImageBuilder

enum_AccessEndpointType := [ "STREAMING" ]

valid {
    input.Body.Name == STRING
    input.Body.ImageName == STRING
    input.Body.ImageArn == STRING
    input.Body.InstanceType == STRING
    input.Body.Description == STRING
    input.Body.DisplayName == STRING
    input.Body.VpcConfig.SubnetIds[_] == STRING
    input.Body.VpcConfig.SecurityGroupIds[_] == STRING
    input.Body.IamRoleArn == STRING
    input.Body.EnableDefaultInternetAccess == BOOLEAN
    input.Body.DomainJoinInfo.DirectoryName == STRING
    input.Body.DomainJoinInfo.OrganizationalUnitDistinguishedName == STRING
    input.Body.AppstreamAgentVersion == STRING
    input.Body.Tags.STRING == STRING
    input.Body.AccessEndpoints[_].EndpointType == enum_AccessEndpointType[_]
    input.Body.AccessEndpoints[_].VpceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateImageBuilderStreamingURL

valid {
    input.Body.Name == STRING
    input.Body.Validity == LONG
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateStack

enum_AccessEndpointType := [ "STREAMING" ]
enum_Action := [ "CLIPBOARD_COPY_FROM_LOCAL_DEVICE", "CLIPBOARD_COPY_TO_LOCAL_DEVICE", "FILE_UPLOAD", "FILE_DOWNLOAD", "PRINTING_TO_LOCAL_DEVICE", "DOMAIN_PASSWORD_SIGNIN", "DOMAIN_SMART_CARD_SIGNIN", "AUTO_TIME_ZONE_REDIRECTION" ]
enum_Permission := [ "ENABLED", "DISABLED" ]
enum_PreferredProtocol := [ "TCP", "UDP" ]
enum_StorageConnectorType := [ "HOMEFOLDERS", "GOOGLE_DRIVE", "ONE_DRIVE" ]

valid {
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.DisplayName == STRING
    input.Body.StorageConnectors[_].ConnectorType == enum_StorageConnectorType[_]
    input.Body.StorageConnectors[_].ResourceIdentifier == STRING
    input.Body.StorageConnectors[_].Domains[_] == STRING
    input.Body.RedirectURL == STRING
    input.Body.FeedbackURL == STRING
    input.Body.UserSettings[_].Action == enum_Action[_]
    input.Body.UserSettings[_].Permission == enum_Permission[_]
    input.Body.UserSettings[_].MaximumLength == INTEGER
    input.Body.ApplicationSettings.Enabled == BOOLEAN
    input.Body.ApplicationSettings.SettingsGroup == STRING
    input.Body.Tags.STRING == STRING
    input.Body.AccessEndpoints[_].EndpointType == enum_AccessEndpointType[_]
    input.Body.AccessEndpoints[_].VpceId == STRING
    input.Body.EmbedHostDomains[_] == STRING
    input.Body.StreamingExperienceSettings.PreferredProtocol == enum_PreferredProtocol[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateStreamingURL

valid {
    input.Body.StackName == STRING
    input.Body.FleetName == STRING
    input.Body.UserId == STRING
    input.Body.ApplicationId == STRING
    input.Body.Validity == LONG
    input.Body.SessionContext == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateThemeForStack

enum_ThemeStyling := [ "LIGHT_BLUE", "BLUE", "PINK", "RED" ]

valid {
    input.Body.StackName == STRING
    input.Body.FooterLinks[_].DisplayName == STRING
    input.Body.FooterLinks[_].FooterLinkURL == STRING
    input.Body.TitleText == STRING
    input.Body.ThemeStyling == enum_ThemeStyling[_]
    input.Body.OrganizationLogoS3Location.S3Bucket == STRING
    input.Body.OrganizationLogoS3Location.S3Key == STRING
    input.Body.FaviconS3Location.S3Bucket == STRING
    input.Body.FaviconS3Location.S3Key == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateUpdatedImage

valid {
    input.Body.existingImageName == STRING
    input.Body.newImageName == STRING
    input.Body.newImageDescription == STRING
    input.Body.newImageDisplayName == STRING
    input.Body.newImageTags.STRING == STRING
    input.Body.dryRun == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateUsageReportSubscription

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

CreateUser

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]
enum_MessageAction := [ "SUPPRESS", "RESEND" ]

valid {
    input.Body.UserName == STRING
    input.Body.MessageAction == enum_MessageAction[_]
    input.Body.FirstName == STRING
    input.Body.LastName == STRING
    input.Body.AuthenticationType == enum_AuthenticationType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteAppBlock

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

DeleteAppBlockBuilder

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

DeleteApplication

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

DeleteDirectoryConfig

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

DeleteEntitlement

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

DeleteFleet

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

DeleteImage

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

DeleteImageBuilder

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

DeleteImagePermissions

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

DeleteStack

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

DeleteThemeForStack

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

DeleteUsageReportSubscription

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

DeleteUser

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]

valid {
    input.Body.UserName == STRING
    input.Body.AuthenticationType == enum_AuthenticationType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeAppBlockBuilderAppBlockAssociations

valid {
    input.Body.AppBlockArn == STRING
    input.Body.AppBlockBuilderName == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeAppBlockBuilders

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

DescribeAppBlocks

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

DescribeApplicationFleetAssociations

valid {
    input.Body.FleetName == STRING
    input.Body.ApplicationArn == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeApplications

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

DescribeDirectoryConfigs

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

DescribeEntitlements

valid {
    input.Body.Name == STRING
    input.Body.StackName == STRING
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeFleets

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

DescribeImageBuilders

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

DescribeImagePermissions

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

DescribeImages

enum_VisibilityType := [ "PUBLIC", "PRIVATE", "SHARED" ]

valid {
    input.Body.Names[_] == STRING
    input.Body.Arns[_] == STRING
    input.Body.Type == enum_VisibilityType[_]
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeSessions

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]

valid {
    input.Body.StackName == STRING
    input.Body.FleetName == STRING
    input.Body.UserId == STRING
    input.Body.NextToken == STRING
    input.Body.Limit == INTEGER
    input.Body.AuthenticationType == enum_AuthenticationType[_]
    input.Body.InstanceId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeStacks

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

DescribeThemeForStack

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

DescribeUsageReportSubscriptions

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

DescribeUserStackAssociations

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]

valid {
    input.Body.StackName == STRING
    input.Body.UserName == STRING
    input.Body.AuthenticationType == enum_AuthenticationType[_]
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeUsers

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]

valid {
    input.Body.AuthenticationType == enum_AuthenticationType[_]
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DisableUser

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]

valid {
    input.Body.UserName == STRING
    input.Body.AuthenticationType == enum_AuthenticationType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DisassociateAppBlockBuilderAppBlock

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

DisassociateApplicationFleet

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

DisassociateApplicationFromEntitlement

valid {
    input.Body.StackName == STRING
    input.Body.EntitlementName == STRING
    input.Body.ApplicationIdentifier == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DisassociateFleet

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

EnableUser

enum_AuthenticationType := [ "API", "SAML", "USERPOOL", "AWS_AD" ]

valid {
    input.Body.UserName == STRING
    input.Body.AuthenticationType == enum_AuthenticationType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ExpireSession

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

ListAssociatedFleets

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

ListAssociatedStacks

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

ListEntitledApplications

valid {
    input.Body.StackName == STRING
    input.Body.EntitlementName == STRING
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

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

StartAppBlockBuilder

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

StartFleet

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

StartImageBuilder

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

StopAppBlockBuilder

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

StopFleet

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

StopImageBuilder

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

TagResource

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

UntagResource

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

UpdateAppBlockBuilder

enum_AccessEndpointType := [ "STREAMING" ]
enum_AppBlockBuilderAttribute := [ "IAM_ROLE_ARN", "ACCESS_ENDPOINTS", "VPC_CONFIGURATION_SECURITY_GROUP_IDS" ]
enum_PlatformType := [ "WINDOWS", "WINDOWS_SERVER_2016", "WINDOWS_SERVER_2019", "WINDOWS_SERVER_2022", "AMAZON_LINUX2", "RHEL8", "ROCKY_LINUX8" ]

valid {
    input.Body.Name == STRING
    input.Body.Description == STRING
    input.Body.DisplayName == STRING
    input.Body.Platform == enum_PlatformType[_]
    input.Body.InstanceType == STRING
    input.Body.VpcConfig.SubnetIds[_] == STRING
    input.Body.VpcConfig.SecurityGroupIds[_] == STRING
    input.Body.EnableDefaultInternetAccess == BOOLEAN
    input.Body.IamRoleArn == STRING
    input.Body.AccessEndpoints[_].EndpointType == enum_AccessEndpointType[_]
    input.Body.AccessEndpoints[_].VpceId == STRING
    input.Body.AttributesToDelete[_] == enum_AppBlockBuilderAttribute[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateApplication

enum_ApplicationAttribute := [ "LAUNCH_PARAMETERS", "WORKING_DIRECTORY" ]

valid {
    input.Body.Name == STRING
    input.Body.DisplayName == STRING
    input.Body.Description == STRING
    input.Body.IconS3Location.S3Bucket == STRING
    input.Body.IconS3Location.S3Key == STRING
    input.Body.LaunchPath == STRING
    input.Body.WorkingDirectory == STRING
    input.Body.LaunchParameters == STRING
    input.Body.AppBlockArn == STRING
    input.Body.AttributesToDelete[_] == enum_ApplicationAttribute[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDirectoryConfig

enum_CertificateBasedAuthStatus := [ "DISABLED", "ENABLED", "ENABLED_NO_DIRECTORY_LOGIN_FALLBACK" ]

valid {
    input.Body.DirectoryName == STRING
    input.Body.OrganizationalUnitDistinguishedNames[_] == STRING
    input.Body.ServiceAccountCredentials.AccountName == STRING
    input.Body.ServiceAccountCredentials.AccountPassword == STRING
    input.Body.CertificateBasedAuthProperties.Status == enum_CertificateBasedAuthStatus[_]
    input.Body.CertificateBasedAuthProperties.CertificateAuthorityArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateEntitlement

enum_AppVisibility := [ "ALL", "ASSOCIATED" ]

valid {
    input.Body.Name == STRING
    input.Body.StackName == STRING
    input.Body.Description == STRING
    input.Body.AppVisibility == enum_AppVisibility[_]
    input.Body.Attributes[_].Name == STRING
    input.Body.Attributes[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateFleet

enum_FleetAttribute := [ "VPC_CONFIGURATION", "VPC_CONFIGURATION_SECURITY_GROUP_IDS", "DOMAIN_JOIN_INFO", "IAM_ROLE_ARN", "USB_DEVICE_FILTER_STRINGS", "SESSION_SCRIPT_S3_LOCATION", "MAX_SESSIONS_PER_INSTANCE" ]
enum_PlatformType := [ "WINDOWS", "WINDOWS_SERVER_2016", "WINDOWS_SERVER_2019", "WINDOWS_SERVER_2022", "AMAZON_LINUX2", "RHEL8", "ROCKY_LINUX8" ]
enum_StreamView := [ "APP", "DESKTOP" ]

valid {
    input.Body.ImageName == STRING
    input.Body.ImageArn == STRING
    input.Body.Name == STRING
    input.Body.InstanceType == STRING
    input.Body.ComputeCapacity.DesiredInstances == INTEGER
    input.Body.ComputeCapacity.DesiredSessions == INTEGER
    input.Body.VpcConfig.SubnetIds[_] == STRING
    input.Body.VpcConfig.SecurityGroupIds[_] == STRING
    input.Body.MaxUserDurationInSeconds == INTEGER
    input.Body.DisconnectTimeoutInSeconds == INTEGER
    input.Body.DeleteVpcConfig == BOOLEAN
    input.Body.Description == STRING
    input.Body.DisplayName == STRING
    input.Body.EnableDefaultInternetAccess == BOOLEAN
    input.Body.DomainJoinInfo.DirectoryName == STRING
    input.Body.DomainJoinInfo.OrganizationalUnitDistinguishedName == STRING
    input.Body.IdleDisconnectTimeoutInSeconds == INTEGER
    input.Body.AttributesToDelete[_] == enum_FleetAttribute[_]
    input.Body.IamRoleArn == STRING
    input.Body.StreamView == enum_StreamView[_]
    input.Body.Platform == enum_PlatformType[_]
    input.Body.MaxConcurrentSessions == INTEGER
    input.Body.UsbDeviceFilterStrings[_] == STRING
    input.Body.SessionScriptS3Location.S3Bucket == STRING
    input.Body.SessionScriptS3Location.S3Key == STRING
    input.Body.MaxSessionsPerInstance == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateImagePermissions

valid {
    input.Body.Name == STRING
    input.Body.SharedAccountId == STRING
    input.Body.ImagePermissions.allowFleet == BOOLEAN
    input.Body.ImagePermissions.allowImageBuilder == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateStack

enum_AccessEndpointType := [ "STREAMING" ]
enum_Action := [ "CLIPBOARD_COPY_FROM_LOCAL_DEVICE", "CLIPBOARD_COPY_TO_LOCAL_DEVICE", "FILE_UPLOAD", "FILE_DOWNLOAD", "PRINTING_TO_LOCAL_DEVICE", "DOMAIN_PASSWORD_SIGNIN", "DOMAIN_SMART_CARD_SIGNIN", "AUTO_TIME_ZONE_REDIRECTION" ]
enum_Permission := [ "ENABLED", "DISABLED" ]
enum_PreferredProtocol := [ "TCP", "UDP" ]
enum_StackAttribute := [ "STORAGE_CONNECTORS", "STORAGE_CONNECTOR_HOMEFOLDERS", "STORAGE_CONNECTOR_GOOGLE_DRIVE", "STORAGE_CONNECTOR_ONE_DRIVE", "REDIRECT_URL", "FEEDBACK_URL", "THEME_NAME", "USER_SETTINGS", "EMBED_HOST_DOMAINS", "IAM_ROLE_ARN", "ACCESS_ENDPOINTS", "STREAMING_EXPERIENCE_SETTINGS" ]
enum_StorageConnectorType := [ "HOMEFOLDERS", "GOOGLE_DRIVE", "ONE_DRIVE" ]

valid {
    input.Body.DisplayName == STRING
    input.Body.Description == STRING
    input.Body.Name == STRING
    input.Body.StorageConnectors[_].ConnectorType == enum_StorageConnectorType[_]
    input.Body.StorageConnectors[_].ResourceIdentifier == STRING
    input.Body.StorageConnectors[_].Domains[_] == STRING
    input.Body.DeleteStorageConnectors == BOOLEAN
    input.Body.RedirectURL == STRING
    input.Body.FeedbackURL == STRING
    input.Body.AttributesToDelete[_] == enum_StackAttribute[_]
    input.Body.UserSettings[_].Action == enum_Action[_]
    input.Body.UserSettings[_].Permission == enum_Permission[_]
    input.Body.UserSettings[_].MaximumLength == INTEGER
    input.Body.ApplicationSettings.Enabled == BOOLEAN
    input.Body.ApplicationSettings.SettingsGroup == STRING
    input.Body.AccessEndpoints[_].EndpointType == enum_AccessEndpointType[_]
    input.Body.AccessEndpoints[_].VpceId == STRING
    input.Body.EmbedHostDomains[_] == STRING
    input.Body.StreamingExperienceSettings.PreferredProtocol == enum_PreferredProtocol[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateThemeForStack

enum_ThemeAttribute := [ "FOOTER_LINKS" ]
enum_ThemeState := [ "ENABLED", "DISABLED" ]
enum_ThemeStyling := [ "LIGHT_BLUE", "BLUE", "PINK", "RED" ]

valid {
    input.Body.StackName == STRING
    input.Body.FooterLinks[_].DisplayName == STRING
    input.Body.FooterLinks[_].FooterLinkURL == STRING
    input.Body.TitleText == STRING
    input.Body.ThemeStyling == enum_ThemeStyling[_]
    input.Body.OrganizationLogoS3Location.S3Bucket == STRING
    input.Body.OrganizationLogoS3Location.S3Key == STRING
    input.Body.FaviconS3Location.S3Bucket == STRING
    input.Body.FaviconS3Location.S3Key == STRING
    input.Body.State == enum_ThemeState[_]
    input.Body.AttributesToDelete[_] == enum_ThemeAttribute[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}