public class ClientFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
APPLICATION_NAME |
| Constructor and Description |
|---|
ClientFactory(ItemGroup itemGroup,
com.google.common.collect.ImmutableList<com.cloudbees.plugins.credentials.domains.DomainRequirement> domainRequirements,
String credentialsId,
Optional<com.google.api.client.http.HttpTransport> httpTransport)
Creates a
ClientFactory instance. |
ClientFactory(ItemGroup itemGroup,
String credentialsId)
Creates a
ClientFactory instance without specifying domainRequirements or
httpTransport. |
| Modifier and Type | Method and Description |
|---|---|
CloudResourceManagerClient |
cloudResourceManagerClient()
Creates a new
CloudResourceManagerClient. |
ComputeClient |
computeClient()
Creates a new
ComputeClient. |
ContainerClient |
containerClient()
Creates a new
ContainerClient. |
String |
getCredentialsId() |
String |
getDefaultProjectId() |
public static final String APPLICATION_NAME
public ClientFactory(ItemGroup itemGroup, com.google.common.collect.ImmutableList<com.cloudbees.plugins.credentials.domains.DomainRequirement> domainRequirements, String credentialsId, Optional<com.google.api.client.http.HttpTransport> httpTransport) throws AbortException
ClientFactory instance.itemGroup - A handle to the Jenkins instance.domainRequirements - A list of domain requirements.credentialsId - The ID of the GoogleRobotCredentials to be retrieved from Jenkins and
utilized for authorization.httpTransport - If specified, the HTTP transport this factory will utilize for clients it
creates.AbortException - If failed to create a new client factory.public ClientFactory(ItemGroup itemGroup, String credentialsId) throws AbortException
ClientFactory instance without specifying domainRequirements or
httpTransport.itemGroup - A handle to the Jenkins instance.credentialsId - The ID of the GoogleRobotCredentials to be retrieved from Jenkins and
utilized for authorization.AbortException - If failed to create a new client factory.public ContainerClient containerClient()
ContainerClient.ContainerClient instance.public ComputeClient computeClient()
ComputeClient.ComputeClient instance.public CloudResourceManagerClient cloudResourceManagerClient()
CloudResourceManagerClient.CloudResourceManagerClient instance.public String getDefaultProjectId()
public String getCredentialsId()
Copyright © 2016–2019 Google. All rights reserved.