Create an app profile object to interact with your app profile.
Package
@google-cloud/bigtable
Example
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance('my-instance');
const appProfile = instance.appProfile('my-app-profile');
Constructors
(constructor)(instance, id)
constructor(instance: Instance, id: string);
Constructs a new instance of the AppProfile
class
Parameters
Name | Description |
instance |
Instance
|
id |
string
|
Properties
bigtable
id
instance
metadata?: google.bigtable.admin.v2.IAppProfile;
name
Methods
create(options)
create(options: AppProfileOptions): Promise<CreateAppProfileResponse>;
Parameter
Returns
create(options, callback)
create(options: AppProfileOptions, callback: CreateAppProfileCallback): void;
Parameters
Returns
create(callback)
create(callback: CreateAppProfileCallback): void;
Parameter
Returns
delete(options)
delete(options?: DeleteAppProfileOptions): Promise<DeleteAppProfileResponse>;
Parameter
Returns
delete(options, callback)
delete(options: DeleteAppProfileOptions, callback: DeleteAppProfileCallback): void;
Parameters
Returns
delete(callback)
delete(callback: DeleteAppProfileCallback): void;
Parameter
Returns
exists(options)
exists(options?: CallOptions): Promise<AppProfileExistsResponse>;
Parameter
Name | Description |
options |
CallOptions
|
Returns
exists(options, callback)
exists(options: CallOptions, callback: AppProfileExistsCallback): void;
Parameters
Returns
exists(callback)
exists(callback: AppProfileExistsCallback): void;
Parameter
Returns
static formatAppProfile_(options: AppProfileOptions): google.bigtable.admin.v2.IAppProfile;
Formats a app profile options object into proto format.
Parameter
Returns
Type | Description |
IAppProfile | {object}
|
Example
// Any cluster routing:
Family.formatAppProfile_({
routing: 'any',
description: 'My App Profile',
});
// {
// multiClusterRoutingUseAny: {},
// description: 'My App Profile',
// }
// Single cluster routing:
const cluster = myInstance.cluster('my-cluster');
Family.formatAppProfile_({
routing: cluster,
allowTransactionalWrites: true,
description: 'My App Profile',
});
// {
// singleClusterRouting: {
// clusterId: 'my-cluster',
// allowTransactionalWrites: true,
// },
// description: 'My App Profile',
// }
get(options)
get(options?: CallOptions): Promise<GetAppProfileResponse>;
Parameter
Name | Description |
options |
CallOptions
|
Returns
get(options, callback)
get(options: CallOptions, callback: GetAppProfileCallback): void;
Parameters
Returns
get(callback)
get(callback: GetAppProfileCallback): void;
Parameter
Returns
getMetadata(options?: CallOptions): Promise<GetAppProfileMetadataResponse>;
Parameter
Name | Description |
options |
CallOptions
|
Returns
getMetadata(options: CallOptions, callback: GetAppProfileMetadataCallback): void;
Parameters
Returns
getMetadata(callback: GetAppProfileMetadataCallback): void;
Parameter
Returns
setMetadata(metadata: AppProfileOptions, options?: CallOptions): Promise<SetAppProfileMetadataResponse>;
Parameters
Returns
setMetadata(metadata: AppProfileOptions, options: CallOptions, callback: SetAppProfileMetadataCallback): void;
Parameters
Returns
setMetadata(metadata: AppProfileOptions, callback: SetAppProfileMetadataCallback): void;
Parameters
Returns