예제 #1
0
        /// <summary>Snippet for CreateUptimeCheckConfigAsync</summary>
        public async Task CreateUptimeCheckConfigAsync()
        {
            // Snippet: CreateUptimeCheckConfigAsync(string,UptimeCheckConfig,CallSettings)
            // Additional: CreateUptimeCheckConfigAsync(string,UptimeCheckConfig,CancellationToken)
            // Create client
            UptimeCheckServiceClient uptimeCheckServiceClient = await UptimeCheckServiceClient.CreateAsync();

            // Initialize request argument(s)
            string            formattedParent   = new ProjectName("[PROJECT]").ToString();
            UptimeCheckConfig uptimeCheckConfig = new UptimeCheckConfig();
            // Make the request
            UptimeCheckConfig response = await uptimeCheckServiceClient.CreateUptimeCheckConfigAsync(formattedParent, uptimeCheckConfig);

            // End snippet
        }
        /// <summary>Snippet for CreateUptimeCheckConfigAsync</summary>
        public async Task CreateUptimeCheckConfigAsync_RequestObject()
        {
            // Snippet: CreateUptimeCheckConfigAsync(CreateUptimeCheckConfigRequest,CallSettings)
            // Create client
            UptimeCheckServiceClient uptimeCheckServiceClient = await UptimeCheckServiceClient.CreateAsync();

            // Initialize request argument(s)
            CreateUptimeCheckConfigRequest request = new CreateUptimeCheckConfigRequest
            {
                Parent            = new ProjectName("[PROJECT]").ToString(),
                UptimeCheckConfig = new UptimeCheckConfig(),
            };
            // Make the request
            UptimeCheckConfig response = await uptimeCheckServiceClient.CreateUptimeCheckConfigAsync(request);

            // End snippet
        }