Class SecureSourceManagerClient (0.5.0)

GitHub RepositoryProduct Reference

Service Description: 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.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   Instance response = secureSourceManagerClient.getInstance(name);
 }
 

Note: close() needs to be called on the SecureSourceManagerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
MethodDescriptionMethod Variants

ListInstances

Lists Instances in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listInstances(ListInstancesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listInstances(LocationName parent)

  • listInstances(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listInstancesPagedCallable()

  • listInstancesCallable()

GetInstance

Gets details of a single instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getInstance(GetInstanceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getInstance(InstanceName name)

  • getInstance(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getInstanceCallable()

CreateInstance

Creates a new instance in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createInstanceAsync(CreateInstanceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createInstanceAsync(LocationName parent, Instance instance, String instanceId)

  • createInstanceAsync(String parent, Instance instance, String instanceId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createInstanceOperationCallable()

  • createInstanceCallable()

DeleteInstance

Deletes a single instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteInstanceAsync(DeleteInstanceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteInstanceAsync(InstanceName name)

  • deleteInstanceAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteInstanceOperationCallable()

  • deleteInstanceCallable()

ListRepositories

Lists Repositories in a given project and location.

**Host: Data Plane**

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRepositories(ListRepositoriesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRepositories(LocationName parent)

  • listRepositories(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRepositoriesPagedCallable()

  • listRepositoriesCallable()

GetRepository

Gets metadata of a repository.

**Host: Data Plane**

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRepository(GetRepositoryRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRepository(RepositoryName name)

  • getRepository(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRepositoryCallable()

CreateRepository

Creates a new repository in a given project and location.

**Host: Data Plane**

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createRepositoryAsync(CreateRepositoryRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createRepositoryAsync(LocationName parent, Repository repository, String repositoryId)

  • createRepositoryAsync(String parent, Repository repository, String repositoryId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createRepositoryOperationCallable()

  • createRepositoryCallable()

DeleteRepository

Deletes a Repository.

**Host: Data Plane**

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteRepositoryAsync(DeleteRepositoryRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteRepositoryAsync(RepositoryName name)

  • deleteRepositoryAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteRepositoryOperationCallable()

  • deleteRepositoryCallable()

GetIamPolicyRepo

Get IAM policy for a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicyRepo(GetIamPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIamPolicyRepo(ResourceName resource)

  • getIamPolicyRepo(String resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyRepoCallable()

SetIamPolicyRepo

Set IAM policy on a repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicyRepo(SetIamPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • setIamPolicyRepo(ResourceName resource)

  • setIamPolicyRepo(String resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyRepoCallable()

TestIamPermissionsRepo

Test IAM permissions on a repository. IAM permission checks are not required on this method.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissionsRepo(TestIamPermissionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • testIamPermissionsRepo(ResourceName resource)

  • testIamPermissionsRepo(String resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsRepoCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of SecureSourceManagerSettings to create(). For example:

To customize credentials:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecureSourceManagerSettings secureSourceManagerSettings =
     SecureSourceManagerSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 SecureSourceManagerClient secureSourceManagerClient =
     SecureSourceManagerClient.create(secureSourceManagerSettings);
 

To customize the endpoint:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecureSourceManagerSettings secureSourceManagerSettings =
     SecureSourceManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
 SecureSourceManagerClient secureSourceManagerClient =
     SecureSourceManagerClient.create(secureSourceManagerSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 SecureSourceManagerSettings secureSourceManagerSettings =
     SecureSourceManagerSettings.newHttpJsonBuilder().build();
 SecureSourceManagerClient secureSourceManagerClient =
     SecureSourceManagerClient.create(secureSourceManagerSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > SecureSourceManagerClient

Static Methods

create()

public static final SecureSourceManagerClient create()

Constructs an instance of SecureSourceManagerClient with default settings.

Returns
TypeDescription
SecureSourceManagerClient
Exceptions
TypeDescription
IOException

create(SecureSourceManagerSettings settings)

public static final SecureSourceManagerClient create(SecureSourceManagerSettings settings)

Constructs an instance of SecureSourceManagerClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsSecureSourceManagerSettings
Returns
TypeDescription
SecureSourceManagerClient
Exceptions
TypeDescription
IOException

create(SecureSourceManagerStub stub)

public static final SecureSourceManagerClient create(SecureSourceManagerStub stub)

Constructs an instance of SecureSourceManagerClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecureSourceManagerSettings).

Parameter
NameDescription
stubSecureSourceManagerStub
Returns
TypeDescription
SecureSourceManagerClient

Constructors

SecureSourceManagerClient(SecureSourceManagerSettings settings)

protected SecureSourceManagerClient(SecureSourceManagerSettings settings)

Constructs an instance of SecureSourceManagerClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
NameDescription
settingsSecureSourceManagerSettings

SecureSourceManagerClient(SecureSourceManagerStub stub)

protected SecureSourceManagerClient(SecureSourceManagerStub stub)
Parameter
NameDescription
stubSecureSourceManagerStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

createInstanceAsync(CreateInstanceRequest request)

public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(CreateInstanceRequest request)

Creates a new instance in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   CreateInstanceRequest request =
       CreateInstanceRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setInstanceId("instanceId902024336")
           .setInstance(Instance.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Instance response = secureSourceManagerClient.createInstanceAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateInstanceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Instance,OperationMetadata>

createInstanceAsync(LocationName parent, Instance instance, String instanceId)

public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(LocationName parent, Instance instance, String instanceId)

Creates a new instance in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Instance instance = Instance.newBuilder().build();
   String instanceId = "instanceId902024336";
   Instance response =
       secureSourceManagerClient.createInstanceAsync(parent, instance, instanceId).get();
 }
 
Parameters
NameDescription
parentLocationName

Required. Value for parent.

instanceInstance

Required. The resource being created.

instanceIdString

Required. ID of the instance to be created.

Returns
TypeDescription
OperationFuture<Instance,OperationMetadata>

createInstanceAsync(String parent, Instance instance, String instanceId)

public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(String parent, Instance instance, String instanceId)

Creates a new instance in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Instance instance = Instance.newBuilder().build();
   String instanceId = "instanceId902024336";
   Instance response =
       secureSourceManagerClient.createInstanceAsync(parent, instance, instanceId).get();
 }
 
Parameters
NameDescription
parentString

Required. Value for parent.

instanceInstance

Required. The resource being created.

instanceIdString

Required. ID of the instance to be created.

Returns
TypeDescription
OperationFuture<Instance,OperationMetadata>

createInstanceCallable()

public final UnaryCallable<CreateInstanceRequest,Operation> createInstanceCallable()

Creates a new instance in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   CreateInstanceRequest request =
       CreateInstanceRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setInstanceId("instanceId902024336")
           .setInstance(Instance.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       secureSourceManagerClient.createInstanceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateInstanceRequest,Operation>

createInstanceOperationCallable()

public final OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> createInstanceOperationCallable()

Creates a new instance in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   CreateInstanceRequest request =
       CreateInstanceRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setInstanceId("instanceId902024336")
           .setInstance(Instance.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Instance, OperationMetadata> future =
       secureSourceManagerClient.createInstanceOperationCallable().futureCall(request);
   // Do something.
   Instance response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateInstanceRequest,Instance,OperationMetadata>

createRepositoryAsync(CreateRepositoryRequest request)

public final OperationFuture<Repository,OperationMetadata> createRepositoryAsync(CreateRepositoryRequest request)

Creates a new repository in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   CreateRepositoryRequest request =
       CreateRepositoryRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setRepository(Repository.newBuilder().build())
           .setRepositoryId("repositoryId2113747461")
           .build();
   Repository response = secureSourceManagerClient.createRepositoryAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateRepositoryRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Repository,OperationMetadata>

createRepositoryAsync(LocationName parent, Repository repository, String repositoryId)

public final OperationFuture<Repository,OperationMetadata> createRepositoryAsync(LocationName parent, Repository repository, String repositoryId)

Creates a new repository in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Repository repository = Repository.newBuilder().build();
   String repositoryId = "repositoryId2113747461";
   Repository response =
       secureSourceManagerClient.createRepositoryAsync(parent, repository, repositoryId).get();
 }
 
Parameters
NameDescription
parentLocationName

Required. The project in which to create the repository. Values are of the form projects/{project_number}/locations/{location_id}

repositoryRepository

Required. The resource being created.

repositoryIdString

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-/.

Returns
TypeDescription
OperationFuture<Repository,OperationMetadata>

createRepositoryAsync(String parent, Repository repository, String repositoryId)

public final OperationFuture<Repository,OperationMetadata> createRepositoryAsync(String parent, Repository repository, String repositoryId)

Creates a new repository in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Repository repository = Repository.newBuilder().build();
   String repositoryId = "repositoryId2113747461";
   Repository response =
       secureSourceManagerClient.createRepositoryAsync(parent, repository, repositoryId).get();
 }
 
Parameters
NameDescription
parentString

Required. The project in which to create the repository. Values are of the form projects/{project_number}/locations/{location_id}

repositoryRepository

Required. The resource being created.

repositoryIdString

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-/.

Returns
TypeDescription
OperationFuture<Repository,OperationMetadata>

createRepositoryCallable()

public final UnaryCallable<CreateRepositoryRequest,Operation> createRepositoryCallable()

Creates a new repository in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   CreateRepositoryRequest request =
       CreateRepositoryRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setRepository(Repository.newBuilder().build())
           .setRepositoryId("repositoryId2113747461")
           .build();
   ApiFuture<Operation> future =
       secureSourceManagerClient.createRepositoryCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateRepositoryRequest,Operation>

createRepositoryOperationCallable()

public final OperationCallable<CreateRepositoryRequest,Repository,OperationMetadata> createRepositoryOperationCallable()

Creates a new repository in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   CreateRepositoryRequest request =
       CreateRepositoryRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setRepository(Repository.newBuilder().build())
           .setRepositoryId("repositoryId2113747461")
           .build();
   OperationFuture<Repository, OperationMetadata> future =
       secureSourceManagerClient.createRepositoryOperationCallable().futureCall(request);
   // Do something.
   Repository response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateRepositoryRequest,Repository,OperationMetadata>

deleteInstanceAsync(DeleteInstanceRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteInstanceAsync(DeleteInstanceRequest request)

Deletes a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   DeleteInstanceRequest request =
       DeleteInstanceRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setRequestId("requestId693933066")
           .build();
   secureSourceManagerClient.deleteInstanceAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteInstanceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteInstanceAsync(InstanceName name)

public final OperationFuture<Empty,OperationMetadata> deleteInstanceAsync(InstanceName name)

Deletes a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   secureSourceManagerClient.deleteInstanceAsync(name).get();
 }
 
Parameter
NameDescription
nameInstanceName

Required. Name of the resource.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteInstanceAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteInstanceAsync(String name)

Deletes a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   secureSourceManagerClient.deleteInstanceAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. Name of the resource.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteInstanceCallable()

public final UnaryCallable<DeleteInstanceRequest,Operation> deleteInstanceCallable()

Deletes a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   DeleteInstanceRequest request =
       DeleteInstanceRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       secureSourceManagerClient.deleteInstanceCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteInstanceRequest,Operation>

deleteInstanceOperationCallable()

public final OperationCallable<DeleteInstanceRequest,Empty,OperationMetadata> deleteInstanceOperationCallable()

Deletes a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   DeleteInstanceRequest request =
       DeleteInstanceRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       secureSourceManagerClient.deleteInstanceOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteInstanceRequest,Empty,OperationMetadata>

deleteRepositoryAsync(DeleteRepositoryRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteRepositoryAsync(DeleteRepositoryRequest request)

Deletes a Repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   DeleteRepositoryRequest request =
       DeleteRepositoryRequest.newBuilder()
           .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setAllowMissing(true)
           .build();
   secureSourceManagerClient.deleteRepositoryAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteRepositoryRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRepositoryAsync(RepositoryName name)

public final OperationFuture<Empty,OperationMetadata> deleteRepositoryAsync(RepositoryName name)

Deletes a Repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   secureSourceManagerClient.deleteRepositoryAsync(name).get();
 }
 
Parameter
NameDescription
nameRepositoryName

Required. Name of the repository to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRepositoryAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteRepositoryAsync(String name)

Deletes a Repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
   secureSourceManagerClient.deleteRepositoryAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. Name of the repository to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}.

Returns
TypeDescription
OperationFuture<Empty,OperationMetadata>

deleteRepositoryCallable()

public final UnaryCallable<DeleteRepositoryRequest,Operation> deleteRepositoryCallable()

Deletes a Repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   DeleteRepositoryRequest request =
       DeleteRepositoryRequest.newBuilder()
           .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setAllowMissing(true)
           .build();
   ApiFuture<Operation> future =
       secureSourceManagerClient.deleteRepositoryCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteRepositoryRequest,Operation>

deleteRepositoryOperationCallable()

public final OperationCallable<DeleteRepositoryRequest,Empty,OperationMetadata> deleteRepositoryOperationCallable()

Deletes a Repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   DeleteRepositoryRequest request =
       DeleteRepositoryRequest.newBuilder()
           .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setAllowMissing(true)
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       secureSourceManagerClient.deleteRepositoryOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteRepositoryRequest,Empty,OperationMetadata>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getIamPolicy(GetIamPolicyRequest request)

public final Policy getIamPolicy(GetIamPolicyRequest request)

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   Policy response = secureSourceManagerClient.getIamPolicy(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.GetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   ApiFuture<Policy> future =
       secureSourceManagerClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getIamPolicyRepo(ResourceName resource)

public final Policy getIamPolicyRepo(ResourceName resource)

Get IAM policy for a repository.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   Policy response = secureSourceManagerClient.getIamPolicyRepo(resource);
 }
 
Parameter
NameDescription
resourcecom.google.api.resourcenames.ResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicyRepo(GetIamPolicyRequest request)

public final Policy getIamPolicyRepo(GetIamPolicyRequest request)

Get IAM policy for a repository.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   Policy response = secureSourceManagerClient.getIamPolicyRepo(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.GetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicyRepo(String resource)

public final Policy getIamPolicyRepo(String resource)

Get IAM policy for a repository.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Policy response = secureSourceManagerClient.getIamPolicyRepo(resource);
 }
 
Parameter
NameDescription
resourceString

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicyRepoCallable()

public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyRepoCallable()

Get IAM policy for a repository.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   ApiFuture<Policy> future =
       secureSourceManagerClient.getIamPolicyRepoCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getInstance(GetInstanceRequest request)

public final Instance getInstance(GetInstanceRequest request)

Gets details of a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetInstanceRequest request =
       GetInstanceRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   Instance response = secureSourceManagerClient.getInstance(request);
 }
 
Parameter
NameDescription
requestGetInstanceRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Instance

getInstance(InstanceName name)

public final Instance getInstance(InstanceName name)

Gets details of a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   Instance response = secureSourceManagerClient.getInstance(name);
 }
 
Parameter
NameDescription
nameInstanceName

Required. Name of the resource.

Returns
TypeDescription
Instance

getInstance(String name)

public final Instance getInstance(String name)

Gets details of a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   Instance response = secureSourceManagerClient.getInstance(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the resource.

Returns
TypeDescription
Instance

getInstanceCallable()

public final UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()

Gets details of a single instance.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetInstanceRequest request =
       GetInstanceRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   ApiFuture<Instance> future =
       secureSourceManagerClient.getInstanceCallable().futureCall(request);
   // Do something.
   Instance response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetInstanceRequest,Instance>

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = secureSourceManagerClient.getLocation(request);
 }
 
Parameter
NameDescription
requestcom.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future =
       secureSourceManagerClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
TypeDescription
OperationsClient

getRepository(GetRepositoryRequest request)

public final Repository getRepository(GetRepositoryRequest request)

Gets metadata of a repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetRepositoryRequest request =
       GetRepositoryRequest.newBuilder()
           .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .build();
   Repository response = secureSourceManagerClient.getRepository(request);
 }
 
Parameter
NameDescription
requestGetRepositoryRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Repository

getRepository(RepositoryName name)

public final Repository getRepository(RepositoryName name)

Gets metadata of a repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   Repository response = secureSourceManagerClient.getRepository(name);
 }
 
Parameter
NameDescription
nameRepositoryName

Required. Name of the repository to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}.

Returns
TypeDescription
Repository

getRepository(String name)

public final Repository getRepository(String name)

Gets metadata of a repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
   Repository response = secureSourceManagerClient.getRepository(name);
 }
 
Parameter
NameDescription
nameString

Required. Name of the repository to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}.

Returns
TypeDescription
Repository

getRepositoryCallable()

public final UnaryCallable<GetRepositoryRequest,Repository> getRepositoryCallable()

Gets metadata of a repository.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   GetRepositoryRequest request =
       GetRepositoryRequest.newBuilder()
           .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .build();
   ApiFuture<Repository> future =
       secureSourceManagerClient.getRepositoryCallable().futureCall(request);
   // Do something.
   Repository response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetRepositoryRequest,Repository>

getSettings()

public final SecureSourceManagerSettings getSettings()
Returns
TypeDescription
SecureSourceManagerSettings

getStub()

public SecureSourceManagerStub getStub()
Returns
TypeDescription
SecureSourceManagerStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listInstances(ListInstancesRequest request)

public final SecureSourceManagerClient.ListInstancesPagedResponse listInstances(ListInstancesRequest request)

Lists Instances in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListInstancesRequest request =
       ListInstancesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Instance element : secureSourceManagerClient.listInstances(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListInstancesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecureSourceManagerClient.ListInstancesPagedResponse

listInstances(LocationName parent)

public final SecureSourceManagerClient.ListInstancesPagedResponse listInstances(LocationName parent)

Lists Instances in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Instance element : secureSourceManagerClient.listInstances(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. Parent value for ListInstancesRequest.

Returns
TypeDescription
SecureSourceManagerClient.ListInstancesPagedResponse

listInstances(String parent)

public final SecureSourceManagerClient.ListInstancesPagedResponse listInstances(String parent)

Lists Instances in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Instance element : secureSourceManagerClient.listInstances(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Parent value for ListInstancesRequest.

Returns
TypeDescription
SecureSourceManagerClient.ListInstancesPagedResponse

listInstancesCallable()

public final UnaryCallable<ListInstancesRequest,ListInstancesResponse> listInstancesCallable()

Lists Instances in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListInstancesRequest request =
       ListInstancesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListInstancesResponse response =
         secureSourceManagerClient.listInstancesCallable().call(request);
     for (Instance element : response.getInstancesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListInstancesRequest,ListInstancesResponse>

listInstancesPagedCallable()

public final UnaryCallable<ListInstancesRequest,SecureSourceManagerClient.ListInstancesPagedResponse> listInstancesPagedCallable()

Lists Instances in a given project and location.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListInstancesRequest request =
       ListInstancesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Instance> future =
       secureSourceManagerClient.listInstancesPagedCallable().futureCall(request);
   // Do something.
   for (Instance element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListInstancesRequest,ListInstancesPagedResponse>

listLocations(ListLocationsRequest request)

public final SecureSourceManagerClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : secureSourceManagerClient.listLocations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestcom.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecureSourceManagerClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response =
         secureSourceManagerClient.listLocationsCallable().call(request);
     for (Location element : response.getLocationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,SecureSourceManagerClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future =
       secureSourceManagerClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

listRepositories(ListRepositoriesRequest request)

public final SecureSourceManagerClient.ListRepositoriesPagedResponse listRepositories(ListRepositoriesRequest request)

Lists Repositories in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListRepositoriesRequest request =
       ListRepositoriesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (Repository element : secureSourceManagerClient.listRepositories(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListRepositoriesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
SecureSourceManagerClient.ListRepositoriesPagedResponse

listRepositories(LocationName parent)

public final SecureSourceManagerClient.ListRepositoriesPagedResponse listRepositories(LocationName parent)

Lists Repositories in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Repository element : secureSourceManagerClient.listRepositories(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. Parent value for ListRepositoriesRequest.

Returns
TypeDescription
SecureSourceManagerClient.ListRepositoriesPagedResponse

listRepositories(String parent)

public final SecureSourceManagerClient.ListRepositoriesPagedResponse listRepositories(String parent)

Lists Repositories in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Repository element : secureSourceManagerClient.listRepositories(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Parent value for ListRepositoriesRequest.

Returns
TypeDescription
SecureSourceManagerClient.ListRepositoriesPagedResponse

listRepositoriesCallable()

public final UnaryCallable<ListRepositoriesRequest,ListRepositoriesResponse> listRepositoriesCallable()

Lists Repositories in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListRepositoriesRequest request =
       ListRepositoriesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListRepositoriesResponse response =
         secureSourceManagerClient.listRepositoriesCallable().call(request);
     for (Repository element : response.getRepositoriesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRepositoriesRequest,ListRepositoriesResponse>

listRepositoriesPagedCallable()

public final UnaryCallable<ListRepositoriesRequest,SecureSourceManagerClient.ListRepositoriesPagedResponse> listRepositoriesPagedCallable()

Lists Repositories in a given project and location.

**Host: Data Plane**

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ListRepositoriesRequest request =
       ListRepositoriesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<Repository> future =
       secureSourceManagerClient.listRepositoriesPagedCallable().futureCall(request);
   // Do something.
   for (Repository element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRepositoriesRequest,ListRepositoriesPagedResponse>

setIamPolicy(SetIamPolicyRequest request)

public final Policy setIamPolicy(SetIamPolicyRequest request)

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Policy response = secureSourceManagerClient.setIamPolicy(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.SetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Policy> future =
       secureSourceManagerClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

setIamPolicyRepo(ResourceName resource)

public final Policy setIamPolicyRepo(ResourceName resource)

Set IAM policy on a repository.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   Policy response = secureSourceManagerClient.setIamPolicyRepo(resource);
 }
 
Parameter
NameDescription
resourcecom.google.api.resourcenames.ResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicyRepo(SetIamPolicyRequest request)

public final Policy setIamPolicyRepo(SetIamPolicyRequest request)

Set IAM policy on a repository.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Policy response = secureSourceManagerClient.setIamPolicyRepo(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.SetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicyRepo(String resource)

public final Policy setIamPolicyRepo(String resource)

Set IAM policy on a repository.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Policy response = secureSourceManagerClient.setIamPolicyRepo(resource);
 }
 
Parameter
NameDescription
resourceString

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicyRepoCallable()

public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyRepoCallable()

Set IAM policy on a repository.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Policy> future =
       secureSourceManagerClient.setIamPolicyRepoCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRequest request)

public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   TestIamPermissionsResponse response = secureSourceManagerClient.testIamPermissions(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.TestIamPermissionsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   ApiFuture<TestIamPermissionsResponse> future =
       secureSourceManagerClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestIamPermissionsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

testIamPermissionsRepo(ResourceName resource)

public final TestIamPermissionsResponse testIamPermissionsRepo(ResourceName resource)

Test IAM permissions on a repository. IAM permission checks are not required on this method.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   TestIamPermissionsResponse response =
       secureSourceManagerClient.testIamPermissionsRepo(resource);
 }
 
Parameter
NameDescription
resourcecom.google.api.resourcenames.ResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsRepo(TestIamPermissionsRequest request)

public final TestIamPermissionsResponse testIamPermissionsRepo(TestIamPermissionsRequest request)

Test IAM permissions on a repository. IAM permission checks are not required on this method.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   TestIamPermissionsResponse response =
       secureSourceManagerClient.testIamPermissionsRepo(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.TestIamPermissionsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsRepo(String resource)

public final TestIamPermissionsResponse testIamPermissionsRepo(String resource)

Test IAM permissions on a repository. IAM permission checks are not required on this method.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   TestIamPermissionsResponse response =
       secureSourceManagerClient.testIamPermissionsRepo(resource);
 }
 
Parameter
NameDescription
resourceString

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsRepoCallable()

public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsRepoCallable()

Test IAM permissions on a repository. IAM permission checks are not required on this method.

Sample code:


 // 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.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   ApiFuture<TestIamPermissionsResponse> future =
       secureSourceManagerClient.testIamPermissionsRepoCallable().futureCall(request);
   // Do something.
   TestIamPermissionsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>