MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / updateChannel

Function updateChannel

media/livestream/updateChannel.js:34–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 const livestreamServiceClient = new LivestreamServiceClient();
33
34 async function updateChannel() {
35 // Construct request
36 const request = {
37 channel: {
38 name: livestreamServiceClient.channelPath(
39 projectId,
40 location,
41 channelId
42 ),
43 inputAttachments: [
44 {
45 key: 'updated-input',
46 input: livestreamServiceClient.inputPath(
47 projectId,
48 location,
49 inputId
50 ),
51 },
52 ],
53 },
54 updateMask: {
55 paths: ['input_attachments'],
56 },
57 };
58
59 // Run request
60 const [operation] = await livestreamServiceClient.updateChannel(request);
61 const response = await operation.promise();
62 const [channel] = response;
63 console.log(`Updated channel: ${channel.name}`);
64 }
65
66 updateChannel();
67 // [END livestream_update_channel]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected