Package com.wavefront.spring.account
Class AccountManagementClient
java.lang.Object
com.wavefront.spring.account.AccountManagementClient
Manage a Wavefront account based on an
ApplicationTags.- Author:
- Stephane Nicoll
-
Constructor Summary
ConstructorsConstructorDescriptionAccountManagementClient(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder, String version)Create an instance using the specifiedRestTemplateBuilderand starterversion. -
Method Summary
Modifier and TypeMethodDescriptiongetExistingAccount(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.
-
Constructor Details
-
AccountManagementClient
public AccountManagementClient(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder, String version)Create an instance using the specifiedRestTemplateBuilderand starterversion.- Parameters:
restTemplateBuilder- the builder to use to configure theRestTemplate.version- the version of the starter ornullif 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 clusterapplicationTags- theApplicationTagsto 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 clusterapplicationTags- theApplicationTagsto useapiToken- the api token to use- Returns:
- an existing account information
- Throws:
AccountManagementFailedException- if the cluster does not support freemium accounts
-