Class AppProfile (3.8.0)

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
NameDescription
instance Instance
id string

Properties

bigtable

bigtable: Bigtable;

id

id: string;

instance

instance: Instance;

metadata

metadata?: google.bigtable.admin.v2.IAppProfile;

name

name: string;

Methods

create(options)

create(options: AppProfileOptions): Promise<CreateAppProfileResponse>;
Parameter
NameDescription
options AppProfileOptions
Returns
TypeDescription
Promise<CreateAppProfileResponse>

create(options, callback)

create(options: AppProfileOptions, callback: CreateAppProfileCallback): void;
Parameters
NameDescription
options AppProfileOptions
callback CreateAppProfileCallback
Returns
TypeDescription
void

create(callback)

create(callback: CreateAppProfileCallback): void;
Parameter
NameDescription
callback CreateAppProfileCallback
Returns
TypeDescription
void

delete(options)

delete(options?: DeleteAppProfileOptions): Promise<DeleteAppProfileResponse>;
Parameter
NameDescription
options DeleteAppProfileOptions
Returns
TypeDescription
Promise<DeleteAppProfileResponse>

delete(options, callback)

delete(options: DeleteAppProfileOptions, callback: DeleteAppProfileCallback): void;
Parameters
NameDescription
options DeleteAppProfileOptions
callback DeleteAppProfileCallback
Returns
TypeDescription
void

delete(callback)

delete(callback: DeleteAppProfileCallback): void;
Parameter
NameDescription
callback DeleteAppProfileCallback
Returns
TypeDescription
void

exists(options)

exists(options?: CallOptions): Promise<AppProfileExistsResponse>;
Parameter
NameDescription
options CallOptions
Returns
TypeDescription
Promise<AppProfileExistsResponse>

exists(options, callback)

exists(options: CallOptions, callback: AppProfileExistsCallback): void;
Parameters
NameDescription
options CallOptions
callback AppProfileExistsCallback
Returns
TypeDescription
void

exists(callback)

exists(callback: AppProfileExistsCallback): void;
Parameter
NameDescription
callback AppProfileExistsCallback
Returns
TypeDescription
void

formatAppProfile_(options)

static formatAppProfile_(options: AppProfileOptions): google.bigtable.admin.v2.IAppProfile;

Formats a app profile options object into proto format.

Parameter
NameDescription
options AppProfileOptions

The options object.

Returns
TypeDescription
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
NameDescription
options CallOptions
Returns
TypeDescription
Promise<GetAppProfileResponse>

get(options, callback)

get(options: CallOptions, callback: GetAppProfileCallback): void;
Parameters
NameDescription
options CallOptions
callback GetAppProfileCallback
Returns
TypeDescription
void

get(callback)

get(callback: GetAppProfileCallback): void;
Parameter
NameDescription
callback GetAppProfileCallback
Returns
TypeDescription
void

getMetadata(options)

getMetadata(options?: CallOptions): Promise<GetAppProfileMetadataResponse>;
Parameter
NameDescription
options CallOptions
Returns
TypeDescription
Promise<GetAppProfileMetadataResponse>

getMetadata(options, callback)

getMetadata(options: CallOptions, callback: GetAppProfileMetadataCallback): void;
Parameters
NameDescription
options CallOptions
callback GetAppProfileMetadataCallback
Returns
TypeDescription
void

getMetadata(callback)

getMetadata(callback: GetAppProfileMetadataCallback): void;
Parameter
NameDescription
callback GetAppProfileMetadataCallback
Returns
TypeDescription
void

setMetadata(metadata, options)

setMetadata(metadata: AppProfileOptions, options?: CallOptions): Promise<SetAppProfileMetadataResponse>;
Parameters
NameDescription
metadata AppProfileOptions
options CallOptions
Returns
TypeDescription
Promise<SetAppProfileMetadataResponse>

setMetadata(metadata, options, callback)

setMetadata(metadata: AppProfileOptions, options: CallOptions, callback: SetAppProfileMetadataCallback): void;
Parameters
NameDescription
metadata AppProfileOptions
options CallOptions
callback SetAppProfileMetadataCallback
Returns
TypeDescription
void

setMetadata(metadata, callback)

setMetadata(metadata: AppProfileOptions, callback: SetAppProfileMetadataCallback): void;
Parameters
NameDescription
metadata AppProfileOptions
callback SetAppProfileMetadataCallback
Returns
TypeDescription
void