Readonly service to query available ImageVersions. v1beta1
Package
@google-cloud/orchestration-airflowConstructors
(constructor)(opts)
constructor(opts?: ClientOptions);
Construct an instance of ImageVersionsClient.
Name | Description |
opts |
ClientOptions
|
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;
imageVersionsStub
imageVersionsStub?: Promise<{
[name: string]: Function;
}>;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
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
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.
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
environmentPath(project, location, environment)
environmentPath(project: string, location: string, environment: string): string;
Return a fully-qualified environment resource name string.
Name | Description |
project |
string
|
location |
string
|
environment |
string
|
Type | Description |
string | {string} Resource name string. |
getProjectId()
getProjectId(): Promise<string>;
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Name | Description |
callback |
Callback<string, undefined, undefined>
|
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.
Type | Description |
Promise<{ [name: string]: Function; }> | {Promise} A promise that resolves to an authenticated service stub. |
listImageVersions(request, options)
listImageVersions(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, options?: CallOptions): Promise<[
protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[],
protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest | null,
protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse
]>;
List ImageVersions for provided location.
Name | Description |
request |
protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Promise<[ protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[], protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest | null, protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse ]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of [ImageVersion]. 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 |
listImageVersions(request, options, callback)
listImageVersions(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>): void;
Name | Description |
request |
protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>
|
Type | Description |
void |
listImageVersions(request, callback)
listImageVersions(request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, callback: PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>): void;
Name | Description |
request |
protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest
|
callback |
PaginationCallback<protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse | null | undefined, protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>
|
Type | Description |
void |
listImageVersionsAsync(request, options)
listImageVersionsAsync(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>;
Equivalent to listImageVersions
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Name | Description |
request |
protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion> | {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 [ImageVersion]. 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. |
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* List ImageVersions in the given project and location, in the form:
* "projects/{projectId}/locations/{locationId}"
*/
// const parent = 'abc123'
/**
* The maximum number of image_versions to return.
*/
// const pageSize = 1234
/**
* The next_page_token value returned from a previous List request, if any.
*/
// const pageToken = 'abc123'
/**
* Whether or not image versions from old releases should be included.
*/
// const includePastReleases = true
// Imports the Service library
const {ImageVersionsClient} =
require('@google-cloud/orchestration-airflow').v1beta1;
// Instantiates a client
const serviceClient = new ImageVersionsClient();
async function callListImageVersions() {
// Construct request
const request = {};
// Run request
const iterable = await serviceClient.listImageVersionsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListImageVersions();
listImageVersionsStream(request, options)
listImageVersionsStream(request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Name | Description |
request |
protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Type | Description |
Transform | {Stream} An object stream which emits an object representing [ImageVersion] 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 |
matchEnvironmentFromEnvironmentName(environmentName)
matchEnvironmentFromEnvironmentName(environmentName: string): string | number;
Parse the environment from Environment resource.
Name | Description |
environmentName |
string
A fully-qualified path representing Environment resource. |
Type | Description |
string | number | {string} A string representing the environment. |
matchLocationFromEnvironmentName(environmentName)
matchLocationFromEnvironmentName(environmentName: string): string | number;
Parse the location from Environment resource.
Name | Description |
environmentName |
string
A fully-qualified path representing Environment resource. |
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromEnvironmentName(environmentName)
matchProjectFromEnvironmentName(environmentName: string): string | number;
Parse the project from Environment resource.
Name | Description |
environmentName |
string
A fully-qualified path representing Environment resource. |
Type | Description |
string | number | {string} A string representing the project. |