Class FlexTemplatesServiceClient (1.0.0-beta03)

public abstract class FlexTemplatesServiceClient

FlexTemplatesService client wrapper, for convenient use.

Inheritance

Object > FlexTemplatesServiceClient

Namespace

Google.Cloud.Dataflow.V1Beta3

Assembly

Google.Cloud.Dataflow.V1Beta3.dll

Remarks

Provides a service for Flex templates. This feature is not ready yet.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the FlexTemplatesService service, which is a host of "dataflow.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default FlexTemplatesService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

GrpcClient

public virtual FlexTemplatesService.FlexTemplatesServiceClient GrpcClient { get; }

The underlying gRPC FlexTemplatesService client

Property Value
TypeDescription
FlexTemplatesService.FlexTemplatesServiceClient

Methods

Create()

public static FlexTemplatesServiceClient Create()

Synchronously creates a FlexTemplatesServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FlexTemplatesServiceClientBuilder.

Returns
TypeDescription
FlexTemplatesServiceClient

The created FlexTemplatesServiceClient.

CreateAsync(CancellationToken)

public static Task<FlexTemplatesServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a FlexTemplatesServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FlexTemplatesServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<FlexTemplatesServiceClient>

The task representing the created FlexTemplatesServiceClient.

LaunchFlexTemplate(LaunchFlexTemplateRequest, CallSettings)

public virtual LaunchFlexTemplateResponse LaunchFlexTemplate(LaunchFlexTemplateRequest request, CallSettings callSettings = null)

Launch a job with a FlexTemplate.

Parameters
NameDescription
requestLaunchFlexTemplateRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
LaunchFlexTemplateResponse

The RPC response.

Example
// Create client
FlexTemplatesServiceClient flexTemplatesServiceClient = FlexTemplatesServiceClient.Create();
// Initialize request argument(s)
LaunchFlexTemplateRequest request = new LaunchFlexTemplateRequest
{
    ProjectId = "",
    LaunchParameter = new LaunchFlexTemplateParameter(),
    Location = "",
    ValidateOnly = false,
};
// Make the request
LaunchFlexTemplateResponse response = flexTemplatesServiceClient.LaunchFlexTemplate(request);

LaunchFlexTemplateAsync(LaunchFlexTemplateRequest, CallSettings)

public virtual Task<LaunchFlexTemplateResponse> LaunchFlexTemplateAsync(LaunchFlexTemplateRequest request, CallSettings callSettings = null)

Launch a job with a FlexTemplate.

Parameters
NameDescription
requestLaunchFlexTemplateRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<LaunchFlexTemplateResponse>

A Task containing the RPC response.

Example
// Create client
FlexTemplatesServiceClient flexTemplatesServiceClient = await FlexTemplatesServiceClient.CreateAsync();
// Initialize request argument(s)
LaunchFlexTemplateRequest request = new LaunchFlexTemplateRequest
{
    ProjectId = "",
    LaunchParameter = new LaunchFlexTemplateParameter(),
    Location = "",
    ValidateOnly = false,
};
// Make the request
LaunchFlexTemplateResponse response = await flexTemplatesServiceClient.LaunchFlexTemplateAsync(request);

LaunchFlexTemplateAsync(LaunchFlexTemplateRequest, CancellationToken)

public virtual Task<LaunchFlexTemplateResponse> LaunchFlexTemplateAsync(LaunchFlexTemplateRequest request, CancellationToken cancellationToken)

Launch a job with a FlexTemplate.

Parameters
NameDescription
requestLaunchFlexTemplateRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<LaunchFlexTemplateResponse>

A Task containing the RPC response.

Example
// Create client
FlexTemplatesServiceClient flexTemplatesServiceClient = await FlexTemplatesServiceClient.CreateAsync();
// Initialize request argument(s)
LaunchFlexTemplateRequest request = new LaunchFlexTemplateRequest
{
    ProjectId = "",
    LaunchParameter = new LaunchFlexTemplateParameter(),
    Location = "",
    ValidateOnly = false,
};
// Make the request
LaunchFlexTemplateResponse response = await flexTemplatesServiceClient.LaunchFlexTemplateAsync(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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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.