Class ServiceManagerClient (3.43.0)

GitHub RepositoryProduct Reference

Service Description: Google Service Management API

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   ManagedService response = serviceManagerClient.getService(serviceName);
 }
 

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

Methods
Method Description Method Variants

ListServices

Lists managed services.

Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for.

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

  • listServices(ListServicesRequest request)

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

  • listServices(String producerProjectId, String consumerId)

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

  • listServicesPagedCallable()

  • listServicesCallable()

GetService

Gets a managed service. Authentication is required unless the service is public.

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

  • getService(GetServiceRequest request)

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

  • getService(String serviceName)

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

  • getServiceCallable()

CreateService

Creates a new managed service.

A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion.

One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project.

Operation<response: ManagedService>

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

  • createServiceAsync(CreateServiceRequest request)

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

  • createServiceAsync(ManagedService service)

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

  • createServiceOperationCallable()

  • createServiceCallable()

DeleteService

Deletes a managed service. This method will change the service to the Soft-Delete state for 30 days. Within this period, service producers may call UndeleteService to restore the service. After 30 days, the service will be permanently deleted.

Operation<response: google.protobuf.Empty>

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

  • deleteServiceAsync(DeleteServiceRequest request)

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

  • deleteServiceAsync(String serviceName)

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

  • deleteServiceOperationCallable()

  • deleteServiceCallable()

UndeleteService

Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days.

Operation<response: UndeleteServiceResponse>

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

  • undeleteServiceAsync(UndeleteServiceRequest request)

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

  • undeleteServiceAsync(String serviceName)

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

  • undeleteServiceOperationCallable()

  • undeleteServiceCallable()

ListServiceConfigs

Lists the history of the service configuration for a managed service, from the newest to the oldest.

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

  • listServiceConfigs(ListServiceConfigsRequest request)

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

  • listServiceConfigs(String serviceName)

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

  • listServiceConfigsPagedCallable()

  • listServiceConfigsCallable()

GetServiceConfig

Gets a service configuration (version) for a managed service.

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

  • getServiceConfig(GetServiceConfigRequest request)

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

  • getServiceConfig(String serviceName, String configId, GetServiceConfigRequest.ConfigView view)

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

  • getServiceConfigCallable()

CreateServiceConfig

Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call CreateServiceRollout.

Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.

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

  • createServiceConfig(CreateServiceConfigRequest request)

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

  • createServiceConfig(String serviceName, Service serviceConfig)

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

  • createServiceConfigCallable()

SubmitConfigSource

Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call CreateServiceRollout.

Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually.

Operation<response: SubmitConfigSourceResponse>

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

  • submitConfigSourceAsync(SubmitConfigSourceRequest request)

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

  • submitConfigSourceAsync(String serviceName, ConfigSource configSource, boolean validateOnly)

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

  • submitConfigSourceOperationCallable()

  • submitConfigSourceCallable()

ListServiceRollouts

Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.

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

  • listServiceRollouts(ListServiceRolloutsRequest request)

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

  • listServiceRollouts(String serviceName, String filter)

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

  • listServiceRolloutsPagedCallable()

  • listServiceRolloutsCallable()

GetServiceRollout

Gets a service configuration rollout.

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

  • getServiceRollout(GetServiceRolloutRequest request)

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

  • getServiceRollout(String serviceName, String rolloutId)

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

  • getServiceRolloutCallable()

CreateServiceRollout

Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging.

Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts.

Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually.

Operation<response: Rollout>

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

  • createServiceRolloutAsync(CreateServiceRolloutRequest request)

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

  • createServiceRolloutAsync(String serviceName, Rollout rollout)

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

  • createServiceRolloutOperationCallable()

  • createServiceRolloutCallable()

GenerateConfigReport

Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.

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

  • generateConfigReport(GenerateConfigReportRequest request)

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

  • generateConfigReport(Any newConfig, Any oldConfig)

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

  • generateConfigReportCallable()

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 ServiceManagerSettings 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
 ServiceManagerSettings serviceManagerSettings =
     ServiceManagerSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ServiceManagerClient serviceManagerClient = ServiceManagerClient.create(serviceManagerSettings);
 

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
 ServiceManagerSettings serviceManagerSettings =
     ServiceManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
 ServiceManagerClient serviceManagerClient = ServiceManagerClient.create(serviceManagerSettings);
 

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
 ServiceManagerSettings serviceManagerSettings =
     ServiceManagerSettings.newHttpJsonBuilder().build();
 ServiceManagerClient serviceManagerClient = ServiceManagerClient.create(serviceManagerSettings);
 

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

Inheritance

java.lang.Object > ServiceManagerClient

Static Methods

create()

public static final ServiceManagerClient create()

Constructs an instance of ServiceManagerClient with default settings.

Returns
Type Description
ServiceManagerClient
Exceptions
Type Description
IOException

create(ServiceManagerSettings settings)

public static final ServiceManagerClient create(ServiceManagerSettings settings)

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

Parameter
Name Description
settings ServiceManagerSettings
Returns
Type Description
ServiceManagerClient
Exceptions
Type Description
IOException

create(ServiceManagerStub stub)

public static final ServiceManagerClient create(ServiceManagerStub stub)

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

Parameter
Name Description
stub ServiceManagerStub
Returns
Type Description
ServiceManagerClient

Constructors

ServiceManagerClient(ServiceManagerSettings settings)

protected ServiceManagerClient(ServiceManagerSettings settings)

Constructs an instance of ServiceManagerClient, 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
Name Description
settings ServiceManagerSettings

ServiceManagerClient(ServiceManagerStub stub)

protected ServiceManagerClient(ServiceManagerStub stub)
Parameter
Name Description
stub ServiceManagerStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createServiceAsync(CreateServiceRequest request)

public final OperationFuture<ManagedService,OperationMetadata> createServiceAsync(CreateServiceRequest request)

Creates a new managed service.

A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion.

One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project.

Operation<response: ManagedService>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   CreateServiceRequest request =
       CreateServiceRequest.newBuilder().setService(ManagedService.newBuilder().build()).build();
   ManagedService response = serviceManagerClient.createServiceAsync(request).get();
 }
 
Parameter
Name Description
request CreateServiceRequest

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

Returns
Type Description
OperationFuture<ManagedService,OperationMetadata>

createServiceAsync(ManagedService service)

public final OperationFuture<ManagedService,OperationMetadata> createServiceAsync(ManagedService service)

Creates a new managed service.

A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion.

One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project.

Operation<response: ManagedService>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ManagedService service = ManagedService.newBuilder().build();
   ManagedService response = serviceManagerClient.createServiceAsync(service).get();
 }
 
Parameter
Name Description
service ManagedService

Required. Initial values for the service resource.

Returns
Type Description
OperationFuture<ManagedService,OperationMetadata>

createServiceCallable()

public final UnaryCallable<CreateServiceRequest,Operation> createServiceCallable()

Creates a new managed service.

A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion.

One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project.

Operation<response: ManagedService>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   CreateServiceRequest request =
       CreateServiceRequest.newBuilder().setService(ManagedService.newBuilder().build()).build();
   ApiFuture<Operation> future =
       serviceManagerClient.createServiceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateServiceRequest,Operation>

createServiceConfig(CreateServiceConfigRequest request)

public final Service createServiceConfig(CreateServiceConfigRequest request)

Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call CreateServiceRollout.

Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   CreateServiceConfigRequest request =
       CreateServiceConfigRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setServiceConfig(Service.newBuilder().build())
           .build();
   Service response = serviceManagerClient.createServiceConfig(request);
 }
 
Parameter
Name Description
request CreateServiceConfigRequest

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

Returns
Type Description
com.google.api.Service

createServiceConfig(String serviceName, Service serviceConfig)

public final Service createServiceConfig(String serviceName, Service serviceConfig)

Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call CreateServiceRollout.

Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   Service serviceConfig = Service.newBuilder().build();
   Service response = serviceManagerClient.createServiceConfig(serviceName, serviceConfig);
 }
 
Parameters
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

serviceConfig com.google.api.Service

Required. The service configuration resource.

Returns
Type Description
com.google.api.Service

createServiceConfigCallable()

public final UnaryCallable<CreateServiceConfigRequest,Service> createServiceConfigCallable()

Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call CreateServiceRollout.

Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   CreateServiceConfigRequest request =
       CreateServiceConfigRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setServiceConfig(Service.newBuilder().build())
           .build();
   ApiFuture<Service> future =
       serviceManagerClient.createServiceConfigCallable().futureCall(request);
   // Do something.
   Service response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateServiceConfigRequest,com.google.api.Service>

createServiceOperationCallable()

public final OperationCallable<CreateServiceRequest,ManagedService,OperationMetadata> createServiceOperationCallable()

Creates a new managed service.

A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion.

One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project.

Operation<response: ManagedService>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   CreateServiceRequest request =
       CreateServiceRequest.newBuilder().setService(ManagedService.newBuilder().build()).build();
   OperationFuture<ManagedService, OperationMetadata> future =
       serviceManagerClient.createServiceOperationCallable().futureCall(request);
   // Do something.
   ManagedService response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateServiceRequest,ManagedService,OperationMetadata>

createServiceRolloutAsync(CreateServiceRolloutRequest request)

public final OperationFuture<Rollout,OperationMetadata> createServiceRolloutAsync(CreateServiceRolloutRequest request)

Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging.

Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts.

Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually.

Operation<response: Rollout>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   CreateServiceRolloutRequest request =
       CreateServiceRolloutRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setRollout(Rollout.newBuilder().build())
           .build();
   Rollout response = serviceManagerClient.createServiceRolloutAsync(request).get();
 }
 
Parameter
Name Description
request CreateServiceRolloutRequest

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

Returns
Type Description
OperationFuture<Rollout,OperationMetadata>

createServiceRolloutAsync(String serviceName, Rollout rollout)

public final OperationFuture<Rollout,OperationMetadata> createServiceRolloutAsync(String serviceName, Rollout rollout)

Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging.

Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts.

Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually.

Operation<response: Rollout>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   Rollout rollout = Rollout.newBuilder().build();
   Rollout response = serviceManagerClient.createServiceRolloutAsync(serviceName, rollout).get();
 }
 
Parameters
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

rollout Rollout

Required. The rollout resource. The service_name field is output only.

Returns
Type Description
OperationFuture<Rollout,OperationMetadata>

createServiceRolloutCallable()

public final UnaryCallable<CreateServiceRolloutRequest,Operation> createServiceRolloutCallable()

Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging.

Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts.

Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually.

Operation<response: Rollout>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   CreateServiceRolloutRequest request =
       CreateServiceRolloutRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setRollout(Rollout.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       serviceManagerClient.createServiceRolloutCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateServiceRolloutRequest,Operation>

createServiceRolloutOperationCallable()

public final OperationCallable<CreateServiceRolloutRequest,Rollout,OperationMetadata> createServiceRolloutOperationCallable()

Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging.

Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts.

Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually.

Operation<response: Rollout>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   CreateServiceRolloutRequest request =
       CreateServiceRolloutRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setRollout(Rollout.newBuilder().build())
           .build();
   OperationFuture<Rollout, OperationMetadata> future =
       serviceManagerClient.createServiceRolloutOperationCallable().futureCall(request);
   // Do something.
   Rollout response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateServiceRolloutRequest,Rollout,OperationMetadata>

deleteServiceAsync(DeleteServiceRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteServiceAsync(DeleteServiceRequest request)

Deletes a managed service. This method will change the service to the Soft-Delete state for 30 days. Within this period, service producers may call UndeleteService to restore the service. After 30 days, the service will be permanently deleted.

Operation<response: google.protobuf.Empty>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   DeleteServiceRequest request =
       DeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
   serviceManagerClient.deleteServiceAsync(request).get();
 }
 
Parameter
Name Description
request DeleteServiceRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteServiceAsync(String serviceName)

public final OperationFuture<Empty,OperationMetadata> deleteServiceAsync(String serviceName)

Deletes a managed service. This method will change the service to the Soft-Delete state for 30 days. Within this period, service producers may call UndeleteService to restore the service. After 30 days, the service will be permanently deleted.

Operation<response: google.protobuf.Empty>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   serviceManagerClient.deleteServiceAsync(serviceName).get();
 }
 
Parameter
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteServiceCallable()

public final UnaryCallable<DeleteServiceRequest,Operation> deleteServiceCallable()

Deletes a managed service. This method will change the service to the Soft-Delete state for 30 days. Within this period, service producers may call UndeleteService to restore the service. After 30 days, the service will be permanently deleted.

Operation<response: google.protobuf.Empty>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   DeleteServiceRequest request =
       DeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
   ApiFuture<Operation> future =
       serviceManagerClient.deleteServiceCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteServiceRequest,Operation>

deleteServiceOperationCallable()

public final OperationCallable<DeleteServiceRequest,Empty,OperationMetadata> deleteServiceOperationCallable()

Deletes a managed service. This method will change the service to the Soft-Delete state for 30 days. Within this period, service producers may call UndeleteService to restore the service. After 30 days, the service will be permanently deleted.

Operation<response: google.protobuf.Empty>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   DeleteServiceRequest request =
       DeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
   OperationFuture<Empty, OperationMetadata> future =
       serviceManagerClient.deleteServiceOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteServiceRequest,Empty,OperationMetadata>

generateConfigReport(GenerateConfigReportRequest request)

public final GenerateConfigReportResponse generateConfigReport(GenerateConfigReportRequest request)

Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GenerateConfigReportRequest request =
       GenerateConfigReportRequest.newBuilder()
           .setNewConfig(Any.newBuilder().build())
           .setOldConfig(Any.newBuilder().build())
           .build();
   GenerateConfigReportResponse response = serviceManagerClient.generateConfigReport(request);
 }
 
Parameter
Name Description
request GenerateConfigReportRequest

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

Returns
Type Description
GenerateConfigReportResponse

generateConfigReport(Any newConfig, Any oldConfig)

public final GenerateConfigReportResponse generateConfigReport(Any newConfig, Any oldConfig)

Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   Any newConfig = Any.newBuilder().build();
   Any oldConfig = Any.newBuilder().build();
   GenerateConfigReportResponse response =
       serviceManagerClient.generateConfigReport(newConfig, oldConfig);
 }
 
Parameters
Name Description
newConfig Any

Required. Service configuration for which we want to generate the report. For this version of API, the supported types are google.api.servicemanagement.v1.ConfigRef, google.api.servicemanagement.v1.ConfigSource, and google.api.Service

oldConfig Any

Optional. Service configuration against which the comparison will be done. For this version of API, the supported types are google.api.servicemanagement.v1.ConfigRef, google.api.servicemanagement.v1.ConfigSource, and google.api.Service

Returns
Type Description
GenerateConfigReportResponse

generateConfigReportCallable()

public final UnaryCallable<GenerateConfigReportRequest,GenerateConfigReportResponse> generateConfigReportCallable()

Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GenerateConfigReportRequest request =
       GenerateConfigReportRequest.newBuilder()
           .setNewConfig(Any.newBuilder().build())
           .setOldConfig(Any.newBuilder().build())
           .build();
   ApiFuture<GenerateConfigReportResponse> future =
       serviceManagerClient.generateConfigReportCallable().futureCall(request);
   // Do something.
   GenerateConfigReportResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GenerateConfigReportRequest,GenerateConfigReportResponse>

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
Type Description
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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource("GetIamPolicyRequest-1527610370".toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   Policy response = serviceManagerClient.getIamPolicy(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.GetIamPolicyRequest

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

Returns
Type Description
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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource("GetIamPolicyRequest-1527610370".toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   ApiFuture<Policy> future = serviceManagerClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

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
Type Description
OperationsClient

getService(GetServiceRequest request)

public final ManagedService getService(GetServiceRequest request)

Gets a managed service. Authentication is required unless the service is public.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GetServiceRequest request =
       GetServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
   ManagedService response = serviceManagerClient.getService(request);
 }
 
Parameter
Name Description
request GetServiceRequest

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

Returns
Type Description
ManagedService

getService(String serviceName)

public final ManagedService getService(String serviceName)

Gets a managed service. Authentication is required unless the service is public.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   ManagedService response = serviceManagerClient.getService(serviceName);
 }
 
Parameter
Name Description
serviceName String

Required. The name of the service. See the ServiceManager overview for naming requirements. For example: example.googleapis.com.

Returns
Type Description
ManagedService

getServiceCallable()

public final UnaryCallable<GetServiceRequest,ManagedService> getServiceCallable()

Gets a managed service. Authentication is required unless the service is public.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GetServiceRequest request =
       GetServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
   ApiFuture<ManagedService> future =
       serviceManagerClient.getServiceCallable().futureCall(request);
   // Do something.
   ManagedService response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetServiceRequest,ManagedService>

getServiceConfig(GetServiceConfigRequest request)

public final Service getServiceConfig(GetServiceConfigRequest request)

Gets a service configuration (version) for a managed 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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GetServiceConfigRequest request =
       GetServiceConfigRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setConfigId("configId-580140035")
           .build();
   Service response = serviceManagerClient.getServiceConfig(request);
 }
 
Parameter
Name Description
request GetServiceConfigRequest

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

Returns
Type Description
com.google.api.Service

getServiceConfig(String serviceName, String configId, GetServiceConfigRequest.ConfigView view)

public final Service getServiceConfig(String serviceName, String configId, GetServiceConfigRequest.ConfigView view)

Gets a service configuration (version) for a managed 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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   String configId = "configId-580140035";
   GetServiceConfigRequest.ConfigView view = GetServiceConfigRequest.ConfigView.forNumber(0);
   Service response = serviceManagerClient.getServiceConfig(serviceName, configId, view);
 }
 
Parameters
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

configId String

Required. The id of the service configuration resource.

This field must be specified for the server to return all fields, including SourceInfo.

view GetServiceConfigRequest.ConfigView

Specifies which parts of the Service Config should be returned in the response.

Returns
Type Description
com.google.api.Service

getServiceConfigCallable()

public final UnaryCallable<GetServiceConfigRequest,Service> getServiceConfigCallable()

Gets a service configuration (version) for a managed 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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GetServiceConfigRequest request =
       GetServiceConfigRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setConfigId("configId-580140035")
           .build();
   ApiFuture<Service> future =
       serviceManagerClient.getServiceConfigCallable().futureCall(request);
   // Do something.
   Service response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetServiceConfigRequest,com.google.api.Service>

getServiceRollout(GetServiceRolloutRequest request)

public final Rollout getServiceRollout(GetServiceRolloutRequest request)

Gets a service configuration rollout.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GetServiceRolloutRequest request =
       GetServiceRolloutRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setRolloutId("rolloutId551248556")
           .build();
   Rollout response = serviceManagerClient.getServiceRollout(request);
 }
 
Parameter
Name Description
request GetServiceRolloutRequest

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

Returns
Type Description
Rollout

getServiceRollout(String serviceName, String rolloutId)

public final Rollout getServiceRollout(String serviceName, String rolloutId)

Gets a service configuration rollout.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   String rolloutId = "rolloutId551248556";
   Rollout response = serviceManagerClient.getServiceRollout(serviceName, rolloutId);
 }
 
Parameters
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

rolloutId String

Required. The id of the rollout resource.

Returns
Type Description
Rollout

getServiceRolloutCallable()

public final UnaryCallable<GetServiceRolloutRequest,Rollout> getServiceRolloutCallable()

Gets a service configuration rollout.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   GetServiceRolloutRequest request =
       GetServiceRolloutRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setRolloutId("rolloutId551248556")
           .build();
   ApiFuture<Rollout> future =
       serviceManagerClient.getServiceRolloutCallable().futureCall(request);
   // Do something.
   Rollout response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetServiceRolloutRequest,Rollout>

getSettings()

public final ServiceManagerSettings getSettings()
Returns
Type Description
ServiceManagerSettings

getStub()

public ServiceManagerStub getStub()
Returns
Type Description
ServiceManagerStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listServiceConfigs(ListServiceConfigsRequest request)

public final ServiceManagerClient.ListServiceConfigsPagedResponse listServiceConfigs(ListServiceConfigsRequest request)

Lists the history of the service configuration for a managed service, from the newest to the oldest.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServiceConfigsRequest request =
       ListServiceConfigsRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (Service element : serviceManagerClient.listServiceConfigs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListServiceConfigsRequest

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

Returns
Type Description
ServiceManagerClient.ListServiceConfigsPagedResponse

listServiceConfigs(String serviceName)

public final ServiceManagerClient.ListServiceConfigsPagedResponse listServiceConfigs(String serviceName)

Lists the history of the service configuration for a managed service, from the newest to the oldest.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   for (Service element : serviceManagerClient.listServiceConfigs(serviceName).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Returns
Type Description
ServiceManagerClient.ListServiceConfigsPagedResponse

listServiceConfigsCallable()

public final UnaryCallable<ListServiceConfigsRequest,ListServiceConfigsResponse> listServiceConfigsCallable()

Lists the history of the service configuration for a managed service, from the newest to the oldest.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServiceConfigsRequest request =
       ListServiceConfigsRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     ListServiceConfigsResponse response =
         serviceManagerClient.listServiceConfigsCallable().call(request);
     for (Service element : response.getServiceConfigsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListServiceConfigsRequest,ListServiceConfigsResponse>

listServiceConfigsPagedCallable()

public final UnaryCallable<ListServiceConfigsRequest,ServiceManagerClient.ListServiceConfigsPagedResponse> listServiceConfigsPagedCallable()

Lists the history of the service configuration for a managed service, from the newest to the oldest.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServiceConfigsRequest request =
       ListServiceConfigsRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture<Service> future =
       serviceManagerClient.listServiceConfigsPagedCallable().futureCall(request);
   // Do something.
   for (Service element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListServiceConfigsRequest,ListServiceConfigsPagedResponse>

listServiceRollouts(ListServiceRolloutsRequest request)

public final ServiceManagerClient.ListServiceRolloutsPagedResponse listServiceRollouts(ListServiceRolloutsRequest request)

Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServiceRolloutsRequest request =
       ListServiceRolloutsRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .setFilter("filter-1274492040")
           .build();
   for (Rollout element : serviceManagerClient.listServiceRollouts(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListServiceRolloutsRequest

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

Returns
Type Description
ServiceManagerClient.ListServiceRolloutsPagedResponse

listServiceRollouts(String serviceName, String filter)

public final ServiceManagerClient.ListServiceRolloutsPagedResponse listServiceRollouts(String serviceName, String filter)

Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   String filter = "filter-1274492040";
   for (Rollout element :
       serviceManagerClient.listServiceRollouts(serviceName, filter).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

filter String

Required. Use filter to return subset of rollouts. The following filters are supported:

-- By [status] [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example, filter='status=SUCCESS'

-- By [strategy] [google.api.servicemanagement.v1.Rollout.strategy]. For example, filter='strategy=TrafficPercentStrategy'

Returns
Type Description
ServiceManagerClient.ListServiceRolloutsPagedResponse

listServiceRolloutsCallable()

public final UnaryCallable<ListServiceRolloutsRequest,ListServiceRolloutsResponse> listServiceRolloutsCallable()

Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServiceRolloutsRequest request =
       ListServiceRolloutsRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListServiceRolloutsResponse response =
         serviceManagerClient.listServiceRolloutsCallable().call(request);
     for (Rollout element : response.getRolloutsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListServiceRolloutsRequest,ListServiceRolloutsResponse>

listServiceRolloutsPagedCallable()

public final UnaryCallable<ListServiceRolloutsRequest,ServiceManagerClient.ListServiceRolloutsPagedResponse> listServiceRolloutsPagedCallable()

Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServiceRolloutsRequest request =
       ListServiceRolloutsRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<Rollout> future =
       serviceManagerClient.listServiceRolloutsPagedCallable().futureCall(request);
   // Do something.
   for (Rollout element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListServiceRolloutsRequest,ListServiceRolloutsPagedResponse>

listServices(ListServicesRequest request)

public final ServiceManagerClient.ListServicesPagedResponse listServices(ListServicesRequest request)

Lists managed services.

Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServicesRequest request =
       ListServicesRequest.newBuilder()
           .setProducerProjectId("producerProjectId-1297373534")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setConsumerId("consumerId-166238287")
           .build();
   for (ManagedService element : serviceManagerClient.listServices(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListServicesRequest

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

Returns
Type Description
ServiceManagerClient.ListServicesPagedResponse

listServices(String producerProjectId, String consumerId)

public final ServiceManagerClient.ListServicesPagedResponse listServices(String producerProjectId, String consumerId)

Lists managed services.

Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String producerProjectId = "producerProjectId-1297373534";
   String consumerId = "consumerId-166238287";
   for (ManagedService element :
       serviceManagerClient.listServices(producerProjectId, consumerId).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
Name Description
producerProjectId String

Include services produced by the specified project.

consumerId String

Include services consumed by the specified consumer.

The Google Service Management implementation accepts the following forms: - project:<project_id>

Returns
Type Description
ServiceManagerClient.ListServicesPagedResponse

listServicesCallable()

public final UnaryCallable<ListServicesRequest,ListServicesResponse> listServicesCallable()

Lists managed services.

Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServicesRequest request =
       ListServicesRequest.newBuilder()
           .setProducerProjectId("producerProjectId-1297373534")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setConsumerId("consumerId-166238287")
           .build();
   while (true) {
     ListServicesResponse response = serviceManagerClient.listServicesCallable().call(request);
     for (ManagedService element : response.getServicesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListServicesRequest,ListServicesResponse>

listServicesPagedCallable()

public final UnaryCallable<ListServicesRequest,ServiceManagerClient.ListServicesPagedResponse> listServicesPagedCallable()

Lists managed services.

Returns all public services. For authenticated users, also returns all services the calling user has "servicemanagement.services.get" permission for.

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   ListServicesRequest request =
       ListServicesRequest.newBuilder()
           .setProducerProjectId("producerProjectId-1297373534")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setConsumerId("consumerId-166238287")
           .build();
   ApiFuture<ManagedService> future =
       serviceManagerClient.listServicesPagedCallable().futureCall(request);
   // Do something.
   for (ManagedService element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListServicesRequest,ListServicesPagedResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource("SetIamPolicyRequest1223629066".toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Policy response = serviceManagerClient.setIamPolicy(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.SetIamPolicyRequest

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

Returns
Type Description
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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource("SetIamPolicyRequest1223629066".toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Policy> future = serviceManagerClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

submitConfigSourceAsync(SubmitConfigSourceRequest request)

public final OperationFuture<SubmitConfigSourceResponse,OperationMetadata> submitConfigSourceAsync(SubmitConfigSourceRequest request)

Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call CreateServiceRollout.

Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually.

Operation<response: SubmitConfigSourceResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   SubmitConfigSourceRequest request =
       SubmitConfigSourceRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setConfigSource(ConfigSource.newBuilder().build())
           .setValidateOnly(true)
           .build();
   SubmitConfigSourceResponse response =
       serviceManagerClient.submitConfigSourceAsync(request).get();
 }
 
Parameter
Name Description
request SubmitConfigSourceRequest

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

Returns
Type Description
OperationFuture<SubmitConfigSourceResponse,OperationMetadata>

submitConfigSourceAsync(String serviceName, ConfigSource configSource, boolean validateOnly)

public final OperationFuture<SubmitConfigSourceResponse,OperationMetadata> submitConfigSourceAsync(String serviceName, ConfigSource configSource, boolean validateOnly)

Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call CreateServiceRollout.

Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually.

Operation<response: SubmitConfigSourceResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   ConfigSource configSource = ConfigSource.newBuilder().build();
   boolean validateOnly = true;
   SubmitConfigSourceResponse response =
       serviceManagerClient
           .submitConfigSourceAsync(serviceName, configSource, validateOnly)
           .get();
 }
 
Parameters
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

configSource ConfigSource

Required. The source configuration for the service.

validateOnly boolean

Optional. If set, this will result in the generation of a google.api.Service configuration based on the ConfigSource provided, but the generated config and the sources will NOT be persisted.

Returns
Type Description
OperationFuture<SubmitConfigSourceResponse,OperationMetadata>

submitConfigSourceCallable()

public final UnaryCallable<SubmitConfigSourceRequest,Operation> submitConfigSourceCallable()

Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call CreateServiceRollout.

Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually.

Operation<response: SubmitConfigSourceResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   SubmitConfigSourceRequest request =
       SubmitConfigSourceRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setConfigSource(ConfigSource.newBuilder().build())
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future =
       serviceManagerClient.submitConfigSourceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<SubmitConfigSourceRequest,Operation>

submitConfigSourceOperationCallable()

public final OperationCallable<SubmitConfigSourceRequest,SubmitConfigSourceResponse,OperationMetadata> submitConfigSourceOperationCallable()

Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call CreateServiceRollout.

Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually.

Operation<response: SubmitConfigSourceResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   SubmitConfigSourceRequest request =
       SubmitConfigSourceRequest.newBuilder()
           .setServiceName("serviceName-1928572192")
           .setConfigSource(ConfigSource.newBuilder().build())
           .setValidateOnly(true)
           .build();
   OperationFuture<SubmitConfigSourceResponse, OperationMetadata> future =
       serviceManagerClient.submitConfigSourceOperationCallable().futureCall(request);
   // Do something.
   SubmitConfigSourceResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<SubmitConfigSourceRequest,SubmitConfigSourceResponse,OperationMetadata>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource("TestIamPermissionsRequest942398222".toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   TestIamPermissionsResponse response = serviceManagerClient.testIamPermissions(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.TestIamPermissionsRequest

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

Returns
Type Description
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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource("TestIamPermissionsRequest942398222".toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   ApiFuture<TestIamPermissionsResponse> future =
       serviceManagerClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestIamPermissionsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

undeleteServiceAsync(UndeleteServiceRequest request)

public final OperationFuture<UndeleteServiceResponse,OperationMetadata> undeleteServiceAsync(UndeleteServiceRequest request)

Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days.

Operation<response: UndeleteServiceResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   UndeleteServiceRequest request =
       UndeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
   UndeleteServiceResponse response = serviceManagerClient.undeleteServiceAsync(request).get();
 }
 
Parameter
Name Description
request UndeleteServiceRequest

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

Returns
Type Description
OperationFuture<UndeleteServiceResponse,OperationMetadata>

undeleteServiceAsync(String serviceName)

public final OperationFuture<UndeleteServiceResponse,OperationMetadata> undeleteServiceAsync(String serviceName)

Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days.

Operation<response: UndeleteServiceResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   String serviceName = "serviceName-1928572192";
   UndeleteServiceResponse response =
       serviceManagerClient.undeleteServiceAsync(serviceName).get();
 }
 
Parameter
Name Description
serviceName String

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Returns
Type Description
OperationFuture<UndeleteServiceResponse,OperationMetadata>

undeleteServiceCallable()

public final UnaryCallable<UndeleteServiceRequest,Operation> undeleteServiceCallable()

Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days.

Operation<response: UndeleteServiceResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   UndeleteServiceRequest request =
       UndeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
   ApiFuture<Operation> future =
       serviceManagerClient.undeleteServiceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UndeleteServiceRequest,Operation>

undeleteServiceOperationCallable()

public final OperationCallable<UndeleteServiceRequest,UndeleteServiceResponse,OperationMetadata> undeleteServiceOperationCallable()

Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days.

Operation<response: UndeleteServiceResponse>

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 (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
   UndeleteServiceRequest request =
       UndeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
   OperationFuture<UndeleteServiceResponse, OperationMetadata> future =
       serviceManagerClient.undeleteServiceOperationCallable().futureCall(request);
   // Do something.
   UndeleteServiceResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<UndeleteServiceRequest,UndeleteServiceResponse,OperationMetadata>