The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.
The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the FlexTemplatesServiceTransport constructor. If set to None, a transport is chosen automatically.
Custom options for the client. 1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value). 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. 3. The universe_domain property can be used to override the default "googleapis.com" universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.
client_info
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.
Exceptions
Type
Description
google.auth.exceptions.MutualTLSChannelError
If mutual TLS transport creation failed for any reason.
Deprecated. Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataflow_v1beta3
def sample_launch_flex_template():
# Create a client
client = dataflow_v1beta3.FlexTemplatesServiceClient()
# Initialize request argument(s)
request = dataflow_v1beta3.LaunchFlexTemplateRequest(
)
# Make the request
response = client.launch_flex_template(request=request)
# Handle the response
print(response)
The request object. A request to launch a Cloud Dataflow job from a FlexTemplate.
retry
google.api_core.retry.Retry
Designation of what errors, if any, should be retried.
timeout
float
The timeout for this request.
metadata
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class FlexTemplatesServiceClient (0.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.9.0 (latest)](/python/docs/reference/dataflow/latest/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient)\n- [0.8.17](/python/docs/reference/dataflow/0.8.17/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient)\n- [0.7.0](/python/docs/reference/dataflow/0.7.0/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient)\n- [0.6.2](/python/docs/reference/dataflow/0.6.2/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient)\n- [0.5.5](/python/docs/reference/dataflow/0.5.5/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient)\n- [0.4.1](/python/docs/reference/dataflow/0.4.1/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient)\n- [0.3.1](/python/docs/reference/dataflow/0.3.1/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient)\n- [0.2.0](/python/docs/reference/dataflow/0.2.0/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient)\n- [0.1.5](/python/docs/reference/dataflow/0.1.5/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient) \n\n FlexTemplatesServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.dataflow_v1beta3.services.flex_templates_service.transports.base.FlexTemplatesServiceTransport, typing.Callable[[...], google.cloud.dataflow_v1beta3.services.flex_templates_service.transports.base.FlexTemplatesServiceTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = \u003cgoogle.api_core.gapic_v1.client_info.ClientInfo object\u003e)\n\nProvides a service for Flex templates.\n\nProperties\n----------\n\n### api_endpoint\n\nReturn the API endpoint used by the client instance.\n\n### transport\n\nReturns the transport used by the client instance.\n\n### universe_domain\n\nReturn the universe domain used by the client instance.\n\nMethods\n-------\n\n### FlexTemplatesServiceClient\n\n FlexTemplatesServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.dataflow_v1beta3.services.flex_templates_service.transports.base.FlexTemplatesServiceTransport, typing.Callable[[...], google.cloud.dataflow_v1beta3.services.flex_templates_service.transports.base.FlexTemplatesServiceTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = \u003cgoogle.api_core.gapic_v1.client_info.ClientInfo object\u003e)\n\nInstantiates the flex templates service client.\n\n### __exit__\n\n __exit__(type, value, traceback)\n\nReleases underlying transport's resources.\n| **Warning:** ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!\n\n### common_billing_account_path\n\n common_billing_account_path(billing_account: str) -\u003e str\n\nReturns a fully-qualified billing_account string.\n\n### common_folder_path\n\n common_folder_path(folder: str) -\u003e str\n\nReturns a fully-qualified folder string.\n\n### common_location_path\n\n common_location_path(project: str, location: str) -\u003e str\n\nReturns a fully-qualified location string.\n\n### common_organization_path\n\n common_organization_path(organization: str) -\u003e str\n\nReturns a fully-qualified organization string.\n\n### common_project_path\n\n common_project_path(project: str) -\u003e str\n\nReturns a fully-qualified project string.\n\n### from_service_account_file\n\n from_service_account_file(filename: str, *args, **kwargs)\n\nCreates an instance of this client using the provided credentials\nfile.\n\n### from_service_account_info\n\n from_service_account_info(info: dict, *args, **kwargs)\n\nCreates an instance of this client using the provided credentials\ninfo.\n\n### from_service_account_json\n\n from_service_account_json(filename: str, *args, **kwargs)\n\nCreates an instance of this client using the provided credentials\nfile.\n\n### get_mtls_endpoint_and_cert_source\n\n get_mtls_endpoint_and_cert_source(\n client_options: typing.Optional[\n google.api_core.client_options.ClientOptions\n ] = None,\n )\n\nDeprecated. Return the API endpoint and client cert source for mutual TLS.\n\nThe client cert source is determined in the following order:\n(1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not \"true\", the\nclient cert source is None.\n(2) if `client_options.client_cert_source` is provided, use the provided one; if the\ndefault client cert source exists, use the default one; otherwise the client cert\nsource is None.\n\nThe API endpoint is determined in the following order:\n(1) if `client_options.api_endpoint` if provided, use the provided one.\n(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is \"always\", use the\ndefault mTLS endpoint; if the environment variable is \"never\", use the default API\nendpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise\nuse the default API endpoint.\n\nMore details can be found at \u003chttps://google.aip.dev/auth/4114\u003e.\n\n### launch_flex_template\n\n launch_flex_template(\n request: typing.Optional[\n typing.Union[\n google.cloud.dataflow_v1beta3.types.templates.LaunchFlexTemplateRequest,\n dict,\n ]\n ] = None,\n *,\n retry: typing.Optional[\n typing.Union[\n google.api_core.retry.retry_unary.Retry,\n google.api_core.gapic_v1.method._MethodDefault,\n ]\n ] = _MethodDefault._DEFAULT_VALUE,\n timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,\n metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()\n ) -\u003e google.cloud.dataflow_v1beta3.types.templates.LaunchFlexTemplateResponse\n\nLaunch a job with a FlexTemplate. \n\n # This snippet has been automatically generated and should be regarded as a\n # code template only.\n # It will require modifications to work:\n # - It may require correct/in-range values for request initialization.\n # - It may require specifying regional endpoints when creating the service\n # client as shown in:\n # https://googleapis.dev/python/google-api-core/latest/client_options.html\n from google.cloud import https://cloud.google.com/python/docs/reference/dataflow/latest/\n\n def sample_launch_flex_template():\n # Create a client\n client = https://cloud.google.com/python/docs/reference/dataflow/latest/.https://cloud.google.com/python/docs/reference/dataflow/latest/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient.html()\n\n # Initialize request argument(s)\n request = https://cloud.google.com/python/docs/reference/dataflow/latest/.https://cloud.google.com/python/docs/reference/dataflow/latest/google.cloud.dataflow_v1beta3.types.LaunchFlexTemplateRequest.html(\n )\n\n # Make the request\n response = client.https://cloud.google.com/python/docs/reference/dataflow/latest/google.cloud.dataflow_v1beta3.services.flex_templates_service.FlexTemplatesServiceClient.html#google_cloud_dataflow_v1beta3_services_flex_templates_service_FlexTemplatesServiceClient_launch_flex_template(request=request)\n\n # Handle the response\n print(response)\n\n### parse_common_billing_account_path\n\n parse_common_billing_account_path(path: str) -\u003e typing.Dict[str, str]\n\nParse a billing_account path into its component segments.\n\n### parse_common_folder_path\n\n parse_common_folder_path(path: str) -\u003e typing.Dict[str, str]\n\nParse a folder path into its component segments.\n\n### parse_common_location_path\n\n parse_common_location_path(path: str) -\u003e typing.Dict[str, str]\n\nParse a location path into its component segments.\n\n### parse_common_organization_path\n\n parse_common_organization_path(path: str) -\u003e typing.Dict[str, str]\n\nParse a organization path into its component segments.\n\n### parse_common_project_path\n\n parse_common_project_path(path: str) -\u003e typing.Dict[str, str]\n\nParse a project path into its component segments."]]