public class CloudControllerClientImpl extends Object implements CloudControllerClient
| Constructor and Description |
|---|
CloudControllerClientImpl(CloudControllerRestClient delegate)
Construct a client with a pre-configured CloudControllerClient
|
CloudControllerClientImpl(URL controllerUrl)
Construct client for anonymous user.
|
CloudControllerClientImpl(URL controllerUrl,
boolean trustSelfSignedCerts) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials)
Construct client without a default organization and space.
|
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
boolean trustSelfSignedCerts) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
CloudSpace target)
Construct a client with a default CloudSpace.
|
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
CloudSpace target,
boolean trustSelfSignedCerts) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
CloudSpace target,
HttpProxyConfiguration httpProxyConfiguration) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
CloudSpace target,
HttpProxyConfiguration httpProxyConfiguration,
boolean trustSelfSignedCerts) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
HttpProxyConfiguration httpProxyConfiguration) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
HttpProxyConfiguration httpProxyConfiguration,
boolean trustSelfSignedCerts) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
String organizationName,
String spaceName)
Construct a client with a default space name and organization name.
|
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
String organizationName,
String spaceName,
boolean trustSelfSignedCerts) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
String organizationName,
String spaceName,
HttpProxyConfiguration httpProxyConfiguration) |
CloudControllerClientImpl(URL controllerUrl,
CloudCredentials credentials,
String organizationName,
String spaceName,
HttpProxyConfiguration httpProxyConfiguration,
boolean trustSelfSignedCerts) |
CloudControllerClientImpl(URL controllerUrl,
HttpProxyConfiguration httpProxyConfiguration) |
CloudControllerClientImpl(URL controllerUrl,
HttpProxyConfiguration httpProxyConfiguration,
boolean trustSelfSignedCerts) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDomain(String domainName)
Add a private domain in the current organization.
|
void |
addRoute(String host,
String domainName,
String path)
Register a new route to the a domain.
|
void |
associateAuditorWithSpace(String spaceName)
Associate current user to the space auditors role
|
void |
associateAuditorWithSpace(String organizationName,
String spaceName)
Associate current user to the space auditors role
|
void |
associateAuditorWithSpace(String organizationName,
String spaceName,
String userGuid)
Associate a user to the space auditors role
|
void |
associateDeveloperWithSpace(String spaceName)
Associate current user to the space developer role
|
void |
associateDeveloperWithSpace(String organizationName,
String spaceName)
Associate current user to the space developer role
|
void |
associateDeveloperWithSpace(String organizationName,
String spaceName,
String userGuid)
Associate a user to the space developer role
|
void |
associateManagerWithSpace(String spaceName)
Associate current user to the space managers role
|
void |
associateManagerWithSpace(String organizationName,
String spaceName)
Associate current user to the space managers role
|
void |
associateManagerWithSpace(String organizationName,
String spaceName,
String userGuid)
Associate a user to the space managers role
|
UploadToken |
asyncUploadApplication(String applicationName,
File file) |
UploadToken |
asyncUploadApplication(String applicationName,
File file,
UploadStatusCallback callback) |
void |
bindDropletToApp(UUID dropletGuid,
UUID applicationGuid) |
void |
bindRunningSecurityGroup(String securityGroupName)
Bind a security group to the list of security groups to be used for running applications.
|
void |
bindSecurityGroup(String organizationName,
String spaceName,
String securityGroupName)
Bind a security group to a space.
|
void |
bindService(String applicationName,
String serviceName)
Associate (provision) a service with an application.
|
void |
bindService(String applicationName,
String serviceName,
Map<String,Object> parameters,
ApplicationServicesUpdateCallback updateServicesCallback)
Associate (provision) a service with an application.
|
void |
bindStagingSecurityGroup(String securityGroupName)
Bind a security group to the list of security groups to be used for staging applications.
|
CloudTask |
cancelTask(UUID taskGuid)
Cancel the given task.
|
void |
createApplication(String applicationName,
Staging staging,
Integer disk,
Integer memory,
List<String> uris,
List<String> serviceNames,
DockerInfo dockerInfo)
Create application.
|
void |
createApplication(String applicationName,
Staging staging,
Integer memory,
List<String> uris,
List<String> serviceNames)
Create application.
|
CloudBuild |
createBuild(UUID packageGuid) |
void |
createQuota(CloudQuota quota)
Create quota
|
void |
createSecurityGroup(CloudSecurityGroup securityGroup)
Create a new CloudSecurityGroup.
|
void |
createSecurityGroup(String name,
InputStream jsonRulesFile)
Create a new CloudSecurityGroup using a JSON rules file.
|
void |
createService(CloudService service)
Create a service.
|
void |
createServiceBroker(CloudServiceBroker serviceBroker)
Create a service broker.
|
CloudServiceKey |
createServiceKey(String serviceName,
String serviceKeyName,
Map<String,Object> parameters)
Create a service key.
|
void |
createSpace(String spaceName)
Create a space with the specified name
|
void |
createUserProvidedService(CloudService service,
Map<String,Object> credentials)
Create a user-provided service.
|
void |
createUserProvidedService(CloudService service,
Map<String,Object> credentials,
String syslogDrainUrl)
Create a user-provided service for logging.
|
void |
deleteAllApplications()
Delete all applications.
|
void |
deleteAllServices()
Delete all services.
|
void |
deleteApplication(String applicationName)
Delete application.
|
void |
deleteDomain(String domainName)
Delete a private domain in the current organization.
|
List<CloudRoute> |
deleteOrphanedRoutes()
Delete routes that do not have any application which is assigned to them.
|
void |
deleteQuota(String quotaName)
Delete quota by name
|
void |
deleteRoute(String host,
String domainName,
String path)
Delete a registered route from the space of the current session.
|
void |
deleteSecurityGroup(String securityGroupName)
Deletes the security group with the given name.
|
void |
deleteService(String service)
Delete cloud service.
|
void |
deleteServiceBroker(String name)
Delete a service broker.
|
void |
deleteServiceKey(String service,
String serviceKey)
Delete a service key.
|
void |
deleteSpace(String spaceName)
Delete a space with the specified name
|
CloudApplication |
getApplication(String applicationName)
Get cloud application with the specified name.
|
CloudApplication |
getApplication(String applicationName,
boolean required)
Get cloud application with the specified name.
|
CloudApplication |
getApplication(UUID applicationGuid)
Get cloud application with the specified GUID.
|
Map<String,String> |
getApplicationEnvironment(String applicationName)
Get application environment variables for the app with the specified name.
|
Map<String,String> |
getApplicationEnvironment(UUID applicationGuid)
Get application environment variables for the app with the specified GUID.
|
List<CloudEvent> |
getApplicationEvents(String applicationName)
Get application events.
|
InstancesInfo |
getApplicationInstances(CloudApplication app)
Get application instances info for application.
|
InstancesInfo |
getApplicationInstances(String applicationName)
Get application instances info for application.
|
List<CloudApplication> |
getApplications()
Get all cloud applications.
|
List<CloudApplication> |
getApplicationsByMetadataLabelSelector(String labelSelector) |
CloudBuild |
getBuild(UUID buildGuid) |
List<CloudBuild> |
getBuildsForApplication(UUID applicationGuid) |
List<CloudBuild> |
getBuildsForPackage(UUID packageGuid) |
URL |
getCloudControllerUrl()
Get the URL used for the cloud controller.
|
CloudInfo |
getCloudInfo()
Get CloudInfo for the current cloud.
|
Map<String,String> |
getCrashLogs(String applicationName)
Deprecated.
use
#streamLogs(String, ApplicationLogListener) or getRecentLogs(String) |
CloudDomain |
getDefaultDomain()
Gets the default domain for the current org, which is the first shared domain.
|
List<CloudDomain> |
getDomains()
Get list of all domain shared and private domains.
|
List<CloudDomain> |
getDomainsForOrganization()
Get list of all domain registered for the current organization.
|
List<CloudEvent> |
getEvents()
Get system events.
|
String |
getFile(String applicationName,
int instanceIndex,
String filePath)
Get file from the deployed application.
|
String |
getFile(String applicationName,
int instanceIndex,
String filePath,
int startPosition)
Get a the content, starting at a specific position, of a file from the deployed application.
|
String |
getFile(String applicationName,
int instanceIndex,
String filePath,
int startPosition,
int endPosition)
Get a range of content of a file from the deployed application.
|
String |
getFileTail(String applicationName,
int instanceIndex,
String filePath,
int length)
Get a the last bytes, with length as specified, of content of a file from the deployed application.
|
Map<String,String> |
getLogs(String applicationName)
Deprecated.
use
#streamLogs(String, ApplicationLogListener) or getRecentLogs(String) |
CloudOrganization |
getOrganization(String organizationName)
Get the organization with the specified name.
|
CloudOrganization |
getOrganization(String organizationName,
boolean required)
Get the organization with the specified name.
|
List<CloudOrganization> |
getOrganizations()
Get list of CloudOrganizations for the current cloud.
|
Map<String,CloudUser> |
getOrganizationUsers(String organizationName)
Get all users in the specified organization
|
List<CloudDomain> |
getPrivateDomains()
Get list of all private domains.
|
CloudQuota |
getQuota(String quotaName)
Get quota by name
|
CloudQuota |
getQuota(String quotaName,
boolean required)
Get quota by name
|
List<CloudQuota> |
getQuotas()
Get quota definitions
|
List<ApplicationLog> |
getRecentLogs(String applicationName)
Stream recent log entries.
|
List<ApplicationLog> |
getRecentLogs(UUID applicationGuid)
Get recent log entries.
|
List<CloudRoute> |
getRoutes(String domainName)
Get the info for all routes for a domain.
|
List<CloudSecurityGroup> |
getRunningSecurityGroups()
List security groups in the set of security groups for running applications.
|
CloudSecurityGroup |
getSecurityGroup(String securityGroupName)
Get a specific security group by name.
|
CloudSecurityGroup |
getSecurityGroup(String securityGroupName,
boolean required)
Get a specific security group by name.
|
List<CloudSecurityGroup> |
getSecurityGroups()
Get a List of all application security groups.
|
CloudService |
getService(String service)
Get cloud service.
|
CloudService |
getService(String service,
boolean required)
Get cloud service.
|
CloudServiceBroker |
getServiceBroker(String name)
Get a service broker.
|
CloudServiceBroker |
getServiceBroker(String name,
boolean required)
Get a service broker.
|
List<CloudServiceBroker> |
getServiceBrokers()
Get all service brokers.
|
CloudServiceInstance |
getServiceInstance(String service)
Get a service instance.
|
CloudServiceInstance |
getServiceInstance(String service,
boolean required)
Get a service instance.
|
List<CloudServiceKey> |
getServiceKeys(String serviceName)
Get service keys for a service.
|
List<CloudServiceOffering> |
getServiceOfferings()
Get all service offerings.
|
Map<String,Object> |
getServiceParameters(UUID guid)
Get all service parameters.
|
List<CloudService> |
getServices()
Get list of cloud services.
|
List<CloudService> |
getServicesByMetadataLabelSelector(String labelSelector) |
List<CloudDomain> |
getSharedDomains()
Get list of all shared domains.
|
CloudSpace |
getSpace(String spaceName)
Get space name with the specified name.
|
CloudSpace |
getSpace(String spaceName,
boolean required)
Get space name with the specified name.
|
CloudSpace |
getSpace(String organizationName,
String spaceName)
Get space name with the specified name.
|
CloudSpace |
getSpace(String organizationName,
String spaceName,
boolean required)
Get space name with the specified name.
|
CloudSpace |
getSpace(UUID spaceGuid)
Get space name with the specified GUID.
|
List<UUID> |
getSpaceAuditors() |
List<UUID> |
getSpaceAuditors(String spaceName)
Get list of space auditor UUID for the space.
|
List<UUID> |
getSpaceAuditors(String organizationName,
String spaceName)
Get list of space auditor UUID for the space.
|
List<UUID> |
getSpaceAuditors(UUID spaceGuid) |
List<UUID> |
getSpaceDevelopers() |
List<UUID> |
getSpaceDevelopers(String spaceName)
Get list of space developer UUID for the space.
|
List<UUID> |
getSpaceDevelopers(String organizationName,
String spaceName)
Get list of space developer UUID for the space.
|
List<UUID> |
getSpaceDevelopers(UUID spaceGuid) |
List<UUID> |
getSpaceManagers() |
List<UUID> |
getSpaceManagers(String spaceName)
Get list of space manager UUID for the space.
|
List<UUID> |
getSpaceManagers(String organizationName,
String spaceName)
Get list of space manager UUID for the space.
|
List<UUID> |
getSpaceManagers(UUID spaceGuid) |
List<CloudSpace> |
getSpaces()
Get list of CloudSpaces for the current cloud.
|
List<CloudSpace> |
getSpaces(String organizationName)
Get list of CloudSpaces for organization.
|
List<CloudSpace> |
getSpacesBoundToSecurityGroup(String securityGroupName)
Gets all the spaces that are bound to the given security group.
|
CloudStack |
getStack(String name)
Get a stack by name.
|
CloudStack |
getStack(String name,
boolean required)
Get a stack by name.
|
List<CloudStack> |
getStacks()
Get the list of stacks available for staging applications.
|
List<CloudSecurityGroup> |
getStagingSecurityGroups()
Lists security groups in the staging set for applications.
|
CloudTask |
getTask(UUID taskGuid) |
List<CloudTask> |
getTasks(String applicationName)
Get the list of one-off tasks currently known for the given application.
|
Upload |
getUploadStatus(UUID packageGuid) |
org.springframework.security.oauth2.common.OAuth2AccessToken |
login()
Login using the credentials already set for the client.
|
void |
logout()
Logout closing the current session.
|
void |
register(String email,
String password)
Register new user account with the provided credentials.
|
void |
registerRestLogListener(RestLogCallback callBack)
Register a new RestLogCallback
|
void |
removeDomain(String domainName)
Delete a private domain in the current organization.
|
void |
rename(String applicationName,
String newName)
Rename an application.
|
StartingInfo |
restartApplication(String applicationName)
Restart application.
|
CloudTask |
runTask(String applicationName,
CloudTask task)
Run a one-off task on an application.
|
void |
setQuotaToOrganization(String organizationName,
String quotaName)
Set quota to organization
|
void |
setResponseErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
Override the default REST response error handler with a custom error handler.
|
StartingInfo |
startApplication(String applicationName)
Start application.
|
void |
stopApplication(String applicationName)
Stop application.
|
void |
unbindRunningSecurityGroup(String securityGroupName)
Unbind a security group from the set of security groups for running applications.
|
void |
unbindSecurityGroup(String organizationName,
String spaceName,
String securityGroupName)
Unbind a security group from a space.
|
void |
unbindService(String applicationName,
String serviceName)
Un-associate (unprovision) a service from an application.
|
void |
unbindService(String applicationName,
String serviceName,
ApplicationServicesUpdateCallback applicationServicesUpdateCallback)
Un-associate (unprovision) a service from an application.
|
void |
unbindStagingSecurityGroup(String securityGroupName)
Unbind a security group from the set of security groups for staging applications.
|
void |
unregister()
Unregister and log out the currently logged in user
|
void |
unRegisterRestLogListener(RestLogCallback callBack)
Un-register a RestLogCallback
|
void |
updateApplicationDiskQuota(String applicationName,
int disk)
Update application disk quota.
|
void |
updateApplicationEnv(String applicationName,
Map<String,String> env)
Update application env using a map where the key specifies the name of the environment variable and the value the value of the
environment variable..
|
void |
updateApplicationInstances(String applicationName,
int instances)
Update application instances.
|
void |
updateApplicationMemory(String applicationName,
int memory)
Update application memory.
|
void |
updateApplicationMetadata(UUID guid,
org.cloudfoundry.client.v3.Metadata metadata) |
void |
updateApplicationStaging(String applicationName,
Staging staging)
Update application staging information.
|
void |
updateApplicationUris(String applicationName,
List<String> uris)
Update application URIs.
|
void |
updatePassword(CloudCredentials credentials,
String newPassword)
Update the password for the logged in user using the username/old_password provided in the credentials.
|
void |
updatePassword(String newPassword)
Update the password for the logged in user.
|
void |
updateQuota(CloudQuota quota,
String name)
Update Quota definition
|
void |
updateSecurityGroup(CloudSecurityGroup securityGroup)
Update an existing security group.
|
void |
updateSecurityGroup(String name,
InputStream jsonRulesFile)
Updates a existing CloudSecurityGroup using a JSON rules file.
|
void |
updateServiceBroker(CloudServiceBroker serviceBroker)
Update a service broker (unchanged forces catalog refresh).
|
void |
updateServiceMetadata(UUID guid,
org.cloudfoundry.client.v3.Metadata metadata) |
void |
updateServicePlanVisibilityForBroker(String name,
boolean visibility)
Service plans are private by default when a service broker's catalog is fetched/updated.
|
void |
uploadApplication(String applicationName,
File file)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String applicationName,
File file,
UploadStatusCallback callback)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String applicationName,
InputStream inputStream)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String applicationName,
InputStream inputStream,
UploadStatusCallback callback)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String applicationName,
String file)
Upload an application to Cloud Foundry.
|
public CloudControllerClientImpl(URL controllerUrl)
public CloudControllerClientImpl(URL controllerUrl, boolean trustSelfSignedCerts)
public CloudControllerClientImpl(URL controllerUrl, HttpProxyConfiguration httpProxyConfiguration)
public CloudControllerClientImpl(URL controllerUrl, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, boolean trustSelfSignedCerts)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, HttpProxyConfiguration httpProxyConfiguration)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, CloudSpace target)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, CloudSpace target, boolean trustSelfSignedCerts)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, CloudSpace target, HttpProxyConfiguration httpProxyConfiguration)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, CloudSpace target, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, String organizationName, String spaceName)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, String organizationName, String spaceName, boolean trustSelfSignedCerts)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, String organizationName, String spaceName, HttpProxyConfiguration httpProxyConfiguration)
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, String organizationName, String spaceName, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts)
public CloudControllerClientImpl(CloudControllerRestClient delegate)
public void addDomain(String domainName)
CloudControllerClientaddDomain in interface CloudControllerClientdomainName - the domain to addpublic void addRoute(String host, String domainName, String path)
CloudControllerClientaddRoute in interface CloudControllerClienthost - the host of the route to registerdomainName - the domain of the route to registerpublic void associateAuditorWithSpace(String spaceName)
CloudControllerClientassociateAuditorWithSpace in interface CloudControllerClientspaceName - name of the spacepublic void associateAuditorWithSpace(String organizationName, String spaceName)
CloudControllerClientassociateAuditorWithSpace in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spacepublic void associateAuditorWithSpace(String organizationName, String spaceName, String userGuid)
CloudControllerClientassociateAuditorWithSpace in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spaceuserGuid - guid of the user. If null, use current user. To retrieve user guid, use getOrganizationUsers and search for usernamepublic void associateDeveloperWithSpace(String spaceName)
CloudControllerClientassociateDeveloperWithSpace in interface CloudControllerClientspaceName - name of the spacepublic void associateDeveloperWithSpace(String organizationName, String spaceName)
CloudControllerClientassociateDeveloperWithSpace in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spacepublic void associateDeveloperWithSpace(String organizationName, String spaceName, String userGuid)
CloudControllerClientassociateDeveloperWithSpace in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spaceuserGuid - guid of the user. If null, use current user. To retrieve user guid, use getOrganizationUsers and search for usernamepublic void associateManagerWithSpace(String spaceName)
CloudControllerClientassociateManagerWithSpace in interface CloudControllerClientspaceName - name of the spacepublic void associateManagerWithSpace(String organizationName, String spaceName)
CloudControllerClientassociateManagerWithSpace in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spacepublic void associateManagerWithSpace(String organizationName, String spaceName, String userGuid)
CloudControllerClientassociateManagerWithSpace in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spaceuserGuid - guid of the user. If null, use current user. To retrieve user guid, use getOrganizationUsers and search for usernamepublic void bindRunningSecurityGroup(String securityGroupName)
CloudControllerClientbindRunningSecurityGroup in interface CloudControllerClientpublic void bindSecurityGroup(String organizationName, String spaceName, String securityGroupName)
CloudControllerClientbindSecurityGroup in interface CloudControllerClientorganizationName - The name of the organization that the space is in.spaceName - The name of the spacesecurityGroupName - The name of the security group to bind to the spacepublic void bindService(String applicationName, String serviceName)
CloudControllerClientbindService in interface CloudControllerClientapplicationName - the application nameserviceName - the service namepublic void bindService(String applicationName, String serviceName, Map<String,Object> parameters, ApplicationServicesUpdateCallback updateServicesCallback)
CloudControllerClientbindService in interface CloudControllerClientapplicationName - the application nameserviceName - the service nameparameters - the binding parameterspublic void bindStagingSecurityGroup(String securityGroupName)
CloudControllerClientbindStagingSecurityGroup in interface CloudControllerClientpublic void createApplication(String applicationName, Staging staging, Integer memory, List<String> uris, List<String> serviceNames)
CloudControllerClientcreateApplication in interface CloudControllerClientapplicationName - application namestaging - staging infomemory - memory to use in MBuris - list of URIs for the appserviceNames - list of service names to bind to apppublic void createApplication(String applicationName, Staging staging, Integer disk, Integer memory, List<String> uris, List<String> serviceNames, DockerInfo dockerInfo)
CloudControllerClientcreateApplication in interface CloudControllerClientapplicationName - application namestaging - staging infodisk - disk quota to use in MBmemory - memory to use in MBuris - list of URIs for the appserviceNames - list of service names to bind to appdockerInfo - docker params(image, username, password)public void createQuota(CloudQuota quota)
CloudControllerClientcreateQuota in interface CloudControllerClientpublic void createSecurityGroup(CloudSecurityGroup securityGroup)
CloudControllerClientcreateSecurityGroup in interface CloudControllerClientpublic void createSecurityGroup(String name, InputStream jsonRulesFile)
CloudControllerClientcf create-security-group
SECURITY-GROUP PATH-TO-RULES-FILE when using the cf command line. See the Application Security Group documentation for more
details.
Example JSON-formatted rules file:
[
{
"protocol":"tcp",
"destination":"10.0.11.0/24",
"ports":"1-65535"
},
{
"protocol":"udp",
"destination":"10.0.11.0/24",
"ports":"1-65535"
}
]
This method requires the logged in user to have admin permissions in the cloud controller.createSecurityGroup in interface CloudControllerClientname - the name for the security groupjsonRulesFile - An input stream that has a single array with JSON objects inside describing the ruleshttp://docs.cloudfoundry.org/adminguide/app-sec-groups.htmlpublic void createService(CloudService service)
CloudControllerClientcreateService in interface CloudControllerClientservice - cloud service infopublic void createServiceBroker(CloudServiceBroker serviceBroker)
CloudControllerClientcreateServiceBroker in interface CloudControllerClientserviceBroker - cloud service broker infopublic CloudServiceKey createServiceKey(String serviceName, String serviceKeyName, Map<String,Object> parameters)
CloudControllerClientcreateServiceKey in interface CloudControllerClientparameters - parameters of service-keypublic void createSpace(String spaceName)
CloudControllerClientcreateSpace in interface CloudControllerClientpublic void createUserProvidedService(CloudService service, Map<String,Object> credentials)
CloudControllerClientcreateUserProvidedService in interface CloudControllerClientservice - cloud service infocredentials - the user-provided service credentialspublic void createUserProvidedService(CloudService service, Map<String,Object> credentials, String syslogDrainUrl)
CloudControllerClientcreateUserProvidedService in interface CloudControllerClientservice - cloud service infocredentials - the user-provided service credentialssyslogDrainUrl - for a logging servicepublic void deleteAllApplications()
CloudControllerClientdeleteAllApplications in interface CloudControllerClientpublic void deleteAllServices()
CloudControllerClientdeleteAllServices in interface CloudControllerClientpublic void deleteApplication(String applicationName)
CloudControllerClientdeleteApplication in interface CloudControllerClientapplicationName - name of applicationpublic void deleteDomain(String domainName)
CloudControllerClientdeleteDomain in interface CloudControllerClientdomainName - the domain to deletepublic List<CloudRoute> deleteOrphanedRoutes()
CloudControllerClientdeleteOrphanedRoutes in interface CloudControllerClientpublic void deleteQuota(String quotaName)
CloudControllerClientdeleteQuota in interface CloudControllerClientpublic void deleteRoute(String host, String domainName, String path)
CloudControllerClientdeleteRoute in interface CloudControllerClienthost - the host of the route to deletedomainName - the domain of the route to deletepublic void deleteSecurityGroup(String securityGroupName)
CloudControllerClientdeleteSecurityGroup in interface CloudControllerClientpublic void deleteService(String service)
CloudControllerClientdeleteService in interface CloudControllerClientservice - name of servicepublic void deleteServiceBroker(String name)
CloudControllerClientdeleteServiceBroker in interface CloudControllerClientname - the service broker namepublic void deleteServiceKey(String service, String serviceKey)
CloudControllerClientdeleteServiceKey in interface CloudControllerClientserviceKey - name of service keypublic void deleteSpace(String spaceName)
CloudControllerClientdeleteSpace in interface CloudControllerClientspaceName - name of the spacepublic CloudApplication getApplication(String applicationName)
CloudControllerClientgetApplication in interface CloudControllerClientapplicationName - name of the apppublic CloudApplication getApplication(String applicationName, boolean required)
CloudControllerClientgetApplication in interface CloudControllerClientapplicationName - name of the apprequired - if true, and organization is not found, throw an exceptionpublic CloudApplication getApplication(UUID applicationGuid)
CloudControllerClientgetApplication in interface CloudControllerClientapplicationGuid - GUID of the apppublic Map<String,String> getApplicationEnvironment(UUID applicationGuid)
CloudControllerClientgetApplicationEnvironment in interface CloudControllerClientapplicationGuid - GUID of the apppublic Map<String,String> getApplicationEnvironment(String applicationName)
CloudControllerClientgetApplicationEnvironment in interface CloudControllerClientapplicationName - name of the apppublic List<CloudEvent> getApplicationEvents(String applicationName)
CloudControllerClientgetApplicationEvents in interface CloudControllerClientapplicationName - name of applicationpublic InstancesInfo getApplicationInstances(String applicationName)
CloudControllerClientgetApplicationInstances in interface CloudControllerClientapplicationName - name of application.public InstancesInfo getApplicationInstances(CloudApplication app)
CloudControllerClientgetApplicationInstances in interface CloudControllerClientapp - the application.public List<CloudApplication> getApplications()
CloudControllerClientgetApplications in interface CloudControllerClientpublic List<CloudApplication> getApplicationsByMetadataLabelSelector(String labelSelector)
getApplicationsByMetadataLabelSelector in interface CloudControllerClientpublic URL getCloudControllerUrl()
CloudControllerClientgetCloudControllerUrl in interface CloudControllerClientpublic CloudInfo getCloudInfo()
CloudControllerClientgetCloudInfo in interface CloudControllerClient@Deprecated public Map<String,String> getCrashLogs(String applicationName)
#streamLogs(String, ApplicationLogListener) or getRecentLogs(String)CloudControllerClientgetCrashLogs in interface CloudControllerClientapplicationName - name of the applicationpublic CloudDomain getDefaultDomain()
CloudControllerClientgetDefaultDomain in interface CloudControllerClientpublic List<CloudDomain> getDomains()
CloudControllerClientgetDomains in interface CloudControllerClientpublic List<CloudDomain> getDomainsForOrganization()
CloudControllerClientgetDomainsForOrganization in interface CloudControllerClientpublic List<CloudEvent> getEvents()
CloudControllerClientgetEvents in interface CloudControllerClientpublic String getFile(String applicationName, int instanceIndex, String filePath)
CloudControllerClientgetFile in interface CloudControllerClientapplicationName - name of the applicationinstanceIndex - instance indexfilePath - path to the filepublic String getFile(String applicationName, int instanceIndex, String filePath, int startPosition)
CloudControllerClientgetFile in interface CloudControllerClientapplicationName - name of the applicationinstanceIndex - instance indexfilePath - path to the filestartPosition - the starting position of the file contents (inclusive)public String getFile(String applicationName, int instanceIndex, String filePath, int startPosition, int endPosition)
CloudControllerClientgetFile in interface CloudControllerClientapplicationName - name of the applicationinstanceIndex - instance indexfilePath - path to the filestartPosition - the starting position of the file contents (inclusive)endPosition - the ending position of the file contents (exclusive)public String getFileTail(String applicationName, int instanceIndex, String filePath, int length)
CloudControllerClientgetFileTail in interface CloudControllerClientapplicationName - name of the applicationinstanceIndex - instance indexfilePath - path to the filelength - the length of the file contents to retrieve@Deprecated public Map<String,String> getLogs(String applicationName)
#streamLogs(String, ApplicationLogListener) or getRecentLogs(String)CloudControllerClientgetLogs in interface CloudControllerClientapplicationName - name of the applicationpublic CloudOrganization getOrganization(String organizationName)
CloudControllerClientgetOrganization in interface CloudControllerClientorganizationName - name of organizationpublic CloudOrganization getOrganization(String organizationName, boolean required)
CloudControllerClientgetOrganization in interface CloudControllerClientorganizationName - name of organizationrequired - if true, and organization is not found, throw an exceptionpublic Map<String,CloudUser> getOrganizationUsers(String organizationName)
CloudControllerClientgetOrganizationUsers in interface CloudControllerClientorganizationName - organization namepublic List<CloudOrganization> getOrganizations()
CloudControllerClientgetOrganizations in interface CloudControllerClientpublic List<CloudDomain> getPrivateDomains()
CloudControllerClientgetPrivateDomains in interface CloudControllerClientpublic CloudQuota getQuota(String quotaName)
CloudControllerClientgetQuota in interface CloudControllerClientpublic CloudQuota getQuota(String quotaName, boolean required)
CloudControllerClientgetQuota in interface CloudControllerClientrequired - if true, and organization is not found, throw an exceptionpublic List<CloudQuota> getQuotas()
CloudControllerClientgetQuotas in interface CloudControllerClientpublic List<ApplicationLog> getRecentLogs(String applicationName)
CloudControllerClientgetRecentLogs in interface CloudControllerClientapplicationName - the name of the applicationpublic List<ApplicationLog> getRecentLogs(UUID applicationGuid)
CloudControllerClientgetRecentLogs in interface CloudControllerClientapplicationGuid - the guid of the applicationpublic List<CloudRoute> getRoutes(String domainName)
CloudControllerClientgetRoutes in interface CloudControllerClientdomainName - the domain the routes belong topublic List<CloudSecurityGroup> getRunningSecurityGroups()
CloudControllerClientgetRunningSecurityGroups in interface CloudControllerClientpublic CloudSecurityGroup getSecurityGroup(String securityGroupName)
CloudControllerClientgetSecurityGroup in interface CloudControllerClientsecurityGroupName - The name of the security grouppublic CloudSecurityGroup getSecurityGroup(String securityGroupName, boolean required)
CloudControllerClientgetSecurityGroup in interface CloudControllerClientsecurityGroupName - The name of the security grouprequired - if true, and organization is not found, throw an exceptionnull if no security groups exist with the given namepublic List<CloudSecurityGroup> getSecurityGroups()
CloudControllerClientgetSecurityGroups in interface CloudControllerClientCloudSecurityGroups in the systempublic CloudService getService(String service)
CloudControllerClientgetService in interface CloudControllerClientservice - name of servicepublic CloudService getService(String service, boolean required)
CloudControllerClientgetService in interface CloudControllerClientservice - name of servicerequired - if true, and organization is not found, throw an exceptionpublic CloudServiceBroker getServiceBroker(String name)
CloudControllerClientgetServiceBroker in interface CloudControllerClientname - the service broker namepublic CloudServiceBroker getServiceBroker(String name, boolean required)
CloudControllerClientgetServiceBroker in interface CloudControllerClientname - the service broker namerequired - if true, and organization is not found, throw an exceptionpublic List<CloudServiceBroker> getServiceBrokers()
CloudControllerClientgetServiceBrokers in interface CloudControllerClientpublic CloudServiceInstance getServiceInstance(String service)
CloudControllerClientgetServiceInstance in interface CloudControllerClientservice - name of the service instancepublic Map<String,Object> getServiceParameters(UUID guid)
CloudControllerClientgetServiceParameters in interface CloudControllerClientguid - The service instance guidpublic CloudServiceInstance getServiceInstance(String service, boolean required)
CloudControllerClientgetServiceInstance in interface CloudControllerClientservice - name of the service instancerequired - if true, and organization is not found, throw an exceptionpublic List<CloudServiceKey> getServiceKeys(String serviceName)
CloudControllerClientgetServiceKeys in interface CloudControllerClientpublic List<CloudServiceOffering> getServiceOfferings()
CloudControllerClientgetServiceOfferings in interface CloudControllerClientpublic List<CloudService> getServices()
CloudControllerClientgetServices in interface CloudControllerClientpublic List<CloudService> getServicesByMetadataLabelSelector(String labelSelector)
getServicesByMetadataLabelSelector in interface CloudControllerClientpublic List<CloudDomain> getSharedDomains()
CloudControllerClientgetSharedDomains in interface CloudControllerClientpublic CloudSpace getSpace(UUID spaceGuid)
CloudControllerClientgetSpace in interface CloudControllerClientpublic CloudSpace getSpace(String organizationName, String spaceName)
CloudControllerClientgetSpace in interface CloudControllerClientpublic CloudSpace getSpace(String organizationName, String spaceName, boolean required)
CloudControllerClientgetSpace in interface CloudControllerClientpublic CloudSpace getSpace(String spaceName)
CloudControllerClientgetSpace in interface CloudControllerClientpublic CloudSpace getSpace(String spaceName, boolean required)
CloudControllerClientgetSpace in interface CloudControllerClientpublic List<UUID> getSpaceAuditors()
getSpaceAuditors in interface CloudControllerClientpublic List<UUID> getSpaceAuditors(String spaceName)
CloudControllerClientgetSpaceAuditors in interface CloudControllerClientspaceName - name of the spacepublic List<UUID> getSpaceAuditors(String organizationName, String spaceName)
CloudControllerClientgetSpaceAuditors in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spacepublic List<UUID> getSpaceAuditors(UUID spaceGuid)
getSpaceAuditors in interface CloudControllerClientpublic List<UUID> getSpaceDevelopers()
getSpaceDevelopers in interface CloudControllerClientpublic List<UUID> getSpaceDevelopers(String spaceName)
CloudControllerClientgetSpaceDevelopers in interface CloudControllerClientspaceName - name of the spacepublic List<UUID> getSpaceDevelopers(String organizationName, String spaceName)
CloudControllerClientgetSpaceDevelopers in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spacepublic List<UUID> getSpaceDevelopers(UUID spaceGuid)
getSpaceDevelopers in interface CloudControllerClientpublic List<UUID> getSpaceManagers()
getSpaceManagers in interface CloudControllerClientpublic List<UUID> getSpaceManagers(String spaceName)
CloudControllerClientgetSpaceManagers in interface CloudControllerClientspaceName - name of the spacepublic List<UUID> getSpaceManagers(String organizationName, String spaceName)
CloudControllerClientgetSpaceManagers in interface CloudControllerClientorganizationName - name of the organization containing the spacespaceName - name of the spacepublic List<UUID> getSpaceManagers(UUID spaceGuid)
getSpaceManagers in interface CloudControllerClientpublic List<CloudSpace> getSpaces()
CloudControllerClientgetSpaces in interface CloudControllerClientpublic List<CloudSpace> getSpaces(String organizationName)
CloudControllerClientgetSpaces in interface CloudControllerClientpublic List<CloudSpace> getSpacesBoundToSecurityGroup(String securityGroupName)
CloudControllerClientgetSpacesBoundToSecurityGroup in interface CloudControllerClientpublic CloudStack getStack(String name)
CloudControllerClientgetStack in interface CloudControllerClientname - the name of the stack to getpublic CloudStack getStack(String name, boolean required)
CloudControllerClientgetStack in interface CloudControllerClientname - the name of the stack to getrequired - if true, and organization is not found, throw an exceptionpublic List<CloudStack> getStacks()
CloudControllerClientgetStacks in interface CloudControllerClientpublic List<CloudSecurityGroup> getStagingSecurityGroups()
CloudControllerClientgetStagingSecurityGroups in interface CloudControllerClientpublic org.springframework.security.oauth2.common.OAuth2AccessToken login()
CloudControllerClientlogin in interface CloudControllerClientpublic void logout()
CloudControllerClientlogout in interface CloudControllerClientpublic void register(String email, String password)
CloudControllerClientregister in interface CloudControllerClientemail - the email accountpassword - the passwordpublic void registerRestLogListener(RestLogCallback callBack)
CloudControllerClientregisterRestLogListener in interface CloudControllerClientcallBack - the callback to be registeredpublic void removeDomain(String domainName)
CloudControllerClientremoveDomain in interface CloudControllerClientdomainName - the domain to removepublic void rename(String applicationName, String newName)
CloudControllerClientrename in interface CloudControllerClientapplicationName - the current namenewName - the new namepublic StartingInfo restartApplication(String applicationName)
CloudControllerClientrestartApplication in interface CloudControllerClientapplicationName - name of applicationpublic void setQuotaToOrganization(String organizationName, String quotaName)
CloudControllerClientsetQuotaToOrganization in interface CloudControllerClientpublic void setResponseErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
CloudControllerClientsetResponseErrorHandler in interface CloudControllerClientpublic StartingInfo startApplication(String applicationName)
CloudControllerClientstartApplication in interface CloudControllerClientapplicationName - name of applicationpublic void stopApplication(String applicationName)
CloudControllerClientstopApplication in interface CloudControllerClientapplicationName - name of applicationpublic void unRegisterRestLogListener(RestLogCallback callBack)
CloudControllerClientunRegisterRestLogListener in interface CloudControllerClientcallBack - the callback to be un-registeredpublic void unbindRunningSecurityGroup(String securityGroupName)
CloudControllerClientunbindRunningSecurityGroup in interface CloudControllerClientpublic void unbindSecurityGroup(String organizationName, String spaceName, String securityGroupName)
CloudControllerClientunbindSecurityGroup in interface CloudControllerClientorganizationName - The name of the organization that the space is in.spaceName - The name of the spacesecurityGroupName - The name of the security group to bind to the spacepublic void unbindService(String applicationName, String serviceName, ApplicationServicesUpdateCallback applicationServicesUpdateCallback)
CloudControllerClientunbindService in interface CloudControllerClientapplicationName - the application nameserviceName - the service nameapplicationServicesUpdateCallback - callback used for error handlingpublic void unbindService(String applicationName, String serviceName)
CloudControllerClientunbindService in interface CloudControllerClientapplicationName - the application nameserviceName - the service namepublic void unbindStagingSecurityGroup(String securityGroupName)
CloudControllerClientunbindStagingSecurityGroup in interface CloudControllerClientpublic void unregister()
CloudControllerClientunregister in interface CloudControllerClientpublic void updateApplicationDiskQuota(String applicationName, int disk)
CloudControllerClientupdateApplicationDiskQuota in interface CloudControllerClientapplicationName - name of applicationdisk - new disk setting in MBpublic void updateApplicationEnv(String applicationName, Map<String,String> env)
CloudControllerClientupdateApplicationEnv in interface CloudControllerClientapplicationName - name of applicationenv - map of environment settingspublic void updateApplicationInstances(String applicationName, int instances)
CloudControllerClientupdateApplicationInstances in interface CloudControllerClientapplicationName - name of applicationinstances - number of instances to usepublic void updateApplicationMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)
updateApplicationMetadata in interface CloudControllerClientpublic void updateApplicationMemory(String applicationName, int memory)
CloudControllerClientupdateApplicationMemory in interface CloudControllerClientapplicationName - name of applicationmemory - new memory setting in MBpublic void updateApplicationStaging(String applicationName, Staging staging)
CloudControllerClientupdateApplicationStaging in interface CloudControllerClientapplicationName - name of appplicationstaging - staging information for the apppublic void updateApplicationUris(String applicationName, List<String> uris)
CloudControllerClientupdateApplicationUris in interface CloudControllerClientapplicationName - name of applicationuris - list of URIs the app should usepublic void updatePassword(String newPassword)
CloudControllerClientupdatePassword in interface CloudControllerClientnewPassword - the new passwordpublic void updatePassword(CloudCredentials credentials, String newPassword)
CloudControllerClientupdatePassword in interface CloudControllerClientcredentials - current credentialsnewPassword - the new passwordpublic void updateQuota(CloudQuota quota, String name)
CloudControllerClientupdateQuota in interface CloudControllerClientpublic void updateServiceMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)
updateServiceMetadata in interface CloudControllerClientpublic void updateSecurityGroup(CloudSecurityGroup securityGroup)
CloudControllerClientupdateSecurityGroup in interface CloudControllerClientpublic void updateSecurityGroup(String name, InputStream jsonRulesFile)
CloudControllerClientcf
update-security-group SECURITY-GROUP PATH-TO-RULES-FILE when using the cf command line. See the Application Security Group
documentation for more details.
Example JSON-formatted rules file:
[
{
"protocol":"tcp",
"destination":"10.0.11.0/24",
"ports":"1-65535"
},
{
"protocol":"udp",
"destination":"10.0.11.0/24",
"ports":"1-65535"
}
]
This method requires the logged in user to have admin permissions in the cloud controller.updateSecurityGroup in interface CloudControllerClientjsonRulesFile - An input stream that has a single array with JSON objects inside describing the ruleshttp://docs.cloudfoundry.org/adminguide/app-sec-groups.htmlpublic void updateServiceBroker(CloudServiceBroker serviceBroker)
CloudControllerClientupdateServiceBroker in interface CloudControllerClientserviceBroker - cloud service broker infopublic void updateServicePlanVisibilityForBroker(String name, boolean visibility)
CloudControllerClientupdateServicePlanVisibilityForBroker in interface CloudControllerClientname - the service broker namevisibility - true for public, false for privatepublic void uploadApplication(String applicationName, String file) throws IOException
CloudControllerClientuploadApplication in interface CloudControllerClientapplicationName - application namefile - path to the application archive or folderIOExceptionpublic void uploadApplication(String applicationName, File file) throws IOException
CloudControllerClientuploadApplication in interface CloudControllerClientapplicationName - the application namefile - the application archive or folderIOExceptionpublic void uploadApplication(String applicationName, File file, UploadStatusCallback callback) throws IOException
CloudControllerClientuploadApplication in interface CloudControllerClientapplicationName - the application namefile - the application archivecallback - a callback interface used to provide progress information or nullIOExceptionpublic void uploadApplication(String applicationName, InputStream inputStream) throws IOException
CloudControllerClientuploadApplication in interface CloudControllerClientapplicationName - the application nameinputStream - the InputStream to read fromIOExceptionpublic void uploadApplication(String applicationName, InputStream inputStream, UploadStatusCallback callback) throws IOException
CloudControllerClientuploadApplication in interface CloudControllerClientapplicationName - the application nameinputStream - the InputStream to read fromcallback - a callback interface used to provide progress information or nullIOExceptionpublic UploadToken asyncUploadApplication(String applicationName, File file) throws IOException
asyncUploadApplication in interface CloudControllerClientIOExceptionpublic UploadToken asyncUploadApplication(String applicationName, File file, UploadStatusCallback callback) throws IOException
asyncUploadApplication in interface CloudControllerClientIOExceptionpublic Upload getUploadStatus(UUID packageGuid)
getUploadStatus in interface CloudControllerClientpublic CloudBuild createBuild(UUID packageGuid)
createBuild in interface CloudControllerClientpublic CloudBuild getBuild(UUID buildGuid)
getBuild in interface CloudControllerClientpublic CloudTask getTask(UUID taskGuid)
getTask in interface CloudControllerClientpublic List<CloudTask> getTasks(String applicationName)
CloudControllerClientgetTasks in interface CloudControllerClientapplicationName - the application to look for taskspublic CloudTask runTask(String applicationName, CloudTask task)
CloudControllerClientrunTask in interface CloudControllerClientapplicationName - the application to run the task ontask - the task to runpublic CloudTask cancelTask(UUID taskGuid)
CloudControllerClientcancelTask in interface CloudControllerClienttaskGuid - the GUID of the task to cancelpublic void bindDropletToApp(UUID dropletGuid, UUID applicationGuid)
bindDropletToApp in interface CloudControllerClientpublic List<CloudBuild> getBuildsForApplication(UUID applicationGuid)
getBuildsForApplication in interface CloudControllerClientpublic List<CloudBuild> getBuildsForPackage(UUID packageGuid)
getBuildsForPackage in interface CloudControllerClientCopyright © 2020 SAP SE. All rights reserved.