Class AwsAccountApi

java.lang.Object
co.cloudcraft.api.ApiBase
co.cloudcraft.api.AwsAccountApi

public class AwsAccountApi extends ApiBase
  • Constructor Details

    • AwsAccountApi

      public AwsAccountApi(RestClient restClient)
  • Method Details

    • getCloudcraftIAMRoleConfig

      public IAMParameters getCloudcraftIAMRoleConfig() throws CloudcraftException
      List all the parameters required for registering a new IAM Role in AWS for use with Cloudcraft, customized to you.

      This API, combined with the AWS CLI to generate IAM Roles, can facilitate fully automated role creation at scale for an organization with a lot of AWS accounts.

      Returns:
      Throws:
      CloudcraftException - when any error occurs exercising this API
    • add

      public AwsAccount add(@NonNull @NonNull AwsAccountRequest accountRequest) throws CloudcraftException
      Register a new AWS account with Cloudcraft, for visualization via the API
      Throws:
      CloudcraftException
    • update

      public AwsAccount update(@NonNull @NonNull String accountId, @NonNull @NonNull AwsAccountRequest accountRequest) throws CloudcraftException
      Update a registered AWS account by ID
      Throws:
      CloudcraftException
    • delete

      public void delete(@NonNull @NonNull String accountId) throws CloudcraftException
      Delete a registered AWS account by ID
      Throws:
      CloudcraftException
    • list

      List all of your linked AWS accounts. The response is an array of AWS accounts. Each entry includes the account ID and name, access control and user information.
      Returns:
      Throws:
      CloudcraftException - when any error occurs exercising this API
    • snapshot

      public CloudcraftResponse snapshot(@NonNull @NonNull String accountId, @NonNull @NonNull String region, @NonNull ApiBase.BlueprintExportFormat format, SnapshotAccountQueryParams requestParams) throws CloudcraftException
      Scan and render one region of an AWS account into a blueprint in JSON, SVG, PNG, PDF or MxGraph format.

      The time required to generate the snapshot depends on the number of resources in the AWS region. The API behaves as a long poll, with a wait time of up to 120 seconds for the result. For most environments the API call will therefore directly return a blueprint. In case the wait time is exceeded, a 202 Accepted response is returned with a {code: STILL_PROCESSING, retry: true ...} JSON body. The snapshot will continue processing in the background, and a retry will either immediately return the result or continue waiting.

      Parameters:
      accountId - Cloudcraft issued identifier for the registered AWS account.
      region - the AWS region
      format - expected response format
      requestParams - optional parameters
      Returns:
      CloudcraftResponse object
      Throws:
      CloudcraftException - when any error occurs exercising this API