Skip to main content
POST
Store ECR Container Registry credentials

Path Parameters

organizationId
string<uuid>
required

CybeDefend organization ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json

ECR credentials to store

name
string
required

Display name for the credential

Example:

"ECR Prod"

awsRegion
string
required

AWS Region

Example:

"us-east-1"

credentialId
string

Existing credential id to update (rotation/type switch)

projectId
string

Deprecated: credentials are org-level. Ignored.

Example:

"097bbbf4-d1eb-4512-9950-684445279808"

credentialType
enum<string>
default:static_keys

Authentication mode

Available options:
static_keys,
iam_role
awsAccountId
string

AWS Account ID (12 digits) — required for static_keys mode

Example:

"123456789012"

awsAccessKeyId
string

AWS Access Key ID — required for static_keys mode

Example:

"AKIAIOSFODNN7EXAMPLE"

awsSecretAccessKey
string

AWS Secret Access Key — required for static_keys mode

Example:

"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"

roleArn
string

IAM role ARN to assume — required for iam_role mode. e.g. arn:aws:iam::123456789012:role/cybedefend-ecr

Example:

"arn:aws:iam::123456789012:role/cybedefend-ecr"

externalId
string

External ID enforced in the role trust policy (iam_role mode). Use the value returned by the prepare-iam-role endpoint.

description
string

Description for this credential

Example:

"Production ECR registry"

Response

Credentials stored successfully

id
string
required

Credential ID

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

awsAccountId
string
required

AWS Account ID (12 digits)

Example:

"123456789012"

awsRegion
string
required

AWS Region

Example:

"us-east-1"

createdAt
string
required

Creation date

Example:

"2025-01-01T00:00:00Z"

awsAccessKeyId
string

AWS Access Key ID (static_keys mode only)

Example:

"AKIAIOSFODNN7EXAMPLE"

credentialType
enum<string>

Authentication mode

Available options:
static_keys,
iam_role
roleArn
string

IAM role ARN (iam_role mode only)

Example:

"arn:aws:iam::123456789012:role/cybedefend-ecr"

description
string

Description

Example:

"Production ECR registry"