コード例 #1
0
        public async Task UpdateSinkAsync()
        {
            // Snippet: UpdateSinkAsync(string,LogSink,CallSettings)
            // Additional: UpdateSinkAsync(string,LogSink,CancellationToken)
            // Create client
            ConfigServiceV2Client configServiceV2Client = ConfigServiceV2Client.Create();
            // Initialize request argument(s)
            string  formattedSinkName = ConfigServiceV2Client.FormatSinkName("[PROJECT]", "[SINK]");
            LogSink sink = new LogSink();
            // Make the request
            LogSink response = await configServiceV2Client.UpdateSinkAsync(formattedSinkName, sink);

            // End snippet
        }
        /// <summary>Snippet for UpdateSinkAsync</summary>
        public async Task UpdateSinkAsync2()
        {
            // Snippet: UpdateSinkAsync(SinkNameOneof,LogSink,CallSettings)
            // Additional: UpdateSinkAsync(SinkNameOneof,LogSink,CancellationToken)
            // Create client
            ConfigServiceV2Client configServiceV2Client = await ConfigServiceV2Client.CreateAsync();

            // Initialize request argument(s)
            SinkNameOneof sinkName = SinkNameOneof.From(new SinkName("[PROJECT]", "[SINK]"));
            LogSink       sink     = new LogSink();
            // Make the request
            LogSink response = await configServiceV2Client.UpdateSinkAsync(sinkName, sink);

            // End snippet
        }
コード例 #3
0
        /// <summary>Snippet for UpdateSinkAsync</summary>
        public async Task UpdateSinkAsync_RequestObject()
        {
            // Snippet: UpdateSinkAsync(UpdateSinkRequest,CallSettings)
            // Create client
            ConfigServiceV2Client configServiceV2Client = await ConfigServiceV2Client.CreateAsync();

            // Initialize request argument(s)
            UpdateSinkRequest request = new UpdateSinkRequest
            {
                SinkNameAsSinkNameOneof = SinkNameOneof.From(new SinkName("[PROJECT]", "[SINK]")),
                Sink = new LogSink(),
            };
            // Make the request
            LogSink response = await configServiceV2Client.UpdateSinkAsync(request);

            // End snippet
        }