{"modulePath":"code.cloudfoundry.org/cli-sapi","version":"v6.51.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ccv3\n\nPackage ccv3 represents a Cloud Controller V3 client.\n\nThese sets of packages are still under development/pre-pre-pre...alpha. Use at your own risk! Functionality and design may change without warning.\n\nIt is currently designed to support Cloud Controller API 3.0.0. However, it may include features and endpoints of later API versions.\n\nFor more information on the Cloud Controller API see [https://apidocs.cloudfoundry.org/](https://apidocs.cloudfoundry.org/)\n\n### Method Naming Conventions {#hdr-Method_Naming_Conventions}\n\nThe client takes a '\\\u003cAction Name\u003e\\\u003cTop Level Endpoint\u003e\\\u003cReturn Value\u003e' approach to method names.  If the \\\u003cTop Level Endpoint\u003e and \\\u003cReturn Value\u003e are similar, they do not need to be repeated. If a GUID is required for the \\\u003cTop Level Endpoint\u003e, the pluralization is removed from said endpoint in the method name.\n\nAdditionally, if the endpoint is an \"action\" endpoint, do not include the word \"Action\" in the method name.\n\nFor Example:\n\n\tMethod Name: GetApplication\n\tEndpoint: /v3/applications/:guid\n\tAction Name: Get\n\tTop Level Endpoint: applications\n\tReturn Value: Application\n\n\tMethod Name: GetServiceInstances\n\tEndpoint: /v3/service_instances\n\tAction Name: Get\n\tTop Level Endpoint: service_instances\n\tReturn Value: []ServiceInstance\n\n\tMethod Name: GetSpaceServiceInstances\n\tEndpoint: /v3/spaces/:guid/service_instances\n\tAction Name: Get\n\tTop Level Endpoint: spaces\n\tReturn Value: []ServiceInstance\n\n\tMethod Name: CreateApplicationTask\n\tEndpoint: /v3/apps/:application_guid/task\n\tAction Name: Post\n\tTop Level Endpoint: apps\n\tReturn Value: Task\n\nUse the following table to determine which HTTP Command equates to which Action Name:\n\n\tHTTP Command -\u003e Action Name\n\tPOST -\u003e Create OR Update*\n\tGET -\u003e Get\n\tPUT -\u003e Update\n\tDELETE -\u003e Delete\n\tPATCH -\u003e Update\n\n\\* - In some cases POSTs are updating resources, in these cases the method should be called Update, not Create.\n\n### Method Locations {#hdr-Method_Locations}\n\nMethods exist in the same file as their return type, regardless of which endpoint they use.\n\n### Error Handling {#hdr-Error_Handling}\n\nAll error handling that requires parsing the error\\_code/code returned back from the Cloud Controller should be placed in the errorWrapper. Everything else can be handled in the individual operations. All parsed cloud controller errors should exist in errors.go, all generic HTTP errors should exist in the cloudcontroller's errors.go. Errors related to the individual operation should exist at the top of that operation's file.\n\n## Functions\n\n```go\nfunc FormatQueryParameters(queries []Query) url.Values\n```\nFormatQueryParameters converts a Query object into a collection that cloudcontroller.Request can accept.\n\n## Types\n\n```go\ntype APILink struct {\n\t// HREF is the fully qualified URL for the link.\n\tHREF string `json:\"href\"`\n\t// Method indicate the desired action to be performed on the identified\n\t// resource.\n\tMethod string `json:\"method\"`\n\n\t// Meta contains additional metadata about the API.\n\tMeta struct {\n\t\t// Version of the API\n\t\tVersion string `json:\"version\"`\n\n\t\t// Fingerprint to authenticate api with\n\t\tHostKeyFingerprint string `json:\"host_key_fingerprint\"`\n\n\t\t// Identifier for UAA queries\n\t\tOAuthClient string `json:\"oath_client\"`\n\t} `json:\"meta\"`\n}\n```\nAPILink represents a generic link from a response object.\n\n```go\ntype APILinks map[string]APILink\n```\nAPILinks is a directory of follow-up urls for the resource.\n\n```go\ntype AppLimit struct {\n\tTotalMemory       *types.NullInt `json:\"total_memory_in_mb,omitempty\"`\n\tInstanceMemory    *types.NullInt `json:\"per_process_memory_in_mb,omitempty\"`\n\tTotalAppInstances *types.NullInt `json:\"total_instances,omitempty\"`\n}\n```\n\n```go\nfunc (al *AppLimit) UnmarshalJSON(rawJSON []byte) error\n```\n\n```go\ntype Application struct {\n\t// GUID is the unique application identifier.\n\tGUID string\n\t// StackName is the name of the stack on which the application runs.\n\tStackName string\n\t// LifecycleBuildpacks is a list of the names of buildpacks.\n\tLifecycleBuildpacks []string\n\t// LifecycleType is the type of the lifecycle.\n\tLifecycleType constant.AppLifecycleType\n\t// Metadata is used for custom tagging of API resources\n\tMetadata *Metadata\n\t// Name is the name given to the application.\n\tName string\n\t// Relationships list the relationships to the application.\n\tRelationships Relationships\n\t// State is the desired state of the application.\n\tState constant.ApplicationState\n}\n```\nApplication represents a Cloud Controller V3 Application.\n\n```go\nfunc (a Application) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts an Application into a Cloud Controller Application.\n\n```go\nfunc (a *Application) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Application response.\n\n```go\ntype ApplicationFeature struct {\n\t// Name of the application feature\n\tName    string\n\tEnabled bool\n}\n```\n\n```go\ntype Build struct {\n\t// CreatedAt is the time with zone when the build was created.\n\tCreatedAt string\n\t// DropletGUID is the unique identifier for the resulting droplet from the\n\t// staging process.\n\tDropletGUID string\n\t// Error describes errors during the build process.\n\tError string\n\t// GUID is the unique build identifier.\n\tGUID string\n\t// PackageGUID is the unique identifier for package that is the input to the\n\t// staging process.\n\tPackageGUID string\n\t// State is the state of the build.\n\tState constant.BuildState\n}\n```\nBuild represent the process of staging an application package.\n\n```go\nfunc (b Build) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts a Build into a Cloud Controller Application.\n\n```go\nfunc (b *Build) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Build response.\n\n```go\ntype Buildpack struct {\n\t// Enabled is true when the buildpack can be used for staging.\n\tEnabled types.NullBool\n\t// Filename is the uploaded filename of the buildpack.\n\tFilename string\n\t// GUID is the unique identifier for the buildpack.\n\tGUID string\n\t// Locked is true when the buildpack cannot be updated.\n\tLocked types.NullBool\n\t// Name is the name of the buildpack. To be used by app buildpack field.\n\t// (only alphanumeric characters)\n\tName string\n\t// Position is the order in which the buildpacks are checked during buildpack\n\t// auto-detection.\n\tPosition types.NullInt\n\t// Stack is the name of the stack that the buildpack will use.\n\tStack string\n\t// State is the current state of the buildpack.\n\tState string\n\t// Links are links to related resources.\n\tLinks APILinks\n\t// Metadata is used for custom tagging of API resources\n\tMetadata *Metadata\n}\n```\nBuildpack represents a Cloud Controller V3 buildpack.\n\n```go\nfunc (buildpack Buildpack) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts a Package into a Cloud Controller Package.\n\n```go\nfunc (buildpack *Buildpack) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Checksum struct {\n\tValue string `json:\"value\"`\n}\n```\n\n```go\ntype Client struct {\n\tInfo\n\tCloudControllerURL string\n\n\tRequester\n\t// contains filtered or unexported fields\n}\n```\nClient can be used to talk to a Cloud Controller's V3 Endpoints.\n\n```go\nfunc NewClient(config Config) *Client\n```\nNewClient returns a new Client.\n\n```go\nfunc TestClient(config Config, clock Clock, requester Requester) *Client\n```\nTestClient returns a new client explicitly meant for internal testing.  This should not be used for production code.\n\n```go\nfunc (client *Client) ApplyOrganizationQuota(quotaGuid, orgGuid string) (RelationshipList, Warnings, error)\n```\n\n```go\nfunc (client Client) ApplySpaceQuota(quotaGUID string, spaceGUID string) (RelationshipList, Warnings, error)\n```\n\n```go\nfunc (client *Client) CancelDeployment(deploymentGUID string) (Warnings, error)\n```\n\n```go\nfunc (client Client) CheckRoute(domainGUID string, hostname string, path string) (bool, Warnings, error)\n```\nCheckRoute checks whether the route with the given domain GUID, hostname, and path exists in the foundation.\n\n```go\nfunc (client *Client) CopyPackage(sourcePkgGUID string, targetAppGUID string) (Package, Warnings, error)\n```\nCopyPackage copies a package from a source package to a destination package Note: source app guid is in URL; dest app guid is in body\n\n```go\nfunc (client *Client) CreateApplication(app Application) (Application, Warnings, error)\n```\nCreateApplication creates an application with the given settings.\n\n```go\nfunc (client *Client) CreateApplicationDeployment(appGUID string, dropletGUID string) (string, Warnings, error)\n```\n\n```go\nfunc (client *Client) CreateApplicationProcessScale(appGUID string, process Process) (Process, Warnings, error)\n```\nCreateApplicationProcessScale updates process instances count, memory or disk\n\n```go\nfunc (client *Client) CreateApplicationTask(appGUID string, task Task) (Task, Warnings, error)\n```\nCreateApplicationTask runs a command in the Application environment associated with the provided Application GUID.\n\n```go\nfunc (client *Client) CreateBuild(build Build) (Build, Warnings, error)\n```\nCreateBuild creates the given build, requires Package GUID to be set on the build.\n\n```go\nfunc (client *Client) CreateBuildpack(bp Buildpack) (Buildpack, Warnings, error)\n```\nCreateBuildpack creates a buildpack with the given settings, Type and the ApplicationRelationship must be set.\n\n```go\nfunc (client Client) CreateDomain(domain Domain) (Domain, Warnings, error)\n```\n\n```go\nfunc (client *Client) CreateDroplet(appGUID string) (Droplet, Warnings, error)\n```\nCreateDroplet creates a new droplet without a package for the app with the given guid.\n\n```go\nfunc (client *Client) CreateIsolationSegment(isolationSegment IsolationSegment) (IsolationSegment, Warnings, error)\n```\nCreateIsolationSegment will create an Isolation Segment on the Cloud Controller. Note: This will not validate that the placement tag exists in the diego cluster.\n\n```go\nfunc (client *Client) CreateOrganization(orgName string) (Organization, Warnings, error)\n```\nCreateOrganization creates an organization with the given name.\n\n```go\nfunc (client *Client) CreateOrganizationQuota(orgQuota OrganizationQuota) (OrganizationQuota, Warnings, error)\n```\n\n```go\nfunc (client *Client) CreatePackage(pkg Package) (Package, Warnings, error)\n```\nCreatePackage creates a package with the given settings, Type and the ApplicationRelationship must be set.\n\n```go\nfunc (client *Client) CreateRole(roleSpec Role) (Role, Warnings, error)\n```\n\n```go\nfunc (client Client) CreateRoute(route Route) (Route, Warnings, error)\n```\n\n```go\nfunc (client *Client) CreateSecurityGroup(securityGroup resources.SecurityGroup) (resources.SecurityGroup, Warnings, error)\n```\n\n```go\nfunc (client *Client) CreateServiceBroker(serviceBroker ServiceBrokerModel) (JobURL, Warnings, error)\n```\nCreateServiceBroker registers a new service broker.\n\n```go\nfunc (client *Client) CreateSpace(space Space) (Space, Warnings, error)\n```\n\n```go\nfunc (client Client) CreateSpaceQuota(spaceQuota SpaceQuota) (SpaceQuota, Warnings, error)\n```\n\n```go\nfunc (client *Client) CreateUser(uaaUserID string) (User, Warnings, error)\n```\nCreateUser creates a new Cloud Controller User from the provided UAA user ID.\n\n```go\nfunc (client *Client) DeleteApplication(appGUID string) (JobURL, Warnings, error)\n```\nDeleteApplication deletes the app with the given app GUID. Returns back a resulting job URL to poll.\n\n```go\nfunc (client *Client) DeleteApplicationProcessInstance(appGUID string, processType string, instanceIndex int) (Warnings, error)\n```\nDeleteApplicationProcessInstance deletes/stops a particular application's process instance.\n\n```go\nfunc (client Client) DeleteBuildpack(buildpackGUID string) (JobURL, Warnings, error)\n```\nDeleteBuildpack deletes the buildpack with the provided guid.\n\n```go\nfunc (client Client) DeleteDomain(domainGUID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client *Client) DeleteIsolationSegment(guid string) (Warnings, error)\n```\nDeleteIsolationSegment removes an isolation segment from the cloud controller. Note: This will only remove it from the cloud controller database. It will not remove it from diego.\n\n```go\nfunc (client *Client) DeleteIsolationSegmentOrganization(isolationSegmentGUID string, orgGUID string) (Warnings, error)\n```\nDeleteIsolationSegmentOrganization will delete the relationship between the isolation segment and the organization provided.\n\n```go\nfunc (client *Client) DeleteOrganization(orgGUID string) (JobURL, Warnings, error)\n```\nDeleteOrganization deletes the organization with the given GUID.\n\n```go\nfunc (client *Client) DeleteOrganizationQuota(quotaGUID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client Client) DeleteOrphanedRoutes(spaceGUID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client *Client) DeleteRole(roleGUID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client Client) DeleteRoute(routeGUID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client *Client) DeleteSecurityGroup(securityGroupGUID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client *Client) DeleteServiceBroker(serviceBrokerGUID string) (JobURL, Warnings, error)\n```\nDeleteServiceBroker deletes a named service broker\n\n```go\nfunc (client *Client) DeleteServiceInstanceRelationshipsSharedSpace(serviceInstanceGUID string, spaceGUID string) (Warnings, error)\n```\nDeleteServiceInstanceRelationshipsSharedSpace will delete the sharing relationship between the service instance and the shared-to space provided.\n\n```go\nfunc (client *Client) DeleteServicePlanVisibility(servicePlanGUID, organizationGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) DeleteSpace(spaceGUID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client Client) DeleteSpaceQuota(spaceQuotaGUID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client *Client) DeleteUser(uaaUserID string) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client *Client) EntitleIsolationSegmentToOrganizations(isolationSegmentGUID string, organizationGUIDs []string) (RelationshipList, Warnings, error)\n```\nEntitleIsolationSegmentToOrganizations will create a link between the isolation segment and the list of organizations provided.\n\n```go\nfunc (client *Client) GetAppFeature(appGUID string, featureName string) (ApplicationFeature, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetApplicationByNameAndSpace(appName string, spaceGUID string) (Application, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetApplicationDropletCurrent(appGUID string) (Droplet, Warnings, error)\n```\nGetApplicationDropletCurrent returns the current droplet for a given application.\n\n```go\nfunc (client *Client) GetApplicationEnvironment(appGUID string) (Environment, Warnings, error)\n```\nGetApplicationEnvironment fetches all the environment variables on an application by groups.\n\n```go\nfunc (client *Client) GetApplicationManifest(appGUID string) ([]byte, Warnings, error)\n```\nGetApplicationManifest returns a (YAML) manifest for an application and its underlying processes.\n\n```go\nfunc (client *Client) GetApplicationProcessByType(appGUID string, processType string) (Process, Warnings, error)\n```\nGetApplicationProcessByType returns application process of specified type\n\n```go\nfunc (client *Client) GetApplicationProcesses(appGUID string) ([]Process, Warnings, error)\n```\nGetApplicationProcesses lists processes for a given application. \\*\\*Note\\*\\*: Due to security, the API obfuscates certain values such as \\`command\\`.\n\n```go\nfunc (client Client) GetApplicationRoutes(appGUID string) ([]Route, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetApplicationTasks(appGUID string, query ...Query) ([]Task, Warnings, error)\n```\nGetApplicationTasks returns a list of tasks associated with the provided application GUID. Results can be filtered by providing URL queries.\n\n```go\nfunc (client *Client) GetApplications(query ...Query) ([]Application, Warnings, error)\n```\nGetApplications lists applications with optional queries.\n\n```go\nfunc (client *Client) GetBuild(guid string) (Build, Warnings, error)\n```\nGetBuild gets the build with the given GUID.\n\n```go\nfunc (client *Client) GetBuildpacks(query ...Query) ([]Buildpack, Warnings, error)\n```\nGetBuildpacks lists buildpacks with optional filters.\n\n```go\nfunc (client *Client) GetDefaultDomain(orgGUID string) (Domain, Warnings, error)\n```\nGetDefaultDomain gets the default domain for the organization with the given GUID.\n\n```go\nfunc (client *Client) GetDeployment(deploymentGUID string) (Deployment, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetDeployments(query ...Query) ([]Deployment, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetDomain(domainGUID string) (Domain, Warnings, error)\n```\nGetDomain returns a domain with the given GUID.\n\n```go\nfunc (client Client) GetDomains(query ...Query) ([]Domain, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetDroplet(dropletGUID string) (Droplet, Warnings, error)\n```\nGetDroplet returns a droplet with the given GUID.\n\n```go\nfunc (client *Client) GetDroplets(query ...Query) ([]Droplet, Warnings, error)\n```\nGetDroplets lists droplets with optional filters.\n\n```go\nfunc (client *Client) GetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName) (EnvironmentVariables, Warnings, error)\n```\nGetEnvironmentVariableGroup gets the values of a particular environment variable group.\n\n```go\nfunc (client *Client) GetEvents(query ...Query) ([]Event, Warnings, error)\n```\nGetEvents uses the /v3/audit\\_events endpoint to retrieve a list of audit events. NOTE: This only returns the first page of results. We are intentionally not using the paginate helper to fetch all pages here because we only needed the first page for the \\`cf events\\` output. If we need to, we can refactor this later to fetch all pages and make \\`cf events\\` only filter down to the first page.\n\n```go\nfunc (client *Client) GetFeatureFlag(flagName string) (FeatureFlag, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetFeatureFlags() ([]FeatureFlag, Warnings, error)\n```\nGetFeatureFlags lists feature flags.\n\n```go\nfunc (client *Client) GetInfo() (Info, ResourceLinks, Warnings, error)\n```\nGetInfo returns endpoint and API information from /v3.\n\n```go\nfunc (client *Client) GetIsolationSegment(guid string) (IsolationSegment, Warnings, error)\n```\nGetIsolationSegment returns back the requested isolation segment that matches the GUID.\n\n```go\nfunc (client *Client) GetIsolationSegmentOrganizations(isolationSegmentGUID string) ([]Organization, Warnings, error)\n```\nGetIsolationSegmentOrganizations lists organizations entitled to an isolation segment.\n\n```go\nfunc (client *Client) GetIsolationSegments(query ...Query) ([]IsolationSegment, Warnings, error)\n```\nGetIsolationSegments lists isolation segments with optional filters.\n\n```go\nfunc (client *Client) GetJob(jobURL JobURL) (Job, Warnings, error)\n```\nGetJob returns a job for the provided GUID.\n\n```go\nfunc (client *Client) GetNewApplicationProcesses(appGUID string, deploymentGUID string) ([]Process, Warnings, error)\n```\nGetNewApplicationProcesses gets processes for an application in the middle of a deployment. The app's processes will include a web process that will be removed when the deployment completes, so exclude that soon-to-be-removed process from the result.\n\n```go\nfunc (client *Client) GetOrganization(orgGUID string) (Organization, Warnings, error)\n```\nGetOrganization gets an organization by the given guid.\n\n```go\nfunc (client *Client) GetOrganizationDefaultIsolationSegment(orgGUID string) (Relationship, Warnings, error)\n```\nGetOrganizationDefaultIsolationSegment returns the relationship between an organization and it's default isolation segment.\n\n```go\nfunc (client Client) GetOrganizationDomains(orgGUID string, query ...Query) ([]Domain, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetOrganizationQuota(quotaGUID string) (OrganizationQuota, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetOrganizationQuotas(query ...Query) ([]OrganizationQuota, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetOrganizations(query ...Query) ([]Organization, Warnings, error)\n```\nGetOrganizations lists organizations with optional filters.\n\n```go\nfunc (client *Client) GetPackage(packageGUID string) (Package, Warnings, error)\n```\nGetPackage returns the package with the given GUID.\n\n```go\nfunc (client *Client) GetPackageDroplets(packageGUID string, query ...Query) ([]Droplet, Warnings, error)\n```\nGetPackageDroplets returns the droplets that run the specified packages\n\n```go\nfunc (client *Client) GetPackages(query ...Query) ([]Package, Warnings, error)\n```\nGetPackages returns the list of packages.\n\n```go\nfunc (client *Client) GetProcess(processGUID string) (Process, Warnings, error)\n```\nGetProcess returns a process with the given guid\n\n```go\nfunc (client *Client) GetProcessInstances(processGUID string) ([]ProcessInstance, Warnings, error)\n```\nGetProcessInstances lists instance stats for a given process.\n\n```go\nfunc (client *Client) GetProcessSidecars(processGuid string) ([]Sidecar, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetRoles(query ...Query) ([]Role, IncludedResources, Warnings, error)\n```\nGetRoles lists roles with optional filters \u0026 includes.\n\n```go\nfunc (client Client) GetRouteDestinations(routeGUID string) ([]RouteDestination, Warnings, error)\n```\n\n```go\nfunc (client Client) GetRoutes(query ...Query) ([]Route, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetRunningSecurityGroups(spaceGUID string, queries ...Query) ([]resources.SecurityGroup, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetSSHEnabled(appGUID string) (SSHEnabled, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetSecurityGroups(queries ...Query) ([]resources.SecurityGroup, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetServiceBrokers(query ...Query) ([]ServiceBroker, Warnings, error)\n```\nGetServiceBrokers lists service brokers.\n\n```go\nfunc (client *Client) GetServiceInstances(query ...Query) ([]ServiceInstance, Warnings, error)\n```\nGetServiceInstances lists service instances with optional filters.\n\n```go\nfunc (client *Client) GetServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName string) (ServiceOffering, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetServiceOfferings(query ...Query) ([]ServiceOffering, Warnings, error)\n```\nGetServiceOffering lists service offering with optional filters.\n\n```go\nfunc (client *Client) GetServicePlanVisibility(servicePlanGUID string) (ServicePlanVisibility, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetServicePlans(query ...Query) ([]ServicePlan, Warnings, error)\n```\nGetServicePlans lists service plan with optional filters.\n\n```go\nfunc (client *Client) GetServicePlansWithSpaceAndOrganization(query ...Query) ([]ServicePlanWithSpaceAndOrganization, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetSpaceFeature(spaceGUID string, featureName string) (bool, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetSpaceIsolationSegment(spaceGUID string) (Relationship, Warnings, error)\n```\nGetSpaceIsolationSegment returns the relationship between a space and it's isolation segment.\n\n```go\nfunc (client Client) GetSpaceQuota(spaceQuotaGUID string) (SpaceQuota, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetSpaceQuotas(query ...Query) ([]SpaceQuota, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetSpaces(query ...Query) ([]Space, IncludedResources, Warnings, error)\n```\nGetSpaces lists spaces with optional filters.\n\n```go\nfunc (client *Client) GetStacks(query ...Query) ([]Stack, Warnings, error)\n```\nGetStacks lists stacks with optional filters.\n\n```go\nfunc (client *Client) GetStagingSecurityGroups(spaceGUID string, queries ...Query) ([]resources.SecurityGroup, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetUser(userGUID string) (User, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetUsers(query ...Query) ([]User, Warnings, error)\n```\n\n```go\nfunc (client Client) MapRoute(routeGUID string, appGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) PollJob(jobURL JobURL) (Warnings, error)\n```\nPollJob will keep polling the given job until the job has terminated, an error is encountered, or config.OverallPollingTimeout is reached. In the last case, a JobTimeoutError is returned.\n\n```go\nfunc (client *Client) PurgeServiceOffering(serviceOfferingGUID string) (Warnings, error)\n```\n\n```go\nfunc (client Client) ResourceMatch(resources []Resource) ([]Resource, Warnings, error)\n```\n\n```go\nfunc (client *Client) RootResponse() (Info, Warnings, error)\n```\nrootResponse returns the CC API root document.\n\n```go\nfunc (client *Client) SetApplicationDroplet(appGUID string, dropletGUID string) (Relationship, Warnings, error)\n```\nSetApplicationDroplet sets the specified droplet on the given application.\n\n```go\nfunc (client Client) SharePrivateDomainToOrgs(domainGuid string, sharedOrgs SharedOrgs) (Warnings, error)\n```\n\n```go\nfunc (client *Client) ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (RelationshipList, Warnings, error)\n```\nShareServiceInstanceToSpaces will create a sharing relationship between the service instance and the shared-to space for each space provided.\n\n```go\nfunc (client *Client) TargetCF(settings TargetSettings) (Info, Warnings, error)\n```\nTargetCF sets the client to use the Cloud Controller specified in the configuration. Any other configuration is also applied to the client.\n\n```go\nfunc (client *Client) UnbindSecurityGroupRunningSpace(securityGroupGUID string, spaceGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) UnbindSecurityGroupStagingSpace(securityGroupGUID string, spaceGUID string) (Warnings, error)\n```\n\n```go\nfunc (client Client) UnmapRoute(routeGUID string, destinationGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) UnsetSpaceQuota(spaceQuotaGUID, spaceGUID string) (Warnings, error)\n```\n\n```go\nfunc (client Client) UnsharePrivateDomainFromOrg(domainGuid string, orgGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateAppFeature(appGUID string, enabled bool, featureName string) (Warnings, error)\n```\nUpdateAppFeature enables/disables the ability to ssh for a given application.\n\n```go\nfunc (client *Client) UpdateApplication(app Application) (Application, Warnings, error)\n```\nUpdateApplication updates an application with the given settings.\n\n```go\nfunc (client *Client) UpdateApplicationApplyManifest(appGUID string, rawManifest []byte) (JobURL, Warnings, error)\n```\nUpdateApplicationApplyManifest applies the manifest to the given application. Returns back a resulting job URL to poll.\n\n```go\nfunc (client *Client) UpdateApplicationEnvironmentVariables(appGUID string, envVars EnvironmentVariables) (EnvironmentVariables, Warnings, error)\n```\nUpdateApplicationEnvironmentVariables adds/updates the user provided environment variables on an application. A restart is required for changes to take effect.\n\n```go\nfunc (client *Client) UpdateApplicationRestart(appGUID string) (Application, Warnings, error)\n```\nUpdateApplicationRestart restarts the given application.\n\n```go\nfunc (client *Client) UpdateApplicationStart(appGUID string) (Application, Warnings, error)\n```\nUpdateApplicationStart starts the given application.\n\n```go\nfunc (client *Client) UpdateApplicationStop(appGUID string) (Application, Warnings, error)\n```\nUpdateApplicationStop stops the given application.\n\n```go\nfunc (client Client) UpdateBuildpack(buildpack Buildpack) (Buildpack, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName, envVars EnvironmentVariables) (EnvironmentVariables, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateFeatureFlag(flag FeatureFlag) (FeatureFlag, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateOrganization(org Organization) (Organization, Warnings, error)\n```\nUpdateOrganization updates an organization with the given properties.\n\n```go\nfunc (client *Client) UpdateOrganizationDefaultIsolationSegmentRelationship(orgGUID string, isoSegGUID string) (Relationship, Warnings, error)\n```\nUpdateOrganizationDefaultIsolationSegmentRelationship sets the default isolation segment for an organization on the controller. If isoSegGuid is empty it will reset the default isolation segment.\n\n```go\nfunc (client *Client) UpdateOrganizationQuota(orgQuota OrganizationQuota) (OrganizationQuota, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateProcess(process Process) (Process, Warnings, error)\n```\nUpdateProcess updates the process's command or health check settings. GUID is always required; HealthCheckType is only required when updating health check settings.\n\n```go\nfunc (client *Client) UpdateResourceMetadata(resource string, resourceGUID string, metadata Metadata) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateSecurityGroup(securityGroup resources.SecurityGroup) (resources.SecurityGroup, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateSecurityGroupRunningSpace(securityGroupGUID string, spaceGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateSecurityGroupStagingSpace(securityGroupGUID string, spaceGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateServiceBroker(serviceBrokerGUID string, serviceBroker ServiceBrokerModel) (JobURL, Warnings, error)\n```\nUpdateServiceBroker updates an existing service broker.\n\n```go\nfunc (client *Client) UpdateServicePlanVisibility(servicePlanGUID string, planVisibility ServicePlanVisibility) (ServicePlanVisibility, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateSpace(space Space) (Space, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateSpaceApplyManifest(spaceGUID string, rawManifest []byte) (JobURL, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateSpaceFeature(spaceGUID string, enabled bool, featureName string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateSpaceIsolationSegmentRelationship(spaceGUID string, isolationSegmentGUID string) (Relationship, Warnings, error)\n```\nUpdateSpaceIsolationSegmentRelationship assigns an isolation segment to a space and returns the relationship.\n\n```go\nfunc (client *Client) UpdateSpaceQuota(spaceQuota SpaceQuota) (SpaceQuota, Warnings, error)\n```\n\n```go\nfunc (client *Client) UpdateTaskCancel(taskGUID string) (Task, Warnings, error)\n```\nUpdateTaskCancel cancels a task.\n\n```go\nfunc (client *Client) UploadBitsPackage(pkg Package, matchedResources []Resource, newResources io.Reader, newResourcesLength int64) (Package, Warnings, error)\n```\nUploadBitsPackage uploads the newResources and a list of existing resources to the cloud controller. An updated package is returned. The function will act differently given the following Readers:\n\n  - io.ReadSeeker: Will function properly on retry.\n  - io.Reader: Will return a ccerror.PipeSeekError on retry.\n  - nil: Will not add the \"application\" section to the request. The newResourcesLength is ignored in this case.\n\nNote: In order to determine if package creation is successful, poll the Package's state field for more information.\n\n```go\nfunc (client *Client) UploadBuildpack(buildpackGUID string, buildpackPath string, buildpack io.Reader, buildpackLength int64) (JobURL, Warnings, error)\n```\nUploadBuildpack uploads the contents of a buildpack zip to the server.\n\n```go\nfunc (client *Client) UploadDropletBits(dropletGUID string, dropletPath string, droplet io.Reader, dropletLength int64) (JobURL, Warnings, error)\n```\nUploadDropletBits asynchronously uploads bits from a .tgz file located at dropletPath to the droplet with guid dropletGUID. It returns a job URL pointing to the asynchronous upload job.\n\n```go\nfunc (client *Client) UploadPackage(pkg Package, fileToUpload string) (Package, Warnings, error)\n```\nUploadPackage uploads a file to a given package's Upload resource. Note: fileToUpload is read entirely into memory prior to sending data to CC.\n\n```go\ntype Clock interface {\n\tNow() time.Time\n}\n```\n\n```go\ntype Config struct {\n\t// AppName is the name of the application/process using the client.\n\tAppName string\n\n\t// AppVersion is the version of the application/process using the client.\n\tAppVersion string\n\n\t// JobPollingTimeout is the maximum amount of time a job polls for.\n\tJobPollingTimeout time.Duration\n\n\t// JobPollingInterval is the wait time between job polls.\n\tJobPollingInterval time.Duration\n\n\t// Wrappers that apply to the client connection.\n\tWrappers []ConnectionWrapper\n}\n```\nConfig allows the Client to be configured\n\n```go\ntype ConnectionWrapper interface {\n\tcloudcontroller.Connection\n\tWrap(innerconnection cloudcontroller.Connection) cloudcontroller.Connection\n}\n```\nConnectionWrapper can wrap a given connection allowing the wrapper to modify all requests going in and out of the given connection.\n\n```go\ntype Deployment struct {\n\tGUID          string\n\tState         constant.DeploymentState\n\tStatusValue   constant.DeploymentStatusValue\n\tStatusReason  constant.DeploymentStatusReason\n\tDropletGUID   string\n\tCreatedAt     string\n\tUpdatedAt     string\n\tRelationships Relationships\n\tNewProcesses  []Process\n}\n```\n\n```go\nfunc (d Deployment) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts a Deployment into a Cloud Controller Deployment.\n\n```go\nfunc (d *Deployment) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Deployment response.\n\n```go\ntype Domain struct {\n\tGUID             string         `json:\"guid,omitempty\"`\n\tName             string         `json:\"name\"`\n\tInternal         types.NullBool `json:\"internal,omitempty\"`\n\tOrganizationGUID string         `json:\"orgguid,omitempty\"`\n\n\t// Metadata is used for custom tagging of API resources\n\tMetadata *Metadata `json:\"metadata,omitempty\"`\n}\n```\n\n```go\nfunc (d Domain) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (d *Domain) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Droplet struct {\n\t//Buildpacks are the detected buildpacks from the staging process.\n\tBuildpacks []DropletBuildpack `json:\"buildpacks,omitempty\"`\n\t// CreatedAt is the timestamp that the Cloud Controller created the droplet.\n\tCreatedAt string `json:\"created_at\"`\n\t// GUID is the unique droplet identifier.\n\tGUID string `json:\"guid\"`\n\t// Image is the Docker image name.\n\tImage string `json:\"image\"`\n\t// Stack is the root filesystem to use with the buildpack.\n\tStack string `json:\"stack,omitempty\"`\n\t// State is the current state of the droplet.\n\tState constant.DropletState `json:\"state\"`\n}\n```\nDroplet represents a Cloud Controller droplet's metadata. A droplet is a set of compiled bits for a given application.\n\n```go\ntype DropletBuildpack struct {\n\t// Name is the buildpack name.\n\tName string `json:\"name\"`\n\t//DetectOutput is the output during buildpack detect process.\n\tDetectOutput string `json:\"detect_output\"`\n}\n```\nDropletBuildpack is the name and output of a buildpack used to create a droplet.\n\n```go\ntype DropletCreateRequest struct {\n\tRelationships Relationships `json:\"relationships\"`\n}\n```\n\n```go\ntype Environment struct {\n\t// Application contains basic application settings set by the user and CF\n\t// instance.\n\tApplication map[string]interface{} `json:\"application_env_json\"`\n\t// EnvironmentVariables are user provided environment variables.\n\tEnvironmentVariables map[string]interface{} `json:\"environment_variables\"`\n\t//Running is the set of default environment variables available to running\n\t//apps.\n\tRunning map[string]interface{} `json:\"running_env_json\"`\n\t//Staging is the set of default environment variables available during\n\t//staging.\n\tStaging map[string]interface{} `json:\"staging_env_json\"`\n\t// System contains information about bound services for the application. AKA\n\t// VCAP_SERVICES.\n\tSystem map[string]interface{} `json:\"system_env_json\"`\n}\n```\nEnvironment variables that will be provided to an app at runtime. It will include environment variables for Environment Variable Groups and Service Bindings.\n\n```go\ntype EnvironmentVariables map[string]types.FilteredString\n```\nEnvironmentVariables represents the environment variables that can be set on an application by the user.\n\n```go\nfunc (variables EnvironmentVariables) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (variables *EnvironmentVariables) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Event struct {\n\tGUID      string\n\tCreatedAt time.Time\n\tType      string\n\tActorName string\n\tData      map[string]interface{}\n}\n```\n\n```go\nfunc (e *Event) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype FeatureFlag struct {\n\tName    string `json:\"name\"`\n\tEnabled bool   `json:\"enabled\"`\n}\n```\nFeatureFlag represents a Cloud Controller V3 Feature Flag.\n\n```go\nfunc (f FeatureFlag) MarshalJSON() ([]byte, error)\n```\n\n```go\ntype IncludedResources struct {\n\tUsers         []User         `json:\"users,omitempty\"`\n\tOrganizations []Organization `json:\"organizations,omitempty\"`\n\tSpaces        []Space        `json:\"spaces,omitempty\"`\n}\n```\n\n```go\ntype IncludedUsers map[constant.IncludedType]User\n```\nIncludedUsers represent a set of users included on an API response.\n\n```go\ntype Info struct {\n\t// Links is a list of top level Cloud Controller APIs.\n\tLinks InfoLinks `json:\"links\"`\n}\n```\nInfo represents a GET response from the '/' endpoint of the cloud controller API.\n\n```go\nfunc (info Info) AppSSHEndpoint() string\n```\nAppSSHEndpoint returns the HREF for SSHing into an app container.\n\n```go\nfunc (info Info) AppSSHHostKeyFingerprint() string\n```\nAppSSHHostKeyFingerprint returns the SSH key fingerprint of the SSH proxy that brokers connections to application instances.\n\n```go\nfunc (info Info) CloudControllerAPIVersion() string\n```\nCloudControllerAPIVersion returns the version of the CloudController.\n\n```go\nfunc (info Info) LogCache() string\n```\nLogCache returns the HREF of the Loggregator Traffic Controller.\n\n```go\nfunc (info Info) Logging() string\n```\nLogging returns the HREF of the Loggregator Traffic Controller.\n\n```go\nfunc (info Info) NetworkPolicyV1() string\n```\nNetworkPolicyV1 returns the HREF of the Container Networking v1 Policy API\n\n```go\nfunc (info Info) OAuthClient() string\n```\nOAuthClient returns the oauth client ID of the SSH proxy that brokers connections to application instances.\n\n```go\nfunc (info Info) Routing() string\n```\n\n```go\nfunc (info Info) UAA() string\n```\nUAA returns the HREF of the UAA server.\n\n```go\ntype InfoLinks struct {\n\t// AppSSH is the link for application ssh info.\n\tAppSSH APILink `json:\"app_ssh\"`\n\n\t// CCV3 is the link to the Cloud Controller V3 API.\n\tCCV3 APILink `json:\"cloud_controller_v3\"`\n\n\t// Logging is the link to the Logging API.\n\tLogging APILink `json:\"logging\"`\n\n\t// Logging is the link to the Logging API.\n\tLogCache APILink `json:\"log_cache\"`\n\n\t// NetworkPolicyV1 is the link to the Container to Container Networking\n\t// API.\n\tNetworkPolicyV1 APILink `json:\"network_policy_v1\"`\n\n\t// Routing is the link to the routing API\n\tRouting APILink `json:\"routing\"`\n\n\t// UAA is the link to the UAA API.\n\tUAA APILink `json:\"uaa\"`\n}\n```\n\n```go\ntype IsolationSegment struct {\n\t//GUID is the unique ID of the isolation segment.\n\tGUID string `json:\"guid,omitempty\"`\n\t//Name is the name of the isolation segment.\n\tName string `json:\"name\"`\n}\n```\nIsolationSegment represents a Cloud Controller Isolation Segment.\n\n```go\ntype Job struct {\n\t// RawErrors is a list of errors that occurred while processing the job.\n\tRawErrors []JobErrorDetails `json:\"errors\"`\n\t// GUID is a unique identifier for the job.\n\tGUID string `json:\"guid\"`\n\t// State is the state of the job.\n\tState constant.JobState `json:\"state\"`\n\t// Warnings are the warnings emitted by the job during its processing.\n\tWarnings []jobWarning `json:\"warnings\"`\n}\n```\nJob represents a Cloud Controller Job.\n\n```go\nfunc (job Job) Errors() []error\n```\nErrors returns back a list of\n\n```go\nfunc (job Job) HasFailed() bool\n```\nHasFailed returns true when the job has completed with an error/failure.\n\n```go\nfunc (job Job) IsComplete() bool\n```\nIsComplete returns true when the job has completed successfully.\n\n```go\ntype JobErrorDetails struct {\n\t// Code is a numeric code for this error.\n\tCode constant.JobErrorCode `json:\"code\"`\n\t// Detail is a verbose description of the error.\n\tDetail string `json:\"detail\"`\n\t// Title is a short description of the error.\n\tTitle string `json:\"title\"`\n}\n```\nJobErrorDetails provides information regarding a job's error.\n\n```go\ntype JobURL string\n```\nJobURL is the URL to a given Job.\n\n```go\ntype Metadata struct {\n\tLabels map[string]types.NullString `json:\"labels,omitempty\"`\n}\n```\nMetadata is used for custom tagging of API resources\n\n```go\ntype Organization struct {\n\t// GUID is the unique organization identifier.\n\tGUID string `json:\"guid,omitempty\"`\n\t// Name is the name of the organization.\n\tName string `json:\"name\"`\n\t// QuotaGUID is the GUID of the organization Quota applied to this Organization\n\tQuotaGUID string `json:\"-\"`\n\n\t// Metadata is used for custom tagging of API resources\n\tMetadata *Metadata `json:\"metadata,omitempty\"`\n}\n```\nOrganization represents a Cloud Controller V3 Organization.\n\n```go\nfunc (org *Organization) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OrganizationQuota struct {\n\tQuota\n}\n```\nOrganizationQuota represents a Cloud Controller organization quota.\n\n```go\ntype Package struct {\n\t// CreatedAt is the time with zone when the object was created.\n\tCreatedAt string\n\n\t// DockerImage is the registry address of the docker image.\n\tDockerImage string\n\n\t// DockerPassword is the password for the docker image's registry.\n\tDockerPassword string\n\n\t// DockerUsername is the username for the docker image's registry.\n\tDockerUsername string\n\n\t// GUID is the unique identifier of the package.\n\tGUID string\n\n\t// Links are links to related resources.\n\tLinks APILinks\n\n\t// Relationships are a list of relationships to other resources.\n\tRelationships Relationships\n\n\t// State is the state of the package.\n\tState constant.PackageState\n\n\t// Type is the package type.\n\tType constant.PackageType\n}\n```\nPackage represents a Cloud Controller V3 Package.\n\n```go\nfunc (p Package) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts a Package into a Cloud Controller Package.\n\n```go\nfunc (p *Package) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Package response.\n\n```go\ntype PaginatedResources struct {\n\t// Pagination represents information about the paginated resource.\n\tPagination struct {\n\t\t// Next represents a link to the next page.\n\t\tNext struct {\n\t\t\t// HREF is the HREF of the next page.\n\t\t\tHREF string `json:\"href\"`\n\t\t} `json:\"next\"`\n\t} `json:\"pagination\"`\n\t// ResourceBytes is the list of resources for the current page.\n\tResourcesBytes json.RawMessage `json:\"resources\"`\n\n\tIncludedResources IncludedResources `json:\"included\"`\n\t// contains filtered or unexported fields\n}\n```\nPaginatedResources represents a page of resources returned by the Cloud Controller.\n\n```go\nfunc NewPaginatedResources(exampleResource interface{}) *PaginatedResources\n```\nNewPaginatedResources returns a new PaginatedResources struct with the given resource type.\n\n```go\nfunc (pr PaginatedResources) NextPage() string\n```\nNextPage returns the HREF of the next page of results.\n\n```go\nfunc (pr PaginatedResources) Resources() ([]interface{}, error)\n```\nResources unmarshals JSON representing a page of resources and returns a slice of the given resource type.\n\n```go\ntype Process struct {\n\tGUID string\n\tType string\n\t// Command is the process start command. Note: This value will be obfuscated when obtained from listing.\n\tCommand                      types.FilteredString\n\tHealthCheckType              constant.HealthCheckType\n\tHealthCheckEndpoint          string\n\tHealthCheckInvocationTimeout int64\n\tHealthCheckTimeout           int64\n\tInstances                    types.NullInt\n\tMemoryInMB                   types.NullUint64\n\tDiskInMB                     types.NullUint64\n}\n```\n\n```go\nfunc (p Process) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (p *Process) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ProcessInstance struct {\n\t// CPU is the current CPU usage of the instance.\n\tCPU float64\n\t// Details is information about errors placing the instance.\n\tDetails string\n\t// DiskQuota is the maximum disk the instance is allowed to use.\n\tDiskQuota uint64\n\t// DiskUsage is the current disk usage of the instance.\n\tDiskUsage uint64\n\t// Index is the index of the instance.\n\tIndex int64\n\t// Isolation segment is the current isolation segment that the instance is\n\t// running on. The value is empty when the instance is not placed on a\n\t// particular isolation segment.\n\tIsolationSegment string\n\t// MemoryQuota is the maximum memory the instance is allowed to use.\n\tMemoryQuota uint64\n\t// DiskUsage is the current memory usage of the instance.\n\tMemoryUsage uint64\n\t// State is the state of the instance.\n\tState constant.ProcessInstanceState\n\t// Type is the process type for the instance.\n\tType string\n\t// Uptime is the duration that the instance has been running.\n\tUptime time.Duration\n}\n```\nProcessInstance represents a single process instance for a particular application.\n\n```go\nfunc (instance *ProcessInstance) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a V3 Cloud Controller Instance response.\n\n```go\ntype Query struct {\n\tKey    QueryKey\n\tValues []string\n}\n```\nQuery is additional settings that can be passed to some requests that can filter, sort, etc. the results.\n\n```go\ntype QueryKey string\n```\nQueryKey is the type of query that is being selected on.\n\n```go\nconst (\n\t// AppGUIDFilter is a query parameter for listing objects by app GUID.\n\tAppGUIDFilter QueryKey = \"app_guids\"\n\t// GUIDFilter is a query parameter for listing objects by GUID.\n\tGUIDFilter QueryKey = \"guids\"\n\t// LabelSelectorFilter is a query parameter for listing objects by label\n\tLabelSelectorFilter QueryKey = \"label_selector\"\n\t// NameFilter is a query parameter for listing objects by name.\n\tNameFilter QueryKey = \"names\"\n\t// NoRouteFilter is a query parameter for skipping route creation and unmapping existing routes.\n\tNoRouteFilter QueryKey = \"no_route\"\n\t// OrganizationGUIDFilter is a query parameter for listing objects by Organization GUID.\n\tOrganizationGUIDFilter QueryKey = \"organization_guids\"\n\t// SequenceIDFilter is a query parameter for listing objects by sequence ID.\n\tSequenceIDFilter QueryKey = \"sequence_ids\"\n\t// SpaceGUIDFilter is a query parameter for listing objects by Space GUID.\n\tSpaceGUIDFilter QueryKey = \"space_guids\"\n\t// StatusValueFilter is a query parameter for listing deployments by status.value\n\tStatusValueFilter QueryKey = \"status_values\"\n\t// DomainGUIDFilter is a query param for listing events by target_guid\n\tTargetGUIDFilter QueryKey = \"target_guids\"\n\t// DomainGUIDFilter is a query param for listing objects by domain_guid\n\tDomainGUIDFilter QueryKey = \"domain_guids\"\n\t// HostsFilter is a query param for listing objects by hostname\n\tHostsFilter QueryKey = \"hosts\"\n\t// HostFilter is a query param for getting an object with the given host\n\tHostFilter QueryKey = \"host\"\n\t// Origins filter is a query parameter when getting a user by origin (Note: CAPI will return an error if usernames filter is not also provided)\n\tOriginsFilter QueryKey = \"origins\"\n\t// PathsFilter is a query param for listing objects by path\n\tPathsFilter QueryKey = \"paths\"\n\t// PathFilter is a query param for getting an object with the given host\n\tPathFilter QueryKey = \"path\"\n\t// RoleTypesFilter is a query param for getting a role by type\n\tRoleTypesFilter QueryKey = \"types\"\n\t// StackFilter is a query parameter for listing objects by stack name\n\tStackFilter QueryKey = \"stacks\"\n\t// UnmappedFilter is a query parameter specifying unmapped routes\n\tUnmappedFilter QueryKey = \"unmapped\"\n\t// UserGUIDFilter is a query parameter when getting a user by GUID\n\tUserGUIDFilter QueryKey = \"user_guids\"\n\t// UsernamesFilter is a query parameter when getting a user by username\n\tUsernamesFilter QueryKey = \"usernames\"\n\t// StatesFilter is a query parameter when getting a package's droplets by state\n\tStatesFilter QueryKey = \"states\"\n\t// ServiceBrokerNamesFilter is a query parameter when getting plans or offerings according to the Service Brokers that it relates to\n\tServiceBrokerNamesFilter QueryKey = \"service_broker_names\"\n\t// ServiceBrokerGUIDsFilter is a query parameter for getting according to the service broker GUID\n\tServiceBrokerGUIDsFilter QueryKey = \"service_broker_guids\"\n\t// ServiceOfferingNamesFilter is a query parameter when getting a plan according to the Service Offerings that it relates to\n\tServiceOfferingNamesFilter QueryKey = \"service_offering_names\"\n\t// ServiceOfferingGUIDsFilter is a query parameter when getting according to service offering GUIDs\n\tServiceOfferingGUIDsFilter QueryKey = \"service_offering_guids\"\n\n\t// OrderBy is a query parameter to specify how to order objects.\n\tOrderBy QueryKey = \"order_by\"\n\t// PerPage is a query parameter for specifying the number of results per page.\n\tPerPage QueryKey = \"per_page\"\n\t// Include is a query parameter for specifying other resources associated with the\n\t// resource returned by the endpoint\n\tInclude QueryKey = \"include\"\n\n\t// GloballyEnabledStaging is the query parameter for getting only security groups that are globally enabled for staging\n\tGloballyEnabledStaging QueryKey = \"globally_enabled_staging\"\n\n\t// GloballyEnabledRunning is the query parameter for getting only security groups that are globally enabled for running\n\tGloballyEnabledRunning QueryKey = \"globally_enabled_running\"\n\n\t// NameOrder is a query value for ordering by name. This value is used in\n\t// conjunction with the OrderBy QueryKey.\n\tNameOrder = \"name\"\n\n\t// PositionOrder is a query value for ordering by position. This value is\n\t// used in conjunction with the OrderBy QueryKey.\n\tPositionOrder = \"position\"\n\n\t// CreatedAtDescendingOrder is a query value for ordering by created_at timestamp,\n\t// in descending order.\n\tCreatedAtDescendingOrder = \"-created_at\"\n\n\t// SourceGUID is the query parameter for getting an object. Currently it's used as a package GUID\n\t// to retrieve a package to later copy it to an app (CopyPackage())\n\tSourceGUID = \"source_guid\"\n\n\t// Purge is a query parameter used on a Delete request to indicate that dependent resources should also be deleted\n\tPurge = \"purge\"\n)\n```\n\n```go\ntype Quota struct {\n\t// GUID is the unique ID of the organization quota.\n\tGUID string `json:\"guid,omitempty\"`\n\t// Name is the name of the organization quota\n\tName string `json:\"name\"`\n\t// Apps contain the various limits that are associated with applications\n\tApps AppLimit `json:\"apps\"`\n\t// Services contain the various limits that are associated with services\n\tServices ServiceLimit `json:\"services\"`\n\t// Routes contain the various limits that are associated with routes\n\tRoutes RouteLimit `json:\"routes\"`\n}\n```\n\n```go\ntype RealRequester struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewRequester(config Config) *RealRequester\n```\n\n```go\nfunc (requester *RealRequester) InitializeConnection(settings TargetSettings)\n```\n\n```go\nfunc (requester *RealRequester) InitializeRouter(resources map[string]string)\n```\n\n```go\nfunc (requester *RealRequester) MakeListRequest(requestParams RequestParams) (IncludedResources, Warnings, error)\n```\n\n```go\nfunc (requester *RealRequester) MakeRequest(requestParams RequestParams) (JobURL, Warnings, error)\n```\n\n```go\nfunc (requester *RealRequester) MakeRequestReceiveRaw(\n\trequestName string,\n\turiParams internal.Params,\n\tresponseBodyMimeType string,\n) ([]byte, Warnings, error)\n```\n\n```go\nfunc (requester *RealRequester) MakeRequestSendRaw(\n\trequestName string,\n\turiParams internal.Params,\n\trequestBody []byte,\n\trequestBodyMimeType string,\n\tresponseBody interface{},\n) (string, Warnings, error)\n```\n\n```go\nfunc (requester *RealRequester) MakeRequestUploadAsync(\n\trequestName string,\n\turiParams internal.Params,\n\trequestBodyMimeType string,\n\trequestBody io.ReadSeeker,\n\tdataLength int64,\n\tresponseBody interface{},\n\twriteErrors \u003c-chan error,\n) (string, Warnings, error)\n```\n\n```go\nfunc (requester *RealRequester) WrapConnection(wrapper ConnectionWrapper)\n```\nWrapConnection wraps the current Client connection in the wrapper.\n\n```go\ntype Relationship struct {\n\tGUID string\n}\n```\nRelationship represents a one to one relationship. An empty GUID will be marshaled as \\`null\\`.\n\n```go\nfunc (r Relationship) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *Relationship) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RelationshipList struct {\n\tGUIDs []string\n}\n```\nRelationshipList represents a one to many relationship.\n\n```go\nfunc (r RelationshipList) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *RelationshipList) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Relationships map[constant.RelationshipType]Relationship\n```\nRelationships represent associations between resources. Relationships is a map of RelationshipTypes to Relationship.\n\n```go\ntype RequestParams struct {\n\tRequestName    string\n\tURIParams      internal.Params\n\tQuery          []Query\n\tRequestBody    interface{}\n\tRequestHeaders [][]string\n\tResponseBody   interface{}\n\tURL            string\n\tAppendToList   func(item interface{}) error\n}\n```\n\n```go\ntype Requester interface {\n\tInitializeConnection(settings TargetSettings)\n\n\tInitializeRouter(resources map[string]string)\n\n\tMakeListRequest(requestParams RequestParams) (IncludedResources, Warnings, error)\n\n\tMakeRequest(requestParams RequestParams) (JobURL, Warnings, error)\n\n\tMakeRequestReceiveRaw(\n\t\trequestName string,\n\t\turiParams internal.Params,\n\t\tresponseBodyMimeType string,\n\t) ([]byte, Warnings, error)\n\n\tMakeRequestSendRaw(\n\t\trequestName string,\n\t\turiParams internal.Params,\n\t\trequestBody []byte,\n\t\trequestBodyMimeType string,\n\t\tresponseBody interface{},\n\t) (string, Warnings, error)\n\n\tMakeRequestUploadAsync(\n\t\trequestName string,\n\t\turiParams internal.Params,\n\t\trequestBodyMimeType string,\n\t\trequestBody io.ReadSeeker,\n\t\tdataLength int64,\n\t\tresponseBody interface{},\n\t\twriteErrors \u003c-chan error,\n\t) (string, Warnings, error)\n\n\tWrapConnection(wrapper ConnectionWrapper)\n}\n```\n\n```go\ntype Resource struct {\n\t// FilePath is the path of the resource.\n\tFilePath string `json:\"path\"`\n\n\t// Mode is the operating system file mode (aka file permissions) of the\n\t// resource.\n\tMode os.FileMode `json:\"mode\"`\n\n\t// SHA1 represents the SHA-1 hash of the resource.\n\tChecksum Checksum `json:\"checksum\"`\n\n\t// Size represents the file size of the resource.\n\tSizeInBytes int64 `json:\"size_in_bytes\"`\n}\n```\n\n```go\nfunc (r Resource) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts a resource into a Cloud Controller Resource.\n\n```go\nfunc (r Resource) ToV2FormattedResource() V2FormattedResource\n```\n\n```go\nfunc (r *Resource) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Resource response.\n\n```go\ntype ResourceLinks map[string]APILink\n```\nResourceLinks represents the information returned back from /v3.\n\n```go\nfunc (resources ResourceLinks) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller /v3 response.\n\n```go\ntype ResourceMetadata struct {\n\tMetadata *Metadata `json:\"metadata,omitempty\"`\n}\n```\n\n```go\ntype Role struct {\n\t// GUID is the unique identifier for the role.\n\tGUID string `json:\"guid\"`\n\t// Type is the type of the role.\n\tType constant.RoleType `json:\"type\"`\n\t// UserGUID is the unique identifier of the user who has this role.\n\tUserGUID string\n\t// Username is the name of the user who has this role, e.g. \"admin\", \"user@example.com\"\n\tUsername string\n\t// Origin is the identity server, default \"uaa\". Active Directory can also be an origin\n\tOrigin string\n\t// OrgGUID is the unique identifier of the org where this role applies,\n\t// if it is an org role.\n\tOrgGUID string\n\t// SpaceGUID is the unique identifier of the space where this role applies,\n\t// if it is a space role.\n\tSpaceGUID string\n}\n```\n\n```go\nfunc (r Role) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts a Role into a Cloud Controller Application.\n\n```go\nfunc (r *Role) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Role response.\n\n```go\ntype Route struct {\n\tGUID         string\n\tSpaceGUID    string\n\tDomainGUID   string\n\tHost         string\n\tPath         string\n\tURL          string\n\tDestinations []RouteDestination\n\tMetadata     *Metadata\n}\n```\n\n```go\nfunc (r Route) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *Route) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RouteDestination struct {\n\tGUID string\n\tApp  RouteDestinationApp\n}\n```\n\n```go\ntype RouteDestinationApp struct {\n\tGUID    string\n\tProcess struct {\n\t\tType string\n\t}\n}\n```\n\n```go\ntype RouteLimit struct {\n\tTotalRoutes        *types.NullInt `json:\"total_routes,omitempty\"`\n\tTotalReservedPorts *types.NullInt `json:\"total_reserved_ports,omitempty\"`\n}\n```\n\n```go\nfunc (sl *RouteLimit) UnmarshalJSON(rawJSON []byte) error\n```\n\n```go\ntype SSHEnabled struct {\n\tEnabled bool\n\tReason  string\n}\n```\n\n```go\ntype ServiceBroker struct {\n\t// GUID is a unique service broker identifier.\n\tGUID string\n\t// Name is the name of the service broker.\n\tName string\n\t// URL is the url of the service broker.\n\tURL string\n\t// Status is the state of the service broker.\n\tStatus string\n\n\tMetadata *Metadata\n}\n```\nServiceBroker represents Service Broker data\n\n```go\nfunc (s *ServiceBroker) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ServiceBrokerModel struct {\n\t// Name is the name of the service broker.\n\tName string `jsonry:\"name,omitempty\"`\n\t// URL is the url of the service broker.\n\tURL string `jsonry:\"url,omitempty\"`\n\t// CredentialsType is always \"basic\"\n\tCredentialsType constant.ServiceBrokerCredentialsType `jsonry:\"authentication.type,omitempty\"`\n\t// Username is the Basic Auth username for the service broker.\n\tUsername string `jsonry:\"authentication.credentials.username,omitempty\"`\n\t// Password is the Basic Auth password for the service broker.\n\tPassword string `jsonry:\"authentication.credentials.password,omitempty\"`\n\t// Space GUID for the space that the broker is in. Empty when not a space-scoped service broker.\n\tSpaceGUID string `jsonry:\"relationships.space.data.guid,omitempty\"`\n}\n```\n\n```go\nfunc (s ServiceBrokerModel) MarshalJSON() ([]byte, error)\n```\n\n```go\ntype ServiceInstance struct {\n\t// GUID is a unique service instance identifier.\n\tGUID string `json:\"guid\"`\n\t// Name is the name of the service instance.\n\tName string `json:\"name\"`\n}\n```\nServiceInstance represents a Cloud Controller V3 Service Instance.\n\n```go\ntype ServiceLimit struct {\n\tTotalServiceInstances *types.NullInt `json:\"total_service_instances,omitempty\"`\n\tPaidServicePlans      *bool          `json:\"paid_services_allowed,omitempty\"`\n}\n```\n\n```go\nfunc (sl *ServiceLimit) UnmarshalJSON(rawJSON []byte) error\n```\n\n```go\ntype ServiceOffering struct {\n\t// GUID is a unique service offering identifier.\n\tGUID string\n\t// Name is the name of the service offering.\n\tName string\n\t// ServiceBrokerName is the name of the service broker\n\tServiceBrokerName string `jsonry:\"relationships.service_broker.data.name\"`\n\n\tMetadata *Metadata\n}\n```\nServiceOffering represents a Cloud Controller V3 Service Offering.\n\n```go\nfunc (so *ServiceOffering) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ServicePlan struct {\n\t// GUID is a unique service plan identifier.\n\tGUID string\n\t// Name is the name of the service plan.\n\tName string\n\t// VisibilityType can be \"public\", \"admin\", \"organization\" or \"space\"\n\tVisibilityType VisibilityType `json:\"visibility_type\"`\n\t// ServicePlanGUID is the GUID of the service offering\n\tServiceOfferingGUID string `jsonry:\"relationships.service_offering.data.guid\"`\n\t// SpaceGUID is the space that a plan from a space-scoped broker relates to\n\tSpaceGUID string `jsonry:\"relationships.space.data.guid\"`\n\n\tMetadata *Metadata\n}\n```\nServicePlan represents a Cloud Controller V3 Service Plan.\n\n```go\nfunc (sp *ServicePlan) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ServicePlanVisibility struct {\n\t// Type is one of 'public', 'organization', 'space' or 'admin'\n\tType VisibilityType `json:\"type\"`\n\n\t// Organizations list of organizations for the service plan\n\tOrganizations []VisibilityDetail `json:\"organizations,omitempty\"`\n\n\t// Space that the plan is visible in\n\tSpace *VisibilityDetail `json:\"space,omitempty\"`\n}\n```\nServicePlanVisibility represents a Cloud Controller V3 Service Plan Visibility.\n\n```go\ntype ServicePlanWithSpaceAndOrganization struct {\n\t// GUID is a unique service plan identifier.\n\tGUID string\n\t// Name is the name of the service plan.\n\tName string\n\t// VisibilityType can be \"public\", \"admin\", \"organization\" or \"space\"\n\tVisibilityType VisibilityType\n\t// ServicePlanGUID is the GUID of the service offering\n\tServiceOfferingGUID string\n\n\tSpaceGUID string\n\n\tSpaceName string\n\n\tOrganizationName string\n}\n```\n\n```go\ntype SharedOrgs struct {\n\tGUIDs []string\n}\n```\n\n```go\nfunc (sharedOrgs SharedOrgs) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (sharedOrgs *SharedOrgs) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Sidecar struct {\n\tGUID    string               `json:\"guid\"`\n\tName    string               `json:\"name\"`\n\tCommand types.FilteredString `json:\"command\"`\n}\n```\n\n```go\ntype Space struct {\n\t// GUID is a unique space identifier.\n\tGUID string `json:\"guid,omitempty\"`\n\t// Name is the name of the space.\n\tName string `json:\"name\"`\n\t// Relationships list the relationships to the space.\n\tRelationships Relationships `json:\"relationships,omitempty\"`\n\t// Metadata is used for custom tagging of API resources\n\tMetadata *Metadata `json:\"metadata,omitempty\"`\n}\n```\nSpace represents a Cloud Controller V3 Space.\n\n```go\ntype SpaceFeature struct {\n\tName    string\n\tEnabled bool\n}\n```\n\n```go\ntype SpaceQuota struct {\n\tQuota\n\t// OrgGUID is the unique ID of the owning organization\n\tOrgGUID string\n\t// SpaceGUIDs are the list of unique ID's of the associated spaces\n\tSpaceGUIDs []string\n}\n```\n\n```go\nfunc (sq SpaceQuota) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (sq *SpaceQuota) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Stack struct {\n\t// GUID is a unique stack identifier.\n\tGUID string `json:\"guid\"`\n\t// Name is the name of the stack.\n\tName string `json:\"name\"`\n\t// Description is the description for the stack\n\tDescription string `json:\"description\"`\n\n\t// Metadata is used for custom tagging of API resources\n\tMetadata *Metadata `json:\"metadata,omitempty\"`\n}\n```\n\n```go\ntype TargetSettings struct {\n\t// DialTimeout is the DNS timeout used to make all requests to the Cloud\n\t// Controller.\n\tDialTimeout time.Duration\n\n\t// SkipSSLValidation controls whether a client verifies the server's\n\t// certificate chain and host name. If SkipSSLValidation is true, TLS accepts\n\t// any certificate presented by the server and any host name in that\n\t// certificate for *all* client requests going forward.\n\t//\n\t// In this mode, TLS is susceptible to man-in-the-middle attacks. This should\n\t// be used only for testing.\n\tSkipSSLValidation bool\n\n\t// URL is a fully qualified URL to the Cloud Controller API.\n\tURL string\n}\n```\nTargetSettings represents configuration for establishing a connection to the Cloud Controller server.\n\n```go\ntype Task struct {\n\t// Command represents the command that will be executed. May be excluded\n\t// based on the user's role.\n\tCommand string `json:\"command,omitempty\"`\n\t// CreatedAt represents the time with zone when the object was created.\n\tCreatedAt string `json:\"created_at,omitempty\"`\n\t// DiskInMB represents the disk in MB allocated for the task.\n\tDiskInMB uint64 `json:\"disk_in_mb,omitempty\"`\n\t// GUID represents the unique task identifier.\n\tGUID string `json:\"guid,omitempty\"`\n\t// MemoryInMB represents the memory in MB allocated for the task.\n\tMemoryInMB uint64 `json:\"memory_in_mb,omitempty\"`\n\t// Name represents the name of the task.\n\tName string `json:\"name,omitempty\"`\n\t// SequenceID represents the user-facing id of the task. This number is\n\t// unique for every task associated with a given app.\n\tSequenceID int64 `json:\"sequence_id,omitempty\"`\n\t// State represents the task state.\n\tState constant.TaskState `json:\"state,omitempty\"`\n\t// Tasks can use a process as a template to fill in\n\t// command, memory, disk values\n\t//\n\t// Using a pointer so that it can be set to nil to prevent\n\t// json serialization when no template is used\n\tTemplate *TaskTemplate `json:\"template,omitempty\"`\n}\n```\nTask represents a Cloud Controller V3 Task.\n\n```go\ntype TaskProcessTemplate struct {\n\tGuid string `json:\"guid,omitempty\"`\n}\n```\n\n```go\ntype TaskTemplate struct {\n\tProcess TaskProcessTemplate `json:\"process,omitempty\"`\n}\n```\n\n```go\ntype User struct {\n\t// GUID is the unique user identifier.\n\tGUID             string `json:\"guid\"`\n\tUsername         string `json:\"username\"`\n\tPresentationName string `json:\"presentation_name\"`\n\tOrigin           string `json:\"origin\"`\n}\n```\nUser represents a Cloud Controller User.\n\n```go\ntype V2FormattedResource struct {\n\n\t// Filename is the name of the resource.\n\tFilename string `json:\"fn\"`\n\n\t// Mode is the operating system file mode (aka file permissions) of the\n\t// resource.\n\tMode os.FileMode `json:\"mode\"`\n\n\t// SHA1 represents the SHA-1 hash of the resource.\n\tSHA1 string `json:\"sha1\"`\n\n\t// Size represents the file size of the resource.\n\tSize int64 `json:\"size\"`\n}\n```\nV2FormattedResource represents a Cloud Controller Resource that still has the same shape as the V2 Resource. The v3 package upload endpoint understands both the V2 shape and the new V3 shape. The v3 resource matching endpoint only understands the new V3 shape.\n\nDeprecated: Use Resource going forward. We anticipate that this struct will only be used by the v6 cli's v3-push command, which is experimental.\n\n```go\nfunc (r V2FormattedResource) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts a resource into a Cloud Controller V2FormattedResource.\n\n```go\nfunc (r *V2FormattedResource) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller V2FormattedResource response.\n\n```go\ntype VisibilityDetail struct {\n\t// Name is the organization name\n\tName string `json:\"name,omitempty\"`\n\t// GUID of the organization\n\tGUID string `json:\"guid\"`\n}\n```\n\n```go\ntype VisibilityType string\n```\n\n```go\ntype Warnings []string\n```\nWarnings are a collection of warnings that the Cloud Controller can return back from an API request.\n\n","path":"code.cloudfoundry.org/cli-sapi/api/cloudcontroller/ccv3","name":"ccv3","synopsis":"Package ccv3 represents a Cloud Controller V3 client.","isRedistributable":true}
