com.trendmicro.ds.platform.rest.api

## Interface ICloudAccountAPI

-     @Path(value="/cloudaccounts")
      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 sessionId)` Delete a cloud account.
    `CloudAccountElement` | `getCloudAccount(java.lang.Integer cloudAccountId, java.lang.String sessionId)` Get a specific cloud account.
    `ListCloudAccountsResponse` | `listCloudAccounts(java.lang.String sessionId)` Lists all of the cloud accounts that are in Deep Security
    `SynchronizeCloudAccountResponse` | `synchronizeCloudAccount(java.lang.Integer cloudAccountId, java.lang.String sessionId)` Synchronize a cloud account by ID.
    `TestCloudAccountResponse` | `testCloudAccountConnection(java.lang.Integer cloudAccountId, java.lang.String sessionId)` Test a cloud account connection against its supporting cloud provider.
    `UpdateCloudAccountResponse` | `updateCloudAccount(java.lang.Integer cloudAccountId, UpdateCloudAccountRequest updateCloudAccountRequest)` Update cloud account information.

- - ### Method Detail

    - #### listCloudAccounts

          @GET
           @Produces(value={"application/xml","application/json"})
          ListCloudAccountsResponse listCloudAccounts(@CookieParam(value="sID")
                                                                                                                    java.lang.String sessionId)
                                                                                                             throws java.lang.Exception

      Lists all of the cloud accounts that are in Deep Security
      Parameters:
        `sessionId` - a session ID returned by the Authentication API.
      Returns:
        A response with status `200 OK` and a body containing `GetCloudAccountsResponse` object if the get was successful If there is an authentication issue with the session cookie it will return a `403 Forbidden` If there is an error getting the account list it will return a `500 Internal Server Error`
      Throws:
        `java.lang.Exception`

    - #### getCloudAccount

          @GET
           @Path(value="/{cloudAccountID}")
           @Produces(value={"application/xml","application/json"})
          CloudAccountElement getCloudAccount(@PathParam(value="cloudAccountID")
                                                                                                                                              java.lang.Integer cloudAccountId,
                                                                                                                                              @QueryParam(value="sID")
                                                                                                                                              java.lang.String sessionId)
                                                                                                                                       throws java.lang.Exception

      Get a specific cloud account.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying a cloud account.
        `sessionId` - a session ID returned by the Authentication API.
      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

          @POST
           @Consumes(value={"application/xml","application/json"})
           @Produces(value={"application/xml","application/json"})
          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
        - amazon.cloud.region.key.9 maps to eu-central-1
        - amazon.cloud.region.key.10 maps to us-gov-west-1
        - amazon.cloud.region.key.11 maps to cn-north-1
        - amazon.cloud.region.key.12 maps to ap-northeast-1
        - amazon.cloud.region.key.13 maps to ap-south-1
        - amazon.cloud.region.key.14 maps to us-east-2
        - amazon.cloud.region.key.15 maps to ca-central-1
        - amazon.cloud.region.key.16 maps to eu-west-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.)

      For AZURE (Resource Manager)

      - subscriptionId
      - subscriptionName
      - cloudType where the value is AZURE_ARM
      - name
      - azureAdTenantId
      - azureAdTenantName
      - azureAdApplicationId
      - azureAdApplicationName
      - azureAdApplicationPassword
      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

          @PUT
           @Path(value="/{cloudAccountID}")
           @Consumes(value={"application/xml","application/json"})
           @Produces(value={"application/xml","application/json"})
          UpdateCloudAccountResponse updateCloudAccount(@PathParam(value="cloudAccountID")
                                                                                                                                                                                                                 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

          @DELETE
           @Path(value="/{cloudAccountID}")
           @Produces(value={"application/xml","application/json"})
          DeleteCloudAccountResponse deleteCloudAccount(@PathParam(value="cloudAccountID")
                                                                                                                                                           java.lang.Integer cloudAccountId,
                                                                                                                                                           @QueryParam(value="sID")
                                                                                                                                                           java.lang.String sessionId)
                                                                                                                                                    throws java.lang.Exception

      Delete a cloud account.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying the cloud account to delete.
        `sessionId` - a session ID returned by the Authentication API.
      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

          @PUT
           @Path(value="/{cloudAccountID}/synchronize")
           @Produces(value={"application/xml","application/json"})
          SynchronizeCloudAccountResponse synchronizeCloudAccount(@PathParam(value="cloudAccountID")
                                                                                                                                                                              java.lang.Integer cloudAccountId,
                                                                                                                                                                              @QueryParam(value="sID")
                                                                                                                                                                              java.lang.String sessionId)
                                                                                                                                                                       throws java.lang.Exception

      Synchronize a cloud account by ID.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying the cloud account to synchronize.
        `sessionId` - a session ID returned by the Authentication API.
      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

          @PUT
           @Path(value="/{cloudAccountID}/testconnection")
           @Produces(value={"application/xml","application/json"})
          TestCloudAccountResponse testCloudAccountConnection(@PathParam(value="cloudAccountID")
                                                                                                                                                                             java.lang.Integer cloudAccountId,
                                                                                                                                                                             @QueryParam(value="sID")
                                                                                                                                                                             java.lang.String sessionId)
                                                                                                                                                                      throws java.lang.Exception

      Test a cloud account connection against its supporting cloud provider.
      Parameters:
        `cloudAccountId` - Identifier uniquely identifying the cloud account to test.
        `sessionId` - a session ID returned by the Authentication API.
      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 © 2017 Trend Micro Inc. All Rights Reserved.