github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/api/cloudcontroller/ccv3/manifest.go (about)

     1  package ccv3
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/api/cloudcontroller"
     5  	"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal"
     6  )
     7  
     8  // GetApplicationManifest returns a (YAML) manifest for an application and its
     9  // underlying processes.
    10  func (client *Client) GetApplicationManifest(appGUID string) ([]byte, Warnings, error) {
    11  	request, err := client.newHTTPRequest(requestOptions{
    12  		RequestName: internal.GetApplicationManifestRequest,
    13  		URIParams:   internal.Params{"app_guid": appGUID},
    14  	})
    15  	if err != nil {
    16  		return nil, nil, err
    17  	}
    18  	request.Header.Set("Accept", "application/x-yaml")
    19  
    20  	var response cloudcontroller.Response
    21  	err = client.connection.Make(request, &response)
    22  
    23  	return response.RawResponse, response.Warnings, err
    24  }