v1beta4
Package
@google-cloud/sqlConstructors
(constructor)(opts, gaxInstance)
constructor
(
opts
?:
ClientOptions
,
gaxInstance
?:
typeof
gax
|
typeof
gax
.
fallback
);
Construct an instance of SqlInstancesServiceClient.
opts
ClientOptions
gaxInstance
typeof gax
| typeof fallback
: loaded instance of google-gax
. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new SqlInstancesServiceClient({fallback: true}, gax); ```
Properties
apiEndpoint
get
apiEndpoint
()
:
string
;
The DNS address for this API service.
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath.
auth
auth
:
gax
.
GoogleAuth
;
descriptors
descriptors
:
Descriptors
;
innerApiCalls
innerApiCalls
:
{
[
name
:
string
]
:
Function
;
};
locationsClient
locationsClient
:
LocationsClient
;
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.
sqlInstancesServiceStub
sqlInstancesServiceStub
?:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
universeDomain
get
universeDomain
()
:
string
;
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Methods
acquireSsrsLease(request, options)
acquireSsrsLease
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseResponse
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseRequest
|
undefined
),
{}
|
undefined
]>;
Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.ISqlInstancesAcquireSsrsLeaseResponse
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesAcquireSsrsLeaseRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing SqlInstancesAcquireSsrsLeaseResponse . Please see the documentation 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. Cloud SQL instance ID. This doesn't include the project ID. It's
* composed of lowercase letters, numbers, and hyphens, and it must start with
* a letter. The total length must be 98 characters or less (Example:
* instance-id).
*/
// const instance = 'abc123'
/**
* Required. ID of the project that contains the instance (Example:
* project-id).
*/
// const project = 'my-project'
/**
* The body for request to acquire an SSRS lease.
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callAcquireSsrsLease
()
{
// Construct request
const
request
=
{
instance
,
project
,
};
// Run request
const
response
=
await
sqlClient
.
acquireSsrsLease
(
request
);
console
.
log
(
response
);
}
callAcquireSsrsLease
();
acquireSsrsLease(request, options, callback)
acquireSsrsLease
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesAcquireSsrsLeaseResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesAcquireSsrsLeaseRequest
| null | undefined, {} | null | undefined>
void
acquireSsrsLease(request, callback)
acquireSsrsLease
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAcquireSsrsLeaseRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesAcquireSsrsLeaseResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesAcquireSsrsLeaseRequest
| null | undefined, {} | null | undefined>
void
addServerCa(request, options)
addServerCa
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAddServerCaRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAddServerCaRequest
|
undefined
),
{}
|
undefined
]>;
Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callAddServerCa
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
addServerCa
(
request
);
console
.
log
(
response
);
}
callAddServerCa
();
addServerCa(request, options, callback)
addServerCa
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAddServerCaRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAddServerCaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest
| null | undefined, {} | null | undefined>
void
addServerCa(request, callback)
addServerCa
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAddServerCaRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesAddServerCaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesAddServerCaRequest
| null | undefined, {} | null | undefined>
void
clone(request, options)
clone
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCloneRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCloneRequest
|
undefined
,
{}
|
undefined
]>;
Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* The ID of the Cloud SQL instance to be cloned (source). This does not
* include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the source as well as the clone Cloud SQL instance.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callClone
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
clone
(
request
);
console
.
log
(
response
);
}
callClone
();
clone(request, options, callback)
clone
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCloneRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCloneRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest
| null | undefined, {} | null | undefined>
void
clone(request, callback)
clone
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCloneRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCloneRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesCloneRequest
| null | undefined, {} | null | undefined>
void
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.
Promise
<void>
{Promise} A promise that resolves when the client is closed.
createEphemeral(request, options)
createEphemeral
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCreateEphemeralCertRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISslCert
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCreateEphemeralCertRequest
|
undefined
),
{}
|
undefined
]>;
Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.ISslCert
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesCreateEphemeralCertRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing SslCert . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the Cloud SQL project.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callCreateEphemeral
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
createEphemeral
(
request
);
console
.
log
(
response
);
}
callCreateEphemeral
();
createEphemeral(request, options, callback)
createEphemeral
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCreateEphemeralCertRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISslCert
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCreateEphemeralCertRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.ISslCert
, protos.google.cloud.sql.v1beta4.ISqlInstancesCreateEphemeralCertRequest
| null | undefined, {} | null | undefined>
void
createEphemeral(request, callback)
createEphemeral
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCreateEphemeralCertRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISslCert
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesCreateEphemeralCertRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.ISslCert
, protos.google.cloud.sql.v1beta4.ISqlInstancesCreateEphemeralCertRequest
| null | undefined, {} | null | undefined>
void
delete(request, options)
delete
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDeleteRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDeleteRequest
|
undefined
,
{}
|
undefined
]>;
Deletes a Cloud SQL instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance to be deleted.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callDelete
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
delete
(
request
);
console
.
log
(
response
);
}
callDelete
();
delete(request, options, callback)
delete
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDeleteRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDeleteRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest
| null | undefined, {} | null | undefined>
void
delete(request, callback)
delete
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDeleteRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDeleteRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesDeleteRequest
| null | undefined, {} | null | undefined>
void
demote(request, options)
demote
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteRequest
|
undefined
,
{}
|
undefined
]>;
Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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 Cloud SQL instance.
*/
// const instance = 'abc123'
/**
* Required. The project ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
* The request body.
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callDemote
()
{
// Construct request
const
request
=
{
instance
,
project
,
};
// Run request
const
response
=
await
sqlClient
.
demote
(
request
);
console
.
log
(
response
);
}
callDemote
();
demote(request, options, callback)
demote
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest
| null | undefined, {} | null | undefined>
void
demote(request, callback)
demote
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteRequest
| null | undefined, {} | null | undefined>
void
demoteMaster(request, options)
demoteMaster
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteMasterRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteMasterRequest
|
undefined
),
{}
|
undefined
]>;
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance name.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callDemoteMaster
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
demoteMaster
(
request
);
console
.
log
(
response
);
}
callDemoteMaster
();
demoteMaster(request, options, callback)
demoteMaster
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteMasterRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteMasterRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest
| null | undefined, {} | null | undefined>
void
demoteMaster(request, callback)
demoteMaster
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteMasterRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesDemoteMasterRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesDemoteMasterRequest
| null | undefined, {} | null | undefined>
void
export(request, options)
export
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesExportRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesExportRequest
|
undefined
,
{}
|
undefined
]>;
Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* The Cloud SQL instance ID. This doesn't include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance to be exported.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callExport
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
export
(
request
);
console
.
log
(
response
);
}
callExport
();
export(request, options, callback)
export
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesExportRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesExportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest
| null | undefined, {} | null | undefined>
void
export(request, callback)
export
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesExportRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesExportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesExportRequest
| null | undefined, {} | null | undefined>
void
failover(request, options)
failover
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesFailoverRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesFailoverRequest
|
undefined
,
{}
|
undefined
]>;
Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the [Overview of high availability]( https://cloud.google.com/sql/docs/mysql/high-availability ) page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the read replica.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callFailover
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
failover
(
request
);
console
.
log
(
response
);
}
callFailover
();
failover(request, options, callback)
failover
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesFailoverRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesFailoverRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest
| null | undefined, {} | null | undefined>
void
failover(request, callback)
failover
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesFailoverRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesFailoverRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesFailoverRequest
| null | undefined, {} | null | undefined>
void
get(request, options)
get
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IDatabaseInstance
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetRequest
|
undefined
,
{}
|
undefined
]>;
Retrieves a resource containing information about a Cloud SQL instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IDatabaseInstance
, protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Database instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callGet
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
get
(
request
);
console
.
log
(
response
);
}
callGet
();
get(request, options, callback)
get
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IDatabaseInstance
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IDatabaseInstance
, protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest
| null | undefined, {} | null | undefined>
void
get(request, callback)
get
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IDatabaseInstance
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IDatabaseInstance
, protos.google.cloud.sql.v1beta4.ISqlInstancesGetRequest
| null | undefined, {} | null | undefined>
void
getDiskShrinkConfig(request, options)
getDiskShrinkConfig
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigResponse
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigRequest
|
undefined
),
{}
|
undefined
]>;
Get Disk Shrink Config for a given instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.ISqlInstancesGetDiskShrinkConfigResponse
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesGetDiskShrinkConfigRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing SqlInstancesGetDiskShrinkConfigResponse . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callGetDiskShrinkConfig
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
getDiskShrinkConfig
(
request
);
console
.
log
(
response
);
}
callGetDiskShrinkConfig
();
getDiskShrinkConfig(request, options, callback)
getDiskShrinkConfig
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesGetDiskShrinkConfigResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesGetDiskShrinkConfigRequest
| null | undefined, {} | null | undefined>
void
getDiskShrinkConfig(request, callback)
getDiskShrinkConfig
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetDiskShrinkConfigRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesGetDiskShrinkConfigResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesGetDiskShrinkConfigRequest
| null | undefined, {} | null | undefined>
void
getLatestRecoveryTime(request, options)
getLatestRecoveryTime
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeResponse
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeRequest
|
undefined
),
{}
|
undefined
]>;
Get Latest Recovery Time for a given instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.ISqlInstancesGetLatestRecoveryTimeResponse
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesGetLatestRecoveryTimeRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing SqlInstancesGetLatestRecoveryTimeResponse . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callGetLatestRecoveryTime
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
getLatestRecoveryTime
(
request
);
console
.
log
(
response
);
}
callGetLatestRecoveryTime
();
getLatestRecoveryTime(request, options, callback)
getLatestRecoveryTime
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesGetLatestRecoveryTimeResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesGetLatestRecoveryTimeRequest
| null | undefined, {} | null | undefined>
void
getLatestRecoveryTime(request, callback)
getLatestRecoveryTime
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesGetLatestRecoveryTimeRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesGetLatestRecoveryTimeResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesGetLatestRecoveryTimeRequest
| null | undefined, {} | null | undefined>
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.
request
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent.
options
CallOptions
| Callback
< google.cloud.location.ILocation
, google.cloud.location.IGetLocationRequest
| null | undefined, {} | null | undefined>
Call options. See CallOptions for more details.
callback
Callback
< google.cloud.location.ILocation
, google.cloud.location.IGetLocationRequest
| null | undefined, {} | null | undefined>
Promise
< 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 for more details and examples.
const
[
response
]
=
await
client
.
getLocation
(
request
);
getProjectId()
getProjectId
()
:
Promise<string>
;
Promise
<string>
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
callback
Callback
<string, undefined, undefined>
void
import(request, options)
import
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesImportRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesImportRequest
|
undefined
,
{}
|
undefined
]>;
Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callImport
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
import
(
request
);
console
.
log
(
response
);
}
callImport
();
import(request, options, callback)
import
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesImportRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesImportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest
| null | undefined, {} | null | undefined>
void
import(request, callback)
import
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesImportRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesImportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesImportRequest
| null | undefined, {} | null | undefined>
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.
Promise
<{
[name: string]: Function
;
}>
{Promise} A promise that resolves to an authenticated service stub.
insert(request, options)
insert
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesInsertRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesInsertRequest
|
undefined
,
{}
|
undefined
]>;
Creates a new Cloud SQL instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Project ID of the project to which the newly created Cloud SQL instances
* should belong.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callInsert
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
insert
(
request
);
console
.
log
(
response
);
}
callInsert
();
insert(request, options, callback)
insert
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesInsertRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesInsertRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest
| null | undefined, {} | null | undefined>
void
insert(request, callback)
insert
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesInsertRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesInsertRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesInsertRequest
| null | undefined, {} | null | undefined>
void
list(request, options)
list
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IInstancesListResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListRequest
|
undefined
,
{}
|
undefined
]>;
Lists instances under a given project.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IInstancesListResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing InstancesListResponse . Please see the documentation 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.
*/
/**
* A filter expression that filters resources listed in the response.
* The expression is in the form of field:value. For example,
* 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per
* their JSON representation, such as 'settings.userLabels.auto_start:true'.
* Multiple filter queries are space-separated. For example.
* 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each
* expression is an AND expression. However, you can include AND and OR
* expressions explicitly.
*/
// const filter = 'abc123'
/**
* The maximum number of instances to return. The service may return fewer
* than this value.
* If unspecified, at most 500 instances are returned.
* The maximum value is 1000; values above 1000 are coerced to 1000.
*/
// const maxResults = 1234
/**
* A previously-returned page token representing part of the larger set of
* results to view.
*/
// const pageToken = 'abc123'
/**
* Project ID of the project for which to list Cloud SQL instances.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callList
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
list
(
request
);
console
.
log
(
response
);
}
callList
();
list(request, options, callback)
list
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IInstancesListResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IInstancesListResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest
| null | undefined, {} | null | undefined>
void
list(request, callback)
list
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IInstancesListResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IInstancesListResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesListRequest
| null | undefined, {} | null | undefined>
void
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.
request
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent.
options
AsyncIterable
< google.cloud.location.ILocation
>
{Object} An iterable Object that allows async iteration . 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 for more details and examples.
const
iterable
=
client
.
listLocationsAsync
(
request
);
for
await
(
const
response
of
iterable
)
{
// process response
}
listServerCas(request, options)
listServerCas
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListServerCasRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IInstancesListServerCasResponse
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListServerCasRequest
|
undefined
),
{}
|
undefined
]>;
Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IInstancesListServerCasResponse
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing InstancesListServerCasResponse . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callListServerCas
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
listServerCas
(
request
);
console
.
log
(
response
);
}
callListServerCas
();
listServerCas(request, options, callback)
listServerCas
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListServerCasRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IInstancesListServerCasResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListServerCasRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IInstancesListServerCasResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest
| null | undefined, {} | null | undefined>
void
listServerCas(request, callback)
listServerCas
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListServerCasRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IInstancesListServerCasResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesListServerCasRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IInstancesListServerCasResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesListServerCasRequest
| null | undefined, {} | null | undefined>
void
patch(request, options)
patch
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPatchRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPatchRequest
|
undefined
,
{}
|
undefined
]>;
Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callPatch
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
patch
(
request
);
console
.
log
(
response
);
}
callPatch
();
patch(request, options, callback)
patch
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPatchRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPatchRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest
| null | undefined, {} | null | undefined>
void
patch(request, callback)
patch
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPatchRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPatchRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesPatchRequest
| null | undefined, {} | null | undefined>
void
performDiskShrink(request, options)
performDiskShrink
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPerformDiskShrinkRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPerformDiskShrinkRequest
|
undefined
),
{}
|
undefined
]>;
Perform Disk Shrink on primary instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesPerformDiskShrinkRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
* Perform disk shrink context.
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callPerformDiskShrink
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
performDiskShrink
(
request
);
console
.
log
(
response
);
}
callPerformDiskShrink
();
performDiskShrink(request, options, callback)
performDiskShrink
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPerformDiskShrinkRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPerformDiskShrinkRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesPerformDiskShrinkRequest
| null | undefined, {} | null | undefined>
void
performDiskShrink(request, callback)
performDiskShrink
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPerformDiskShrinkRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPerformDiskShrinkRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesPerformDiskShrinkRequest
| null | undefined, {} | null | undefined>
void
promoteReplica(request, options)
promoteReplica
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPromoteReplicaRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPromoteReplicaRequest
|
undefined
),
{}
|
undefined
]>;
Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL read replica instance name.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the read replica.
*/
// const project = 'my-project'
/**
* Set to true if the promote operation should attempt to re-add the original
* primary as a replica when it comes back online. Otherwise, if this value is
* false or not set, the original primary will be a standalone instance.
*/
// const failover = true
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callPromoteReplica
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
promoteReplica
(
request
);
console
.
log
(
response
);
}
callPromoteReplica
();
promoteReplica(request, options, callback)
promoteReplica
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPromoteReplicaRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPromoteReplicaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest
| null | undefined, {} | null | undefined>
void
promoteReplica(request, callback)
promoteReplica
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPromoteReplicaRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesPromoteReplicaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesPromoteReplicaRequest
| null | undefined, {} | null | undefined>
void
reencrypt(request, options)
reencrypt
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReencryptRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReencryptRequest
|
undefined
,
{}
|
undefined
]>;
Reencrypt CMEK instance with latest key version.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
* Reencrypt body that users request
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callReencrypt
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
reencrypt
(
request
);
console
.
log
(
response
);
}
callReencrypt
();
reencrypt(request, options, callback)
reencrypt
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReencryptRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReencryptRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest
| null | undefined, {} | null | undefined>
void
reencrypt(request, callback)
reencrypt
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReencryptRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReencryptRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesReencryptRequest
| null | undefined, {} | null | undefined>
void
releaseSsrsLease(request, options)
releaseSsrsLease
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseResponse
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseRequest
|
undefined
),
{}
|
undefined
]>;
Release a lease for the setup of SQL Server Reporting Services (SSRS).
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.ISqlInstancesReleaseSsrsLeaseResponse
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesReleaseSsrsLeaseRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing SqlInstancesReleaseSsrsLeaseResponse . Please see the documentation 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 Cloud SQL instance ID. This doesn't include the project ID.
* It's composed of lowercase letters, numbers, and hyphens, and it must start
* with a letter. The total length must be 98 characters or less (Example:
* instance-id).
*/
// const instance = 'abc123'
/**
* Required. The ID of the project that contains the instance (Example:
* project-id).
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callReleaseSsrsLease
()
{
// Construct request
const
request
=
{
instance
,
project
,
};
// Run request
const
response
=
await
sqlClient
.
releaseSsrsLease
(
request
);
console
.
log
(
response
);
}
callReleaseSsrsLease
();
releaseSsrsLease(request, options, callback)
releaseSsrsLease
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesReleaseSsrsLeaseResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesReleaseSsrsLeaseRequest
| null | undefined, {} | null | undefined>
void
releaseSsrsLease(request, callback)
releaseSsrsLease
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesReleaseSsrsLeaseRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesReleaseSsrsLeaseResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesReleaseSsrsLeaseRequest
| null | undefined, {} | null | undefined>
void
rescheduleMaintenance(request, options)
rescheduleMaintenance
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRescheduleMaintenanceRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRescheduleMaintenanceRequest
|
undefined
),
{}
|
undefined
]>;
Reschedules the maintenance on the given instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesRescheduleMaintenanceRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callRescheduleMaintenance
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
rescheduleMaintenance
(
request
);
console
.
log
(
response
);
}
callRescheduleMaintenance
();
rescheduleMaintenance(request, options, callback)
rescheduleMaintenance
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRescheduleMaintenanceRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRescheduleMaintenanceRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRescheduleMaintenanceRequest
| null | undefined, {} | null | undefined>
void
rescheduleMaintenance(request, callback)
rescheduleMaintenance
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRescheduleMaintenanceRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRescheduleMaintenanceRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRescheduleMaintenanceRequest
| null | undefined, {} | null | undefined>
void
resetReplicaSize(request, options)
resetReplicaSize
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetReplicaSizeRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetReplicaSizeRequest
|
undefined
),
{}
|
undefined
]>;
Reset Replica Size to primary instance disk size.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesResetReplicaSizeRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL read replica instance name.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the read replica.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callResetReplicaSize
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
resetReplicaSize
(
request
);
console
.
log
(
response
);
}
callResetReplicaSize
();
resetReplicaSize(request, options, callback)
resetReplicaSize
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetReplicaSizeRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetReplicaSizeRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesResetReplicaSizeRequest
| null | undefined, {} | null | undefined>
void
resetReplicaSize(request, callback)
resetReplicaSize
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetReplicaSizeRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetReplicaSizeRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesResetReplicaSizeRequest
| null | undefined, {} | null | undefined>
void
resetSslConfig(request, options)
resetSslConfig
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetSslConfigRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetSslConfigRequest
|
undefined
),
{}
|
undefined
]>;
Deletes all client certificates and generates a new server SSL certificate for the instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callResetSslConfig
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
resetSslConfig
(
request
);
console
.
log
(
response
);
}
callResetSslConfig
();
resetSslConfig(request, options, callback)
resetSslConfig
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetSslConfigRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetSslConfigRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest
| null | undefined, {} | null | undefined>
void
resetSslConfig(request, callback)
resetSslConfig
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetSslConfigRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesResetSslConfigRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesResetSslConfigRequest
| null | undefined, {} | null | undefined>
void
restart(request, options)
restart
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestartRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestartRequest
|
undefined
,
{}
|
undefined
]>;
Restarts a Cloud SQL instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance to be restarted.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callRestart
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
restart
(
request
);
console
.
log
(
response
);
}
callRestart
();
restart(request, options, callback)
restart
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestartRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestartRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest
| null | undefined, {} | null | undefined>
void
restart(request, callback)
restart
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestartRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestartRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRestartRequest
| null | undefined, {} | null | undefined>
void
restoreBackup(request, options)
restoreBackup
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestoreBackupRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestoreBackupRequest
|
undefined
),
{}
|
undefined
]>;
Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callRestoreBackup
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
restoreBackup
(
request
);
console
.
log
(
response
);
}
callRestoreBackup
();
restoreBackup(request, options, callback)
restoreBackup
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestoreBackupRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestoreBackupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest
| null | undefined, {} | null | undefined>
void
restoreBackup(request, callback)
restoreBackup
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestoreBackupRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRestoreBackupRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRestoreBackupRequest
| null | undefined, {} | null | undefined>
void
rotateServerCa(request, options)
rotateServerCa
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRotateServerCaRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRotateServerCaRequest
|
undefined
),
{}
|
undefined
]>;
Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callRotateServerCa
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
rotateServerCa
(
request
);
console
.
log
(
response
);
}
callRotateServerCa
();
rotateServerCa(request, options, callback)
rotateServerCa
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRotateServerCaRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRotateServerCaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest
| null | undefined, {} | null | undefined>
void
rotateServerCa(request, callback)
rotateServerCa
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRotateServerCaRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesRotateServerCaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesRotateServerCaRequest
| null | undefined, {} | null | undefined>
void
startExternalSync(request, options)
startExternalSync
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartExternalSyncRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartExternalSyncRequest
|
undefined
),
{}
|
undefined
]>;
Start External primary instance migration.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesStartExternalSyncRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
* External sync mode.
*/
// const syncMode = {}
/**
* Whether to skip the verification step (VESS).
*/
// const skipVerification = true
/**
* MySQL-specific settings for start external sync.
*/
// const mysqlSyncConfig = {}
/**
* Optional. Parallel level for initial data sync. Currently only applicable
* for MySQL.
*/
// const syncParallelLevel = {}
/**
* Optional. MigrationType decides if the migration is a physical file based
* migration or logical migration.
*/
// const migrationType = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callStartExternalSync
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
startExternalSync
(
request
);
console
.
log
(
response
);
}
callStartExternalSync
();
startExternalSync(request, options, callback)
startExternalSync
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartExternalSyncRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartExternalSyncRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesStartExternalSyncRequest
| null | undefined, {} | null | undefined>
void
startExternalSync(request, callback)
startExternalSync
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartExternalSyncRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartExternalSyncRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesStartExternalSyncRequest
| null | undefined, {} | null | undefined>
void
startReplica(request, options)
startReplica
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartReplicaRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartReplicaRequest
|
undefined
),
{}
|
undefined
]>;
Starts the replication in the read replica instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesStartReplicaRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL read replica instance name.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the read replica.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callStartReplica
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
startReplica
(
request
);
console
.
log
(
response
);
}
callStartReplica
();
startReplica(request, options, callback)
startReplica
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartReplicaRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartReplicaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesStartReplicaRequest
| null | undefined, {} | null | undefined>
void
startReplica(request, callback)
startReplica
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartReplicaRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStartReplicaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesStartReplicaRequest
| null | undefined, {} | null | undefined>
void
stopReplica(request, options)
stopReplica
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStopReplicaRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStopReplicaRequest
|
undefined
),
{}
|
undefined
]>;
Stops the replication in the read replica instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesStopReplicaRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL read replica instance name.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the read replica.
*/
// const project = 'my-project'
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callStopReplica
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
stopReplica
(
request
);
console
.
log
(
response
);
}
callStopReplica
();
stopReplica(request, options, callback)
stopReplica
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStopReplicaRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStopReplicaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesStopReplicaRequest
| null | undefined, {} | null | undefined>
void
stopReplica(request, callback)
stopReplica
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStopReplicaRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesStopReplicaRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesStopReplicaRequest
| null | undefined, {} | null | undefined>
void
switchover(request, options)
switchover
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesSwitchoverRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesSwitchoverRequest
|
undefined
),
{}
|
undefined
]>;
Switches over from the primary instance to a replica instance.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL read replica instance name.
*/
// const instance = 'abc123'
/**
* ID of the project that contains the replica.
*/
// const project = 'my-project'
/**
* Optional. (MySQL only) Cloud SQL instance operations timeout, which is a
* sum of all database operations. Default value is 10 minutes and can be
* modified to a maximum value of 24 hours.
*/
// const dbTimeout = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callSwitchover
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
switchover
(
request
);
console
.
log
(
response
);
}
callSwitchover
();
switchover(request, options, callback)
switchover
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesSwitchoverRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesSwitchoverRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest
| null | undefined, {} | null | undefined>
void
switchover(request, callback)
switchover
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesSwitchoverRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesSwitchoverRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesSwitchoverRequest
| null | undefined, {} | null | undefined>
void
truncateLog(request, options)
truncateLog
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesTruncateLogRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesTruncateLogRequest
|
undefined
),
{}
|
undefined
]>;
Truncate MySQL general and slow query log tables MySQL only.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesTruncateLogRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the Cloud SQL project.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callTruncateLog
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
truncateLog
(
request
);
console
.
log
(
response
);
}
callTruncateLog
();
truncateLog(request, options, callback)
truncateLog
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesTruncateLogRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesTruncateLogRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesTruncateLogRequest
| null | undefined, {} | null | undefined>
void
truncateLog(request, callback)
truncateLog
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesTruncateLogRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesTruncateLogRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesTruncateLogRequest
| null | undefined, {} | null | undefined>
void
update(request, options)
update
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesUpdateRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesUpdateRequest
|
undefined
,
{}
|
undefined
]>;
Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesUpdateRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
*/
// const body = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callUpdate
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
update
(
request
);
console
.
log
(
response
);
}
callUpdate
();
update(request, options, callback)
update
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesUpdateRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesUpdateRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesUpdateRequest
| null | undefined, {} | null | undefined>
void
update(request, callback)
update
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesUpdateRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesUpdateRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1beta4.IOperation
, protos.google.cloud.sql.v1beta4.ISqlInstancesUpdateRequest
| null | undefined, {} | null | undefined>
void
verifyExternalSyncSettings(request, options)
verifyExternalSyncSettings
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsResponse
,
(
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsRequest
|
undefined
),
{}
|
undefined
]>;
Verify External primary instance external sync settings.
request
options
Promise
<[ protos.google.cloud.sql.v1beta4.ISqlInstancesVerifyExternalSyncSettingsResponse
,
( protos.google.cloud.sql.v1beta4.ISqlInstancesVerifyExternalSyncSettingsRequest
| undefined),
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing SqlInstancesVerifyExternalSyncSettingsResponse . Please see the documentation 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.
*/
/**
* Cloud SQL instance ID. This does not include the project ID.
*/
// const instance = 'abc123'
/**
* Project ID of the project that contains the instance.
*/
// const project = 'my-project'
/**
* Flag to enable verifying connection only
*/
// const verifyConnectionOnly = true
/**
* External sync mode
*/
// const syncMode = {}
/**
* Optional. Flag to verify settings required by replication setup only
*/
// const verifyReplicationOnly = true
/**
* Optional. MySQL-specific settings for start external sync.
*/
// const mysqlSyncConfig = {}
/**
* Optional. MigrationType field decides if the migration is a physical file
* based migration or logical migration
*/
// const migrationType = {}
/**
* Optional. Parallel level for initial data sync. Currently only applicable
* for PostgreSQL.
*/
// const syncParallelLevel = {}
// Imports the Sql library
const
{
SqlInstancesServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1beta4
;
// Instantiates a client
const
sqlClient
=
new
SqlInstancesServiceClient
();
async
function
callVerifyExternalSyncSettings
()
{
// Construct request
const
request
=
{
};
// Run request
const
response
=
await
sqlClient
.
verifyExternalSyncSettings
(
request
);
console
.
log
(
response
);
}
callVerifyExternalSyncSettings
();
verifyExternalSyncSettings(request, options, callback)
verifyExternalSyncSettings
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesVerifyExternalSyncSettingsResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesVerifyExternalSyncSettingsRequest
| null | undefined, {} | null | undefined>
void
verifyExternalSyncSettings(request, callback)
verifyExternalSyncSettings
(
request
:
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsResponse
,
protos
.
google
.
cloud
.
sql
.
v1beta4
.
ISqlInstancesVerifyExternalSyncSettingsRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
callback
Callback
< protos.google.cloud.sql.v1beta4.ISqlInstancesVerifyExternalSyncSettingsResponse
, protos.google.cloud.sql.v1beta4.ISqlInstancesVerifyExternalSyncSettingsRequest
| null | undefined, {} | null | undefined>
void

