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="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p> 82<p class="firstline">CreateProfile creates a new profile resource in the online mode. 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". </p> 83<p class="toc_element"> 84 <code><a href="#createOffline">createOffline(parent, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">CreateOfflineProfile creates a new profile resource in the offline mode. The client provides the profile to create along with the profile bytes, the server records it.</p> 86<p class="toc_element"> 87 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> 88<p class="firstline">UpdateProfile updates the profile bytes and labels on the profile resource created in the online mode. Updating the bytes for profiles created in the offline mode is currently not supported: the profile content must be provided at the time of the profile creation.</p> 89<h3>Method Details</h3> 90<div class="method"> 91 <code class="details" id="close">close()</code> 92 <pre>Close httplib2 connections.</pre> 93</div> 94 95<div class="method"> 96 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code> 97 <pre>CreateProfile creates a new profile resource in the online mode. 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". 98 99Args: 100 parent: string, Parent project to create the profile in. (required) 101 body: object, The request body. 102 The object takes the form of: 103 104{ # CreateProfileRequest describes a profile resource online creation request. The deployment field must be populated. The profile_type specifies the list of profile types supported by the agent. The creation call will hang until a profile of one of these types needs to be collected. 105 "deployment": { # Deployment contains the deployment identification information. # Required. Deployment details. 106 "labels": { # Labels identify the deployment within the user universe and same target. Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Value for an individual label must be <= 512 bytes, the total size of all label names and values must be <= 1024 bytes. Label named "language" can be used to record the programming language of the profiled deployment. The standard choices for the value include "java", "go", "python", "ruby", "nodejs", "php", "dotnet". For deployments running on Google Cloud Platform, "zone" or "region" label should be present describing the deployment location. An example of a zone is "us-central1-a", an example of a region is "us-central1" or "us-central". 107 "a_key": "A String", 108 }, 109 "projectId": "A String", # Project ID is the ID of a cloud project. Validation regex: `^a-z{4,61}[a-z0-9]$`. 110 "target": "A String", # Target is the service name used to group related deployments: * Service name for App Engine Flex / Standard. * Cluster and container name for GKE. * User-specified string for direct Compute Engine profiling (e.g. Java). * Job name for Dataflow. Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 111 }, 112 "profileType": [ # Required. One or more profile types that the agent is capable of providing. 113 "A String", 114 ], 115} 116 117 x__xgafv: string, V1 error format. 118 Allowed values 119 1 - v1 error format 120 2 - v2 error format 121 122Returns: 123 An object of the form: 124 125 { # Profile resource. 126 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 127 "labels": { # Labels identify the deployment within the user universe and same target. Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Value for an individual label must be <= 512 bytes, the total size of all label names and values must be <= 1024 bytes. Label named "language" can be used to record the programming language of the profiled deployment. The standard choices for the value include "java", "go", "python", "ruby", "nodejs", "php", "dotnet". For deployments running on Google Cloud Platform, "zone" or "region" label should be present describing the deployment location. An example of a zone is "us-central1-a", an example of a region is "us-central1" or "us-central". 128 "a_key": "A String", 129 }, 130 "projectId": "A String", # Project ID is the ID of a cloud project. Validation regex: `^a-z{4,61}[a-z0-9]$`. 131 "target": "A String", # Target is the service name used to group related deployments: * Service name for App Engine Flex / Standard. * Cluster and container name for GKE. * User-specified string for direct Compute Engine profiling (e.g. Java). * Job name for Dataflow. Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 132 }, 133 "duration": "A String", # Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously). 134 "labels": { # Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits. 135 "a_key": "A String", 136 }, 137 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 138 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto. 139 "profileType": "A String", # Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server. 140}</pre> 141</div> 142 143<div class="method"> 144 <code class="details" id="createOffline">createOffline(parent, body=None, x__xgafv=None)</code> 145 <pre>CreateOfflineProfile creates a new profile resource in the offline mode. The client provides the profile to create along with the profile bytes, the server records it. 146 147Args: 148 parent: string, Parent project to create the profile in. (required) 149 body: object, The request body. 150 The object takes the form of: 151 152{ # Profile resource. 153 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 154 "labels": { # Labels identify the deployment within the user universe and same target. Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Value for an individual label must be <= 512 bytes, the total size of all label names and values must be <= 1024 bytes. Label named "language" can be used to record the programming language of the profiled deployment. The standard choices for the value include "java", "go", "python", "ruby", "nodejs", "php", "dotnet". For deployments running on Google Cloud Platform, "zone" or "region" label should be present describing the deployment location. An example of a zone is "us-central1-a", an example of a region is "us-central1" or "us-central". 155 "a_key": "A String", 156 }, 157 "projectId": "A String", # Project ID is the ID of a cloud project. Validation regex: `^a-z{4,61}[a-z0-9]$`. 158 "target": "A String", # Target is the service name used to group related deployments: * Service name for App Engine Flex / Standard. * Cluster and container name for GKE. * User-specified string for direct Compute Engine profiling (e.g. Java). * Job name for Dataflow. Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 159 }, 160 "duration": "A String", # Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously). 161 "labels": { # Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits. 162 "a_key": "A String", 163 }, 164 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 165 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto. 166 "profileType": "A String", # Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server. 167} 168 169 x__xgafv: string, V1 error format. 170 Allowed values 171 1 - v1 error format 172 2 - v2 error format 173 174Returns: 175 An object of the form: 176 177 { # Profile resource. 178 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 179 "labels": { # Labels identify the deployment within the user universe and same target. Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Value for an individual label must be <= 512 bytes, the total size of all label names and values must be <= 1024 bytes. Label named "language" can be used to record the programming language of the profiled deployment. The standard choices for the value include "java", "go", "python", "ruby", "nodejs", "php", "dotnet". For deployments running on Google Cloud Platform, "zone" or "region" label should be present describing the deployment location. An example of a zone is "us-central1-a", an example of a region is "us-central1" or "us-central". 180 "a_key": "A String", 181 }, 182 "projectId": "A String", # Project ID is the ID of a cloud project. Validation regex: `^a-z{4,61}[a-z0-9]$`. 183 "target": "A String", # Target is the service name used to group related deployments: * Service name for App Engine Flex / Standard. * Cluster and container name for GKE. * User-specified string for direct Compute Engine profiling (e.g. Java). * Job name for Dataflow. Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 184 }, 185 "duration": "A String", # Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously). 186 "labels": { # Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits. 187 "a_key": "A String", 188 }, 189 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 190 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto. 191 "profileType": "A String", # Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server. 192}</pre> 193</div> 194 195<div class="method"> 196 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> 197 <pre>UpdateProfile updates the profile bytes and labels on the profile resource created in the online mode. Updating the bytes for profiles created in the offline mode is currently not supported: the profile content must be provided at the time of the profile creation. 198 199Args: 200 name: string, Output only. Opaque, server-assigned, unique ID for this profile. (required) 201 body: object, The request body. 202 The object takes the form of: 203 204{ # Profile resource. 205 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 206 "labels": { # Labels identify the deployment within the user universe and same target. Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Value for an individual label must be <= 512 bytes, the total size of all label names and values must be <= 1024 bytes. Label named "language" can be used to record the programming language of the profiled deployment. The standard choices for the value include "java", "go", "python", "ruby", "nodejs", "php", "dotnet". For deployments running on Google Cloud Platform, "zone" or "region" label should be present describing the deployment location. An example of a zone is "us-central1-a", an example of a region is "us-central1" or "us-central". 207 "a_key": "A String", 208 }, 209 "projectId": "A String", # Project ID is the ID of a cloud project. Validation regex: `^a-z{4,61}[a-z0-9]$`. 210 "target": "A String", # Target is the service name used to group related deployments: * Service name for App Engine Flex / Standard. * Cluster and container name for GKE. * User-specified string for direct Compute Engine profiling (e.g. Java). * Job name for Dataflow. Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 211 }, 212 "duration": "A String", # Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously). 213 "labels": { # Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits. 214 "a_key": "A String", 215 }, 216 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 217 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto. 218 "profileType": "A String", # Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server. 219} 220 221 updateMask: string, Field mask used to specify the fields to be overwritten. Currently only profile_bytes and labels fields are supported by UpdateProfile, so only those fields can be specified in the mask. When no mask is provided, all fields are overwritten. 222 x__xgafv: string, V1 error format. 223 Allowed values 224 1 - v1 error format 225 2 - v2 error format 226 227Returns: 228 An object of the form: 229 230 { # Profile resource. 231 "deployment": { # Deployment contains the deployment identification information. # Deployment this profile corresponds to. 232 "labels": { # Labels identify the deployment within the user universe and same target. Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`. Value for an individual label must be <= 512 bytes, the total size of all label names and values must be <= 1024 bytes. Label named "language" can be used to record the programming language of the profiled deployment. The standard choices for the value include "java", "go", "python", "ruby", "nodejs", "php", "dotnet". For deployments running on Google Cloud Platform, "zone" or "region" label should be present describing the deployment location. An example of a zone is "us-central1-a", an example of a region is "us-central1" or "us-central". 233 "a_key": "A String", 234 }, 235 "projectId": "A String", # Project ID is the ID of a cloud project. Validation regex: `^a-z{4,61}[a-z0-9]$`. 236 "target": "A String", # Target is the service name used to group related deployments: * Service name for App Engine Flex / Standard. * Cluster and container name for GKE. * User-specified string for direct Compute Engine profiling (e.g. Java). * Job name for Dataflow. Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`. 237 }, 238 "duration": "A String", # Duration of the profiling session. Input (for the offline mode) or output (for the online mode). The field represents requested profiling duration. It may slightly differ from the effective profiling duration, which is recorded in the profile data, in case the profiling can't be stopped immediately (e.g. in case stopping the profiling is handled asynchronously). 239 "labels": { # Input only. Labels associated to this specific profile. These labels will get merged with the deployment labels for the final data set. See documentation on deployment labels for validation rules and limits. 240 "a_key": "A String", 241 }, 242 "name": "A String", # Output only. Opaque, server-assigned, unique ID for this profile. 243 "profileBytes": "A String", # Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto. 244 "profileType": "A String", # Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server. 245}</pre> 246</div> 247 248</body></html>