1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="cloudprofiler_v2.html">Stackdriver Profiler API</a> . <a href="cloudprofiler_v2.projects.html">projects</a> . <a href="cloudprofiler_v2.projects.profiles.html">profiles</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p> 79<p class="firstline">CreateProfile creates a new profile resource in the online mode.</p> 80<p class="toc_element"> 81 <code><a href="#createOffline">createOffline(parent, body, x__xgafv=None)</a></code></p> 82<p class="firstline">CreateOfflineProfile creates a new profile resource in the offline mode.</p> 83<p class="toc_element"> 84 <code><a href="#patch">patch(name, body, updateMask=None, x__xgafv=None)</a></code></p> 85<p class="firstline">UpdateProfile updates the profile bytes and labels on the profile resource</p> 86<h3>Method Details</h3> 87<div class="method"> 88 <code class="details" id="create">create(parent, body, x__xgafv=None)</code> 89 <pre>CreateProfile creates a new profile resource in the online mode. 90 91The server ensures that the new profiles are created at a constant rate per 92deployment, so the creation request may hang for some time until the next 93profile session is available. 94 95The request may fail with ABORTED error if the creation is not available 96within ~1m, the response will indicate the duration of the backoff the 97client should take before attempting creating a profile again. The backoff 98duration is returned in google.rpc.RetryInfo extension on the response 99status. To a gRPC client, the extension will be return as a 100binary-serialized proto in the trailing metadata item named 101"google.rpc.retryinfo-bin". 102 103Args: 104 parent: string, Parent project to create the profile in. (required) 105 body: object, The request body. (required) 106 The object takes the form of: 107 108{ # CreateProfileRequest describes a profile resource online creation request. 109 # The deployment field must be populated. The profile_type specifies the list 110 # of profile types supported by the agent. The creation call will hang until a 111 # profile of one of these types needs to be collected. 112 "profileType": [ # One or more profile types that the agent is capable of providing. 113 "A String", 114 ], 115 "deployment": { # Deployment contains the deployment identification information. # Deployment details. 116 "projectId": "A String", # Project ID is the ID of a cloud project. 117 # Validation regex: `^a-z{4,61}[a-z0-9]$`. 118 "labels": { # Labels identify the deployment within the user universe and same target. 119 # Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. 120 # Value for an individual label must be <= 512 bytes, the total 121 # size of all label names and values must be <= 1024 bytes. 122 # 123 # Label named "language" can be used to record the programming language of 124 # the profiled deployment. The standard choices for the value include "java", 125 # "go", "python", "ruby", "nodejs", "php", "dotnet". 126 # 127 # For deployments running on Google Cloud Platform, "zone" or "region" label 128 # should be present describing the deployment location. An example of a zone 129 # is "us-central1-a", an example of a region is "us-central1" or 130 # "us-central". 131 "a_key": "A String", 132 }, 133 "target": "A String", # Target is the service name used to group related deployments: 134 # * Service name for GAE Flex / Standard. 135 # * Cluster and container name for GKE. 136 # * User-specified string for direct GCE profiling (e.g. Java). 137 # * Job name for Dataflow. 138 # Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 139 }, 140 } 141 142 x__xgafv: string, V1 error format. 143 Allowed values 144 1 - v1 error format 145 2 - v2 error format 146 147Returns: 148 An object of the form: 149 150 { # Profile resource. 151 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 152 "labels": { # Input only. Labels associated to this specific profile. These labels will 153 # get merged with the deployment labels for the final data set. See 154 # documentation on deployment labels for validation rules and limits. 155 "a_key": "A String", 156 }, 157 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the 158 # format is https://github.com/google/pprof/blob/master/proto/profile.proto. 159 "profileType": "A String", # Type of profile. 160 # For offline mode, this must be specified when creating the profile. For 161 # online mode it is assigned and returned by the server. 162 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 163 "projectId": "A String", # Project ID is the ID of a cloud project. 164 # Validation regex: `^a-z{4,61}[a-z0-9]$`. 165 "labels": { # Labels identify the deployment within the user universe and same target. 166 # Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. 167 # Value for an individual label must be <= 512 bytes, the total 168 # size of all label names and values must be <= 1024 bytes. 169 # 170 # Label named "language" can be used to record the programming language of 171 # the profiled deployment. The standard choices for the value include "java", 172 # "go", "python", "ruby", "nodejs", "php", "dotnet". 173 # 174 # For deployments running on Google Cloud Platform, "zone" or "region" label 175 # should be present describing the deployment location. An example of a zone 176 # is "us-central1-a", an example of a region is "us-central1" or 177 # "us-central". 178 "a_key": "A String", 179 }, 180 "target": "A String", # Target is the service name used to group related deployments: 181 # * Service name for GAE Flex / Standard. 182 # * Cluster and container name for GKE. 183 # * User-specified string for direct GCE profiling (e.g. Java). 184 # * Job name for Dataflow. 185 # Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 186 }, 187 "duration": "A String", # Duration of the profiling session. 188 # Input (for the offline mode) or output (for the online mode). 189 # The field represents requested profiling duration. It may slightly differ 190 # from the effective profiling duration, which is recorded in the profile 191 # data, in case the profiling can't be stopped immediately (e.g. in case 192 # stopping the profiling is handled asynchronously). 193 }</pre> 194</div> 195 196<div class="method"> 197 <code class="details" id="createOffline">createOffline(parent, body, x__xgafv=None)</code> 198 <pre>CreateOfflineProfile creates a new profile resource in the offline mode. 199The client provides the profile to create along with the profile bytes, the 200server records it. 201 202Args: 203 parent: string, Parent project to create the profile in. (required) 204 body: object, The request body. (required) 205 The object takes the form of: 206 207{ # Profile resource. 208 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 209 "labels": { # Input only. Labels associated to this specific profile. These labels will 210 # get merged with the deployment labels for the final data set. See 211 # documentation on deployment labels for validation rules and limits. 212 "a_key": "A String", 213 }, 214 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the 215 # format is https://github.com/google/pprof/blob/master/proto/profile.proto. 216 "profileType": "A String", # Type of profile. 217 # For offline mode, this must be specified when creating the profile. For 218 # online mode it is assigned and returned by the server. 219 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 220 "projectId": "A String", # Project ID is the ID of a cloud project. 221 # Validation regex: `^a-z{4,61}[a-z0-9]$`. 222 "labels": { # Labels identify the deployment within the user universe and same target. 223 # Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. 224 # Value for an individual label must be <= 512 bytes, the total 225 # size of all label names and values must be <= 1024 bytes. 226 # 227 # Label named "language" can be used to record the programming language of 228 # the profiled deployment. The standard choices for the value include "java", 229 # "go", "python", "ruby", "nodejs", "php", "dotnet". 230 # 231 # For deployments running on Google Cloud Platform, "zone" or "region" label 232 # should be present describing the deployment location. An example of a zone 233 # is "us-central1-a", an example of a region is "us-central1" or 234 # "us-central". 235 "a_key": "A String", 236 }, 237 "target": "A String", # Target is the service name used to group related deployments: 238 # * Service name for GAE Flex / Standard. 239 # * Cluster and container name for GKE. 240 # * User-specified string for direct GCE profiling (e.g. Java). 241 # * Job name for Dataflow. 242 # Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 243 }, 244 "duration": "A String", # Duration of the profiling session. 245 # Input (for the offline mode) or output (for the online mode). 246 # The field represents requested profiling duration. It may slightly differ 247 # from the effective profiling duration, which is recorded in the profile 248 # data, in case the profiling can't be stopped immediately (e.g. in case 249 # stopping the profiling is handled asynchronously). 250} 251 252 x__xgafv: string, V1 error format. 253 Allowed values 254 1 - v1 error format 255 2 - v2 error format 256 257Returns: 258 An object of the form: 259 260 { # Profile resource. 261 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 262 "labels": { # Input only. Labels associated to this specific profile. These labels will 263 # get merged with the deployment labels for the final data set. See 264 # documentation on deployment labels for validation rules and limits. 265 "a_key": "A String", 266 }, 267 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the 268 # format is https://github.com/google/pprof/blob/master/proto/profile.proto. 269 "profileType": "A String", # Type of profile. 270 # For offline mode, this must be specified when creating the profile. For 271 # online mode it is assigned and returned by the server. 272 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 273 "projectId": "A String", # Project ID is the ID of a cloud project. 274 # Validation regex: `^a-z{4,61}[a-z0-9]$`. 275 "labels": { # Labels identify the deployment within the user universe and same target. 276 # Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. 277 # Value for an individual label must be <= 512 bytes, the total 278 # size of all label names and values must be <= 1024 bytes. 279 # 280 # Label named "language" can be used to record the programming language of 281 # the profiled deployment. The standard choices for the value include "java", 282 # "go", "python", "ruby", "nodejs", "php", "dotnet". 283 # 284 # For deployments running on Google Cloud Platform, "zone" or "region" label 285 # should be present describing the deployment location. An example of a zone 286 # is "us-central1-a", an example of a region is "us-central1" or 287 # "us-central". 288 "a_key": "A String", 289 }, 290 "target": "A String", # Target is the service name used to group related deployments: 291 # * Service name for GAE Flex / Standard. 292 # * Cluster and container name for GKE. 293 # * User-specified string for direct GCE profiling (e.g. Java). 294 # * Job name for Dataflow. 295 # Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 296 }, 297 "duration": "A String", # Duration of the profiling session. 298 # Input (for the offline mode) or output (for the online mode). 299 # The field represents requested profiling duration. It may slightly differ 300 # from the effective profiling duration, which is recorded in the profile 301 # data, in case the profiling can't be stopped immediately (e.g. in case 302 # stopping the profiling is handled asynchronously). 303 }</pre> 304</div> 305 306<div class="method"> 307 <code class="details" id="patch">patch(name, body, updateMask=None, x__xgafv=None)</code> 308 <pre>UpdateProfile updates the profile bytes and labels on the profile resource 309created in the online mode. Updating the bytes for profiles created in the 310offline mode is currently not supported: the profile content must be 311provided at the time of the profile creation. 312 313Args: 314 name: string, Output only. Opaque, server-assigned, unique ID for this profile. (required) 315 body: object, The request body. (required) 316 The object takes the form of: 317 318{ # Profile resource. 319 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 320 "labels": { # Input only. Labels associated to this specific profile. These labels will 321 # get merged with the deployment labels for the final data set. See 322 # documentation on deployment labels for validation rules and limits. 323 "a_key": "A String", 324 }, 325 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the 326 # format is https://github.com/google/pprof/blob/master/proto/profile.proto. 327 "profileType": "A String", # Type of profile. 328 # For offline mode, this must be specified when creating the profile. For 329 # online mode it is assigned and returned by the server. 330 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 331 "projectId": "A String", # Project ID is the ID of a cloud project. 332 # Validation regex: `^a-z{4,61}[a-z0-9]$`. 333 "labels": { # Labels identify the deployment within the user universe and same target. 334 # Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. 335 # Value for an individual label must be <= 512 bytes, the total 336 # size of all label names and values must be <= 1024 bytes. 337 # 338 # Label named "language" can be used to record the programming language of 339 # the profiled deployment. The standard choices for the value include "java", 340 # "go", "python", "ruby", "nodejs", "php", "dotnet". 341 # 342 # For deployments running on Google Cloud Platform, "zone" or "region" label 343 # should be present describing the deployment location. An example of a zone 344 # is "us-central1-a", an example of a region is "us-central1" or 345 # "us-central". 346 "a_key": "A String", 347 }, 348 "target": "A String", # Target is the service name used to group related deployments: 349 # * Service name for GAE Flex / Standard. 350 # * Cluster and container name for GKE. 351 # * User-specified string for direct GCE profiling (e.g. Java). 352 # * Job name for Dataflow. 353 # Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 354 }, 355 "duration": "A String", # Duration of the profiling session. 356 # Input (for the offline mode) or output (for the online mode). 357 # The field represents requested profiling duration. It may slightly differ 358 # from the effective profiling duration, which is recorded in the profile 359 # data, in case the profiling can't be stopped immediately (e.g. in case 360 # stopping the profiling is handled asynchronously). 361} 362 363 updateMask: string, Field mask used to specify the fields to be overwritten. Currently only 364profile_bytes and labels fields are supported by UpdateProfile, so only 365those fields can be specified in the mask. When no mask is provided, all 366fields are overwritten. 367 x__xgafv: string, V1 error format. 368 Allowed values 369 1 - v1 error format 370 2 - v2 error format 371 372Returns: 373 An object of the form: 374 375 { # Profile resource. 376 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 377 "labels": { # Input only. Labels associated to this specific profile. These labels will 378 # get merged with the deployment labels for the final data set. See 379 # documentation on deployment labels for validation rules and limits. 380 "a_key": "A String", 381 }, 382 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the 383 # format is https://github.com/google/pprof/blob/master/proto/profile.proto. 384 "profileType": "A String", # Type of profile. 385 # For offline mode, this must be specified when creating the profile. For 386 # online mode it is assigned and returned by the server. 387 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 388 "projectId": "A String", # Project ID is the ID of a cloud project. 389 # Validation regex: `^a-z{4,61}[a-z0-9]$`. 390 "labels": { # Labels identify the deployment within the user universe and same target. 391 # Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. 392 # Value for an individual label must be <= 512 bytes, the total 393 # size of all label names and values must be <= 1024 bytes. 394 # 395 # Label named "language" can be used to record the programming language of 396 # the profiled deployment. The standard choices for the value include "java", 397 # "go", "python", "ruby", "nodejs", "php", "dotnet". 398 # 399 # For deployments running on Google Cloud Platform, "zone" or "region" label 400 # should be present describing the deployment location. An example of a zone 401 # is "us-central1-a", an example of a region is "us-central1" or 402 # "us-central". 403 "a_key": "A String", 404 }, 405 "target": "A String", # Target is the service name used to group related deployments: 406 # * Service name for GAE Flex / Standard. 407 # * Cluster and container name for GKE. 408 # * User-specified string for direct GCE profiling (e.g. Java). 409 # * Job name for Dataflow. 410 # Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 411 }, 412 "duration": "A String", # Duration of the profiling session. 413 # Input (for the offline mode) or output (for the online mode). 414 # The field represents requested profiling duration. It may slightly differ 415 # from the effective profiling duration, which is recorded in the profile 416 # data, in case the profiling can't be stopped immediately (e.g. in case 417 # stopping the profiling is handled asynchronously). 418 }</pre> 419</div> 420 421</body></html>