232 lines
5.0 KiB
Plaintext
232 lines
5.0 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
url = "file:local-aws-state.sqlite"
|
|
}
|
|
|
|
model Attribute {
|
|
id Int @id @default(autoincrement())
|
|
arn String
|
|
name String
|
|
value String
|
|
|
|
@@unique([arn, name])
|
|
}
|
|
|
|
model Audit {
|
|
id String @id
|
|
createdAt DateTime @default(now())
|
|
action String?
|
|
request String?
|
|
response String?
|
|
}
|
|
|
|
model IamRole {
|
|
id String @id
|
|
path String?
|
|
name String
|
|
assumeRolePolicy String?
|
|
description String?
|
|
maxSessionDuration Int?
|
|
permissionBoundaryArn String?
|
|
lastUsedDate DateTime?
|
|
lastUsedRegion String?
|
|
accountId String
|
|
createdAt DateTime @default(now())
|
|
|
|
policies IamRoleIamPolicyAttachment[]
|
|
inlinePolicies IamRoleInlinePolicy[]
|
|
|
|
@@unique([accountId, name])
|
|
}
|
|
|
|
model IamRoleInlinePolicy {
|
|
id String @id @default(uuid())
|
|
roleName String
|
|
policyName String
|
|
policyDocument String
|
|
accountId String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
role IamRole @relation(fields: [accountId, roleName], references: [accountId, name], onDelete: Cascade)
|
|
|
|
@@unique([accountId, roleName, policyName])
|
|
}
|
|
|
|
model IamPolicy {
|
|
id String
|
|
version Int @default(1)
|
|
isDefault Boolean
|
|
path String?
|
|
name String
|
|
description String?
|
|
policy String
|
|
isAttachable Boolean @default(false)
|
|
accountId String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@id([id, version])
|
|
}
|
|
|
|
model IamRoleIamPolicyAttachment {
|
|
iamRoleId String
|
|
iamPolicyId String
|
|
|
|
role IamRole @relation(fields: [iamRoleId], references: [id])
|
|
|
|
@@id([iamRoleId, iamPolicyId])
|
|
}
|
|
|
|
model KmsAlias {
|
|
name String
|
|
accountId String
|
|
region String
|
|
kmsKeyId String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
kmsKey KmsKey @relation(fields: [kmsKeyId], references: [id])
|
|
|
|
@@id([accountId, region, name])
|
|
}
|
|
|
|
model KmsKey {
|
|
id String @id
|
|
enabled Boolean
|
|
usage String
|
|
description String
|
|
keySpec String
|
|
keyState String
|
|
origin String
|
|
multiRegion Boolean
|
|
policy String
|
|
key Bytes
|
|
rotationPeriod Int?
|
|
nextRotation DateTime?
|
|
accountId String
|
|
region String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
aliases KmsAlias[]
|
|
}
|
|
|
|
model Secret {
|
|
versionId String @id
|
|
name String
|
|
description String?
|
|
secretString String
|
|
accountId String
|
|
region String
|
|
createdAt DateTime @default(now())
|
|
deletionDate DateTime?
|
|
|
|
@@index([name])
|
|
}
|
|
|
|
model SnsTopic {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
accountId String
|
|
region String
|
|
|
|
@@unique([accountId, region, name])
|
|
}
|
|
|
|
model SnsTopicSubscription {
|
|
id String @id
|
|
topicArn String
|
|
endpoint String?
|
|
protocol String
|
|
accountId String
|
|
region String
|
|
}
|
|
|
|
model SqsQueue {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
accountId String
|
|
region String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
messages SqsQueueMessage[]
|
|
|
|
@@unique([accountId, region, name])
|
|
}
|
|
|
|
model SqsQueueMessage {
|
|
id String @id
|
|
queueId Int
|
|
senderId String
|
|
message String
|
|
inFlightRelease DateTime
|
|
createdAt DateTime @default(now())
|
|
|
|
queue SqsQueue @relation(fields: [queueId], references: [id])
|
|
|
|
@@index([queueId])
|
|
}
|
|
|
|
model Tag {
|
|
id Int @id @default(autoincrement())
|
|
arn String
|
|
name String
|
|
value String
|
|
|
|
@@unique([arn, name])
|
|
}
|
|
|
|
model S3Bucket {
|
|
id String @id
|
|
name String @unique
|
|
tags String @default("{}")
|
|
policy String?
|
|
acl String @default("{\"Owner\":{\"ID\":\"local-user\",\"DisplayName\":\"local-user\"},\"Grants\":[]}")
|
|
createdAt DateTime @default(now())
|
|
|
|
objects S3Object[]
|
|
}
|
|
|
|
model S3Object {
|
|
id String @id
|
|
bucketId String
|
|
key String
|
|
versionId String?
|
|
content Bytes
|
|
contentType String @default("application/octet-stream")
|
|
size Int
|
|
etag String
|
|
metadata String @default("{}")
|
|
storageClass String @default("STANDARD")
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
bucket S3Bucket @relation(fields: [bucketId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([bucketId, key])
|
|
@@index([bucketId])
|
|
}
|
|
|
|
model ConsulKVEntry {
|
|
key String @id
|
|
value String // Base64 encoded
|
|
flags BigInt @default(0)
|
|
createIndex Int
|
|
modifyIndex Int
|
|
lockIndex Int @default(0)
|
|
session String?
|
|
datacenter String @default("dc1")
|
|
namespace String @default("default")
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@index([datacenter])
|
|
@@index([namespace])
|
|
}
|