Secure Source Manager API
Access Secure Source Manager instances, resources, and repositories.
This API is split across two servers: the Control Plane and the Data Plane.
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must connect to your instance's API hostname to access them. The API hostname looks like the following:
https://[instance-id]-[project-number]-api.[location].sourcemanager.dev
For example,
https://my-instance-702770452863-api.us-central1.sourcemanager.dev
Data Plane endpoints are denoted with **Host: Data Plane**.
All other endpoints are found in the normal Cloud API location, namely, securcesourcemanager.googleapis.com
. v1
Package
@google-cloud/securesourcemanagerConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of SecureSourceManagerClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
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;
iamClient
iamClient: IamClient;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
locationsClient
locationsClient: LocationsClient;
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
secureSourceManagerStub
secureSourceManagerStub?: Promise<{
[name: string]: Function;
}>;
servicePath
static get servicePath(): string;
The DNS address for this API service.
universeDomain
get universeDomain(): string;
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
cancelOperation(request, options, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
Parameters | |
---|---|
Name | Description |
request |
CancelOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
checkCreateInstanceProgress(name)
checkCreateInstanceProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Instance, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;
Check the status of the long running operation returned by createInstance()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Instance, protos.google.cloud.securesourcemanager.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation 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. Value for parent.
*/
// const parent = 'abc123'
/**
* Required. ID of the instance to be created.
*/
// const instanceId = 'abc123'
/**
* Required. The resource being created.
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
};
// Run request
const [operation] = await securesourcemanagerClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
checkCreateRepositoryProgress(name)
checkCreateRepositoryProgress(name: string): Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Repository, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;
Check the status of the long running operation returned by createRepository()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.securesourcemanager.v1.Repository, protos.google.cloud.securesourcemanager.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation 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 project in which to create the repository. Values are of the
* form `projects/{project_number}/locations/{location_id}`
*/
// const parent = 'abc123'
/**
* Required. The resource being created.
*/
// const repository = {}
/**
* Required. The ID to use for the repository, which will become the final
* component of the repository's resource name. This value should be 4-63
* characters, and valid characters are /[a-z][0-9]-/.
*/
// const repositoryId = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callCreateRepository() {
// Construct request
const request = {
parent,
repository,
repositoryId,
};
// Run request
const [operation] = await securesourcemanagerClient.createRepository(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateRepository();
checkDeleteInstanceProgress(name)
checkDeleteInstanceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteInstance()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation 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. Name of the resource.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callDeleteInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await securesourcemanagerClient.deleteInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInstance();
checkDeleteRepositoryProgress(name)
checkDeleteRepositoryProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>>;
Check the status of the long running operation returned by deleteRepository()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.securesourcemanager.v1.OperationMetadata>> | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation 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. Name of the repository to delete.
* The format is
* projects/{project_number}/locations/{location_id}/repositories/{repository_id}.
*/
// const name = 'abc123'
/**
* Optional. If set to true, and the repository is not found, the request will
* succeed but no action will be taken on the server.
*/
// const allowMissing = true
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callDeleteRepository() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await securesourcemanagerClient.deleteRepository(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteRepository();
close()
close(): Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns | |
---|---|
Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
createInstance(request, options)
createInstance(request?: protos.google.cloud.securesourcemanager.v1.ICreateInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new instance in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
ICreateInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Value for parent.
*/
// const parent = 'abc123'
/**
* Required. ID of the instance to be created.
*/
// const instanceId = 'abc123'
/**
* Required. The resource being created.
*/
// const instance = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callCreateInstance() {
// Construct request
const request = {
parent,
instanceId,
instance,
};
// Run request
const [operation] = await securesourcemanagerClient.createInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateInstance();
createInstance(request, options, callback)
createInstance(request: protos.google.cloud.securesourcemanager.v1.ICreateInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createInstance(request, callback)
createInstance(request: protos.google.cloud.securesourcemanager.v1.ICreateInstanceRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateInstanceRequest
|
callback |
Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createRepository(request, options)
createRepository(request?: protos.google.cloud.securesourcemanager.v1.ICreateRepositoryRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new repository in a given project and location.
**Host: Data Plane**
Parameters | |
---|---|
Name | Description |
request |
ICreateRepositoryRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project in which to create the repository. Values are of the
* form `projects/{project_number}/locations/{location_id}`
*/
// const parent = 'abc123'
/**
* Required. The resource being created.
*/
// const repository = {}
/**
* Required. The ID to use for the repository, which will become the final
* component of the repository's resource name. This value should be 4-63
* characters, and valid characters are /[a-z][0-9]-/.
*/
// const repositoryId = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callCreateRepository() {
// Construct request
const request = {
parent,
repository,
repositoryId,
};
// Run request
const [operation] = await securesourcemanagerClient.createRepository(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateRepository();
createRepository(request, options, callback)
createRepository(request: protos.google.cloud.securesourcemanager.v1.ICreateRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateRepositoryRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createRepository(request, callback)
createRepository(request: protos.google.cloud.securesourcemanager.v1.ICreateRepositoryRequest, callback: Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateRepositoryRequest
|
callback |
Callback<LROperation<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
cryptoKeyPath(project, location, keyRing, cryptoKey)
cryptoKeyPath(project: string, location: string, keyRing: string, cryptoKey: string): string;
Return a fully-qualified cryptoKey resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
keyRing |
string
|
cryptoKey |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
deleteInstance(request, options)
deleteInstance(request?: protos.google.cloud.securesourcemanager.v1.IDeleteInstanceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a single instance.
Parameters | |
---|---|
Name | Description |
request |
IDeleteInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the resource.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callDeleteInstance() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await securesourcemanagerClient.deleteInstance(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteInstance();
deleteInstance(request, options, callback)
deleteInstance(request: protos.google.cloud.securesourcemanager.v1.IDeleteInstanceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteInstanceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteInstance(request, callback)
deleteInstance(request: protos.google.cloud.securesourcemanager.v1.IDeleteInstanceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteInstanceRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteOperation(request, options, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
Parameters | |
---|---|
Name | Description |
request |
DeleteOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
deleteRepository(request, options)
deleteRepository(request?: protos.google.cloud.securesourcemanager.v1.IDeleteRepositoryRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a Repository.
**Host: Data Plane**
Parameters | |
---|---|
Name | Description |
request |
IDeleteRepositoryRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the repository to delete.
* The format is
* projects/{project_number}/locations/{location_id}/repositories/{repository_id}.
*/
// const name = 'abc123'
/**
* Optional. If set to true, and the repository is not found, the request will
* succeed but no action will be taken on the server.
*/
// const allowMissing = true
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callDeleteRepository() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await securesourcemanagerClient.deleteRepository(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteRepository();
deleteRepository(request, options, callback)
deleteRepository(request: protos.google.cloud.securesourcemanager.v1.IDeleteRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteRepositoryRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteRepository(request, callback)
deleteRepository(request: protos.google.cloud.securesourcemanager.v1.IDeleteRepositoryRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteRepositoryRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.securesourcemanager.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getIamPolicy(request, options, callback)
getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.GetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<[google.iam.v1.Policy]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
getIamPolicyRepo(request, options)
getIamPolicyRepo(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[
protos.google.iam.v1.IPolicy,
protos.google.iam.v1.IGetIamPolicyRequest | undefined,
{} | undefined
]>;
Get IAM policy for a repository.
Parameters | |
---|---|
Name | Description |
request |
IGetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.iam.v1.IPolicy,
protos.google.iam.v1.IGetIamPolicyRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing Policy. 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 resource for which the policy is being requested.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
* `GetIamPolicy`.
*/
// const options = {}
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callGetIamPolicyRepo() {
// Construct request
const request = {
resource,
};
// Run request
const response = await securesourcemanagerClient.getIamPolicyRepo(request);
console.log(response);
}
callGetIamPolicyRepo();
getIamPolicyRepo(request, options, callback)
getIamPolicyRepo(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetIamPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getIamPolicyRepo(request, callback)
getIamPolicyRepo(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetIamPolicyRequest
|
callback |
Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getInstance(request, options)
getInstance(request?: protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest, options?: CallOptions): Promise<[
protos.google.cloud.securesourcemanager.v1.IInstance,
(protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | undefined),
{} | undefined
]>;
Gets details of a single instance.
Parameters | |
---|---|
Name | Description |
request |
IGetInstanceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.securesourcemanager.v1.IInstance,
(protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | 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. Name of the resource.
*/
// const name = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callGetInstance() {
// Construct request
const request = {
name,
};
// Run request
const response = await securesourcemanagerClient.getInstance(request);
console.log(response);
}
callGetInstance();
getInstance(request, options, callback)
getInstance(request: protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetInstanceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getInstance(request, callback)
getInstance(request: protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetInstanceRequest
|
callback |
Callback<protos.google.cloud.securesourcemanager.v1.IInstance, protos.google.cloud.securesourcemanager.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
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>
|
Returns | |
---|---|
Type | Description |
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);
getOperation(request, options, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
Parameters | |
---|---|
Name | Description |
request |
GetOperationRequest
The request object that will be sent. |
options |
CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
Returns | |
---|---|
Type | Description |
Promise<[protos.google.longrunning.Operation]> |
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
void |
getRepository(request, options)
getRepository(request?: protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest, options?: CallOptions): Promise<[
protos.google.cloud.securesourcemanager.v1.IRepository,
(protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | undefined),
{} | undefined
]>;
Gets metadata of a repository.
**Host: Data Plane**
Parameters | |
---|---|
Name | Description |
request |
IGetRepositoryRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.securesourcemanager.v1.IRepository,
(protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | 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. Name of the repository to retrieve.
* The format is
* `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`.
*/
// const name = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callGetRepository() {
// Construct request
const request = {
name,
};
// Run request
const response = await securesourcemanagerClient.getRepository(request);
console.log(response);
}
callGetRepository();
getRepository(request, options, callback)
getRepository(request: protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest, options: CallOptions, callback: Callback<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetRepositoryRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getRepository(request, callback)
getRepository(request: protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest, callback: Callback<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetRepositoryRequest
|
callback |
Callback<protos.google.cloud.securesourcemanager.v1.IRepository, protos.google.cloud.securesourcemanager.v1.IGetRepositoryRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns | |
---|---|
Type | Description |
Promise<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub. |
instancePath(project, location, instance)
instancePath(project: string, location: string, instance: string): string;
Return a fully-qualified instance resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
instance |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
listInstances(request, options)
listInstances(request?: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, options?: CallOptions): Promise<[
protos.google.cloud.securesourcemanager.v1.IInstance[],
protos.google.cloud.securesourcemanager.v1.IListInstancesRequest | null,
protos.google.cloud.securesourcemanager.v1.IListInstancesResponse
]>;
Lists Instances in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.securesourcemanager.v1.IInstance[],
protos.google.cloud.securesourcemanager.v1.IListInstancesRequest | null,
protos.google.cloud.securesourcemanager.v1.IListInstancesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listInstances(request, options, callback)
listInstances(request: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IInstance>): void;
Parameters | |
---|---|
Name | Description |
request |
IListInstancesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IInstance>
|
Returns | |
---|---|
Type | Description |
void |
listInstances(request, callback)
listInstances(request: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IInstance>): void;
Parameters | |
---|---|
Name | Description |
request |
IListInstancesRequest
|
callback |
PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, protos.google.cloud.securesourcemanager.v1.IListInstancesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IInstance>
|
Returns | |
---|---|
Type | Description |
void |
listInstancesAsync(request, options)
listInstancesAsync(request?: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IInstance>;
Equivalent to listInstances
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IInstance> | {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. |
/**
* 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. Parent value for ListInstancesRequest.
*/
// const parent = 'abc123'
/**
* Requested page size. Server may return fewer items than requested.
* If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Filter for filtering results.
*/
// const filter = 'abc123'
/**
* Hint for how to order the results.
*/
// const orderBy = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callListInstances() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = securesourcemanagerClient.listInstancesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListInstances();
listInstancesStream(request, options)
listInstancesStream(request?: protos.google.cloud.securesourcemanager.v1.IListInstancesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListInstancesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
Lists information about the supported locations for this service. Returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<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
}
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED
. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
Parameters | |
---|---|
Name | Description |
request |
ListOperationsRequest
The request object that will be sent. |
options |
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.longrunning.ListOperationsResponse> | {Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
listRepositories(request, options)
listRepositories(request?: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, options?: CallOptions): Promise<[
protos.google.cloud.securesourcemanager.v1.IRepository[],
protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest | null,
protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse
]>;
Lists Repositories in a given project and location.
**Host: Data Plane**
Parameters | |
---|---|
Name | Description |
request |
IListRepositoriesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.securesourcemanager.v1.IRepository[],
protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest | null,
protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listRepositories(request, options, callback)
listRepositories(request: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IRepository>): void;
Parameters | |
---|---|
Name | Description |
request |
IListRepositoriesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IRepository>
|
Returns | |
---|---|
Type | Description |
void |
listRepositories(request, callback)
listRepositories(request: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, callback: PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IRepository>): void;
Parameters | |
---|---|
Name | Description |
request |
IListRepositoriesRequest
|
callback |
PaginationCallback<protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, protos.google.cloud.securesourcemanager.v1.IListRepositoriesResponse | null | undefined, protos.google.cloud.securesourcemanager.v1.IRepository>
|
Returns | |
---|---|
Type | Description |
void |
listRepositoriesAsync(request, options)
listRepositoriesAsync(request?: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.securesourcemanager.v1.IRepository>;
Equivalent to listRepositories
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListRepositoriesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.securesourcemanager.v1.IRepository> | {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. |
/**
* 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. Parent value for ListRepositoriesRequest.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Filter results.
*/
// const filter = 'abc123'
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callListRepositories() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = securesourcemanagerClient.listRepositoriesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListRepositories();
listRepositoriesStream(request, options)
listRepositoriesStream(request?: protos.google.cloud.securesourcemanager.v1.IListRepositoriesRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListRepositoriesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
matchCryptoKeyFromCryptoKeyName(cryptoKeyName)
matchCryptoKeyFromCryptoKeyName(cryptoKeyName: string): string | number;
Parse the crypto_key from CryptoKey resource.
Parameter | |
---|---|
Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the crypto_key. |
matchInstanceFromInstanceName(instanceName)
matchInstanceFromInstanceName(instanceName: string): string | number;
Parse the instance from Instance resource.
Parameter | |
---|---|
Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the instance. |
matchKeyRingFromCryptoKeyName(cryptoKeyName)
matchKeyRingFromCryptoKeyName(cryptoKeyName: string): string | number;
Parse the key_ring from CryptoKey resource.
Parameter | |
---|---|
Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the key_ring. |
matchLocationFromCryptoKeyName(cryptoKeyName)
matchLocationFromCryptoKeyName(cryptoKeyName: string): string | number;
Parse the location from CryptoKey resource.
Parameter | |
---|---|
Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromInstanceName(instanceName)
matchLocationFromInstanceName(instanceName: string): string | number;
Parse the location from Instance resource.
Parameter | |
---|---|
Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromRepositoryName(repositoryName)
matchLocationFromRepositoryName(repositoryName: string): string | number;
Parse the location from Repository resource.
Parameter | |
---|---|
Name | Description |
repositoryName |
string
A fully-qualified path representing Repository resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromCryptoKeyName(cryptoKeyName)
matchProjectFromCryptoKeyName(cryptoKeyName: string): string | number;
Parse the project from CryptoKey resource.
Parameter | |
---|---|
Name | Description |
cryptoKeyName |
string
A fully-qualified path representing CryptoKey resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromInstanceName(instanceName)
matchProjectFromInstanceName(instanceName: string): string | number;
Parse the project from Instance resource.
Parameter | |
---|---|
Name | Description |
instanceName |
string
A fully-qualified path representing Instance resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter | |
---|---|
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRepositoryName(repositoryName)
matchProjectFromRepositoryName(repositoryName: string): string | number;
Parse the project from Repository resource.
Parameter | |
---|---|
Name | Description |
repositoryName |
string
A fully-qualified path representing Repository resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchRepositoryFromRepositoryName(repositoryName)
matchRepositoryFromRepositoryName(repositoryName: string): string | number;
Parse the repository from Repository resource.
Parameter | |
---|---|
Name | Description |
repositoryName |
string
A fully-qualified path representing Repository resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the repository. |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
repositoryPath(project, location, repository)
repositoryPath(project: string, location: string, repository: string): string;
Return a fully-qualified repository resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
repository |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
setIamPolicy(request, options, callback)
setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.SetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<[google.iam.v1.Policy]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
setIamPolicyRepo(request, options)
setIamPolicyRepo(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[
protos.google.iam.v1.IPolicy,
protos.google.iam.v1.ISetIamPolicyRequest | undefined,
{} | undefined
]>;
Set IAM policy on a repository.
Parameters | |
---|---|
Name | Description |
request |
ISetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.iam.v1.IPolicy,
protos.google.iam.v1.ISetIamPolicyRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing Policy. 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 resource for which the policy is being specified.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* REQUIRED: The complete policy to be applied to the `resource`. The size of
* the policy is limited to a few 10s of KB. An empty policy is a
* valid policy but certain Cloud Platform services (such as Projects)
* might reject them.
*/
// const policy = {}
/**
* OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
* the fields in the mask will be modified. If no mask is provided, the
* following default mask is used:
* `paths: "bindings, etag"`
*/
// const updateMask = {}
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callSetIamPolicyRepo() {
// Construct request
const request = {
resource,
policy,
};
// Run request
const response = await securesourcemanagerClient.setIamPolicyRepo(request);
console.log(response);
}
callSetIamPolicyRepo();
setIamPolicyRepo(request, options, callback)
setIamPolicyRepo(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ISetIamPolicyRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
setIamPolicyRepo(request, callback)
setIamPolicyRepo(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ISetIamPolicyRequest
|
callback |
Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
testIamPermissions(request, options, callback)
testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Parameters | |
---|---|
Name | Description |
request |
IamProtos.google.iam.v1.TestIamPermissionsRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
Returns | |
---|---|
Type | Description |
Promise<[google.iam.v1.TestIamPermissionsResponse]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
testIamPermissionsRepo(request, options)
testIamPermissionsRepo(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[
protos.google.iam.v1.ITestIamPermissionsResponse,
protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
{} | undefined
]>;
Test IAM permissions on a repository. IAM permission checks are not required on this method.
Parameters | |
---|---|
Name | Description |
request |
ITestIamPermissionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.iam.v1.ITestIamPermissionsResponse,
protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing TestIamPermissionsResponse. 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 resource for which the policy detail is being requested.
* See the operation documentation for the appropriate value for this field.
*/
// const resource = 'abc123'
/**
* The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '*' or 'storage.*') are not allowed. For more
* information see
* IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
*/
// const permissions = ['abc','def']
// Imports the Securesourcemanager library
const {SecureSourceManagerClient} = require('@google-cloud/securesourcemanager').v1;
// Instantiates a client
const securesourcemanagerClient = new SecureSourceManagerClient();
async function callTestIamPermissionsRepo() {
// Construct request
const request = {
resource,
permissions,
};
// Run request
const response = await securesourcemanagerClient.testIamPermissionsRepo(request);
console.log(response);
}
callTestIamPermissionsRepo();
testIamPermissionsRepo(request, options, callback)
testIamPermissionsRepo(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ITestIamPermissionsRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
testIamPermissionsRepo(request, callback)
testIamPermissionsRepo(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ITestIamPermissionsRequest
|
callback |
Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |