Class CloudControllerClientImpl
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.CloudControllerClientImpl
-
- All Implemented Interfaces:
CloudControllerClient
public class CloudControllerClientImpl extends Object implements CloudControllerClient
A Java client to exercise the Cloud Foundry API.
-
-
Constructor Summary
Constructors Constructor Description CloudControllerClientImpl(CloudControllerRestClient delegate)Construct a client with a pre-configured CloudControllerClientCloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials)Construct client without a default organization and space.CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, CloudSpace target, boolean trustSelfSignedCerts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDomain(String domainName)Add a private domain in the current organization.voidaddRoute(String host, String domainName, String path)Register a new route to the a domain.CloudPackageasyncUploadApplication(String applicationName, Path file)CloudPackageasyncUploadApplication(String applicationName, Path file, UploadStatusCallback callback)voidbindDropletToApp(UUID dropletGuid, UUID applicationGuid)Optional<String>bindServiceInstance(String applicationName, String serviceInstanceName)Associate (provision) a service with an application.Optional<String>bindServiceInstance(String applicationName, String serviceInstanceName, Map<String,Object> parameters, ApplicationServicesUpdateCallback updateServicesCallback)Associate (provision) a service with an application.CloudTaskcancelTask(UUID taskGuid)Cancel the given task.CloudServiceKeycreateAndFetchServiceKey(CloudServiceKey keyModel, String serviceInstanceName)voidcreateApplication(ApplicationToCreateDto applicationToCreateDto)Create applicationCloudBuildcreateBuild(UUID packageGuid)CloudPackagecreateDockerPackage(UUID applicationGuid, DockerInfo dockerInfo)StringcreateServiceBroker(CloudServiceBroker serviceBroker)Create a service broker.voidcreateServiceInstance(CloudServiceInstance serviceInstance)Create a service instance.Optional<String>createServiceKey(CloudServiceKey keyModel, String serviceInstanceName)Optional<String>createServiceKey(String serviceInstanceName, String serviceKeyName, Map<String,Object> parameters)Create a service key.voidcreateUserProvidedServiceInstance(CloudServiceInstance serviceInstance)Create a user-provided service instance.voiddeleteApplication(String applicationName)Delete application.voiddeleteDomain(String domainName)Delete a private domain in the current organization.voiddeleteOrphanedRoutes()Delete routes that do not have any application which is assigned to them.voiddeleteRoute(String host, String domainName, String path)Delete a registered route from the space of the current session.Optional<String>deleteServiceBinding(String serviceInstanceName, String serviceKeyName)Delete a service binding.Optional<String>deleteServiceBinding(UUID bindingGuid)Delete a service binding.Optional<String>deleteServiceBinding(UUID bindingGuid, ServiceBindingOperationCallback serviceBindingOperationCallback)Delete a service binding.StringdeleteServiceBroker(String name)Delete a service broker.voiddeleteServiceInstance(CloudServiceInstance serviceInstance)voiddeleteServiceInstance(String serviceInstanceName)Delete cloud service instance.List<CloudServiceBinding>getAppBindings(UUID applicationGuid)Get the bindings for a particular application.CloudApplicationgetApplication(String applicationName)Get cloud application with the specified name.CloudApplicationgetApplication(String applicationName, boolean required)Get cloud application with the specified name.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.UUIDgetApplicationGuid(String applicationName)Get the GUID of the cloud application with the specified name.InstancesInfogetApplicationInstances(CloudApplication app)Get application instances info for application.InstancesInfogetApplicationInstances(UUID applicationGuid)StringgetApplicationName(UUID applicationGuid)CloudProcessgetApplicationProcess(UUID applicationGuid)List<CloudRoute>getApplicationRoutes(UUID applicationGuid)List<CloudApplication>getApplications()Get all applications in the currently targeted space.List<CloudApplication>getApplicationsByMetadataLabelSelector(String labelSelector)booleangetApplicationSshEnabled(UUID applicationGuid)CloudAsyncJobgetAsyncJob(String jobId)CloudBuildgetBuild(UUID buildGuid)List<CloudBuild>getBuildsForApplication(UUID applicationGuid)List<CloudBuild>getBuildsForPackage(UUID packageGuid)DropletInfogetCurrentDropletForApplication(UUID applicationGuid)CloudDomaingetDefaultDomain()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.List<CloudEvent>getEventsByActee(UUID uuid)CloudPackagegetPackage(UUID packageGuid)List<CloudPackage>getPackagesForApplication(UUID applicationGuid)List<CloudDomain>getPrivateDomains()Get list of all private domains.UUIDgetRequiredServiceInstanceGuid(String name)Get the GUID of a service instance.List<CloudRoute>getRoutes(String domainName)Get the info for all routes for a domain.List<CloudServiceBinding>getServiceAppBindings(UUID serviceInstanceGuid)Get the bindings for a particular service instance.CloudServiceBindinggetServiceBinding(UUID serviceBindingId)Get a service bindingCloudServiceBindinggetServiceBindingForApplication(UUID applicationId, UUID serviceInstanceGuid)Get the binding between an application and a service instance.Map<String,Object>getServiceBindingParameters(UUID guid)Get all service binding parameters.CloudServiceBrokergetServiceBroker(String name)Get a service broker.CloudServiceBrokergetServiceBroker(String name, boolean required)Get a service broker.List<CloudServiceBroker>getServiceBrokers()Get all service brokers.CloudServiceInstancegetServiceInstance(String serviceInstanceName)Get a service instance.CloudServiceInstancegetServiceInstance(String serviceInstanceName, boolean required)Get a service instance.StringgetServiceInstanceName(UUID serviceInstanceGuid)Get a service instance name.Map<String,Object>getServiceInstanceParameters(UUID guid)Get all service instance parameters.List<CloudServiceInstance>getServiceInstancesByMetadataLabelSelector(String labelSelector)List<CloudServiceInstance>getServiceInstancesWithoutAuxiliaryContentByMetadataLabelSelector(String labelSelector)List<CloudServiceInstance>getServiceInstancesWithoutAuxiliaryContentByNames(List<String> names)CloudServiceInstancegetServiceInstanceWithoutAuxiliaryContent(String serviceInstanceName)Get a service instance.CloudServiceInstancegetServiceInstanceWithoutAuxiliaryContent(String serviceInstanceName, boolean required)Get a service instance.CloudServiceKeygetServiceKey(String serviceInstanceName, String serviceKeyName)Get a service key.List<CloudServiceKey>getServiceKeys(CloudServiceInstance serviceInstance)Get service keys for a service instance.List<CloudServiceKey>getServiceKeys(String serviceInstanceName)Get service keys for a service instance.List<CloudServiceKey>getServiceKeysWithCredentials(CloudServiceInstance serviceInstance)List<CloudServiceKey>getServiceKeysWithCredentials(String serviceInstanceName)List<CloudServiceOffering>getServiceOfferings()Get all service offerings.List<CloudDomain>getSharedDomains()Get list of all shared domains.CloudStackgetStack(String name)Get a stack by name.CloudStackgetStack(String name, boolean required)Get a stack by name.List<CloudStack>getStacks()Get the list of stacks available for staging applications.CloudSpacegetTarget()CloudTaskgetTask(UUID taskGuid)List<CloudTask>getTasks(String applicationName)Get the list of one-off tasks currently known for the given application.UploadgetUploadStatus(UUID packageGuid)Map<String,Object>getUserProvidedServiceInstanceParameters(UUID guid)Get all user-provided service instance parametersSet<UserRole>getUserRolesBySpaceAndUser(UUID spaceGuid, UUID userGuid)voidrename(String applicationName, String newName)Rename an application.voidrestartApplication(String applicationName)Restart application.CloudTaskrunTask(String applicationName, CloudTask task)Run a one-off task on an application.voidstartApplication(String applicationName)Start application.voidstopApplication(String applicationName)Stop application.Optional<String>unbindServiceInstance(String applicationName, String serviceInstanceName)Un-associate (unprovision) a service from an application.Optional<String>unbindServiceInstance(String applicationName, String serviceInstanceName, ApplicationServicesUpdateCallback applicationServicesUpdateCallback)Un-associate (unprovision) a service from an application.Optional<String>unbindServiceInstance(UUID applicationGuid, UUID serviceInstanceGuid)Un-associate (unprovision) a service from an application.voidupdateApplicationDiskQuota(String applicationName, int disk)Update application disk quota.voidupdateApplicationEnv(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..voidupdateApplicationInstances(String applicationName, int instances)Update application instances.voidupdateApplicationMemory(String applicationName, int memory)Update application memory.voidupdateApplicationMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)voidupdateApplicationRoutes(String applicationName, Set<CloudRoute> routes)Update application Routes.voidupdateApplicationStaging(String applicationName, Staging staging)Update application staging information.voidupdateServiceBindingMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)StringupdateServiceBroker(CloudServiceBroker serviceBroker)Update a service broker (unchanged forces catalog refresh).voidupdateServiceInstanceMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)voidupdateServiceParameters(String serviceName, Map<String,Object> parameters)voidupdateServicePlan(String serviceName, String planName)voidupdateServicePlanVisibilityForBroker(String name, ServicePlanVisibility visibility)Service plans are private by default when a service broker's catalog is fetched/updated.voidupdateServiceSyslogDrainUrl(String serviceName, String syslogDrainUrl)voidupdateServiceTags(String serviceName, List<String> tags)
-
-
-
Constructor Detail
-
CloudControllerClientImpl
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials)
Construct client without a default organization and space.
-
CloudControllerClientImpl
public CloudControllerClientImpl(URL controllerUrl, CloudCredentials credentials, CloudSpace target, boolean trustSelfSignedCerts)
-
CloudControllerClientImpl
public CloudControllerClientImpl(CloudControllerRestClient delegate)
Construct a client with a pre-configured CloudControllerClient
-
-
Method Detail
-
getTarget
public CloudSpace getTarget()
- Specified by:
getTargetin interfaceCloudControllerClient
-
addDomain
public void addDomain(String domainName)
Description copied from interface:CloudControllerClientAdd a private domain in the current organization.- Specified by:
addDomainin interfaceCloudControllerClient- Parameters:
domainName- the domain to add
-
addRoute
public void addRoute(String host, String domainName, String path)
Description copied from interface:CloudControllerClientRegister a new route to the a domain.- Specified by:
addRoutein interfaceCloudControllerClient- Parameters:
host- the host of the route to registerdomainName- the domain of the route to register
-
bindServiceInstance
public Optional<String> bindServiceInstance(String applicationName, String serviceInstanceName)
Description copied from interface:CloudControllerClientAssociate (provision) a service with an application.- Specified by:
bindServiceInstancein interfaceCloudControllerClient- Parameters:
applicationName- the application nameserviceInstanceName- the service instance name- Returns:
- job id for async polling if present
-
bindServiceInstance
public Optional<String> bindServiceInstance(String applicationName, String serviceInstanceName, Map<String,Object> parameters, ApplicationServicesUpdateCallback updateServicesCallback)
Description copied from interface:CloudControllerClientAssociate (provision) a service with an application.- Specified by:
bindServiceInstancein interfaceCloudControllerClient- Parameters:
applicationName- the application nameserviceInstanceName- the service instance nameparameters- the binding parametersupdateServicesCallback- callback used for error handling- Returns:
- job id for async polling if present
-
createApplication
public void createApplication(ApplicationToCreateDto applicationToCreateDto)
Description copied from interface:CloudControllerClientCreate application- Specified by:
createApplicationin interfaceCloudControllerClient- Parameters:
applicationToCreateDto- the application's parameters used for its creation
-
createServiceInstance
public void createServiceInstance(CloudServiceInstance serviceInstance)
Description copied from interface:CloudControllerClientCreate a service instance.- Specified by:
createServiceInstancein interfaceCloudControllerClient- Parameters:
serviceInstance- cloud service instance info
-
createServiceBroker
public String createServiceBroker(CloudServiceBroker serviceBroker)
Description copied from interface:CloudControllerClientCreate a service broker.- Specified by:
createServiceBrokerin interfaceCloudControllerClient- Parameters:
serviceBroker- cloud service broker info- Returns:
- job id for async poll
-
createAndFetchServiceKey
public CloudServiceKey createAndFetchServiceKey(CloudServiceKey keyModel, String serviceInstanceName)
- Specified by:
createAndFetchServiceKeyin interfaceCloudControllerClient- Parameters:
keyModel- service-key cloud objectserviceInstanceName- name of related service instance- Returns:
- the service-key object populated with new guid
-
createServiceKey
public Optional<String> createServiceKey(CloudServiceKey keyModel, String serviceInstanceName)
- Specified by:
createServiceKeyin interfaceCloudControllerClient- Parameters:
keyModel- service-key cloud objectserviceInstanceName- name of related service instance- Returns:
- job id for async polling if present
-
createServiceKey
public Optional<String> createServiceKey(String serviceInstanceName, String serviceKeyName, Map<String,Object> parameters)
Description copied from interface:CloudControllerClientCreate a service key.- Specified by:
createServiceKeyin interfaceCloudControllerClient- Parameters:
serviceInstanceName- name of service instanceserviceKeyName- name of service-keyparameters- parameters of service-key- Returns:
- job id for async polling if present
-
createUserProvidedServiceInstance
public void createUserProvidedServiceInstance(CloudServiceInstance serviceInstance)
Description copied from interface:CloudControllerClientCreate a user-provided service instance.- Specified by:
createUserProvidedServiceInstancein interfaceCloudControllerClient- Parameters:
serviceInstance- cloud service instance info
-
deleteApplication
public void deleteApplication(String applicationName)
Description copied from interface:CloudControllerClientDelete application.- Specified by:
deleteApplicationin interfaceCloudControllerClient- Parameters:
applicationName- name of application
-
deleteDomain
public void deleteDomain(String domainName)
Description copied from interface:CloudControllerClientDelete a private domain in the current organization.- Specified by:
deleteDomainin interfaceCloudControllerClient- Parameters:
domainName- the domain to delete
-
deleteOrphanedRoutes
public void deleteOrphanedRoutes()
Description copied from interface:CloudControllerClientDelete routes that do not have any application which is assigned to them.- Specified by:
deleteOrphanedRoutesin interfaceCloudControllerClient
-
deleteRoute
public void deleteRoute(String host, String domainName, String path)
Description copied from interface:CloudControllerClientDelete a registered route from the space of the current session.- Specified by:
deleteRoutein interfaceCloudControllerClient- Parameters:
host- the host of the route to deletedomainName- the domain of the route to delete
-
deleteServiceInstance
public void deleteServiceInstance(String serviceInstanceName)
Description copied from interface:CloudControllerClientDelete cloud service instance.- Specified by:
deleteServiceInstancein interfaceCloudControllerClient- Parameters:
serviceInstanceName- name of service instance
-
deleteServiceInstance
public void deleteServiceInstance(CloudServiceInstance serviceInstance)
- Specified by:
deleteServiceInstancein interfaceCloudControllerClient- Parameters:
serviceInstance-CloudServiceInstance
-
deleteServiceBroker
public String deleteServiceBroker(String name)
Description copied from interface:CloudControllerClientDelete a service broker.- Specified by:
deleteServiceBrokerin interfaceCloudControllerClient- Parameters:
name- the service broker name- Returns:
- async job id
-
getServiceBinding
public CloudServiceBinding getServiceBinding(UUID serviceBindingId)
Description copied from interface:CloudControllerClientGet a service binding- Specified by:
getServiceBindingin interfaceCloudControllerClient- Parameters:
serviceBindingId- the id of the service binding- Returns:
- the service binding
-
deleteServiceBinding
public Optional<String> deleteServiceBinding(String serviceInstanceName, String serviceKeyName)
Description copied from interface:CloudControllerClientDelete a service binding.- Specified by:
deleteServiceBindingin interfaceCloudControllerClient- Parameters:
serviceInstanceName- name of service instanceserviceKeyName- name of service key- Returns:
- job id for async polling if present
-
deleteServiceBinding
public Optional<String> deleteServiceBinding(UUID bindingGuid, ServiceBindingOperationCallback serviceBindingOperationCallback)
Description copied from interface:CloudControllerClientDelete a service binding.- Specified by:
deleteServiceBindingin interfaceCloudControllerClient- Parameters:
bindingGuid- The GUID of the bindingserviceBindingOperationCallback- callback used for error handling- Returns:
- job id for async polling if present
-
deleteServiceBinding
public Optional<String> deleteServiceBinding(UUID bindingGuid)
Description copied from interface:CloudControllerClientDelete a service binding.- Specified by:
deleteServiceBindingin interfaceCloudControllerClient- Parameters:
bindingGuid- The GUID of the binding- Returns:
- job id for async polling if present
-
getApplication
public CloudApplication getApplication(String applicationName)
Description copied from interface:CloudControllerClientGet cloud application with the specified name.- Specified by:
getApplicationin interfaceCloudControllerClient- Parameters:
applicationName- name of the app- Returns:
- the cloud application
-
getApplication
public CloudApplication getApplication(String applicationName, boolean required)
Description copied from interface:CloudControllerClientGet cloud application with the specified name.- Specified by:
getApplicationin interfaceCloudControllerClient- Parameters:
applicationName- name of the apprequired- if true, and organization is not found, throw an exception- Returns:
- the cloud application
-
getApplicationGuid
public UUID getApplicationGuid(String applicationName)
Description copied from interface:CloudControllerClientGet the GUID of the cloud application with the specified name.- Specified by:
getApplicationGuidin interfaceCloudControllerClient- Parameters:
applicationName- name of the app- Returns:
- the cloud application's guid
-
getApplicationName
public String getApplicationName(UUID applicationGuid)
- Specified by:
getApplicationNamein interfaceCloudControllerClient
-
getApplicationEnvironment
public Map<String,String> getApplicationEnvironment(UUID applicationGuid)
Description copied from interface:CloudControllerClientGet application environment variables for the app with the specified GUID.- Specified by:
getApplicationEnvironmentin interfaceCloudControllerClient- Parameters:
applicationGuid- GUID of the app- Returns:
- the cloud application environment variables
-
getApplicationEnvironment
public Map<String,String> getApplicationEnvironment(String applicationName)
Description copied from interface:CloudControllerClientGet application environment variables for the app with the specified name.- Specified by:
getApplicationEnvironmentin interfaceCloudControllerClient- Parameters:
applicationName- name of the app- Returns:
- the cloud application environment variables
-
getApplicationEvents
public List<CloudEvent> getApplicationEvents(String applicationName)
Description copied from interface:CloudControllerClientGet application events.- Specified by:
getApplicationEventsin interfaceCloudControllerClient- Parameters:
applicationName- name of application- Returns:
- application events
-
getEventsByActee
public List<CloudEvent> getEventsByActee(UUID uuid)
- Specified by:
getEventsByActeein interfaceCloudControllerClient
-
getApplicationInstances
public InstancesInfo getApplicationInstances(CloudApplication app)
Description copied from interface:CloudControllerClientGet application instances info for application.- Specified by:
getApplicationInstancesin interfaceCloudControllerClient- Parameters:
app- the application.- Returns:
- instances info
-
getApplicationInstances
public InstancesInfo getApplicationInstances(UUID applicationGuid)
- Specified by:
getApplicationInstancesin interfaceCloudControllerClient
-
getApplicationProcess
public CloudProcess getApplicationProcess(UUID applicationGuid)
- Specified by:
getApplicationProcessin interfaceCloudControllerClient
-
getApplicationRoutes
public List<CloudRoute> getApplicationRoutes(UUID applicationGuid)
- Specified by:
getApplicationRoutesin interfaceCloudControllerClient
-
getApplicationSshEnabled
public boolean getApplicationSshEnabled(UUID applicationGuid)
- Specified by:
getApplicationSshEnabledin interfaceCloudControllerClient
-
getApplications
public List<CloudApplication> getApplications()
Description copied from interface:CloudControllerClientGet all applications in the currently targeted space. This method has EXTREMELY poor performance for spaces with a lot of applications.- Specified by:
getApplicationsin interfaceCloudControllerClient- Returns:
- list of applications
-
getApplicationsByMetadataLabelSelector
public List<CloudApplication> getApplicationsByMetadataLabelSelector(String labelSelector)
- Specified by:
getApplicationsByMetadataLabelSelectorin interfaceCloudControllerClient
-
getDefaultDomain
public CloudDomain getDefaultDomain()
Description copied from interface:CloudControllerClientGets the default domain for the current org, which is the first shared domain.- Specified by:
getDefaultDomainin interfaceCloudControllerClient- Returns:
- the default domain
-
getDomains
public List<CloudDomain> getDomains()
Description copied from interface:CloudControllerClientGet list of all domain shared and private domains.- Specified by:
getDomainsin interfaceCloudControllerClient- Returns:
- list of domains
-
getDomainsForOrganization
public List<CloudDomain> getDomainsForOrganization()
Description copied from interface:CloudControllerClientGet list of all domain registered for the current organization.- Specified by:
getDomainsForOrganizationin interfaceCloudControllerClient- Returns:
- list of domains
-
getEvents
public List<CloudEvent> getEvents()
Description copied from interface:CloudControllerClientGet system events.- Specified by:
getEventsin interfaceCloudControllerClient- Returns:
- all system events
-
getPrivateDomains
public List<CloudDomain> getPrivateDomains()
Description copied from interface:CloudControllerClientGet list of all private domains.- Specified by:
getPrivateDomainsin interfaceCloudControllerClient- Returns:
- list of private domains
-
getRoutes
public List<CloudRoute> getRoutes(String domainName)
Description copied from interface:CloudControllerClientGet the info for all routes for a domain.- Specified by:
getRoutesin interfaceCloudControllerClient- Parameters:
domainName- the domain the routes belong to- Returns:
- list of routes
-
getServiceBroker
public CloudServiceBroker getServiceBroker(String name)
Description copied from interface:CloudControllerClientGet a service broker.- Specified by:
getServiceBrokerin interfaceCloudControllerClient- Parameters:
name- the service broker name- Returns:
- the service broker
-
getServiceBroker
public CloudServiceBroker getServiceBroker(String name, boolean required)
Description copied from interface:CloudControllerClientGet a service broker.- Specified by:
getServiceBrokerin interfaceCloudControllerClient- Parameters:
name- the service broker namerequired- if true, and organization is not found, throw an exception- Returns:
- the service broker
-
getServiceBrokers
public List<CloudServiceBroker> getServiceBrokers()
Description copied from interface:CloudControllerClientGet all service brokers.- Specified by:
getServiceBrokersin interfaceCloudControllerClient- Returns:
- the service brokers
-
getRequiredServiceInstanceGuid
public UUID getRequiredServiceInstanceGuid(String name)
Description copied from interface:CloudControllerClientGet the GUID of a service instance.- Specified by:
getRequiredServiceInstanceGuidin interfaceCloudControllerClient- Parameters:
name- the name of the service instance- Returns:
- the service instance GUID
-
getServiceInstance
public CloudServiceInstance getServiceInstance(String serviceInstanceName)
Description copied from interface:CloudControllerClientGet a service instance.- Specified by:
getServiceInstancein interfaceCloudControllerClient- Parameters:
serviceInstanceName- name of the service instance- Returns:
- the service instance info
-
getServiceInstance
public CloudServiceInstance getServiceInstance(String serviceInstanceName, boolean required)
Description copied from interface:CloudControllerClientGet a service instance.- Specified by:
getServiceInstancein interfaceCloudControllerClient- Parameters:
serviceInstanceName- name of the service instancerequired- if true, and service instance is not found, throw an exception- Returns:
- the service instance info
-
getServiceInstanceName
public String getServiceInstanceName(UUID serviceInstanceGuid)
Description copied from interface:CloudControllerClientGet a service instance name.- Specified by:
getServiceInstanceNamein interfaceCloudControllerClient- Parameters:
serviceInstanceGuid- GUID of the service instance- Returns:
- the service instance name
-
getServiceInstanceWithoutAuxiliaryContent
public CloudServiceInstance getServiceInstanceWithoutAuxiliaryContent(String serviceInstanceName)
Description copied from interface:CloudControllerClientGet a service instance.- Specified by:
getServiceInstanceWithoutAuxiliaryContentin interfaceCloudControllerClient- Parameters:
serviceInstanceName- name of the service instance- Returns:
- the service instance info
-
getServiceInstanceWithoutAuxiliaryContent
public CloudServiceInstance getServiceInstanceWithoutAuxiliaryContent(String serviceInstanceName, boolean required)
Description copied from interface:CloudControllerClientGet a service instance.- Specified by:
getServiceInstanceWithoutAuxiliaryContentin interfaceCloudControllerClient- Parameters:
serviceInstanceName- name of the service instancerequired- if true, and service instance is not found, throw an exception- Returns:
- the service instance info
-
getServiceAppBindings
public List<CloudServiceBinding> getServiceAppBindings(UUID serviceInstanceGuid)
Description copied from interface:CloudControllerClientGet the bindings for a particular service instance.- Specified by:
getServiceAppBindingsin interfaceCloudControllerClient- Parameters:
serviceInstanceGuid- the GUID of the service instance- Returns:
- the bindings
-
getAppBindings
public List<CloudServiceBinding> getAppBindings(UUID applicationGuid)
Description copied from interface:CloudControllerClientGet the bindings for a particular application.- Specified by:
getAppBindingsin interfaceCloudControllerClient- Parameters:
applicationGuid- the GUID of the application- Returns:
- the bindings
-
getServiceBindingForApplication
public CloudServiceBinding getServiceBindingForApplication(UUID applicationId, UUID serviceInstanceGuid)
Description copied from interface:CloudControllerClientGet the binding between an application and a service instance.- Specified by:
getServiceBindingForApplicationin interfaceCloudControllerClient- Parameters:
applicationId- the GUID of the applicationserviceInstanceGuid- the GUID of the service instance- Returns:
- the binding
-
getServiceInstanceParameters
public Map<String,Object> getServiceInstanceParameters(UUID guid)
Description copied from interface:CloudControllerClientGet all service instance parameters.- Specified by:
getServiceInstanceParametersin interfaceCloudControllerClient- Parameters:
guid- The service instance guid- Returns:
- service instance parameters in key-value pairs
-
getUserProvidedServiceInstanceParameters
public Map<String,Object> getUserProvidedServiceInstanceParameters(UUID guid)
Description copied from interface:CloudControllerClientGet all user-provided service instance parameters- Specified by:
getUserProvidedServiceInstanceParametersin interfaceCloudControllerClient- Parameters:
guid- The service instance guid- Returns:
- user-provided service instance parameters in key-value pairs
-
getServiceBindingParameters
public Map<String,Object> getServiceBindingParameters(UUID guid)
Description copied from interface:CloudControllerClientGet all service binding parameters.- Specified by:
getServiceBindingParametersin interfaceCloudControllerClient- Parameters:
guid- The service binding guid- Returns:
- service binding parameters in key-value pairs
-
getServiceKey
public CloudServiceKey getServiceKey(String serviceInstanceName, String serviceKeyName)
Description copied from interface:CloudControllerClientGet a service key.- Specified by:
getServiceKeyin interfaceCloudControllerClient- Parameters:
serviceInstanceName- The service instance nameserviceKeyName- The service key name- Returns:
- the service key info
-
getServiceKeys
public List<CloudServiceKey> getServiceKeys(String serviceInstanceName)
Description copied from interface:CloudControllerClientGet service keys for a service instance.- Specified by:
getServiceKeysin interfaceCloudControllerClient- Parameters:
serviceInstanceName- name containing service keys- Returns:
- the service keys info
-
getServiceKeysWithCredentials
public List<CloudServiceKey> getServiceKeysWithCredentials(String serviceInstanceName)
- Specified by:
getServiceKeysWithCredentialsin interfaceCloudControllerClient
-
getServiceKeys
public List<CloudServiceKey> getServiceKeys(CloudServiceInstance serviceInstance)
Description copied from interface:CloudControllerClientGet service keys for a service instance.- Specified by:
getServiceKeysin interfaceCloudControllerClient- Parameters:
serviceInstance- instance containing service keys- Returns:
- the service keys info
-
getServiceKeysWithCredentials
public List<CloudServiceKey> getServiceKeysWithCredentials(CloudServiceInstance serviceInstance)
- Specified by:
getServiceKeysWithCredentialsin interfaceCloudControllerClient
-
getServiceOfferings
public List<CloudServiceOffering> getServiceOfferings()
Description copied from interface:CloudControllerClientGet all service offerings.- Specified by:
getServiceOfferingsin interfaceCloudControllerClient- Returns:
- list of service offerings
-
getServiceInstancesByMetadataLabelSelector
public List<CloudServiceInstance> getServiceInstancesByMetadataLabelSelector(String labelSelector)
- Specified by:
getServiceInstancesByMetadataLabelSelectorin interfaceCloudControllerClient
-
getServiceInstancesWithoutAuxiliaryContentByMetadataLabelSelector
public List<CloudServiceInstance> getServiceInstancesWithoutAuxiliaryContentByMetadataLabelSelector(String labelSelector)
- Specified by:
getServiceInstancesWithoutAuxiliaryContentByMetadataLabelSelectorin interfaceCloudControllerClient
-
getSharedDomains
public List<CloudDomain> getSharedDomains()
Description copied from interface:CloudControllerClientGet list of all shared domains.- Specified by:
getSharedDomainsin interfaceCloudControllerClient- Returns:
- list of shared domains
-
getStack
public CloudStack getStack(String name)
Description copied from interface:CloudControllerClientGet a stack by name.- Specified by:
getStackin interfaceCloudControllerClient- Parameters:
name- the name of the stack to get- Returns:
- the stack
-
getStack
public CloudStack getStack(String name, boolean required)
Description copied from interface:CloudControllerClientGet a stack by name.- Specified by:
getStackin interfaceCloudControllerClient- Parameters:
name- the name of the stack to getrequired- if true, and organization is not found, throw an exception- Returns:
- the stack, or null if not found
-
getStacks
public List<CloudStack> getStacks()
Description copied from interface:CloudControllerClientGet the list of stacks available for staging applications.- Specified by:
getStacksin interfaceCloudControllerClient- Returns:
- the list of available stacks
-
rename
public void rename(String applicationName, String newName)
Description copied from interface:CloudControllerClientRename an application.- Specified by:
renamein interfaceCloudControllerClient- Parameters:
applicationName- the current namenewName- the new name
-
restartApplication
public void restartApplication(String applicationName)
Description copied from interface:CloudControllerClientRestart application.- Specified by:
restartApplicationin interfaceCloudControllerClient- Parameters:
applicationName- name of application
-
startApplication
public void startApplication(String applicationName)
Description copied from interface:CloudControllerClientStart application. May return starting info if the response obtained after the start request contains headers . If the response does not contain headers, null is returned instead.- Specified by:
startApplicationin interfaceCloudControllerClient- Parameters:
applicationName- name of application
-
stopApplication
public void stopApplication(String applicationName)
Description copied from interface:CloudControllerClientStop application.- Specified by:
stopApplicationin interfaceCloudControllerClient- Parameters:
applicationName- name of application
-
unbindServiceInstance
public Optional<String> unbindServiceInstance(String applicationName, String serviceInstanceName, ApplicationServicesUpdateCallback applicationServicesUpdateCallback)
Description copied from interface:CloudControllerClientUn-associate (unprovision) a service from an application.- Specified by:
unbindServiceInstancein interfaceCloudControllerClient- Parameters:
applicationName- the application nameserviceInstanceName- the service instance nameapplicationServicesUpdateCallback- callback used for error handling- Returns:
- job id for async polling if present
-
unbindServiceInstance
public Optional<String> unbindServiceInstance(String applicationName, String serviceInstanceName)
Description copied from interface:CloudControllerClientUn-associate (unprovision) a service from an application.- Specified by:
unbindServiceInstancein interfaceCloudControllerClient- Parameters:
applicationName- the application nameserviceInstanceName- the service instance name- Returns:
- job id for async polling if present
-
unbindServiceInstance
public Optional<String> unbindServiceInstance(UUID applicationGuid, UUID serviceInstanceGuid)
Description copied from interface:CloudControllerClientUn-associate (unprovision) a service from an application.- Specified by:
unbindServiceInstancein interfaceCloudControllerClient- Parameters:
applicationGuid- the application guidserviceInstanceGuid- the service instance guid- Returns:
- job id for async polling if present
-
updateApplicationDiskQuota
public void updateApplicationDiskQuota(String applicationName, int disk)
Description copied from interface:CloudControllerClientUpdate application disk quota.- Specified by:
updateApplicationDiskQuotain interfaceCloudControllerClient- Parameters:
applicationName- name of applicationdisk- new disk setting in MB
-
updateApplicationEnv
public void updateApplicationEnv(String applicationName, Map<String,String> env)
Description copied from interface:CloudControllerClientUpdate application env using a map where the key specifies the name of the environment variable and the value the value of the environment variable..- Specified by:
updateApplicationEnvin interfaceCloudControllerClient- Parameters:
applicationName- name of applicationenv- map of environment settings
-
updateApplicationInstances
public void updateApplicationInstances(String applicationName, int instances)
Description copied from interface:CloudControllerClientUpdate application instances.- Specified by:
updateApplicationInstancesin interfaceCloudControllerClient- Parameters:
applicationName- name of applicationinstances- number of instances to use
-
getServiceInstancesWithoutAuxiliaryContentByNames
public List<CloudServiceInstance> getServiceInstancesWithoutAuxiliaryContentByNames(List<String> names)
- Specified by:
getServiceInstancesWithoutAuxiliaryContentByNamesin interfaceCloudControllerClient
-
updateApplicationMemory
public void updateApplicationMemory(String applicationName, int memory)
Description copied from interface:CloudControllerClientUpdate application memory.- Specified by:
updateApplicationMemoryin interfaceCloudControllerClient- Parameters:
applicationName- name of applicationmemory- new memory setting in MB
-
updateApplicationStaging
public void updateApplicationStaging(String applicationName, Staging staging)
Description copied from interface:CloudControllerClientUpdate application staging information.- Specified by:
updateApplicationStagingin interfaceCloudControllerClient- Parameters:
applicationName- name of appplicationstaging- staging information for the app
-
updateApplicationRoutes
public void updateApplicationRoutes(String applicationName, Set<CloudRoute> routes)
Description copied from interface:CloudControllerClientUpdate application Routes.- Specified by:
updateApplicationRoutesin interfaceCloudControllerClient- Parameters:
applicationName- name of applicationroutes- list of route summary info for the routes the app should use
-
updateApplicationMetadata
public void updateApplicationMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)
- Specified by:
updateApplicationMetadatain interfaceCloudControllerClient
-
updateServiceInstanceMetadata
public void updateServiceInstanceMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)
- Specified by:
updateServiceInstanceMetadatain interfaceCloudControllerClient
-
updateServiceBindingMetadata
public void updateServiceBindingMetadata(UUID guid, org.cloudfoundry.client.v3.Metadata metadata)
- Specified by:
updateServiceBindingMetadatain interfaceCloudControllerClient
-
updateServiceBroker
public String updateServiceBroker(CloudServiceBroker serviceBroker)
Description copied from interface:CloudControllerClientUpdate a service broker (unchanged forces catalog refresh).- Specified by:
updateServiceBrokerin interfaceCloudControllerClient- Parameters:
serviceBroker- cloud service broker info- Returns:
- async job id
-
updateServicePlanVisibilityForBroker
public void updateServicePlanVisibilityForBroker(String name, ServicePlanVisibility visibility)
Description copied from interface:CloudControllerClientService plans are private by default when a service broker's catalog is fetched/updated. This method will update the visibility of all plans for a broker to either public or private.- Specified by:
updateServicePlanVisibilityForBrokerin interfaceCloudControllerClient- Parameters:
name- the service broker namevisibility- true for public, false for private
-
updateServicePlan
public void updateServicePlan(String serviceName, String planName)
- Specified by:
updateServicePlanin interfaceCloudControllerClient
-
updateServiceParameters
public void updateServiceParameters(String serviceName, Map<String,Object> parameters)
- Specified by:
updateServiceParametersin interfaceCloudControllerClient
-
updateServiceTags
public void updateServiceTags(String serviceName, List<String> tags)
- Specified by:
updateServiceTagsin interfaceCloudControllerClient
-
updateServiceSyslogDrainUrl
public void updateServiceSyslogDrainUrl(String serviceName, String syslogDrainUrl)
- Specified by:
updateServiceSyslogDrainUrlin interfaceCloudControllerClient
-
asyncUploadApplication
public CloudPackage asyncUploadApplication(String applicationName, Path file)
- Specified by:
asyncUploadApplicationin interfaceCloudControllerClient
-
asyncUploadApplication
public CloudPackage asyncUploadApplication(String applicationName, Path file, UploadStatusCallback callback)
- Specified by:
asyncUploadApplicationin interfaceCloudControllerClient
-
getUploadStatus
public Upload getUploadStatus(UUID packageGuid)
- Specified by:
getUploadStatusin interfaceCloudControllerClient
-
createBuild
public CloudBuild createBuild(UUID packageGuid)
- Specified by:
createBuildin interfaceCloudControllerClient
-
getBuild
public CloudBuild getBuild(UUID buildGuid)
- Specified by:
getBuildin interfaceCloudControllerClient
-
getTask
public CloudTask getTask(UUID taskGuid)
- Specified by:
getTaskin interfaceCloudControllerClient
-
getTasks
public List<CloudTask> getTasks(String applicationName)
Description copied from interface:CloudControllerClientGet the list of one-off tasks currently known for the given application.- Specified by:
getTasksin interfaceCloudControllerClient- Parameters:
applicationName- the application to look for tasks- Returns:
- the list of known tasks
-
runTask
public CloudTask runTask(String applicationName, CloudTask task)
Description copied from interface:CloudControllerClientRun a one-off task on an application.- Specified by:
runTaskin interfaceCloudControllerClient- Parameters:
applicationName- the application to run the task ontask- the task to run- Returns:
- the ran task
-
cancelTask
public CloudTask cancelTask(UUID taskGuid)
Description copied from interface:CloudControllerClientCancel the given task.- Specified by:
cancelTaskin interfaceCloudControllerClient- Parameters:
taskGuid- the GUID of the task to cancel- Returns:
- the cancelled task
-
bindDropletToApp
public void bindDropletToApp(UUID dropletGuid, UUID applicationGuid)
- Specified by:
bindDropletToAppin interfaceCloudControllerClient
-
getBuildsForApplication
public List<CloudBuild> getBuildsForApplication(UUID applicationGuid)
- Specified by:
getBuildsForApplicationin interfaceCloudControllerClient
-
getBuildsForPackage
public List<CloudBuild> getBuildsForPackage(UUID packageGuid)
- Specified by:
getBuildsForPackagein interfaceCloudControllerClient
-
getCurrentDropletForApplication
public DropletInfo getCurrentDropletForApplication(UUID applicationGuid)
- Specified by:
getCurrentDropletForApplicationin interfaceCloudControllerClient
-
getPackage
public CloudPackage getPackage(UUID packageGuid)
- Specified by:
getPackagein interfaceCloudControllerClient
-
getPackagesForApplication
public List<CloudPackage> getPackagesForApplication(UUID applicationGuid)
- Specified by:
getPackagesForApplicationin interfaceCloudControllerClient
-
getUserRolesBySpaceAndUser
public Set<UserRole> getUserRolesBySpaceAndUser(UUID spaceGuid, UUID userGuid)
- Specified by:
getUserRolesBySpaceAndUserin interfaceCloudControllerClient
-
createDockerPackage
public CloudPackage createDockerPackage(UUID applicationGuid, DockerInfo dockerInfo)
- Specified by:
createDockerPackagein interfaceCloudControllerClient
-
getAsyncJob
public CloudAsyncJob getAsyncJob(String jobId)
- Specified by:
getAsyncJobin interfaceCloudControllerClient
-
-