Class AccountManagementClient

java.lang.Object
com.wavefront.spring.account.AccountManagementClient

public class AccountManagementClient extends Object
Manage a Wavefront account based on an ApplicationTags.
Author:
Stephane Nicoll
  • Constructor Summary

    Constructors
    Constructor
    Description
    AccountManagementClient​(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder, String version)
    Create an instance using the specified RestTemplateBuilder and starter version.
  • Method Summary

    Modifier and Type
    Method
    Description
    getExistingAccount​(String clusterUri, com.wavefront.sdk.common.application.ApplicationTags applicationTags, String apiToken)
    Retrieve an existing account for the specified Wavefront cluster, application information and api token.
    provisionAccount​(String clusterUri, com.wavefront.sdk.common.application.ApplicationTags applicationTags)
    Provision an account for the specified Wavefront cluster and application information.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AccountManagementClient

      public AccountManagementClient(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder, String version)
      Create an instance using the specified RestTemplateBuilder and starter version.
      Parameters:
      restTemplateBuilder - the builder to use to configure the RestTemplate.
      version - the version of the starter or null if the version could not be determined.
  • Method Details

    • provisionAccount

      public AccountInfo provisionAccount(String clusterUri, com.wavefront.sdk.common.application.ApplicationTags applicationTags)
      Provision an account for the specified Wavefront cluster and application information.
      Parameters:
      clusterUri - the URI of the Wavefront cluster
      applicationTags - the ApplicationTags to use
      Returns:
      the provisioned account
      Throws:
      AccountManagementFailedException - if the cluster does not support freemium accounts
    • getExistingAccount

      public AccountInfo getExistingAccount(String clusterUri, com.wavefront.sdk.common.application.ApplicationTags applicationTags, String apiToken)
      Retrieve an existing account for the specified Wavefront cluster, application information and api token.
      Parameters:
      clusterUri - the URI of the Wavefront cluster
      applicationTags - the ApplicationTags to use
      apiToken - the api token to use
      Returns:
      an existing account information
      Throws:
      AccountManagementFailedException - if the cluster does not support freemium accounts