Using Live Stream API, you can generate live streams in the various renditions and streaming formats. The streaming format include HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send a source stream in the various ways, including Real-Time Messaging Protocol (RTMP) and Secure Reliable Transport (SRT). v1
Package
@google-cloud/livestreamConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of LivestreamServiceClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
livestreamServiceStub
livestreamServiceStub?: Promise<{
[name: string]: Function;
}>;
locationsClient
locationsClient: LocationsClient;
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
cancelOperation(request, options, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
protos.google.longrunning.CancelOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
channelPath(project, location, channel)
channelPath(project: string, location: string, channel: string): string;
Return a fully-qualified channel resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
channel |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
checkCreateChannelProgress(name)
checkCreateChannelProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.Channel, protos.google.cloud.video.livestream.v1.OperationMetadata>>;
Check the status of the long running operation returned by createChannel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.video.livestream.v1.Channel, protos.google.cloud.video.livestream.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent location for the resource, in the form of:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* Required. The channel resource to be created.
*/
// const channel = {}
/**
* Required. The ID of the channel resource to be created.
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
* could contain dashes (-) in between.
*/
// const channelId = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callCreateChannel() {
// Construct request
const request = {
parent,
channel,
channelId,
};
// Run request
const [operation] = await livestreamClient.createChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateChannel();
checkCreateInputProgress(name)
checkCreateInputProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.Input, protos.google.cloud.video.livestream.v1.OperationMetadata>>;
Check the status of the long running operation returned by createInput()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.video.livestream.v1.Input, protos.google.cloud.video.livestream.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent location for the resource, in the form of:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* Required. The input resource to be created.
*/
// const input = {}
/**
* Required. The ID of the input resource to be created.
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
* could contain dashes (-) in between.
*/
// const inputId = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callCreateInput() {
// Construct request
const request = {
parent,
input,
inputId,
};
// Run request
const [operation] = await livestreamClient.createInput(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInput();
checkDeleteChannelProgress(name)
checkDeleteChannelProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.video.livestream.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteChannel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.video.livestream.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the channel resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
/**
* If the `force` field is set to the default value of `false`, you must
* delete all of a channel's events before you can delete the channel itself.
* If the field is set to `true`, requests to delete a channel also delete
* associated channel events.
*/
// const force = true
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callDeleteChannel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await livestreamClient.deleteChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteChannel();
checkDeleteInputProgress(name)
checkDeleteInputProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.video.livestream.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteInput()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.video.livestream.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the input resource, in the form of:
* `projects/{project}/locations/{location}/inputs/{inputId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callDeleteInput() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await livestreamClient.deleteInput(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInput();
checkStartChannelProgress(name)
checkStartChannelProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.ChannelOperationResponse, protos.google.cloud.video.livestream.v1.OperationMetadata>>;
Check the status of the long running operation returned by startChannel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.video.livestream.v1.ChannelOperationResponse, protos.google.cloud.video.livestream.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the channel resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callStartChannel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await livestreamClient.startChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callStartChannel();
checkStopChannelProgress(name)
checkStopChannelProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.ChannelOperationResponse, protos.google.cloud.video.livestream.v1.OperationMetadata>>;
Check the status of the long running operation returned by stopChannel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.video.livestream.v1.ChannelOperationResponse, protos.google.cloud.video.livestream.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the channel resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callStopChannel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await livestreamClient.stopChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callStopChannel();
checkUpdateChannelProgress(name)
checkUpdateChannelProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.Channel, protos.google.cloud.video.livestream.v1.OperationMetadata>>;
Check the status of the long running operation returned by updateChannel()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.video.livestream.v1.Channel, protos.google.cloud.video.livestream.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Field mask is used to specify the fields to be overwritten in the Channel
* resource by the update. You can only update the following fields:
* * `inputAttachments` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment)
* * `inputConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig)
* * `output` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output)
* * `elementaryStreams` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream)
* * `muxStreams` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream)
* * `manifests` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest)
* * `spriteSheets` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
* * `logConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig)
* * `timecodeConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig)
* * `encryptions` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption)
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask.
* If the mask is not present, then each field from the list above is updated
* if the field appears in the request payload. To unset a field, add the
* field to the update mask and remove it from the request payload.
*/
// const updateMask = {}
/**
* Required. The channel resource to be updated.
*/
// const channel = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callUpdateChannel() {
// Construct request
const request = {
channel,
};
// Run request
const [operation] = await livestreamClient.updateChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateChannel();
checkUpdateInputProgress(name)
checkUpdateInputProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.Input, protos.google.cloud.video.livestream.v1.OperationMetadata>>;
Check the status of the long running operation returned by updateInput()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.video.livestream.v1.Input, protos.google.cloud.video.livestream.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Field mask is used to specify the fields to be overwritten in the Input
* resource by the update. You can only update the following fields:
* * `preprocessingConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
* * `securityRules` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask.
* If the mask is not present, then each field from the list above is updated
* if the field appears in the request payload. To unset a field, add the
* field to the update mask and remove it from the request payload.
*/
// const updateMask = {}
/**
* Required. The input resource to be updated.
*/
// const input = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callUpdateInput() {
// Construct request
const request = {
input,
};
// Run request
const [operation] = await livestreamClient.updateInput(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateInput();
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns | |
---|---|
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createChannel(request, options)
createChannel(request?: protos.google.cloud.video.livestream.v1.ICreateChannelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a channel with the provided unique ID in the specified region.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateChannelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent location for the resource, in the form of:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* Required. The channel resource to be created.
*/
// const channel = {}
/**
* Required. The ID of the channel resource to be created.
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
* could contain dashes (-) in between.
*/
// const channelId = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callCreateChannel() {
// Construct request
const request = {
parent,
channel,
channelId,
};
// Run request
const [operation] = await livestreamClient.createChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateChannel();
createChannel(request, options, callback)
createChannel(request: protos.google.cloud.video.livestream.v1.ICreateChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateChannelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createChannel(request, callback)
createChannel(request: protos.google.cloud.video.livestream.v1.ICreateChannelRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateChannelRequest
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createEvent(request, options)
createEvent(request?: protos.google.cloud.video.livestream.v1.ICreateEventRequest, options?: CallOptions): Promise<[
protos.google.cloud.video.livestream.v1.IEvent,
protos.google.cloud.video.livestream.v1.ICreateEventRequest | undefined,
{} | undefined
]>;
Creates an event with the provided unique ID in the specified channel.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateEventRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.video.livestream.v1.IEvent,
protos.google.cloud.video.livestream.v1.ICreateEventRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent channel for the resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const parent = 'abc123'
/**
* Required. The event resource to be created.
*/
// const event = {}
/**
* Required. The ID of the event resource to be created.
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
* could contain dashes (-) in between.
*/
// const eventId = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callCreateEvent() {
// Construct request
const request = {
parent,
event,
eventId,
};
// Run request
const response = await livestreamClient.createEvent(request);
console.log(response);
}
callCreateEvent();
createEvent(request, options, callback)
createEvent(request: protos.google.cloud.video.livestream.v1.ICreateEventRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateEventRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createEvent(request, callback)
createEvent(request: protos.google.cloud.video.livestream.v1.ICreateEventRequest, callback: Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateEventRequest
|
callback |
Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createInput(request, options)
createInput(request?: protos.google.cloud.video.livestream.v1.ICreateInputRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates an input with the provided unique ID in the specified region.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateInputRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent location for the resource, in the form of:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* Required. The input resource to be created.
*/
// const input = {}
/**
* Required. The ID of the input resource to be created.
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
* could contain dashes (-) in between.
*/
// const inputId = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callCreateInput() {
// Construct request
const request = {
parent,
input,
inputId,
};
// Run request
const [operation] = await livestreamClient.createInput(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInput();
createInput(request, options, callback)
createInput(request: protos.google.cloud.video.livestream.v1.ICreateInputRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateInputRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createInput(request, callback)
createInput(request: protos.google.cloud.video.livestream.v1.ICreateInputRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.ICreateInputRequest
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteChannel(request, options)
deleteChannel(request?: protos.google.cloud.video.livestream.v1.IDeleteChannelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes the specified channel.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteChannelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the channel resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
/**
* If the `force` field is set to the default value of `false`, you must
* delete all of a channel's events before you can delete the channel itself.
* If the field is set to `true`, requests to delete a channel also delete
* associated channel events.
*/
// const force = true
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callDeleteChannel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await livestreamClient.deleteChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteChannel();
deleteChannel(request, options, callback)
deleteChannel(request: protos.google.cloud.video.livestream.v1.IDeleteChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteChannelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteChannel(request, callback)
deleteChannel(request: protos.google.cloud.video.livestream.v1.IDeleteChannelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteChannelRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteEvent(request, options)
deleteEvent(request?: protos.google.cloud.video.livestream.v1.IDeleteEventRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.video.livestream.v1.IDeleteEventRequest | undefined,
{} | undefined
]>;
Deletes the specified event.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteEventRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.video.livestream.v1.IDeleteEventRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the event resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callDeleteEvent() {
// Construct request
const request = {
name,
};
// Run request
const response = await livestreamClient.deleteEvent(request);
console.log(response);
}
callDeleteEvent();
deleteEvent(request, options, callback)
deleteEvent(request: protos.google.cloud.video.livestream.v1.IDeleteEventRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IDeleteEventRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteEventRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IDeleteEventRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteEvent(request, callback)
deleteEvent(request: protos.google.cloud.video.livestream.v1.IDeleteEventRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IDeleteEventRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteEventRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IDeleteEventRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteInput(request, options)
deleteInput(request?: protos.google.cloud.video.livestream.v1.IDeleteInputRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes the specified input.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteInputRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the input resource, in the form of:
* `projects/{project}/locations/{location}/inputs/{inputId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callDeleteInput() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await livestreamClient.deleteInput(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInput();
deleteInput(request, options, callback)
deleteInput(request: protos.google.cloud.video.livestream.v1.IDeleteInputRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteInputRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteInput(request, callback)
deleteInput(request: protos.google.cloud.video.livestream.v1.IDeleteInputRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IDeleteInputRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteOperation(request, options, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
Parameters | |
---|---|
Name | Description |
request |
protos.google.longrunning.DeleteOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
eventPath(project, location, channel, event)
eventPath(project: string, location: string, channel: string, event: string): string;
Return a fully-qualified event resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
channel |
string
|
event |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
getChannel(request, options)
getChannel(request?: protos.google.cloud.video.livestream.v1.IGetChannelRequest, options?: CallOptions): Promise<[
protos.google.cloud.video.livestream.v1.IChannel,
protos.google.cloud.video.livestream.v1.IGetChannelRequest | undefined,
{} | undefined
]>;
Returns the specified channel.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetChannelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.video.livestream.v1.IChannel,
protos.google.cloud.video.livestream.v1.IGetChannelRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the channel resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const name = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callGetChannel() {
// Construct request
const request = {
name,
};
// Run request
const response = await livestreamClient.getChannel(request);
console.log(response);
}
callGetChannel();
getChannel(request, options, callback)
getChannel(request: protos.google.cloud.video.livestream.v1.IGetChannelRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetChannelRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getChannel(request, callback)
getChannel(request: protos.google.cloud.video.livestream.v1.IGetChannelRequest, callback: Callback<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetChannelRequest
|
callback |
Callback<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getEvent(request, options)
getEvent(request?: protos.google.cloud.video.livestream.v1.IGetEventRequest, options?: CallOptions): Promise<[
protos.google.cloud.video.livestream.v1.IEvent,
protos.google.cloud.video.livestream.v1.IGetEventRequest | undefined,
{} | undefined
]>;
Returns the specified event.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetEventRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.video.livestream.v1.IEvent,
protos.google.cloud.video.livestream.v1.IGetEventRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the event resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
*/
// const name = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callGetEvent() {
// Construct request
const request = {
name,
};
// Run request
const response = await livestreamClient.getEvent(request);
console.log(response);
}
callGetEvent();
getEvent(request, options, callback)
getEvent(request: protos.google.cloud.video.livestream.v1.IGetEventRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetEventRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getEvent(request, callback)
getEvent(request: protos.google.cloud.video.livestream.v1.IGetEventRequest, callback: Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetEventRequest
|
callback |
Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getInput(request, options)
getInput(request?: protos.google.cloud.video.livestream.v1.IGetInputRequest, options?: CallOptions): Promise<[
protos.google.cloud.video.livestream.v1.IInput,
protos.google.cloud.video.livestream.v1.IGetInputRequest | undefined,
{} | undefined
]>;
Returns the specified input.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetInputRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.video.livestream.v1.IInput,
protos.google.cloud.video.livestream.v1.IGetInputRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the input resource, in the form of:
* `projects/{project}/locations/{location}/inputs/{inputId}`.
*/
// const name = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callGetInput() {
// Construct request
const request = {
name,
};
// Run request
const response = await livestreamClient.getInput(request);
console.log(response);
}
callGetInput();
getInput(request, options, callback)
getInput(request: protos.google.cloud.video.livestream.v1.IGetInputRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetInputRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getInput(request, callback)
getInput(request: protos.google.cloud.video.livestream.v1.IGetInputRequest, callback: Callback<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IGetInputRequest
|
callback |
Callback<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getLocation(request, options, callback)
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
Gets information about a location.
Parameters | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
Promise<LocationProtos.google.cloud.location.ILocation> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
const [response] = await client.getLocation(request);
getOperation(request, options, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
Parameters | |
---|---|
Name | Description |
request |
protos.google.longrunning.GetOperationRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<[protos.google.longrunning.Operation]> |
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns | |
---|---|
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub. |
inputPath(project, location, input)
inputPath(project: string, location: string, input: string): string;
Return a fully-qualified input resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
input |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
listChannels(request, options)
listChannels(request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, options?: CallOptions): Promise<[
protos.google.cloud.video.livestream.v1.IChannel[],
protos.google.cloud.video.livestream.v1.IListChannelsRequest | null,
protos.google.cloud.video.livestream.v1.IListChannelsResponse
]>;
Returns a list of all channels in the specified region.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListChannelsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.video.livestream.v1.IChannel[],
protos.google.cloud.video.livestream.v1.IListChannelsRequest | null,
protos.google.cloud.video.livestream.v1.IListChannelsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listChannels(request, options, callback)
listChannels(request: protos.google.cloud.video.livestream.v1.IListChannelsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListChannelsRequest, protos.google.cloud.video.livestream.v1.IListChannelsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IChannel>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListChannelsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.video.livestream.v1.IListChannelsRequest, protos.google.cloud.video.livestream.v1.IListChannelsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IChannel>
|
Returns | |
---|---|
Type | Description |
void |
listChannels(request, callback)
listChannels(request: protos.google.cloud.video.livestream.v1.IListChannelsRequest, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListChannelsRequest, protos.google.cloud.video.livestream.v1.IListChannelsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IChannel>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListChannelsRequest
|
callback |
PaginationCallback<protos.google.cloud.video.livestream.v1.IListChannelsRequest, protos.google.cloud.video.livestream.v1.IListChannelsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IChannel>
|
Returns | |
---|---|
Type | Description |
void |
listChannelsAsync(request, options)
listChannelsAsync(request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.video.livestream.v1.IChannel>;
Equivalent to listChannels
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListChannelsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.video.livestream.v1.IChannel> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent location for the resource, in the form of:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* The maximum number of items to return. If unspecified, server
* will pick an appropriate default. Server may return fewer items than
* requested. A caller should only rely on response's
* next_page_token google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token
* to determine if there are more items left to be queried.
*/
// const pageSize = 1234
/**
* The next_page_token value returned from a previous List request, if any.
*/
// const pageToken = 'abc123'
/**
* The filter to apply to list results.
*/
// const filter = 'abc123'
/**
* Specifies the ordering of results following syntax at
* https://cloud.google.com/apis/design/design_patterns#sorting_order.
*/
// const orderBy = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callListChannels() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await livestreamClient.listChannelsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListChannels();
listChannelsStream(request, options)
listChannelsStream(request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListChannelsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listEvents(request, options)
listEvents(request?: protos.google.cloud.video.livestream.v1.IListEventsRequest, options?: CallOptions): Promise<[
protos.google.cloud.video.livestream.v1.IEvent[],
protos.google.cloud.video.livestream.v1.IListEventsRequest | null,
protos.google.cloud.video.livestream.v1.IListEventsResponse
]>;
Returns a list of all events in the specified channel.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListEventsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.video.livestream.v1.IEvent[],
protos.google.cloud.video.livestream.v1.IListEventsRequest | null,
protos.google.cloud.video.livestream.v1.IListEventsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listEvents(request, options, callback)
listEvents(request: protos.google.cloud.video.livestream.v1.IListEventsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListEventsRequest, protos.google.cloud.video.livestream.v1.IListEventsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IEvent>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListEventsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.video.livestream.v1.IListEventsRequest, protos.google.cloud.video.livestream.v1.IListEventsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IEvent>
|
Returns | |
---|---|
Type | Description |
void |
listEvents(request, callback)
listEvents(request: protos.google.cloud.video.livestream.v1.IListEventsRequest, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListEventsRequest, protos.google.cloud.video.livestream.v1.IListEventsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IEvent>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListEventsRequest
|
callback |
PaginationCallback<protos.google.cloud.video.livestream.v1.IListEventsRequest, protos.google.cloud.video.livestream.v1.IListEventsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IEvent>
|
Returns | |
---|---|
Type | Description |
void |
listEventsAsync(request, options)
listEventsAsync(request?: protos.google.cloud.video.livestream.v1.IListEventsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.video.livestream.v1.IEvent>;
Equivalent to listEvents
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListEventsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.video.livestream.v1.IEvent> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent channel for the resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const parent = 'abc123'
/**
* The maximum number of items to return. If unspecified, server
* will pick an appropriate default. Server may return fewer items than
* requested. A caller should only rely on response's
* next_page_token google.cloud.video.livestream.v1.ListEventsResponse.next_page_token
* to determine if there are more items left to be queried.
*/
// const pageSize = 1234
/**
* The next_page_token value returned from a previous List request, if any.
*/
// const pageToken = 'abc123'
/**
* The filter to apply to list results.
*/
// const filter = 'abc123'
/**
* Specifies the ordering of results following syntax at
* https://cloud.google.com/apis/design/design_patterns#sorting_order.
*/
// const orderBy = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callListEvents() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await livestreamClient.listEventsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListEvents();
listEventsStream(request, options)
listEventsStream(request?: protos.google.cloud.video.livestream.v1.IListEventsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListEventsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listInputs(request, options)
listInputs(request?: protos.google.cloud.video.livestream.v1.IListInputsRequest, options?: CallOptions): Promise<[
protos.google.cloud.video.livestream.v1.IInput[],
protos.google.cloud.video.livestream.v1.IListInputsRequest | null,
protos.google.cloud.video.livestream.v1.IListInputsResponse
]>;
Returns a list of all inputs in the specified region.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListInputsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.video.livestream.v1.IInput[],
protos.google.cloud.video.livestream.v1.IListInputsRequest | null,
protos.google.cloud.video.livestream.v1.IListInputsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listInputs(request, options, callback)
listInputs(request: protos.google.cloud.video.livestream.v1.IListInputsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListInputsRequest, protos.google.cloud.video.livestream.v1.IListInputsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IInput>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListInputsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.video.livestream.v1.IListInputsRequest, protos.google.cloud.video.livestream.v1.IListInputsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IInput>
|
Returns | |
---|---|
Type | Description |
void |
listInputs(request, callback)
listInputs(request: protos.google.cloud.video.livestream.v1.IListInputsRequest, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListInputsRequest, protos.google.cloud.video.livestream.v1.IListInputsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IInput>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListInputsRequest
|
callback |
PaginationCallback<protos.google.cloud.video.livestream.v1.IListInputsRequest, protos.google.cloud.video.livestream.v1.IListInputsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IInput>
|
Returns | |
---|---|
Type | Description |
void |
listInputsAsync(request, options)
listInputsAsync(request?: protos.google.cloud.video.livestream.v1.IListInputsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.video.livestream.v1.IInput>;
Equivalent to listInputs
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListInputsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.video.livestream.v1.IInput> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent location for the resource, in the form of:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* The maximum number of items to return. If unspecified, server
* will pick an appropriate default. Server may return fewer items than
* requested. A caller should only rely on response's
* next_page_token google.cloud.video.livestream.v1.ListInputsResponse.next_page_token
* to determine if there are more items left to be queried.
*/
// const pageSize = 1234
/**
* The next_page_token value returned from a previous List request, if any.
*/
// const pageToken = 'abc123'
/**
* The filter to apply to list results.
*/
// const filter = 'abc123'
/**
* Specifies the ordering of results following syntax at Sorting
* Order (https://cloud.google.com/apis/design/design_patterns#sorting_order).
*/
// const orderBy = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callListInputs() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await livestreamClient.listInputsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListInputs();
listInputsStream(request, options)
listInputsStream(request?: protos.google.cloud.video.livestream.v1.IListInputsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IListInputsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
Lists information about the supported locations for this service. Returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<LocationProtos.google.cloud.location.ILocation> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED
. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.longrunning.ListOperationsRequest
The request object that will be sent. |
options |
gax.CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.longrunning.ListOperationsResponse> | {Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
matchChannelFromChannelName(channelName)
matchChannelFromChannelName(channelName: string): string | number;
Parse the channel from Channel resource.
Parameter | |
---|---|
Name | Description |
channelName |
string
A fully-qualified path representing Channel resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the channel. |
matchChannelFromEventName(eventName)
matchChannelFromEventName(eventName: string): string | number;
Parse the channel from Event resource.
Parameter | |
---|---|
Name | Description |
eventName |
string
A fully-qualified path representing Event resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the channel. |
matchEventFromEventName(eventName)
matchEventFromEventName(eventName: string): string | number;
Parse the event from Event resource.
Parameter | |
---|---|
Name | Description |
eventName |
string
A fully-qualified path representing Event resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the event. |
matchInputFromInputName(inputName)
matchInputFromInputName(inputName: string): string | number;
Parse the input from Input resource.
Parameter | |
---|---|
Name | Description |
inputName |
string
A fully-qualified path representing Input resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the input. |
matchLocationFromChannelName(channelName)
matchLocationFromChannelName(channelName: string): string | number;
Parse the location from Channel resource.
Parameter | |
---|---|
Name | Description |
channelName |
string
A fully-qualified path representing Channel resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromEventName(eventName)
matchLocationFromEventName(eventName: string): string | number;
Parse the location from Event resource.
Parameter | |
---|---|
Name | Description |
eventName |
string
A fully-qualified path representing Event resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromInputName(inputName)
matchLocationFromInputName(inputName: string): string | number;
Parse the location from Input resource.
Parameter | |
---|---|
Name | Description |
inputName |
string
A fully-qualified path representing Input resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromChannelName(channelName)
matchProjectFromChannelName(channelName: string): string | number;
Parse the project from Channel resource.
Parameter | |
---|---|
Name | Description |
channelName |
string
A fully-qualified path representing Channel resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromEventName(eventName)
matchProjectFromEventName(eventName: string): string | number;
Parse the project from Event resource.
Parameter | |
---|---|
Name | Description |
eventName |
string
A fully-qualified path representing Event resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromInputName(inputName)
matchProjectFromInputName(inputName: string): string | number;
Parse the project from Input resource.
Parameter | |
---|---|
Name | Description |
inputName |
string
A fully-qualified path representing Input resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter | |
---|---|
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
startChannel(request, options)
startChannel(request?: protos.google.cloud.video.livestream.v1.IStartChannelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IStartChannelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the channel resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callStartChannel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await livestreamClient.startChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callStartChannel();
startChannel(request, options, callback)
startChannel(request: protos.google.cloud.video.livestream.v1.IStartChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IStartChannelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
startChannel(request, callback)
startChannel(request: protos.google.cloud.video.livestream.v1.IStartChannelRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IStartChannelRequest
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
stopChannel(request, options)
stopChannel(request?: protos.google.cloud.video.livestream.v1.IStopChannelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IStopChannelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the channel resource, in the form of:
* `projects/{project}/locations/{location}/channels/{channelId}`.
*/
// const name = 'abc123'
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callStopChannel() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await livestreamClient.stopChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callStopChannel();
stopChannel(request, options, callback)
stopChannel(request: protos.google.cloud.video.livestream.v1.IStopChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IStopChannelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
stopChannel(request, callback)
stopChannel(request: protos.google.cloud.video.livestream.v1.IStopChannelRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IStopChannelRequest
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateChannel(request, options)
updateChannel(request?: protos.google.cloud.video.livestream.v1.IUpdateChannelRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates the specified channel.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IUpdateChannelRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Field mask is used to specify the fields to be overwritten in the Channel
* resource by the update. You can only update the following fields:
* * `inputAttachments` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment)
* * `inputConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig)
* * `output` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output)
* * `elementaryStreams` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream)
* * `muxStreams` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream)
* * `manifests` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest)
* * `spriteSheets` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
* * `logConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig)
* * `timecodeConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig)
* * `encryptions` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption)
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask.
* If the mask is not present, then each field from the list above is updated
* if the field appears in the request payload. To unset a field, add the
* field to the update mask and remove it from the request payload.
*/
// const updateMask = {}
/**
* Required. The channel resource to be updated.
*/
// const channel = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callUpdateChannel() {
// Construct request
const request = {
channel,
};
// Run request
const [operation] = await livestreamClient.updateChannel(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateChannel();
updateChannel(request, options, callback)
updateChannel(request: protos.google.cloud.video.livestream.v1.IUpdateChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IUpdateChannelRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateChannel(request, callback)
updateChannel(request: protos.google.cloud.video.livestream.v1.IUpdateChannelRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IUpdateChannelRequest
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateInput(request, options)
updateInput(request?: protos.google.cloud.video.livestream.v1.IUpdateInputRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates the specified input.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IUpdateInputRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Field mask is used to specify the fields to be overwritten in the Input
* resource by the update. You can only update the following fields:
* * `preprocessingConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
* * `securityRules` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask.
* If the mask is not present, then each field from the list above is updated
* if the field appears in the request payload. To unset a field, add the
* field to the update mask and remove it from the request payload.
*/
// const updateMask = {}
/**
* Required. The input resource to be updated.
*/
// const input = {}
/**
* A request ID to identify requests. Specify a unique request ID
* so that if you must retry your request, the server will know to ignore
* the request if it has already been completed. The server will guarantee
* that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID,
* the server can check if original operation with the same request ID was
* received, and if so, will ignore the second request. This prevents clients
* from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported `(00000000-0000-0000-0000-000000000000)`.
*/
// const requestId = 'abc123'
// Imports the Livestream library
const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;
// Instantiates a client
const livestreamClient = new LivestreamServiceClient();
async function callUpdateInput() {
// Construct request
const request = {
input,
};
// Run request
const [operation] = await livestreamClient.updateInput(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateInput();
updateInput(request, options, callback)
updateInput(request: protos.google.cloud.video.livestream.v1.IUpdateInputRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IUpdateInputRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateInput(request, callback)
updateInput(request: protos.google.cloud.video.livestream.v1.IUpdateInputRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.video.livestream.v1.IUpdateInputRequest
|
callback |
Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |