-
Notifications
You must be signed in to change notification settings - Fork 4
2.11 SDK configuration
jwebs1 edited this page Jul 6, 2015
·
2 revisions
To use the SDK, you need to provide valid CenturyLink credentials.
You can select from several possible credential providers.
-
DefaultCredentialsProvider
is a wrapper for other providers. It is used by default if the SDK default constructor is called. -
EnvironmentVariableCredentialsProvider
loads credentials from environment variables. The default property keys for the username and password areCLC_USERNAME
andCLC_PASSWORD
. -
PropertiesFileCredentialsProvider
loads user-credentials from a properties file located in the application's classpath. The default name of the classpath file iscenturylink-cloud.properties
. -
StaticCredentialsProvider
loads credentials directly through the constructor. -
SystemVariableCredentialsProvider
loads credentials from Java VM variables. The default property keys for the username and password areclc.username
andclc.password
.
Here is an example:
ClcSdk sdk =
new ClcSdk(
new StaticCredentialsProvider("username", "password"),
SdkConfiguration.builder()
.maxRetries(10)
.proxyHost("localhost")
.proxyPort(8081)
.proxyScheme("http")
.proxyUsername("proxyUser")
.proxyPassword("proxyPassword")
.socketTimeout(5000)
.build()
);
Additionally, you can provide the following configuration properties:
Name | Type | Description | Required |
---|---|---|---|
maxRetries | int | The maximum allowed number of re-tries | No |
proxyHost | String | The proxy host name | No |
proxyPort | int | The proxy port. If it is specified, proxyHost must be specified too. | No |
proxyScheme | String | The proxy scheme (e.g. "http" or "https"). If it is specified, proxyHost must be specified too. The default value is "http". | No |
proxyUsername | String | The proxy user name | No |
proxyPassword | String | The proxy password | No |
socketTimeout | long | The socket timeout in milliseconds | No |
- [Getting Started] (./1.-Getting-started)
- User Guide - Basic Functions
- Server management
- Server actions
- Managing groups
- Group actions
- Searching templates
- Searching data centers
- Invoice statistics
- SDK configuration
- User Guide - Advanced Functions
- Configuring remote servers over SSH
- Defining a group hierarchy
- Billing statistics
- Server monitoring statistics
- Policies management
- Shared load balancers management
- User Guide - Framework adapters