/// <summary>Snippet for DeleteConnection</summary>
        public void DeleteConnectionRequestObject()
        {
            // Snippet: DeleteConnection(DeleteConnectionRequest, CallSettings)
            // Create client
            ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
            // Initialize request argument(s)
            DeleteConnectionRequest request = new DeleteConnectionRequest
            {
                ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
            };

            // Make the request
            connectionServiceClient.DeleteConnection(request);
            // End snippet
        }
Ejemplo n.º 2
0
        /// <summary>Snippet for UpdateConnectionAsync</summary>
        public async Task UpdateConnectionResourceNamesAsync()
        {
            // Snippet: UpdateConnectionAsync(ConnectionName, Connection, FieldMask, CallSettings)
            // Additional: UpdateConnectionAsync(ConnectionName, Connection, FieldMask, CancellationToken)
            // Create client
            ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();

            // Initialize request argument(s)
            ConnectionName name       = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
            Connection     connection = new Connection();
            FieldMask      updateMask = new FieldMask();
            // Make the request
            Connection response = await connectionServiceClient.UpdateConnectionAsync(name, connection, updateMask);

            // End snippet
        }
Ejemplo n.º 3
0
 /// <summary>Snippet for UpdateConnection</summary>
 public void UpdateConnectionRequestObject()
 {
     // Snippet: UpdateConnection(UpdateConnectionRequest, CallSettings)
     // Create client
     ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
     // Initialize request argument(s)
     UpdateConnectionRequest request = new UpdateConnectionRequest
     {
         ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
         Connection     = new Connection(),
         UpdateMask     = new FieldMask(),
     };
     // Make the request
     Connection response = connectionServiceClient.UpdateConnection(request);
     // End snippet
 }
Ejemplo n.º 4
0
        /// <summary>Snippet for DeleteConnectionAsync</summary>
        public async Task DeleteConnectionRequestObjectAsync()
        {
            // Snippet: DeleteConnectionAsync(DeleteConnectionRequest, CallSettings)
            // Additional: DeleteConnectionAsync(DeleteConnectionRequest, CancellationToken)
            // Create client
            ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();

            // Initialize request argument(s)
            DeleteConnectionRequest request = new DeleteConnectionRequest
            {
                ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
            };
            // Make the request
            await connectionServiceClient.DeleteConnectionAsync(request);

            // End snippet
        }
Ejemplo n.º 5
0
        /// <summary>Snippet for UpdateConnectionAsync</summary>
        public async Task UpdateConnectionRequestObjectAsync()
        {
            // Snippet: UpdateConnectionAsync(UpdateConnectionRequest, CallSettings)
            // Additional: UpdateConnectionAsync(UpdateConnectionRequest, CancellationToken)
            // Create client
            ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();

            // Initialize request argument(s)
            UpdateConnectionRequest request = new UpdateConnectionRequest
            {
                ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
                Connection     = new Connection(),
                UpdateMask     = new FieldMask(),
            };
            // Make the request
            Connection response = await connectionServiceClient.UpdateConnectionAsync(request);

            // End snippet
        }