Method: projects.profiles.create

profiles.create creates a new profile resource in the online mode.

Direct use of this API is discouraged, please use a supported profiler agent instead for profile collection.

The server ensures that the new profiles are created at a constant rate per deployment, so the creation request may hang for some time until the next profile session is available.

The request may fail with ABORTED error if the creation is not available within ~1m, the response will indicate the duration of the backoff the client should take before attempting creating a profile again. The backoff duration is returned in google.rpc.RetryInfo extension on the response status. To a gRPC client, the extension will be return as a binary-serialized proto in the trailing metadata item named "google.rpc.retryinfo-bin".

HTTP request

POST https://cloudprofiler.googleapis.com/v2/{parent=projects/*}/profiles

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Parent project to create the profile in. It takes the form projects/{project} .

Authorization requires the following IAM permission on the specified resource parent :

  • cloudprofiler.profiles.create

Request body

The request body contains data with the following structure:

JSON representation
 { 
 "deployment" 
 : 
 { 
 object (  Deployment 
 
) 
 } 
 , 
 "profileType" 
 : 
 [ 
 enum (  ProfileType 
 
) 
 ] 
 } 
Fields
deployment

object ( Deployment )

Deployment details.

Authorization requires the following IAM permission on the specified resource deployment :

  • cloudprofiler.profiles.create
profileType[]

enum ( ProfileType )

One or more profile types that the agent is capable of providing.

Response body

If successful, the response body contains a newly created instance of Profile .

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/monitoring
  • https://www.googleapis.com/auth/monitoring.write
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview .

Design a Mobile Site
View Site in Mobile | Classic
Share by: