CLOUDHSMV2

CopyBackupToRegion

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

CreateCluster

enum_BackupRetentionType := [ "DAYS" ]
enum_ClusterMode := [ "FIPS", "NON_FIPS" ]
enum_NetworkType := [ "IPV4", "DUALSTACK" ]

valid {
    input.Body.BackupRetentionPolicy.Type == enum_BackupRetentionType[_]
    input.Body.BackupRetentionPolicy.Value == STRING
    input.Body.HsmType == STRING
    input.Body.SourceBackupId == STRING
    input.Body.SubnetIds[_] == STRING
    input.Body.NetworkType == enum_NetworkType[_]
    input.Body.TagList[_].Key == STRING
    input.Body.TagList[_].Value == STRING
    input.Body.Mode == enum_ClusterMode[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateHsm

valid {
    input.Body.ClusterId == STRING
    input.Body.AvailabilityZone == STRING
    input.Body.IpAddress == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteBackup

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

DeleteCluster

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

DeleteHsm

valid {
    input.Body.ClusterId == STRING
    input.Body.HsmId == STRING
    input.Body.EniId == STRING
    input.Body.EniIp == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteResourcePolicy

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

DescribeBackups

valid {
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.Body.Filters.STRING[_] == STRING
    input.Body.Shared == BOOLEAN
    input.Body.SortAscending == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeClusters

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

GetResourcePolicy

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

InitializeCluster

valid {
    input.Body.ClusterId == STRING
    input.Body.SignedCert == STRING
    input.Body.TrustAnchor == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTags

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

ModifyBackupAttributes

valid {
    input.Body.BackupId == STRING
    input.Body.NeverExpires == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ModifyCluster

enum_BackupRetentionType := [ "DAYS" ]

valid {
    input.Body.BackupRetentionPolicy.Type == enum_BackupRetentionType[_]
    input.Body.BackupRetentionPolicy.Value == STRING
    input.Body.ClusterId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutResourcePolicy

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

RestoreBackup

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

TagResource

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

UntagResource

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