Service to manage SSL certs for Cloud SQL instances. v1
Package
@google-cloud/sqlConstructors
(constructor)(opts, gaxInstance)
constructor
(
opts
?:
ClientOptions
,
gaxInstance
?:
typeof
gax
|
typeof
gax
.
fallback
);
Construct an instance of SqlSslCertsServiceClient.
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 SqlSslCertsServiceClient({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.
sqlSslCertsServiceStub
sqlSslCertsServiceStub
?:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
universeDomain
get
universeDomain
()
:
string
;
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Methods
close()
close
()
:
Promise<void>
;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Promise
<void>
{Promise} A promise that resolves when the client is closed.
delete(request, options)
delete
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsDeleteRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsDeleteRequest
|
undefined
,
{}
|
undefined
]>;
Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.
request
options
Promise
<[ protos.google.cloud.sql.v1.IOperation
, protos.google.cloud.sql.v1.ISqlSslCertsDeleteRequest
| 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'
/**
* Sha1 FingerPrint.
*/
// const sha1Fingerprint = 'abc123'
// Imports the Sql library
const
{
SqlSslCertsServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1
;
// Instantiates a client
const
sqlClient
=
new
SqlSslCertsServiceClient
();
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
.
v1
.
ISqlSslCertsDeleteRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsDeleteRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1.IOperation
, protos.google.cloud.sql.v1.ISqlSslCertsDeleteRequest
| null | undefined, {} | null | undefined>
void
delete(request, callback)
delete
(
request
:
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsDeleteRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1
.
IOperation
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsDeleteRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1.IOperation
, protos.google.cloud.sql.v1.ISqlSslCertsDeleteRequest
| null | undefined, {} | null | undefined>
void
get(request, options)
get
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsGetRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1
.
ISslCert
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsGetRequest
|
undefined
,
{}
|
undefined
]>;
Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.
request
options
Promise
<[ protos.google.cloud.sql.v1.ISslCert
, protos.google.cloud.sql.v1.ISqlSslCertsGetRequest
| 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 project that contains the instance.
*/
// const project = 'my-project'
/**
* Sha1 FingerPrint.
*/
// const sha1Fingerprint = 'abc123'
// Imports the Sql library
const
{
SqlSslCertsServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1
;
// Instantiates a client
const
sqlClient
=
new
SqlSslCertsServiceClient
();
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
.
v1
.
ISqlSslCertsGetRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1
.
ISslCert
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsGetRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1.ISslCert
, protos.google.cloud.sql.v1.ISqlSslCertsGetRequest
| null | undefined, {} | null | undefined>
void
get(request, callback)
get
(
request
:
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsGetRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1
.
ISslCert
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsGetRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1.ISslCert
, protos.google.cloud.sql.v1.ISqlSslCertsGetRequest
| 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
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
.
v1
.
ISqlSslCertsInsertRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1
.
ISslCertsInsertResponse
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsInsertRequest
|
undefined
,
{}
|
undefined
]>;
Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.
request
options
Promise
<[ protos.google.cloud.sql.v1.ISslCertsInsertResponse
, protos.google.cloud.sql.v1.ISqlSslCertsInsertRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing SslCertsInsertResponse . 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
{
SqlSslCertsServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1
;
// Instantiates a client
const
sqlClient
=
new
SqlSslCertsServiceClient
();
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
.
v1
.
ISqlSslCertsInsertRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1
.
ISslCertsInsertResponse
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsInsertRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1.ISslCertsInsertResponse
, protos.google.cloud.sql.v1.ISqlSslCertsInsertRequest
| null | undefined, {} | null | undefined>
void
insert(request, callback)
insert
(
request
:
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsInsertRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1
.
ISslCertsInsertResponse
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsInsertRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1.ISslCertsInsertResponse
, protos.google.cloud.sql.v1.ISqlSslCertsInsertRequest
| null | undefined, {} | null | undefined>
void
list(request, options)
list
(
request
?:
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsListRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
sql
.
v1
.
ISslCertsListResponse
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsListRequest
|
undefined
,
{}
|
undefined
]>;
Lists all of the current SSL certificates for the instance.
request
options
Promise
<[ protos.google.cloud.sql.v1.ISslCertsListResponse
, protos.google.cloud.sql.v1.ISqlSslCertsListRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing SslCertsListResponse . 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
{
SqlSslCertsServiceClient
}
=
require
(
' @google-cloud/sql
'
).
v1
;
// Instantiates a client
const
sqlClient
=
new
SqlSslCertsServiceClient
();
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
.
v1
.
ISqlSslCertsListRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1
.
ISslCertsListResponse
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsListRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.cloud.sql.v1.ISslCertsListResponse
, protos.google.cloud.sql.v1.ISqlSslCertsListRequest
| null | undefined, {} | null | undefined>
void
list(request, callback)
list
(
request
:
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsListRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
sql
.
v1
.
ISslCertsListResponse
,
protos
.
google
.
cloud
.
sql
.
v1
.
ISqlSslCertsListRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.cloud.sql.v1.ISslCertsListResponse
, protos.google.cloud.sql.v1.ISqlSslCertsListRequest
| 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
}