POST
/
dbroles
/
jobs
curl --request POST \
  --url https://use.hoop.dev/api/dbroles/jobs \
  --header 'Content-Type: */*' \
  --data '{
  "agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "aws": {
    "default_security_group": {
      "ingress_cidr": "192.168.1.0/24",
      "target_port": 5432
    },
    "instance_arn": "arn:aws:rds:us-west-2:123456789012:db:my-instance"
  },
  "connection_prefix_name": "prod-postgres-",
  "job_steps": [
    "create-connections",
    "send-webhook"
  ],
  "vault_provider": {
    "secret_id": "dbsecrets/data"
  }
}'
{
  "job_id": "8F680C64-DBFD-48E1-9855-6650D9CAD62C"
}

Body

*/*
The request body resource
agent_id
string
required

Unique identifier of the agent hosting the database resource

Minimum length: 36
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

aws
object
required

AWS-specific configuration for the database role creation job

connection_prefix_name
string
required

Base prefix for connection names - the role name will be appended to this prefix when creating the database connection (e.g., "prod-postgres-ro")

Example:

"prod-postgres-"

job_steps
enum<string>[]
required

The additional steps to execute

Available options:
create-connections,
send-webhook
Example:
["create-connections", "send-webhook"]
vault_provider
object

Vault Provider uses HashiCorp Vault to store the provisioned credentials. The target agent must be configured with the Vault Credentials in order for this operation to work

Response

202
application/json
Accepted
job_id
string

Unique identifier for the asynchronous job that will create the database role

Example:

"8F680C64-DBFD-48E1-9855-6650D9CAD62C"