iam.audit-destinations.create

Export to S3, a webhook or syslog over TLS, or alarm by email on matching events

POST /iam/api/audit-destinationsIAM iam:CreateAuditDestinationChanges state

Delivers events from now on (update with resumeFrom=start to replay what is stored). filterActions takes globs; empty means every action. A webhook signing secret is returned once.

Request syntax

POST /iam/api/audit-destinations
{
  "kind": "enum",
  "name": "string",
  "filterActions": "array of string",
  "filterOutcome": "enum",
  "config": "map of string",
  "secretAccessKey": "string"
}

Request body

  • kindRequired

    enum

    Where entries go: an S3 bucket, an https webhook, a syslog receiver over TLS, or email (an alarm)

    One of: s3, webhook, syslog, email

  • nameRequired

    string

    A name, unique in the organization

    Constraints: 1-64 chars

  • filterActionsOptional

    array of string

    Action patterns to send, e.g. iam:* or auth:SignIn; empty or omitted: every action

    Constraints: max 100 chars

  • filterOutcomeOptional

    enum

    Send only entries with this outcome: success (Succeeded), error (Failed) or failure (Denied); null or omitted: every outcome

    One of: success, error, failure

    May be null.

  • configRequired

    map of string

    Settings for the kind. s3: {bucket, accessKeyId, region (default us-east-1), prefix, endpoint (default this platform’s object storage)}; webhook: {url} (https); syslog: {host, port (default 6514), caCertificate (PEM, for a private CA)}; email: {addresses}

    Constraints: key=<json>

  • secretAccessKeyOptional

    string

    The secret key that goes with config.accessKeyId; required for s3, stored encrypted and never returned

    Constraints: 16-256 chars

Response

201 with the destination as get describes it, plus webhookSecret: for a webhook, the secret each delivery’s signature header is made with, shown only in this response (null for other kinds).

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow iam:CreateAuditDestination on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud iam audit-destinations create --kind s3 --name example --config '{"key":"value"}'

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_iam_audit-destinations_create.