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="dataflow_v1b3.html">Dataflow API</a> . <a href="dataflow_v1b3.projects.html">projects</a> . <a href="dataflow_v1b3.projects.catalogTemplates.html">catalogTemplates</a> . <a href="dataflow_v1b3.projects.catalogTemplates.templateVersions.html">templateVersions</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">Creates a new Template with TemplateVersion. Requires project_id(projects) and template display_name(catalogTemplates). The template display_name is set by the user.</p> 83<h3>Method Details</h3> 84<div class="method"> 85 <code class="details" id="close">close()</code> 86 <pre>Close httplib2 connections.</pre> 87</div> 88 89<div class="method"> 90 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code> 91 <pre>Creates a new Template with TemplateVersion. Requires project_id(projects) and template display_name(catalogTemplates). The template display_name is set by the user. 92 93Args: 94 parent: string, The parent project and template that the TemplateVersion will be created under. Create using project_id(pid1) and display_name(tid1). Format: projects/{pid1}/catalogTemplates/{tid1} (required) 95 body: object, The request body. 96 The object takes the form of: 97 98{ # Creates a new Template with TemplateVersions. 99 "templateVersion": { # ///////////////////////////////////////////////////////////////////////////// //// Template Catalog is used to organize user TemplateVersions. //// TemplateVersions that have the same project_id and display_name are //// belong to the same Template. //// Templates with the same project_id belong to the same Project. //// TemplateVersion may have labels and multiple labels are allowed. //// Duplicated labels in the same `TemplateVersion` are not allowed. //// TemplateVersion may have tags and multiple tags are allowed. Duplicated //// tags in the same `Template` are not allowed! # The TemplateVersion object to create. 100 "artifact": { # Job information for templates. # Job graph and metadata if it is a legacy Template. Container image path and metadata if it is flex Template. 101 "containerSpec": { # Container Spec. # Container image path set for flex Template. 102 "defaultEnvironment": { # The environment values to be set at runtime for flex template. # Default runtime environment for the job. 103 "additionalExperiments": [ # Additional experiment flags for the job. 104 "A String", 105 ], 106 "additionalUserLabels": { # Additional user labels to be specified for the job. Keys and values must follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) page. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1kg", "count": "3" }. 107 "a_key": "A String", 108 }, 109 "enableStreamingEngine": True or False, # Whether to enable Streaming Engine for the job. 110 "flexrsGoal": "A String", # Set FlexRS goal for the job. https://cloud.google.com/dataflow/docs/guides/flexrs 111 "ipConfiguration": "A String", # Configuration for VM IPs. 112 "kmsKeyName": "A String", # Name for the Cloud KMS key for the job. Key format is: projects//locations//keyRings//cryptoKeys/ 113 "machineType": "A String", # The machine type to use for the job. Defaults to the value from the template if not specified. 114 "maxWorkers": 42, # The maximum number of Google Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000. 115 "network": "A String", # Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default". 116 "numWorkers": 42, # The initial number of Google Compute Engine instances for the job. 117 "serviceAccountEmail": "A String", # The email address of the service account to run the job as. 118 "subnetwork": "A String", # Subnetwork to which VMs will be assigned, if desired. You can specify a subnetwork using either a complete URL or an abbreviated path. Expected to be of the form "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK" or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in a Shared VPC network, you must use the complete URL. 119 "tempLocation": "A String", # The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with `gs://`. 120 "workerRegion": "A String", # The Compute Engine region (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1". Mutually exclusive with worker_zone. If neither worker_region nor worker_zone is specified, default to the control plane's region. 121 "workerZone": "A String", # The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with worker_region. If neither worker_region nor worker_zone is specified, a zone in the control plane's region is chosen based on available capacity. If both `worker_zone` and `zone` are set, `worker_zone` takes precedence. 122 "zone": "A String", # The Compute Engine [availability zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) for launching worker instances to run your pipeline. In the future, worker_zone will take precedence. 123 }, 124 "image": "A String", # Name of the docker container image. E.g., gcr.io/project/some-image 125 "metadata": { # Metadata describing a template. # Metadata describing a template including description and validation rules. 126 "description": "A String", # Optional. A description of the template. 127 "name": "A String", # Required. The name of the template. 128 "parameters": [ # The parameters for the template. 129 { # Metadata for a specific parameter. 130 "helpText": "A String", # Required. The help text to display for the parameter. 131 "isOptional": True or False, # Optional. Whether the parameter is optional. Defaults to false. 132 "label": "A String", # Required. The label to display for the parameter. 133 "name": "A String", # Required. The name of the parameter. 134 "paramType": "A String", # Optional. The type of the parameter. Used for selecting input picker. 135 "regexes": [ # Optional. Regexes that the parameter must match. 136 "A String", 137 ], 138 }, 139 ], 140 }, 141 "sdkInfo": { # SDK Information. # Required. SDK info of the Flex Template. 142 "language": "A String", # Required. The SDK Language. 143 "version": "A String", # Optional. The SDK version. 144 }, 145 }, 146 "jobGraphGcsPath": "A String", # job_graph_gcs_path set for legacy Template. 147 "metadata": { # Metadata describing a template. # Metadata set for legacy Template. 148 "description": "A String", # Optional. A description of the template. 149 "name": "A String", # Required. The name of the template. 150 "parameters": [ # The parameters for the template. 151 { # Metadata for a specific parameter. 152 "helpText": "A String", # Required. The help text to display for the parameter. 153 "isOptional": True or False, # Optional. Whether the parameter is optional. Defaults to false. 154 "label": "A String", # Required. The label to display for the parameter. 155 "name": "A String", # Required. The name of the parameter. 156 "paramType": "A String", # Optional. The type of the parameter. Used for selecting input picker. 157 "regexes": [ # Optional. Regexes that the parameter must match. 158 "A String", 159 ], 160 }, 161 ], 162 }, 163 }, 164 "createTime": "A String", # Creation time of this TemplateVersion. 165 "description": "A String", # Template description from the user. 166 "displayName": "A String", # A customized name for Template. Multiple TemplateVersions per Template. 167 "labels": { # Labels for the Template Version. Labels can be duplicate within Template. 168 "a_key": "A String", 169 }, 170 "projectId": "A String", # A unique project_id. Multiple Templates per Project. 171 "tags": [ # Alias for version_id, helps locate a TemplateVersion. 172 "A String", 173 ], 174 "type": "A String", # Either LEGACY or FLEX. This should match with the type of artifact. 175 "versionId": "A String", # An auto generated version_id for TemplateVersion. 176 }, 177} 178 179 x__xgafv: string, V1 error format. 180 Allowed values 181 1 - v1 error format 182 2 - v2 error format 183 184Returns: 185 An object of the form: 186 187 { # ///////////////////////////////////////////////////////////////////////////// //// Template Catalog is used to organize user TemplateVersions. //// TemplateVersions that have the same project_id and display_name are //// belong to the same Template. //// Templates with the same project_id belong to the same Project. //// TemplateVersion may have labels and multiple labels are allowed. //// Duplicated labels in the same `TemplateVersion` are not allowed. //// TemplateVersion may have tags and multiple tags are allowed. Duplicated //// tags in the same `Template` are not allowed! 188 "artifact": { # Job information for templates. # Job graph and metadata if it is a legacy Template. Container image path and metadata if it is flex Template. 189 "containerSpec": { # Container Spec. # Container image path set for flex Template. 190 "defaultEnvironment": { # The environment values to be set at runtime for flex template. # Default runtime environment for the job. 191 "additionalExperiments": [ # Additional experiment flags for the job. 192 "A String", 193 ], 194 "additionalUserLabels": { # Additional user labels to be specified for the job. Keys and values must follow the restrictions specified in the [labeling restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) page. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1kg", "count": "3" }. 195 "a_key": "A String", 196 }, 197 "enableStreamingEngine": True or False, # Whether to enable Streaming Engine for the job. 198 "flexrsGoal": "A String", # Set FlexRS goal for the job. https://cloud.google.com/dataflow/docs/guides/flexrs 199 "ipConfiguration": "A String", # Configuration for VM IPs. 200 "kmsKeyName": "A String", # Name for the Cloud KMS key for the job. Key format is: projects//locations//keyRings//cryptoKeys/ 201 "machineType": "A String", # The machine type to use for the job. Defaults to the value from the template if not specified. 202 "maxWorkers": 42, # The maximum number of Google Compute Engine instances to be made available to your pipeline during execution, from 1 to 1000. 203 "network": "A String", # Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default". 204 "numWorkers": 42, # The initial number of Google Compute Engine instances for the job. 205 "serviceAccountEmail": "A String", # The email address of the service account to run the job as. 206 "subnetwork": "A String", # Subnetwork to which VMs will be assigned, if desired. You can specify a subnetwork using either a complete URL or an abbreviated path. Expected to be of the form "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK" or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in a Shared VPC network, you must use the complete URL. 207 "tempLocation": "A String", # The Cloud Storage path to use for temporary files. Must be a valid Cloud Storage URL, beginning with `gs://`. 208 "workerRegion": "A String", # The Compute Engine region (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1". Mutually exclusive with worker_zone. If neither worker_region nor worker_zone is specified, default to the control plane's region. 209 "workerZone": "A String", # The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with worker_region. If neither worker_region nor worker_zone is specified, a zone in the control plane's region is chosen based on available capacity. If both `worker_zone` and `zone` are set, `worker_zone` takes precedence. 210 "zone": "A String", # The Compute Engine [availability zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) for launching worker instances to run your pipeline. In the future, worker_zone will take precedence. 211 }, 212 "image": "A String", # Name of the docker container image. E.g., gcr.io/project/some-image 213 "metadata": { # Metadata describing a template. # Metadata describing a template including description and validation rules. 214 "description": "A String", # Optional. A description of the template. 215 "name": "A String", # Required. The name of the template. 216 "parameters": [ # The parameters for the template. 217 { # Metadata for a specific parameter. 218 "helpText": "A String", # Required. The help text to display for the parameter. 219 "isOptional": True or False, # Optional. Whether the parameter is optional. Defaults to false. 220 "label": "A String", # Required. The label to display for the parameter. 221 "name": "A String", # Required. The name of the parameter. 222 "paramType": "A String", # Optional. The type of the parameter. Used for selecting input picker. 223 "regexes": [ # Optional. Regexes that the parameter must match. 224 "A String", 225 ], 226 }, 227 ], 228 }, 229 "sdkInfo": { # SDK Information. # Required. SDK info of the Flex Template. 230 "language": "A String", # Required. The SDK Language. 231 "version": "A String", # Optional. The SDK version. 232 }, 233 }, 234 "jobGraphGcsPath": "A String", # job_graph_gcs_path set for legacy Template. 235 "metadata": { # Metadata describing a template. # Metadata set for legacy Template. 236 "description": "A String", # Optional. A description of the template. 237 "name": "A String", # Required. The name of the template. 238 "parameters": [ # The parameters for the template. 239 { # Metadata for a specific parameter. 240 "helpText": "A String", # Required. The help text to display for the parameter. 241 "isOptional": True or False, # Optional. Whether the parameter is optional. Defaults to false. 242 "label": "A String", # Required. The label to display for the parameter. 243 "name": "A String", # Required. The name of the parameter. 244 "paramType": "A String", # Optional. The type of the parameter. Used for selecting input picker. 245 "regexes": [ # Optional. Regexes that the parameter must match. 246 "A String", 247 ], 248 }, 249 ], 250 }, 251 }, 252 "createTime": "A String", # Creation time of this TemplateVersion. 253 "description": "A String", # Template description from the user. 254 "displayName": "A String", # A customized name for Template. Multiple TemplateVersions per Template. 255 "labels": { # Labels for the Template Version. Labels can be duplicate within Template. 256 "a_key": "A String", 257 }, 258 "projectId": "A String", # A unique project_id. Multiple Templates per Project. 259 "tags": [ # Alias for version_id, helps locate a TemplateVersion. 260 "A String", 261 ], 262 "type": "A String", # Either LEGACY or FLEX. This should match with the type of artifact. 263 "versionId": "A String", # An auto generated version_id for TemplateVersion. 264}</pre> 265</div> 266 267</body></html>