com.trendmicro.ds.platform.rest.api

## Interface ICloudAccountAPI

-     public interface ICloudAccountAPI

  Interface for the Cloud Account API.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `CreateCloudAccountResponse` | `addCloudAccount(CreateCloudAccountRequest createCloudAccountRequest)` Add a new cloud account.
    `DeleteCloudAccountResponse` | `deleteCloudAccount(java.lang.Integer cloudAccountId, java.lang.String sID)` Delete a cloud account.
    `CloudAccountElement` | `getCloudAccount(java.lang.Integer cloudAccountId, java.lang.String sID)` Get a specific cloud account.
    `CloudAccountListing` | `getCloudAccounts(java.lang.String sID)` List configuration of all cloud accounts (Amazon, vCloud Private Cloud).
    `SynchronizeCloudAccountResponse` | `synchronizeCloudAccount(java.lang.Integer cloudAccountId, java.lang.String sID)` Synchronize a cloud account by ID.
    `TestCloudAccountResponse` | `testCloudAccountConnection(java.lang.Integer cloudAccountId, java.lang.String sID)` Test a cloud account connection against its supporting cloud provider.
    `UpdateCloudAccountResponse` | `updateCloudAccount(java.lang.Integer cloudAccountId, UpdateCloudAccountRequest updateCloudAccountRequest)` Update cloud account information.

- - ### Method Detail

    - #### getCloudAccounts

          CloudAccountListing getCloudAccounts(java.lang.String sID)
                                        throws java.lang.Exception

      List configuration of all cloud accounts (Amazon, vCloud Private Cloud).
      Parameters:
        `sID` - session ID.
      Returns:
        The list of configured cloud accounts (if any).
      Throws:
        `java.lang.Exception`

    - #### getCloudAccount

          CloudAccountElement getCloudAccount(java.lang.Integer cloudAccountId,
                                              java.lang.String sID)
                                       throws java.lang.Exception

      Get a specific cloud account.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying a cloud account.
        `sID` - session ID.
      Returns:
        The requested cloud account. It will return response code `404 Not Found` when trying to retrieve a non-existent cloud account.
      Throws:
        `java.lang.Exception`

    - #### addCloudAccount

          CreateCloudAccountResponse addCloudAccount(CreateCloudAccountRequest createCloudAccountRequest)
                                              throws java.lang.Exception

      Add a new cloud account.

      The following fields of the CloudAccountElement are mandatory:

      For AMAZON

      - accessKey
      - secretKey
      - cloudType where the value is AMAZON
      - name
      - cloudRegion where the value are a choice between the following keys:
        - amazon.cloud.region.key.1 maps to us-east-1
        - amazon.cloud.region.key.2 maps to us-west-2
        - amazon.cloud.region.key.3 maps to us-west-1
        - amazon.cloud.region.key.4 maps to eu-west-1
        - amazon.cloud.region.key.5 maps to ap-southeast-1
        - amazon.cloud.region.key.6 maps to ap-northeast-1
        - amazon.cloud.region.key.7 maps to sa-east-1
        - amazon.cloud.region.key.8 maps to ap-southeast-2

      For VCLOUD

      - userId
      - userPassword
      - endpoint
      - cloudType where the value is VCLOUD_PRIVATE_CLOUD
      - name

      For AZURE

      - subscriptionId
      - azureCertificate
      - cloudType where the value is AZURE
      - name
      - azureCertPassword (A password is required only if the key pair is encrypted.)
      Parameters:
        `createCloudAccountRequest` - The request parameters.
      Returns:
        A response with status `200 OK` and a body containing response information when adding a cloud account succeeds. It will return a response with status `400 Bad Request` and a body containing an `ErrorMessage` when mandatory parameters are missing or validation fails.
      Throws:
        `java.lang.Exception`

    - #### updateCloudAccount

          UpdateCloudAccountResponse updateCloudAccount(java.lang.Integer cloudAccountId,
                                                        UpdateCloudAccountRequest updateCloudAccountRequest)
                                                 throws java.lang.Exception

      Update cloud account information.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying the cloud account to update.
        `updateCloudAccountRequest` - The request parameters
      Returns:
        A response with status `200 OK` and a body containing response information when updating a cloud account succeeds. It will return a response with status `400 Bad Request` and a body containing an `ErrorMessage` when trying to modify an unsupported attribute or when trying to modify a non-existent cloud account.
      Throws:
        `java.lang.Exception`

    - #### deleteCloudAccount

          DeleteCloudAccountResponse deleteCloudAccount(java.lang.Integer cloudAccountId,
                                                        java.lang.String sID)
                                                 throws java.lang.Exception

      Delete a cloud account.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying the cloud account to delete.
        `sID` - session ID.
      Returns:
        A response with status `200 OK` and a body containing response information when deletion was successful. If the id is null or empty, it will return a response with status `400 Bad Request` and a body containing an `ErrorMessage`.
      Throws:
        `java.lang.Exception`

    - #### synchronizeCloudAccount

          SynchronizeCloudAccountResponse synchronizeCloudAccount(java.lang.Integer cloudAccountId,
                                                                  java.lang.String sID)
                                                           throws java.lang.Exception

      Synchronize a cloud account by ID.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying the cloud account to synchronize.
        `sID` - session ID.
      Returns:
        A response with status `200 OK` and a body containing response information when synchronization was successful. If the id is null or empty, it will return a response with status `400 Bad Request` and a body containing an `ErrorMessage`.
      Throws:
        `java.lang.Exception`

    - #### testCloudAccountConnection

          TestCloudAccountResponse testCloudAccountConnection(java.lang.Integer cloudAccountId,
                                                              java.lang.String sID)
                                                       throws java.lang.Exception

      Test a cloud account connection against its supporting cloud provider.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying the cloud account to test.
        `sID` - session ID.
      Returns:
        A response with status `200 OK` and a body containing response information when the connection to the supporting cloud provider was successful. If the cloudAccountId is null or empty, it will return a response with status `400 Bad Request` and a body containing an `ErrorMessage`.
      Throws:
        `java.lang.Exception`

Copyright © 2015 Trend Micro Inc. All Rights Reserved.