public interface CloudFoundryOperations
Modifier and Type | Method and Description |
---|---|
void |
addDomain(String domainName)
Add a private domain in the current organization.
|
void |
addRoute(String host,
String domainName)
Register a new route to the a domain.
|
void |
associateAuditorWithSpace(String spaceName)
Associate current user to the space auditors role
|
void |
associateAuditorWithSpace(String orgName,
String spaceName)
Associate current user to the space auditors role
|
void |
associateAuditorWithSpace(String orgName,
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 orgName,
String spaceName)
Associate current user to the space developer role
|
void |
associateDeveloperWithSpace(String orgName,
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 orgName,
String spaceName)
Associate current user to the space managers role
|
void |
associateManagerWithSpace(String orgName,
String spaceName,
String userGuid)
Associate a user to the space managers role
|
void |
bindRunningSecurityGroup(String securityGroupName)
Bind a security group to the list of security groups to be used for running applications.
|
void |
bindSecurityGroup(String orgName,
String spaceName,
String securityGroupName)
Bind a security group to a space.
|
void |
bindService(String appName,
String serviceName)
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.
|
void |
createApplication(String appName,
Staging staging,
Integer disk,
Integer memory,
List<String> uris,
List<String> serviceNames)
Create application.
|
void |
createApplication(String appName,
Staging staging,
Integer memory,
List<String> uris,
List<String> serviceNames)
Create application.
|
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.
|
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 |
debugApplication(String appName,
CloudApplication.DebugMode mode)
Debug application.
|
void |
deleteAllApplications()
Delete all applications.
|
void |
deleteAllServices()
Delete all services.
|
void |
deleteApplication(String appName)
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)
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 |
deleteSpace(String spaceName)
Delete a space with the specified name
|
CloudApplication |
getApplication(String appName)
Get cloud application with the specified name.
|
CloudApplication |
getApplication(UUID guid)
Get cloud application with the specified GUID.
|
Map<String,Object> |
getApplicationEnvironment(String appName)
Get application environment variables for the app with the specified name.
|
Map<String,Object> |
getApplicationEnvironment(UUID appGuid)
Get application environment variables for the app with the specified GUID.
|
List<CloudEvent> |
getApplicationEvents(String appName)
Get application events.
|
InstancesInfo |
getApplicationInstances(CloudApplication app)
Get application instances info for application.
|
InstancesInfo |
getApplicationInstances(String appName)
Get application instances info for application.
|
List<CloudApplication> |
getApplications()
Get all cloud applications.
|
ApplicationStats |
getApplicationStats(String appName)
Get application stats for the app with the specified name.
|
URL |
getCloudControllerUrl()
Get the URL used for the cloud controller.
|
CloudInfo |
getCloudInfo()
Get CloudInfo for the current cloud.
|
CrashesInfo |
getCrashes(String appName)
Get crashes info for application.
|
Map<String,String> |
getCrashLogs(String appName)
Deprecated.
|
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> |
getDomainsForOrg()
Get list of all domain registered for the current organization.
|
List<CloudEvent> |
getEvents()
Get system events.
|
String |
getFile(String appName,
int instanceIndex,
String filePath)
Get file from the deployed application.
|
String |
getFile(String appName,
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 appName,
int instanceIndex,
String filePath,
int startPosition,
int endPosition)
Get a range of content of a file from the deployed application.
|
String |
getFileTail(String appName,
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 appName)
Deprecated.
|
List<CloudOrganization> |
getOrganizations()
Get list of CloudOrganizations for the current cloud.
|
Map<String,CloudUser> |
getOrganizationUsers(String orgName)
Get all users in the specified organization
|
CloudOrganization |
getOrgByName(String orgName,
boolean required)
Get the organization with the specified name.
|
List<CloudDomain> |
getPrivateDomains()
Get list of all private domains.
|
CloudQuota |
getQuotaByName(String quotaName,
boolean required)
Get quota by name
|
List<CloudQuota> |
getQuotas()
Get quota definitions
|
List<ApplicationLog> |
getRecentLogs(String appName)
Stream 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.
|
List<CloudSecurityGroup> |
getSecurityGroups()
Get a List of all application security groups.
|
CloudService |
getService(String service)
Get cloud service.
|
CloudServiceBroker |
getServiceBroker(String name)
Get a service broker.
|
List<CloudServiceBroker> |
getServiceBrokers()
Get all service brokers.
|
CloudServiceInstance |
getServiceInstance(String service)
Get a service instance.
|
List<CloudServiceOffering> |
getServiceOfferings()
Get all service offerings.
|
List<CloudService> |
getServices()
Get list of cloud services.
|
List<CloudDomain> |
getSharedDomains()
Get list of all shared domains.
|
CloudSpace |
getSpace(String spaceName)
Get space name with the specified name.
|
List<UUID> |
getSpaceAuditors(String spaceName)
Get list of space auditor UUID for the space.
|
List<UUID> |
getSpaceAuditors(String orgName,
String spaceName)
Get list of space auditor UUID for the space.
|
List<UUID> |
getSpaceDevelopers(String spaceName)
Get list of space developer UUID for the space.
|
List<UUID> |
getSpaceDevelopers(String orgName,
String spaceName)
Get list of space developer UUID for the space.
|
List<UUID> |
getSpaceManagers(String spaceName)
Get list of space manager UUID for the space.
|
List<UUID> |
getSpaceManagers(String orgName,
String spaceName)
Get list of space manager UUID for the space.
|
List<CloudSpace> |
getSpaces()
Get list of CloudSpaces for the current cloud.
|
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.
|
List<CloudStack> |
getStacks()
Get the list of stacks available for staging applications.
|
String |
getStagingLogs(StartingInfo info,
int offset)
Get the staging log while an application is starting.
|
List<CloudSecurityGroup> |
getStagingSecurityGroups()
Lists security groups in the staging set for applications.
|
org.springframework.security.oauth2.common.OAuth2AccessToken |
login()
Login using the credentials already set for the client.
|
void |
logout()
Logout closing the current session.
|
void |
openFile(String appName,
int instanceIndex,
String filePath,
ClientHttpResponseCallback clientHttpResponseCallback)
Provide the content of a file from the deployed application via callbacks.
|
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)
Deprecated.
alias for
deleteDomain(java.lang.String) |
void |
rename(String appName,
String newName)
Rename an application.
|
StartingInfo |
restartApplication(String appName)
Restart application.
|
void |
setQuotaToOrg(String orgName,
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 appName)
Start application.
|
void |
stopApplication(String appName)
Stop application.
|
StreamingLogToken |
streamLogs(String appName,
ApplicationLogListener listener)
Stream application logs produced after this method is called.
|
void |
unbindRunningSecurityGroup(String securityGroupName)
Unbind a security group from the set of security groups for running applications.
|
void |
unbindSecurityGroup(String orgName,
String spaceName,
String securityGroupName)
Unbind a security group from a space.
|
void |
unbindService(String appName,
String serviceName)
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 appName,
int disk)
Update application disk quota.
|
void |
updateApplicationEnv(String appName,
List<String> env)
Update application env using a list of strings each with one environment setting.
|
void |
updateApplicationEnv(String appName,
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 appName,
int instances)
Update application instances.
|
void |
updateApplicationMemory(String appName,
int memory)
Update application memory.
|
void |
updateApplicationServices(String appName,
List<String> services)
Update application services.
|
void |
updateApplicationStaging(String appName,
Staging staging)
Update application staging information.
|
void |
updateApplicationUris(String appName,
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 |
updateServicePlanVisibilityForBroker(String name,
boolean visibility)
Service plans are private by default when a service broker's catalog is
fetched/updated.
|
void |
uploadApplication(String appName,
ApplicationArchive archive)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String appName,
ApplicationArchive archive,
UploadStatusCallback callback)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String appName,
File file)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String appName,
File file,
UploadStatusCallback callback)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String appName,
String file)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String appName,
String fileName,
InputStream inputStream)
Upload an application to Cloud Foundry.
|
void |
uploadApplication(String appName,
String fileName,
InputStream inputStream,
UploadStatusCallback callback)
Upload an application to Cloud Foundry.
|
void setResponseErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
errorHandler
- URL getCloudControllerUrl()
CloudInfo getCloudInfo()
List<CloudSpace> getSpaces()
List<UUID> getSpaceManagers(String spaceName)
spaceName
- name of the spaceList<UUID> getSpaceDevelopers(String spaceName)
spaceName
- name of the spaceList<UUID> getSpaceAuditors(String spaceName)
spaceName
- name of the spaceList<UUID> getSpaceManagers(String orgName, String spaceName)
orgName
- name of the organization containing the spacespaceName
- name of the spaceList<UUID> getSpaceDevelopers(String orgName, String spaceName)
orgName
- name of the organization containing the spacespaceName
- name of the spaceList<UUID> getSpaceAuditors(String orgName, String spaceName)
orgName
- name of the organization containing the spacespaceName
- name of the spacevoid associateAuditorWithSpace(String spaceName)
spaceName
- name of the spacevoid associateDeveloperWithSpace(String spaceName)
spaceName
- name of the spacevoid associateManagerWithSpace(String spaceName)
spaceName
- name of the spacevoid associateAuditorWithSpace(String orgName, String spaceName)
orgName
- name of the organization containing the spacespaceName
- name of the spacevoid associateDeveloperWithSpace(String orgName, String spaceName)
orgName
- name of the organization containing the spacespaceName
- name of the spacevoid associateManagerWithSpace(String orgName, String spaceName)
orgName
- name of the organization containing the spacespaceName
- name of the spacevoid associateAuditorWithSpace(String orgName, String spaceName, String userGuid)
orgName
- 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 usernamevoid associateDeveloperWithSpace(String orgName, String spaceName, String userGuid)
orgName
- 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 usernamevoid associateManagerWithSpace(String orgName, String spaceName, String userGuid)
orgName
- 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 usernamevoid createSpace(String spaceName)
spaceName
- CloudSpace getSpace(String spaceName)
spaceName
- name of the spacevoid deleteSpace(String spaceName)
spaceName
- name of the spaceList<CloudOrganization> getOrganizations()
CloudOrganization getOrgByName(String orgName, boolean required)
orgName
- name of organizationrequired
- if true, and organization is not found, throw an exceptionvoid register(String email, String password)
email
- the email accountpassword
- the passwordvoid updatePassword(String newPassword)
newPassword
- the new passwordvoid updatePassword(CloudCredentials credentials, String newPassword)
credentials
- current credentialsnewPassword
- the new passwordvoid unregister()
org.springframework.security.oauth2.common.OAuth2AccessToken login()
void logout()
List<CloudApplication> getApplications()
CloudApplication getApplication(String appName)
appName
- name of the appCloudApplication getApplication(UUID guid)
guid
- GUID of the appApplicationStats getApplicationStats(String appName)
appName
- name of the appMap<String,Object> getApplicationEnvironment(String appName)
appName
- name of the appMap<String,Object> getApplicationEnvironment(UUID appGuid)
appGuid
- GUID of the appvoid createApplication(String appName, Staging staging, Integer memory, List<String> uris, List<String> serviceNames)
appName
- application namestaging
- staging infomemory
- memory to use in MBuris
- list of URIs for the appserviceNames
- list of service names to bind to appvoid createApplication(String appName, Staging staging, Integer disk, Integer memory, List<String> uris, List<String> serviceNames)
appName
- 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 appvoid createService(CloudService service)
service
- cloud service infovoid createUserProvidedService(CloudService service, Map<String,Object> credentials)
service
- cloud service infocredentials
- the user-provided service credentialsvoid createUserProvidedService(CloudService service, Map<String,Object> credentials, String syslogDrainUrl)
service
- cloud service infocredentials
- the user-provided service credentialssyslogDrainUrl
- for a logging serviceList<CloudRoute> deleteOrphanedRoutes()
void uploadApplication(String appName, String file) throws IOException
appName
- application namefile
- path to the application archive or folderIOException
void uploadApplication(String appName, File file) throws IOException
appName
- the application namefile
- the application archive or folderIOException
void uploadApplication(String appName, File file, UploadStatusCallback callback) throws IOException
appName
- the application namefile
- the application archivecallback
- a callback interface used to provide progress information or nullIOException
void uploadApplication(String appName, String fileName, InputStream inputStream) throws IOException
appName
- the application namefileName
- the logical name of the application fileinputStream
- the InputStream to read fromIOException
void uploadApplication(String appName, String fileName, InputStream inputStream, UploadStatusCallback callback) throws IOException
appName
- the application namefileName
- the logical name of the application fileinputStream
- the InputStream to read fromcallback
- a callback interface used to provide progress information or nullIOException
void uploadApplication(String appName, ApplicationArchive archive) throws IOException
appName
- the application namearchive
- the application archiveIOException
void uploadApplication(String appName, ApplicationArchive archive, UploadStatusCallback callback) throws IOException
appName
- the application namearchive
- the application archivecallback
- a callback interface used to provide progress information or nullIOException
StartingInfo startApplication(String appName)
appName
- name of applicationvoid debugApplication(String appName, CloudApplication.DebugMode mode)
appName
- name of applicationmode
- debug mode infovoid stopApplication(String appName)
appName
- name of applicationStartingInfo restartApplication(String appName)
appName
- name of applicationvoid deleteApplication(String appName)
appName
- name of applicationvoid deleteAllApplications()
void deleteAllServices()
void updateApplicationDiskQuota(String appName, int disk)
appName
- name of applicationdisk
- new disk setting in MBvoid updateApplicationMemory(String appName, int memory)
appName
- name of applicationmemory
- new memory setting in MBvoid updateApplicationInstances(String appName, int instances)
appName
- name of applicationinstances
- number of instances to usevoid updateApplicationServices(String appName, List<String> services)
appName
- name of appplicationservices
- list of services that should be bound to appvoid updateApplicationStaging(String appName, Staging staging)
appName
- name of appplicationstaging
- staging information for the appvoid updateApplicationUris(String appName, List<String> uris)
appName
- name of applicationuris
- list of URIs the app should usevoid updateApplicationEnv(String appName, Map<String,String> env)
appName
- name of applicationenv
- map of environment settingsvoid updateApplicationEnv(String appName, List<String> env)
appName
- name of applicationenv
- list of environment settingsList<CloudEvent> getEvents()
List<CloudEvent> getApplicationEvents(String appName)
appName
- name of applicationMap<String,String> getLogs(String appName)
appName
- name of the applicationStreamingLogToken streamLogs(String appName, ApplicationLogListener listener)
appName
- the name of the applicationlistener
- listener object to be notifiedList<ApplicationLog> getRecentLogs(String appName)
appName
- the name of the applicationMap<String,String> getCrashLogs(String appName)
appName
- name of the applicationString getStagingLogs(StartingInfo info, int offset)
info
- starting information containing staging log file URL. Obtained
after starting an application.offset
- starting position from where content should be retrieved.List<CloudStack> getStacks()
CloudStack getStack(String name)
name
- the name of the stack to getString getFile(String appName, int instanceIndex, String filePath)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the fileString getFile(String appName, int instanceIndex, String filePath, int startPosition)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the filestartPosition
- the starting position of the file contents (inclusive)String getFile(String appName, int instanceIndex, String filePath, int startPosition, int endPosition)
appName
- 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)String getFileTail(String appName, int instanceIndex, String filePath, int length)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the filelength
- the length of the file contents to retrievevoid openFile(String appName, int instanceIndex, String filePath, ClientHttpResponseCallback clientHttpResponseCallback)
appName
- name of the applicationinstanceIndex
- instance indexfilePath
- path to the fileclientHttpResponseCallback
- callback object to receive file contentsList<CloudService> getServices()
CloudService getService(String service)
service
- name of serviceCloudServiceInstance getServiceInstance(String service)
service
- name of the service instancevoid deleteService(String service)
service
- name of serviceList<CloudServiceOffering> getServiceOfferings()
List<CloudServiceBroker> getServiceBrokers()
CloudServiceBroker getServiceBroker(String name)
name
- the service broker namevoid createServiceBroker(CloudServiceBroker serviceBroker)
serviceBroker
- cloud service broker infovoid updateServiceBroker(CloudServiceBroker serviceBroker)
serviceBroker
- cloud service broker infovoid deleteServiceBroker(String name)
name
- the service broker namevoid updateServicePlanVisibilityForBroker(String name, boolean visibility)
name
- the service broker namevisibility
- true for public, false for privatevoid bindService(String appName, String serviceName)
appName
- the application nameserviceName
- the service namevoid unbindService(String appName, String serviceName)
appName
- the application nameserviceName
- the service nameInstancesInfo getApplicationInstances(String appName)
appName
- name of application.InstancesInfo getApplicationInstances(CloudApplication app)
app
- the application.CrashesInfo getCrashes(String appName)
appName
- name of applicationvoid rename(String appName, String newName)
appName
- the current namenewName
- the new nameList<CloudDomain> getDomainsForOrg()
List<CloudDomain> getPrivateDomains()
List<CloudDomain> getSharedDomains()
List<CloudDomain> getDomains()
CloudDomain getDefaultDomain()
void addDomain(String domainName)
domainName
- the domain to addvoid removeDomain(String domainName)
deleteDomain(java.lang.String)
domainName
- the domain to removevoid deleteDomain(String domainName)
domainName
- the domain to deleteList<CloudRoute> getRoutes(String domainName)
domainName
- the domain the routes belong tovoid addRoute(String host, String domainName)
host
- the host of the route to registerdomainName
- the domain of the route to registervoid deleteRoute(String host, String domainName)
host
- the host of the route to deletedomainName
- the domain of the route to deletevoid registerRestLogListener(RestLogCallback callBack)
callBack
- the callback to be registeredvoid unRegisterRestLogListener(RestLogCallback callBack)
callBack
- the callback to be un-registeredCloudQuota getQuotaByName(String quotaName, boolean required)
quotaName
- required
- void setQuotaToOrg(String orgName, String quotaName)
orgName
- quotaName
- void createQuota(CloudQuota quota)
quota
- void deleteQuota(String quotaName)
quotaName
- List<CloudQuota> getQuotas()
void updateQuota(CloudQuota quota, String name)
quota
- name
- List<CloudSecurityGroup> getSecurityGroups()
CloudSecurityGroup
s in the systemCloudSecurityGroup getSecurityGroup(String securityGroupName)
securityGroupName
- The name of the security groupnull
if no security groups exist with the
given namevoid createSecurityGroup(CloudSecurityGroup securityGroup)
securityGroup
- void createSecurityGroup(String name, InputStream jsonRulesFile)
cf 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.name
- 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.html
void updateSecurityGroup(CloudSecurityGroup securityGroup)
securityGroup
- IllegalArgumentException
- if a security group does not exist with the name of the given CloudSecurityGroupvoid updateSecurityGroup(String name, InputStream jsonRulesFile)
cf 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.jsonRulesFile
- An input stream that has a single array with JSON objects inside describing the rulesIllegalArgumentException
- if a security group does not exist with the given namehttp://docs.cloudfoundry.org/adminguide/app-sec-groups.html
void deleteSecurityGroup(String securityGroupName)
securityGroupName
- IllegalArgumentException
- if a security group does not exist with the given nameList<CloudSecurityGroup> getStagingSecurityGroups()
void bindStagingSecurityGroup(String securityGroupName)
void unbindStagingSecurityGroup(String securityGroupName)
List<CloudSecurityGroup> getRunningSecurityGroups()
void bindRunningSecurityGroup(String securityGroupName)
void unbindRunningSecurityGroup(String securityGroupName)
List<CloudSpace> getSpacesBoundToSecurityGroup(String securityGroupName)
void bindSecurityGroup(String orgName, String spaceName, String securityGroupName)
orgName
- 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 spaceIllegalArgumentException
- if the org, space, or security group do not existvoid unbindSecurityGroup(String orgName, String spaceName, String securityGroupName)
orgName
- 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 spaceIllegalArgumentException
- if the org, space, or security group do not existMap<String,CloudUser> getOrganizationUsers(String orgName)
orgName
- organization nameIllegalArgumentException
- if the org do not existCopyright © 2015. All rights reserved.