> ## Documentation Index
> Fetch the complete documentation index at: https://densify-sync-changelog-7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Onboard AWS account

> Initiates AWS CloudWatch data collection and runs optimization analysis. Subsequent data collection and analysis are scheduled nightly. If an analysis already exists, this endpoint re-runs analysis and can update  the webhook for result delivery.




## OpenAPI

````yaml openapi/public_cloud/Analysis_AWS_Analyze.yaml POST /analysis/cloud/aws/analyze
openapi: 3.0.3
info:
  title: Kubex API – AWS Analyze
  version: '1.0'
servers:
  - url: https://{host}/api/v2
    variables:
      host:
        default: api.example.com
security: []
paths:
  /analysis/cloud/aws/analyze:
    post:
      tags:
        - AWS Analyze
      summary: Onboard AWS account
      description: >
        Initiates AWS CloudWatch data collection and runs optimization analysis.
        Subsequent data collection and analysis are scheduled nightly. If an
        analysis already exists, this endpoint re-runs analysis and can update 
        the webhook for result delivery.
      operationId: analyzeAws
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AwsAnalyzeRequest'
      responses:
        '200':
          description: Acknowledge request / analysis state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AwsAnalyzeResponse'
        '400':
          description: Invalid parameters
        '401':
          description: Authentication failed
        '404':
          description: Resource not found
        '500':
          description: Internal server error
components:
  schemas:
    AwsAnalyzeRequest:
      type: object
      properties:
        accountId:
          type: string
          description: The AWS account ID with the CloudWatch data to collect.
        roleArnName:
          type: string
          description: ARN for the IAM role created in AWS for data collection.
        roleExternalId:
          type: string
          description: External ID specified for Kubex when the IAM role was created.
        connectionName:
          type: string
          description: >-
            Optional friendly name for this connection (max 32 chars; must be
            unique within type).
        triggerAdhocAudit:
          type: string
          description: Optional flag to trigger a one-time 60-day historical audit.
        startDayOffset:
          type: string
          description: >-
            Optional start offset from the 60-day maximum for historical
            collection.
        endDayOffset:
          type: string
          description: Optional end offset from “yesterday” for historical collection.
        webHook:
          $ref: '#/components/schemas/WebHook'
      required:
        - accountId
        - roleArnName
        - roleExternalId
    AwsAnalyzeResponse:
      type: object
      properties:
        href:
          type: string
          description: Referenced resource to the analysis entity or status endpoint.
        message:
          type: string
          description: Human-readable message describing the result.
        status:
          type: integer
          description: HTTP response code of the request.
    WebHook:
      type: object
      properties:
        uri:
          type: string
          format: uri
          description: Destination URI to receive results when analysis completes.
        authType:
          type: string
          description: Authentication type for the webhook (e.g., basic, bearer).
        authValue:
          type: string
          description: Authentication credentials/value corresponding to authType.

````