Configures and manages metastore federation services. Dataproc Metastore Federation Service allows federating a collection of backend metastores like BigQuery, Dataplex Lakes, and other Dataproc Metastores. The Federation Service exposes a gRPC URL through which metadata from the backend metastores are served at query time.
The Dataproc Metastore Federation API defines the following resource model: * The service works with a collection of Google Cloud projects. * Each project has a collection of available locations. * Each location has a collection of federations. * Dataproc Metastore Federations are resources with names of the form: projects/{project_number}/locations/{location_id}/federations/{federation_id}
. v1beta
Package
@google-cloud/dataproc-metastoreConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of DataprocMetastoreFederationClient.
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;
dataprocMetastoreFederationStub
dataprocMetastoreFederationStub?: Promise<{
[name: string]: Function;
}>;
descriptors
descriptors: Descriptors;
iamClient
iamClient: IamClient;
innerApiCalls
innerApiCalls: {
[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
backupPath(project, location, service, backup)
backupPath(project: string, location: string, service: string, backup: string): string;
Return a fully-qualified backup resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
service |
string
|
backup |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
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: ''});
checkCreateFederationProgress(name)
checkCreateFederationProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1beta.Federation, protos.google.cloud.metastore.v1beta.OperationMetadata>>;
Check the status of the long running operation returned by createFederation()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.metastore.v1beta.Federation, protos.google.cloud.metastore.v1beta.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 relative resource name of the location in which to create a
* federation service, in the following form:
* `projects/{project_number}/locations/{location_id}`.
*/
// const parent = 'abc123'
/**
* Required. The ID of the metastore federation, which is used as the final
* component of the metastore federation's name.
* This value must be between 2 and 63 characters long inclusive, begin with a
* letter, end with a letter or number, and consist of alpha-numeric
* ASCII characters or hyphens.
*/
// const federationId = 'abc123'
/**
* Required. The Metastore Federation to create. The `name` field is
* ignored. The ID of the created metastore federation must be
* provided in the request's `federation_id` field.
*/
// const federation = {}
/**
* Optional. A request ID. Specify a unique request ID to allow the server to
* ignore the request if it has completed. The server will ignore subsequent
* requests that provide a duplicate request ID for at least 60 minutes after
* the first request.
* For example, if an initial request times out, followed by another request
* with the same request ID, the server ignores the second request to prevent
* the creation of duplicate commitments.
* The request ID must be a valid
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
* A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
*/
// const requestId = 'abc123'
// Imports the Metastore library
const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta;
// Instantiates a client
const metastoreClient = new DataprocMetastoreFederationClient();
async function callCreateFederation() {
// Construct request
const request = {
parent,
federationId,
federation,
};
// Run request
const [operation] = await metastoreClient.createFederation(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateFederation();
checkDeleteFederationProgress(name)
checkDeleteFederationProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.metastore.v1beta.OperationMetadata>>;
Check the status of the long running operation returned by deleteFederation()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.metastore.v1beta.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 relative resource name of the metastore federation to delete,
* in the following form:
* `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
*/
// const name = 'abc123'
/**
* Optional. A request ID. Specify a unique request ID to allow the server to
* ignore the request if it has completed. The server will ignore subsequent
* requests that provide a duplicate request ID for at least 60 minutes after
* the first request.
* For example, if an initial request times out, followed by another request
* with the same request ID, the server ignores the second request to prevent
* the creation of duplicate commitments.
* The request ID must be a valid
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
* A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
*/
// const requestId = 'abc123'
// Imports the Metastore library
const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta;
// Instantiates a client
const metastoreClient = new DataprocMetastoreFederationClient();
async function callDeleteFederation() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await metastoreClient.deleteFederation(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteFederation();
checkUpdateFederationProgress(name)
checkUpdateFederationProgress(name: string): Promise<LROperation<protos.google.cloud.metastore.v1beta.Federation, protos.google.cloud.metastore.v1beta.OperationMetadata>>;
Check the status of the long running operation returned by updateFederation()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.metastore.v1beta.Federation, protos.google.cloud.metastore.v1beta.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. A field mask used to specify the fields to be overwritten in the
* metastore federation resource by the update.
* Fields specified in the `update_mask` are relative to the resource (not
* to the full request). A field is overwritten if it is in the mask.
*/
// const updateMask = {}
/**
* Required. The metastore federation to update. The server only merges fields
* in the service if they are specified in `update_mask`.
* The metastore federation's `name` field is used to identify the
* metastore service to be updated.
*/
// const federation = {}
/**
* Optional. A request ID. Specify a unique request ID to allow the server to
* ignore the request if it has completed. The server will ignore subsequent
* requests that provide a duplicate request ID for at least 60 minutes after
* the first request.
* For example, if an initial request times out, followed by another request
* with the same request ID, the server ignores the second request to prevent
* the creation of duplicate commitments.
* The request ID must be a valid
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
* A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
*/
// const requestId = 'abc123'
// Imports the Metastore library
const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta;
// Instantiates a client
const metastoreClient = new DataprocMetastoreFederationClient();
async function callUpdateFederation() {
// Construct request
const request = {
updateMask,
federation,
};
// Run request
const [operation] = await metastoreClient.updateFederation(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateFederation();
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. |
createFederation(request, options)
createFederation(request?: protos.google.cloud.metastore.v1beta.ICreateFederationRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a metastore federation in a project and location.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.ICreateFederationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.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 relative resource name of the location in which to create a
* federation service, in the following form:
* `projects/{project_number}/locations/{location_id}`.
*/
// const parent = 'abc123'
/**
* Required. The ID of the metastore federation, which is used as the final
* component of the metastore federation's name.
* This value must be between 2 and 63 characters long inclusive, begin with a
* letter, end with a letter or number, and consist of alpha-numeric
* ASCII characters or hyphens.
*/
// const federationId = 'abc123'
/**
* Required. The Metastore Federation to create. The `name` field is
* ignored. The ID of the created metastore federation must be
* provided in the request's `federation_id` field.
*/
// const federation = {}
/**
* Optional. A request ID. Specify a unique request ID to allow the server to
* ignore the request if it has completed. The server will ignore subsequent
* requests that provide a duplicate request ID for at least 60 minutes after
* the first request.
* For example, if an initial request times out, followed by another request
* with the same request ID, the server ignores the second request to prevent
* the creation of duplicate commitments.
* The request ID must be a valid
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
* A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
*/
// const requestId = 'abc123'
// Imports the Metastore library
const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta;
// Instantiates a client
const metastoreClient = new DataprocMetastoreFederationClient();
async function callCreateFederation() {
// Construct request
const request = {
parent,
federationId,
federation,
};
// Run request
const [operation] = await metastoreClient.createFederation(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateFederation();
createFederation(request, options, callback)
createFederation(request: protos.google.cloud.metastore.v1beta.ICreateFederationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.ICreateFederationRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createFederation(request, callback)
createFederation(request: protos.google.cloud.metastore.v1beta.ICreateFederationRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.ICreateFederationRequest
|
callback |
Callback<LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteFederation(request, options)
deleteFederation(request?: protos.google.cloud.metastore.v1beta.IDeleteFederationRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a single federation.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IDeleteFederationRequest
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.metastore.v1beta.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 relative resource name of the metastore federation to delete,
* in the following form:
* `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
*/
// const name = 'abc123'
/**
* Optional. A request ID. Specify a unique request ID to allow the server to
* ignore the request if it has completed. The server will ignore subsequent
* requests that provide a duplicate request ID for at least 60 minutes after
* the first request.
* For example, if an initial request times out, followed by another request
* with the same request ID, the server ignores the second request to prevent
* the creation of duplicate commitments.
* The request ID must be a valid
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
* A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
*/
// const requestId = 'abc123'
// Imports the Metastore library
const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta;
// Instantiates a client
const metastoreClient = new DataprocMetastoreFederationClient();
async function callDeleteFederation() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await metastoreClient.deleteFederation(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteFederation();
deleteFederation(request, options, callback)
deleteFederation(request: protos.google.cloud.metastore.v1beta.IDeleteFederationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IDeleteFederationRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteFederation(request, callback)
deleteFederation(request: protos.google.cloud.metastore.v1beta.IDeleteFederationRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IDeleteFederationRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.metastore.v1beta.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: ''});
federationPath(project, location, federation)
federationPath(project: string, location: string, federation: string): string;
Return a fully-qualified federation resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
federation |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
getFederation(request, options)
getFederation(request?: protos.google.cloud.metastore.v1beta.IGetFederationRequest, options?: CallOptions): Promise<[
protos.google.cloud.metastore.v1beta.IFederation,
protos.google.cloud.metastore.v1beta.IGetFederationRequest | undefined,
{} | undefined
]>;
Gets the details of a single federation.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IGetFederationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.metastore.v1beta.IFederation,
protos.google.cloud.metastore.v1beta.IGetFederationRequest | 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 relative resource name of the metastore federation to
* retrieve, in the following form:
* `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
*/
// const name = 'abc123'
// Imports the Metastore library
const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta;
// Instantiates a client
const metastoreClient = new DataprocMetastoreFederationClient();
async function callGetFederation() {
// Construct request
const request = {
name,
};
// Run request
const response = await metastoreClient.getFederation(request);
console.log(response);
}
callGetFederation();
getFederation(request, options, callback)
getFederation(request: protos.google.cloud.metastore.v1beta.IGetFederationRequest, options: CallOptions, callback: Callback<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IGetFederationRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IGetFederationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IGetFederationRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getFederation(request, callback)
getFederation(request: protos.google.cloud.metastore.v1beta.IGetFederationRequest, callback: Callback<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IGetFederationRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IGetFederationRequest
|
callback |
Callback<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IGetFederationRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getIamPolicy(request, options, callback)
getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.GetIamPolicyRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | 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<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | 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 . |
Returns | |
---|---|
Type | Description |
Promise<IamProtos.google.iam.v1.Policy> | {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. |
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. |
listFederations(request, options)
listFederations(request?: protos.google.cloud.metastore.v1beta.IListFederationsRequest, options?: CallOptions): Promise<[
protos.google.cloud.metastore.v1beta.IFederation[],
protos.google.cloud.metastore.v1beta.IListFederationsRequest | null,
protos.google.cloud.metastore.v1beta.IListFederationsResponse
]>;
Lists federations in a project and location.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IListFederationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.metastore.v1beta.IFederation[],
protos.google.cloud.metastore.v1beta.IListFederationsRequest | null,
protos.google.cloud.metastore.v1beta.IListFederationsResponse
]> | {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 |
listFederations(request, options, callback)
listFederations(request: protos.google.cloud.metastore.v1beta.IListFederationsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.metastore.v1beta.IListFederationsRequest, protos.google.cloud.metastore.v1beta.IListFederationsResponse | null | undefined, protos.google.cloud.metastore.v1beta.IFederation>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IListFederationsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.metastore.v1beta.IListFederationsRequest, protos.google.cloud.metastore.v1beta.IListFederationsResponse | null | undefined, protos.google.cloud.metastore.v1beta.IFederation>
|
Returns | |
---|---|
Type | Description |
void |
listFederations(request, callback)
listFederations(request: protos.google.cloud.metastore.v1beta.IListFederationsRequest, callback: PaginationCallback<protos.google.cloud.metastore.v1beta.IListFederationsRequest, protos.google.cloud.metastore.v1beta.IListFederationsResponse | null | undefined, protos.google.cloud.metastore.v1beta.IFederation>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IListFederationsRequest
|
callback |
PaginationCallback<protos.google.cloud.metastore.v1beta.IListFederationsRequest, protos.google.cloud.metastore.v1beta.IListFederationsResponse | null | undefined, protos.google.cloud.metastore.v1beta.IFederation>
|
Returns | |
---|---|
Type | Description |
void |
listFederationsAsync(request, options)
listFederationsAsync(request?: protos.google.cloud.metastore.v1beta.IListFederationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.metastore.v1beta.IFederation>;
Equivalent to listFederations
, 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.metastore.v1beta.IListFederationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.metastore.v1beta.IFederation> | {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 relative resource name of the location of metastore
* federations to list, in the following form:
* `projects/{project_number}/locations/{location_id}`.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of federations to return. The response may
* contain less than the maximum number. If unspecified, no more than 500
* services are returned. The maximum value is 1000; values above 1000 are
* changed to 1000.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous ListFederationServices
* call. Provide this token to retrieve the subsequent page.
* To retrieve the first page, supply an empty page token.
* When paginating, other parameters provided to
* ListFederationServices must match the call that provided the
* page token.
*/
// const pageToken = 'abc123'
/**
* Optional. The filter to apply to list results.
*/
// const filter = 'abc123'
/**
* Optional. Specify the ordering of results as described in Sorting
* Order (https://cloud.google.com/apis/design/design_patterns#sorting_order).
* If not specified, the results will be sorted in the default order.
*/
// const orderBy = 'abc123'
// Imports the Metastore library
const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta;
// Instantiates a client
const metastoreClient = new DataprocMetastoreFederationClient();
async function callListFederations() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await metastoreClient.listFederationsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListFederations();
listFederationsStream(request, options)
listFederationsStream(request?: protos.google.cloud.metastore.v1beta.IListFederationsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IListFederationsRequest
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. |
matchBackupFromBackupName(backupName)
matchBackupFromBackupName(backupName: string): string | number;
Parse the backup from Backup resource.
Parameter | |
---|---|
Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the backup. |
matchFederationFromFederationName(federationName)
matchFederationFromFederationName(federationName: string): string | number;
Parse the federation from Federation resource.
Parameter | |
---|---|
Name | Description |
federationName |
string
A fully-qualified path representing Federation resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the federation. |
matchLocationFromBackupName(backupName)
matchLocationFromBackupName(backupName: string): string | number;
Parse the location from Backup resource.
Parameter | |
---|---|
Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromFederationName(federationName)
matchLocationFromFederationName(federationName: string): string | number;
Parse the location from Federation resource.
Parameter | |
---|---|
Name | Description |
federationName |
string
A fully-qualified path representing Federation 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. |
matchLocationFromMetadataImportName(metadataImportName)
matchLocationFromMetadataImportName(metadataImportName: string): string | number;
Parse the location from MetadataImport resource.
Parameter | |
---|---|
Name | Description |
metadataImportName |
string
A fully-qualified path representing MetadataImport resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromServiceName(serviceName)
matchLocationFromServiceName(serviceName: string): string | number;
Parse the location from Service resource.
Parameter | |
---|---|
Name | Description |
serviceName |
string
A fully-qualified path representing Service resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchMetadataImportFromMetadataImportName(metadataImportName)
matchMetadataImportFromMetadataImportName(metadataImportName: string): string | number;
Parse the metadata_import from MetadataImport resource.
Parameter | |
---|---|
Name | Description |
metadataImportName |
string
A fully-qualified path representing MetadataImport resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the metadata_import. |
matchProjectFromBackupName(backupName)
matchProjectFromBackupName(backupName: string): string | number;
Parse the project from Backup resource.
Parameter | |
---|---|
Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromFederationName(federationName)
matchProjectFromFederationName(federationName: string): string | number;
Parse the project from Federation resource.
Parameter | |
---|---|
Name | Description |
federationName |
string
A fully-qualified path representing Federation 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. |
matchProjectFromMetadataImportName(metadataImportName)
matchProjectFromMetadataImportName(metadataImportName: string): string | number;
Parse the project from MetadataImport resource.
Parameter | |
---|---|
Name | Description |
metadataImportName |
string
A fully-qualified path representing MetadataImport 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. |
matchProjectFromServiceName(serviceName)
matchProjectFromServiceName(serviceName: string): string | number;
Parse the project from Service resource.
Parameter | |
---|---|
Name | Description |
serviceName |
string
A fully-qualified path representing Service resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchServiceFromBackupName(backupName)
matchServiceFromBackupName(backupName: string): string | number;
Parse the service from Backup resource.
Parameter | |
---|---|
Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the service. |
matchServiceFromMetadataImportName(metadataImportName)
matchServiceFromMetadataImportName(metadataImportName: string): string | number;
Parse the service from MetadataImport resource.
Parameter | |
---|---|
Name | Description |
metadataImportName |
string
A fully-qualified path representing MetadataImport resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the service. |
matchServiceFromServiceName(serviceName)
matchServiceFromServiceName(serviceName: string): string | number;
Parse the service from Service resource.
Parameter | |
---|---|
Name | Description |
serviceName |
string
A fully-qualified path representing Service resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the service. |
metadataImportPath(project, location, service, metadataImport)
metadataImportPath(project: string, location: string, service: string, metadataImport: string): string;
Return a fully-qualified metadataImport resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
service |
string
|
metadataImport |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
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. |
servicePath(project, location, service)
servicePath(project: string, location: string, service: string): string;
Return a fully-qualified service resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
service |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
setIamPolicy(request, options, callback)
setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.Policy>;
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.SetIamPolicyRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | 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<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | 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 . |
Returns | |
---|---|
Type | Description |
Promise<IamProtos.google.iam.v1.Policy> | {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. |
testIamPermissions(request, options, callback)
testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse>;
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.TestIamPermissionsRequest
The request object that will be sent. |
options |
gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | 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<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | 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 . |
Returns | |
---|---|
Type | Description |
Promise<IamProtos.google.iam.v1.TestIamPermissionsResponse> | {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. |
updateFederation(request, options)
updateFederation(request?: protos.google.cloud.metastore.v1beta.IUpdateFederationRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Updates the fields of a federation.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IUpdateFederationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.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. A field mask used to specify the fields to be overwritten in the
* metastore federation resource by the update.
* Fields specified in the `update_mask` are relative to the resource (not
* to the full request). A field is overwritten if it is in the mask.
*/
// const updateMask = {}
/**
* Required. The metastore federation to update. The server only merges fields
* in the service if they are specified in `update_mask`.
* The metastore federation's `name` field is used to identify the
* metastore service to be updated.
*/
// const federation = {}
/**
* Optional. A request ID. Specify a unique request ID to allow the server to
* ignore the request if it has completed. The server will ignore subsequent
* requests that provide a duplicate request ID for at least 60 minutes after
* the first request.
* For example, if an initial request times out, followed by another request
* with the same request ID, the server ignores the second request to prevent
* the creation of duplicate commitments.
* The request ID must be a valid
* UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
* A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
*/
// const requestId = 'abc123'
// Imports the Metastore library
const {DataprocMetastoreFederationClient} = require('@google-cloud/dataproc-metastore').v1beta;
// Instantiates a client
const metastoreClient = new DataprocMetastoreFederationClient();
async function callUpdateFederation() {
// Construct request
const request = {
updateMask,
federation,
};
// Run request
const [operation] = await metastoreClient.updateFederation(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateFederation();
updateFederation(request, options, callback)
updateFederation(request: protos.google.cloud.metastore.v1beta.IUpdateFederationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IUpdateFederationRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateFederation(request, callback)
updateFederation(request: protos.google.cloud.metastore.v1beta.IUpdateFederationRequest, callback: Callback<LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.metastore.v1beta.IUpdateFederationRequest
|
callback |
Callback<LROperation<protos.google.cloud.metastore.v1beta.IFederation, protos.google.cloud.metastore.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |