Beispiel #1
0
        /// <summary>Snippet for GetTemplateAsync</summary>
        public async Task GetTemplateRequestObjectAsync()
        {
            // Snippet: GetTemplateAsync(GetTemplateRequest, CallSettings)
            // Additional: GetTemplateAsync(GetTemplateRequest, CancellationToken)
            // 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);

            // End snippet
        }
Beispiel #2
0
        /// <summary>Snippet for LaunchTemplateAsync</summary>
        public async Task LaunchTemplateRequestObjectAsync()
        {
            // Snippet: LaunchTemplateAsync(LaunchTemplateRequest, CallSettings)
            // Additional: LaunchTemplateAsync(LaunchTemplateRequest, CancellationToken)
            // 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);

            // End snippet
        }
Beispiel #3
0
        /// <summary>Snippet for CreateJobFromTemplateAsync</summary>
        public async Task CreateJobFromTemplateRequestObjectAsync()
        {
            // Snippet: CreateJobFromTemplateAsync(CreateJobFromTemplateRequest, CallSettings)
            // Additional: CreateJobFromTemplateAsync(CreateJobFromTemplateRequest, CancellationToken)
            // 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);

            // End snippet
        }