public abstract class TemplatesServiceClientReference documentation and code samples for the Dataflow v1beta3 API class TemplatesServiceClient.
TemplatesService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dataflow.V1Beta3Assembly
Google.Cloud.Dataflow.V1Beta3.dll
Remarks
Provides a method to create Cloud Dataflow jobs from templates.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the TemplatesService service, which is a host of "dataflow.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default TemplatesService scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default TemplatesService scopes are:
GrpcClient
public virtual TemplatesService.TemplatesServiceClient GrpcClient { get; }The underlying gRPC TemplatesService client
| Property Value | |
|---|---|
| Type | Description |
TemplatesServiceTemplatesServiceClient |
|
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }The service metadata associated with this client type.
| Property Value | |
|---|---|
| Type | Description |
ServiceMetadata |
|
Methods
Create()
public static TemplatesServiceClient Create()Synchronously creates a TemplatesServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TemplatesServiceClientBuilder.
| Returns | |
|---|---|
| Type | Description |
TemplatesServiceClient |
The created TemplatesServiceClient. |
CreateAsync(CancellationToken)
public static Task<TemplatesServiceClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a TemplatesServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TemplatesServiceClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskTemplatesServiceClient |
The task representing the created TemplatesServiceClient. |
CreateJobFromTemplate(CreateJobFromTemplateRequest, CallSettings)
public virtual Job CreateJobFromTemplate(CreateJobFromTemplateRequest request, CallSettings callSettings = null)Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API.
To create a job, we recommend using projects.locations.templates.create
with a regional endpoint. Using
projects.templates.create is not recommended, because your job will
always start in us-central1.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateJobFromTemplateRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Job |
The RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = TemplatesServiceClient.Create();
// Initialize request argument(s)
CreateJobFromTemplateRequest request = new CreateJobFromTemplateRequest
{
ProjectId = "",
GcsPath = "",
Parameters = { { "", "" }, },
JobName = "",
Environment = new RuntimeEnvironment(),
Location = "",
};
// Make the request
Job response = templatesServiceClient.CreateJobFromTemplate(request);
CreateJobFromTemplateAsync(CreateJobFromTemplateRequest, CallSettings)
public virtual Task<Job> CreateJobFromTemplateAsync(CreateJobFromTemplateRequest request, CallSettings callSettings = null)Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API.
To create a job, we recommend using projects.locations.templates.create
with a regional endpoint. Using
projects.templates.create is not recommended, because your job will
always start in us-central1.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateJobFromTemplateRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskJob |
A Task containing the RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = await TemplatesServiceClient.CreateAsync();
// Initialize request argument(s)
CreateJobFromTemplateRequest request = new CreateJobFromTemplateRequest
{
ProjectId = "",
GcsPath = "",
Parameters = { { "", "" }, },
JobName = "",
Environment = new RuntimeEnvironment(),
Location = "",
};
// Make the request
Job response = await templatesServiceClient.CreateJobFromTemplateAsync(request);
CreateJobFromTemplateAsync(CreateJobFromTemplateRequest, CancellationToken)
public virtual Task<Job> CreateJobFromTemplateAsync(CreateJobFromTemplateRequest request, CancellationToken cancellationToken)Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API.
To create a job, we recommend using projects.locations.templates.create
with a regional endpoint. Using
projects.templates.create is not recommended, because your job will
always start in us-central1.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateJobFromTemplateRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskJob |
A Task containing the RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = await TemplatesServiceClient.CreateAsync();
// Initialize request argument(s)
CreateJobFromTemplateRequest request = new CreateJobFromTemplateRequest
{
ProjectId = "",
GcsPath = "",
Parameters = { { "", "" }, },
JobName = "",
Environment = new RuntimeEnvironment(),
Location = "",
};
// Make the request
Job response = await templatesServiceClient.CreateJobFromTemplateAsync(request);
GetTemplate(GetTemplateRequest, CallSettings)
public virtual GetTemplateResponse GetTemplate(GetTemplateRequest request, CallSettings callSettings = null)Get the template associated with a template.
To get the template, we recommend using projects.locations.templates.get
with a regional endpoint. Using
projects.templates.get is not recommended, because only
templates that are running in us-central1 are retrieved.
| Parameters | |
|---|---|
| Name | Description |
request |
GetTemplateRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
GetTemplateResponse |
The RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = TemplatesServiceClient.Create();
// Initialize request argument(s)
GetTemplateRequest request = new GetTemplateRequest
{
ProjectId = "",
GcsPath = "",
View = GetTemplateRequest.Types.TemplateView.MetadataOnly,
Location = "",
};
// Make the request
GetTemplateResponse response = templatesServiceClient.GetTemplate(request);
GetTemplateAsync(GetTemplateRequest, CallSettings)
public virtual Task<GetTemplateResponse> GetTemplateAsync(GetTemplateRequest request, CallSettings callSettings = null)Get the template associated with a template.
To get the template, we recommend using projects.locations.templates.get
with a regional endpoint. Using
projects.templates.get is not recommended, because only
templates that are running in us-central1 are retrieved.
| Parameters | |
|---|---|
| Name | Description |
request |
GetTemplateRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskGetTemplateResponse |
A Task containing the RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = await TemplatesServiceClient.CreateAsync();
// Initialize request argument(s)
GetTemplateRequest request = new GetTemplateRequest
{
ProjectId = "",
GcsPath = "",
View = GetTemplateRequest.Types.TemplateView.MetadataOnly,
Location = "",
};
// Make the request
GetTemplateResponse response = await templatesServiceClient.GetTemplateAsync(request);
GetTemplateAsync(GetTemplateRequest, CancellationToken)
public virtual Task<GetTemplateResponse> GetTemplateAsync(GetTemplateRequest request, CancellationToken cancellationToken)Get the template associated with a template.
To get the template, we recommend using projects.locations.templates.get
with a regional endpoint. Using
projects.templates.get is not recommended, because only
templates that are running in us-central1 are retrieved.
| Parameters | |
|---|---|
| Name | Description |
request |
GetTemplateRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskGetTemplateResponse |
A Task containing the RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = await TemplatesServiceClient.CreateAsync();
// Initialize request argument(s)
GetTemplateRequest request = new GetTemplateRequest
{
ProjectId = "",
GcsPath = "",
View = GetTemplateRequest.Types.TemplateView.MetadataOnly,
Location = "",
};
// Make the request
GetTemplateResponse response = await templatesServiceClient.GetTemplateAsync(request);
LaunchTemplate(LaunchTemplateRequest, CallSettings)
public virtual LaunchTemplateResponse LaunchTemplate(LaunchTemplateRequest request, CallSettings callSettings = null)Launches a template.
To launch a template, we recommend using
projects.locations.templates.launch with a regional endpoint. Using
projects.templates.launch is not recommended, because jobs launched
from the template will always start in us-central1.
| Parameters | |
|---|---|
| Name | Description |
request |
LaunchTemplateRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
LaunchTemplateResponse |
The RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = TemplatesServiceClient.Create();
// Initialize request argument(s)
LaunchTemplateRequest request = new LaunchTemplateRequest
{
ProjectId = "",
ValidateOnly = false,
GcsPath = "",
LaunchParameters = new LaunchTemplateParameters(),
Location = "",
};
// Make the request
LaunchTemplateResponse response = templatesServiceClient.LaunchTemplate(request);
LaunchTemplateAsync(LaunchTemplateRequest, CallSettings)
public virtual Task<LaunchTemplateResponse> LaunchTemplateAsync(LaunchTemplateRequest request, CallSettings callSettings = null)Launches a template.
To launch a template, we recommend using
projects.locations.templates.launch with a regional endpoint. Using
projects.templates.launch is not recommended, because jobs launched
from the template will always start in us-central1.
| Parameters | |
|---|---|
| Name | Description |
request |
LaunchTemplateRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskLaunchTemplateResponse |
A Task containing the RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = await TemplatesServiceClient.CreateAsync();
// Initialize request argument(s)
LaunchTemplateRequest request = new LaunchTemplateRequest
{
ProjectId = "",
ValidateOnly = false,
GcsPath = "",
LaunchParameters = new LaunchTemplateParameters(),
Location = "",
};
// Make the request
LaunchTemplateResponse response = await templatesServiceClient.LaunchTemplateAsync(request);
LaunchTemplateAsync(LaunchTemplateRequest, CancellationToken)
public virtual Task<LaunchTemplateResponse> LaunchTemplateAsync(LaunchTemplateRequest request, CancellationToken cancellationToken)Launches a template.
To launch a template, we recommend using
projects.locations.templates.launch with a regional endpoint. Using
projects.templates.launch is not recommended, because jobs launched
from the template will always start in us-central1.
| Parameters | |
|---|---|
| Name | Description |
request |
LaunchTemplateRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskLaunchTemplateResponse |
A Task containing the RPC response. |
// Create client
TemplatesServiceClient templatesServiceClient = await TemplatesServiceClient.CreateAsync();
// Initialize request argument(s)
LaunchTemplateRequest request = new LaunchTemplateRequest
{
ProjectId = "",
ValidateOnly = false,
GcsPath = "",
LaunchParameters = new LaunchTemplateParameters(),
Location = "",
};
// Make the request
LaunchTemplateResponse response = await templatesServiceClient.LaunchTemplateAsync(request);
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
| Returns | |
|---|---|
| Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.