Class AppHubClient (0.20.0)
Stay organized with collections
Save and categorize content based on your preferences.
Service Description: The App Hub API allows you to manage App Hub resources.
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(AppHubClientappHubClient=AppHubClient.create()){
LocationNamename=LocationName.of("[PROJECT]","[LOCATION]");
LookupServiceProjectAttachmentResponseresponse=
appHubClient.lookupServiceProjectAttachment(name);
}
Note: close() needs to be called on the AppHubClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
LookupServiceProjectAttachment |
Lists a service project attachment for a given service project. You can call this API from any project to find if it is attached to a host project. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListServiceProjectAttachments |
Lists service projects attached to the host project. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateServiceProjectAttachment |
Attaches a service project to the host project. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetServiceProjectAttachment |
Gets a service project attachment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteServiceProjectAttachment |
Deletes a service project attachment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DetachServiceProjectAttachment |
Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDiscoveredServices |
Lists Discovered Services that can be added to an Application in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDiscoveredService |
Gets a Discovered Service in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
LookupDiscoveredService |
Lists a Discovered Service in a host project and location, with a given resource URI. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListServices |
Lists Services in an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateService |
Creates a Service in an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetService |
Gets a Service in an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateService |
Updates a Service in an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteService |
Deletes a Service from an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDiscoveredWorkloads |
Lists Discovered Workloads that can be added to an Application in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDiscoveredWorkload |
Gets a Discovered Workload in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
LookupDiscoveredWorkload |
Lists a Discovered Workload in a host project and location, with a given resource URI. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListWorkloads |
Lists Workloads in an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateWorkload |
Creates a Workload in an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetWorkload |
Gets a Workload in an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateWorkload |
Updates a Workload in an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteWorkload |
Deletes a Workload from an Application. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListApplications |
Lists Applications in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateApplication |
Creates an Application in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetApplication |
Gets an Application in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateApplication |
Updates an Application in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteApplication |
Deletes an Application in a host project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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 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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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 AppHubSettings 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
AppHubSettingsappHubSettings=
AppHubSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
AppHubClientappHubClient=AppHubClient.create(appHubSettings);
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
AppHubSettingsappHubSettings=AppHubSettings.newBuilder().setEndpoint(myEndpoint).build();
AppHubClientappHubClient=AppHubClient.create(appHubSettings);
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
AppHubSettingsappHubSettings=AppHubSettings.newHttpJsonBuilder().build();
AppHubClientappHubClient=AppHubClient.create(appHubSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
publicstaticfinalAppHubClientcreate()Constructs an instance of AppHubClient with default settings.
| Returns | |
|---|---|
| Type | Description |
AppHubClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(AppHubSettings settings)
publicstaticfinalAppHubClientcreate(AppHubSettingssettings)Constructs an instance of AppHubClient, 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 |
AppHubSettings |
| Returns | |
|---|---|
| Type | Description |
AppHubClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(AppHubStub stub)
publicstaticfinalAppHubClientcreate(AppHubStubstub)Constructs an instance of AppHubClient, using the given stub for making calls. This is for advanced usage - prefer using create(AppHubSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
AppHubStub |
| Returns | |
|---|---|
| Type | Description |
AppHubClient |
|
Constructors
AppHubClient(AppHubSettings settings)
protectedAppHubClient(AppHubSettingssettings)Constructs an instance of AppHubClient, 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 |
AppHubSettings |
AppHubClient(AppHubStub stub)
protectedAppHubClient(AppHubStubstub)| Parameter | |
|---|---|
| Name | Description |
stub |
AppHubStub |
Methods
awaitTermination(long duration, TimeUnit unit)
publicbooleanawaitTermination(longduration,TimeUnitunit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
close()
publicfinalvoidclose()createApplicationAsync(CreateApplicationRequest request)
publicfinalOperationFuture<Application,OperationMetadata>createApplicationAsync(CreateApplicationRequestrequest)Creates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
CreateApplicationRequestrequest=
CreateApplicationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setApplicationId("applicationId-1011352949")
.setApplication(Application.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Applicationresponse=appHubClient.createApplicationAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateApplicationRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Application,OperationMetadata> |
|
createApplicationAsync(LocationName parent, Application application, String applicationId)
publicfinalOperationFuture<Application,OperationMetadata>createApplicationAsync(LocationNameparent,Applicationapplication,StringapplicationId)Creates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
Applicationapplication=Application.newBuilder().build();
StringapplicationId="applicationId-1011352949";
Applicationresponse=
appHubClient.createApplicationAsync(parent,application,applicationId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationName Required. Project and location to create Application in. Expected format:
|
application |
Application Required. The resource being created |
applicationId |
String Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Application,OperationMetadata> |
|
createApplicationAsync(String parent, Application application, String applicationId)
publicfinalOperationFuture<Application,OperationMetadata>createApplicationAsync(Stringparent,Applicationapplication,StringapplicationId)Creates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
Applicationapplication=Application.newBuilder().build();
StringapplicationId="applicationId-1011352949";
Applicationresponse=
appHubClient.createApplicationAsync(parent,application,applicationId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Project and location to create Application in. Expected format:
|
application |
Application Required. The resource being created |
applicationId |
String Required. The Application identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Application,OperationMetadata> |
|
createApplicationCallable()
publicfinalUnaryCallable<CreateApplicationRequest,Operation>createApplicationCallable()Creates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
CreateApplicationRequestrequest=
CreateApplicationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setApplicationId("applicationId-1011352949")
.setApplication(Application.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.createApplicationCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateApplicationRequest,Operation> |
|
createApplicationOperationCallable()
publicfinalOperationCallable<CreateApplicationRequest,Application,OperationMetadata>createApplicationOperationCallable()Creates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
CreateApplicationRequestrequest=
CreateApplicationRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setApplicationId("applicationId-1011352949")
.setApplication(Application.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Application,OperationMetadata>future=
appHubClient.createApplicationOperationCallable().futureCall(request);
// Do something.
Applicationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateApplicationRequest,Application,OperationMetadata> |
|
createServiceAsync(ApplicationName parent, Service service, String serviceId)
publicfinalOperationFuture<Service,OperationMetadata>createServiceAsync(ApplicationNameparent,Serviceservice,StringserviceId)Creates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ApplicationNameparent=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]");
Serviceservice=Service.newBuilder().build();
StringserviceId="serviceId-194185552";
Serviceresponse=appHubClient.createServiceAsync(parent,service,serviceId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
ApplicationName Required. Fully qualified name of the parent Application to create the Service
in. Expected format: |
service |
Service Required. The resource being created. |
serviceId |
String Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Service,OperationMetadata> |
|
createServiceAsync(CreateServiceRequest request)
publicfinalOperationFuture<Service,OperationMetadata>createServiceAsync(CreateServiceRequestrequest)Creates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateServiceRequestrequest=
CreateServiceRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setServiceId("serviceId-194185552")
.setService(Service.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Serviceresponse=appHubClient.createServiceAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateServiceRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Service,OperationMetadata> |
|
createServiceAsync(String parent, Service service, String serviceId)
publicfinalOperationFuture<Service,OperationMetadata>createServiceAsync(Stringparent,Serviceservice,StringserviceId)Creates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString();
Serviceservice=Service.newBuilder().build();
StringserviceId="serviceId-194185552";
Serviceresponse=appHubClient.createServiceAsync(parent,service,serviceId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Fully qualified name of the parent Application to create the Service
in. Expected format: |
service |
Service Required. The resource being created. |
serviceId |
String Required. The Service identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Service,OperationMetadata> |
|
createServiceCallable()
publicfinalUnaryCallable<CreateServiceRequest,Operation>createServiceCallable()Creates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateServiceRequestrequest=
CreateServiceRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setServiceId("serviceId-194185552")
.setService(Service.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.createServiceCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateServiceRequest,Operation> |
|
createServiceOperationCallable()
publicfinalOperationCallable<CreateServiceRequest,Service,OperationMetadata>createServiceOperationCallable()Creates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateServiceRequestrequest=
CreateServiceRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setServiceId("serviceId-194185552")
.setService(Service.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Service,OperationMetadata>future=
appHubClient.createServiceOperationCallable().futureCall(request);
// Do something.
Serviceresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateServiceRequest,Service,OperationMetadata> |
|
createServiceProjectAttachmentAsync(CreateServiceProjectAttachmentRequest request)
publicfinalOperationFuture<ServiceProjectAttachment,OperationMetadata>createServiceProjectAttachmentAsync(CreateServiceProjectAttachmentRequestrequest)Attaches a service project to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateServiceProjectAttachmentRequestrequest=
CreateServiceProjectAttachmentRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setServiceProjectAttachmentId("serviceProjectAttachmentId-1738589598")
.setServiceProjectAttachment(ServiceProjectAttachment.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ServiceProjectAttachmentresponse=
appHubClient.createServiceProjectAttachmentAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateServiceProjectAttachmentRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ServiceProjectAttachment,OperationMetadata> |
|
createServiceProjectAttachmentAsync(LocationName parent, ServiceProjectAttachment serviceProjectAttachment, String serviceProjectAttachmentId)
publicfinalOperationFuture<ServiceProjectAttachment,OperationMetadata>createServiceProjectAttachmentAsync(LocationNameparent,ServiceProjectAttachmentserviceProjectAttachment,StringserviceProjectAttachmentId)Attaches a service project to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
ServiceProjectAttachmentserviceProjectAttachment=
ServiceProjectAttachment.newBuilder().build();
StringserviceProjectAttachmentId="serviceProjectAttachmentId-1738589598";
ServiceProjectAttachmentresponse=
appHubClient
.createServiceProjectAttachmentAsync(
parent,serviceProjectAttachment,serviceProjectAttachmentId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationName Required. Host project ID and location to which service project is being
attached. Only global location is supported. Expected format:
|
serviceProjectAttachment |
ServiceProjectAttachment Required. The resource being created. |
serviceProjectAttachmentId |
String Required. The service project attachment identifier must contain the project id of the service project specified in the service_project_attachment.service_project field. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ServiceProjectAttachment,OperationMetadata> |
|
createServiceProjectAttachmentAsync(String parent, ServiceProjectAttachment serviceProjectAttachment, String serviceProjectAttachmentId)
publicfinalOperationFuture<ServiceProjectAttachment,OperationMetadata>createServiceProjectAttachmentAsync(Stringparent,ServiceProjectAttachmentserviceProjectAttachment,StringserviceProjectAttachmentId)Attaches a service project to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
ServiceProjectAttachmentserviceProjectAttachment=
ServiceProjectAttachment.newBuilder().build();
StringserviceProjectAttachmentId="serviceProjectAttachmentId-1738589598";
ServiceProjectAttachmentresponse=
appHubClient
.createServiceProjectAttachmentAsync(
parent,serviceProjectAttachment,serviceProjectAttachmentId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Host project ID and location to which service project is being
attached. Only global location is supported. Expected format:
|
serviceProjectAttachment |
ServiceProjectAttachment Required. The resource being created. |
serviceProjectAttachmentId |
String Required. The service project attachment identifier must contain the project id of the service project specified in the service_project_attachment.service_project field. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ServiceProjectAttachment,OperationMetadata> |
|
createServiceProjectAttachmentCallable()
publicfinalUnaryCallable<CreateServiceProjectAttachmentRequest,Operation>createServiceProjectAttachmentCallable()Attaches a service project to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateServiceProjectAttachmentRequestrequest=
CreateServiceProjectAttachmentRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setServiceProjectAttachmentId("serviceProjectAttachmentId-1738589598")
.setServiceProjectAttachment(ServiceProjectAttachment.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=
appHubClient.createServiceProjectAttachmentCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateServiceProjectAttachmentRequest,Operation> |
|
createServiceProjectAttachmentOperationCallable()
publicfinalOperationCallable<CreateServiceProjectAttachmentRequest,ServiceProjectAttachment,OperationMetadata>createServiceProjectAttachmentOperationCallable()Attaches a service project to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateServiceProjectAttachmentRequestrequest=
CreateServiceProjectAttachmentRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setServiceProjectAttachmentId("serviceProjectAttachmentId-1738589598")
.setServiceProjectAttachment(ServiceProjectAttachment.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<ServiceProjectAttachment,OperationMetadata>future=
appHubClient.createServiceProjectAttachmentOperationCallable().futureCall(request);
// Do something.
ServiceProjectAttachmentresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateServiceProjectAttachmentRequest,ServiceProjectAttachment,OperationMetadata> |
|
createWorkloadAsync(ApplicationName parent, Workload workload, String workloadId)
publicfinalOperationFuture<Workload,OperationMetadata>createWorkloadAsync(ApplicationNameparent,Workloadworkload,StringworkloadId)Creates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ApplicationNameparent=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]");
Workloadworkload=Workload.newBuilder().build();
StringworkloadId="workloadId-186277134";
Workloadresponse=appHubClient.createWorkloadAsync(parent,workload,workloadId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
ApplicationName Required. Fully qualified name of the Application to create Workload in. Expected
format: |
workload |
Workload Required. The resource being created. |
workloadId |
String Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Workload,OperationMetadata> |
|
createWorkloadAsync(CreateWorkloadRequest request)
publicfinalOperationFuture<Workload,OperationMetadata>createWorkloadAsync(CreateWorkloadRequestrequest)Creates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateWorkloadRequestrequest=
CreateWorkloadRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setWorkloadId("workloadId-186277134")
.setWorkload(Workload.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Workloadresponse=appHubClient.createWorkloadAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateWorkloadRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Workload,OperationMetadata> |
|
createWorkloadAsync(String parent, Workload workload, String workloadId)
publicfinalOperationFuture<Workload,OperationMetadata>createWorkloadAsync(Stringparent,Workloadworkload,StringworkloadId)Creates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString();
Workloadworkload=Workload.newBuilder().build();
StringworkloadId="workloadId-186277134";
Workloadresponse=appHubClient.createWorkloadAsync(parent,workload,workloadId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Fully qualified name of the Application to create Workload in. Expected
format: |
workload |
Workload Required. The resource being created. |
workloadId |
String Required. The Workload identifier. Must contain only lowercase letters, numbers or hyphens, with the first character a letter, the last a letter or a number, and a 63 character maximum. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Workload,OperationMetadata> |
|
createWorkloadCallable()
publicfinalUnaryCallable<CreateWorkloadRequest,Operation>createWorkloadCallable()Creates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateWorkloadRequestrequest=
CreateWorkloadRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setWorkloadId("workloadId-186277134")
.setWorkload(Workload.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.createWorkloadCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateWorkloadRequest,Operation> |
|
createWorkloadOperationCallable()
publicfinalOperationCallable<CreateWorkloadRequest,Workload,OperationMetadata>createWorkloadOperationCallable()Creates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
CreateWorkloadRequestrequest=
CreateWorkloadRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setWorkloadId("workloadId-186277134")
.setWorkload(Workload.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Workload,OperationMetadata>future=
appHubClient.createWorkloadOperationCallable().futureCall(request);
// Do something.
Workloadresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateWorkloadRequest,Workload,OperationMetadata> |
|
deleteApplicationAsync(ApplicationName name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApplicationAsync(ApplicationNamename)Deletes an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ApplicationNamename=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]");
appHubClient.deleteApplicationAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ApplicationName Required. Fully qualified name of the Application to delete. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApplicationAsync(DeleteApplicationRequest request)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApplicationAsync(DeleteApplicationRequestrequest)Deletes an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
DeleteApplicationRequestrequest=
DeleteApplicationRequest.newBuilder()
.setName(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setRequestId("requestId693933066")
.build();
appHubClient.deleteApplicationAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteApplicationRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApplicationAsync(String name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApplicationAsync(Stringname)Deletes an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Stringname=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString();
appHubClient.deleteApplicationAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the Application to delete. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApplicationCallable()
publicfinalUnaryCallable<DeleteApplicationRequest,Operation>deleteApplicationCallable()Deletes an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
DeleteApplicationRequestrequest=
DeleteApplicationRequest.newBuilder()
.setName(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.deleteApplicationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteApplicationRequest,Operation> |
|
deleteApplicationOperationCallable()
publicfinalOperationCallable<DeleteApplicationRequest,Empty,OperationMetadata>deleteApplicationOperationCallable()Deletes an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
DeleteApplicationRequestrequest=
DeleteApplicationRequest.newBuilder()
.setName(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty,OperationMetadata>future=
appHubClient.deleteApplicationOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteApplicationRequest,Empty,OperationMetadata> |
|
deleteServiceAsync(DeleteServiceRequest request)
publicfinalOperationFuture<Empty,OperationMetadata>deleteServiceAsync(DeleteServiceRequestrequest)Deletes a Service from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteServiceRequestrequest=
DeleteServiceRequest.newBuilder()
.setName(
ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]")
.toString())
.setRequestId("requestId693933066")
.build();
appHubClient.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(ServiceName name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteServiceAsync(ServiceNamename)Deletes a Service from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ServiceNamename=ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]");
appHubClient.deleteServiceAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ServiceName Required. Fully qualified name of the Service to delete from an Application.
Expected format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteServiceAsync(String name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteServiceAsync(Stringname)Deletes a Service from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringname=
ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]").toString();
appHubClient.deleteServiceAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the Service to delete from an Application.
Expected format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteServiceCallable()
publicfinalUnaryCallable<DeleteServiceRequest,Operation>deleteServiceCallable()Deletes a Service from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteServiceRequestrequest=
DeleteServiceRequest.newBuilder()
.setName(
ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.deleteServiceCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteServiceRequest,Operation> |
|
deleteServiceOperationCallable()
publicfinalOperationCallable<DeleteServiceRequest,Empty,OperationMetadata>deleteServiceOperationCallable()Deletes a Service from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteServiceRequestrequest=
DeleteServiceRequest.newBuilder()
.setName(
ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty,OperationMetadata>future=
appHubClient.deleteServiceOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteServiceRequest,Empty,OperationMetadata> |
|
deleteServiceProjectAttachmentAsync(DeleteServiceProjectAttachmentRequest request)
publicfinalOperationFuture<Empty,OperationMetadata>deleteServiceProjectAttachmentAsync(DeleteServiceProjectAttachmentRequestrequest)Deletes a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteServiceProjectAttachmentRequestrequest=
DeleteServiceProjectAttachmentRequest.newBuilder()
.setName(
ServiceProjectAttachmentName.of(
"[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]")
.toString())
.setRequestId("requestId693933066")
.build();
appHubClient.deleteServiceProjectAttachmentAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteServiceProjectAttachmentRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteServiceProjectAttachmentAsync(ServiceProjectAttachmentName name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteServiceProjectAttachmentAsync(ServiceProjectAttachmentNamename)Deletes a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
ServiceProjectAttachmentNamename=
ServiceProjectAttachmentName.of(
"[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]");
appHubClient.deleteServiceProjectAttachmentAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ServiceProjectAttachmentName Required. Fully qualified name of the service project attachment to delete.
Expected format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteServiceProjectAttachmentAsync(String name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteServiceProjectAttachmentAsync(Stringname)Deletes a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringname=
ServiceProjectAttachmentName.of("[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]")
.toString();
appHubClient.deleteServiceProjectAttachmentAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the service project attachment to delete.
Expected format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteServiceProjectAttachmentCallable()
publicfinalUnaryCallable<DeleteServiceProjectAttachmentRequest,Operation>deleteServiceProjectAttachmentCallable()Deletes a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteServiceProjectAttachmentRequestrequest=
DeleteServiceProjectAttachmentRequest.newBuilder()
.setName(
ServiceProjectAttachmentName.of(
"[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=
appHubClient.deleteServiceProjectAttachmentCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteServiceProjectAttachmentRequest,Operation> |
|
deleteServiceProjectAttachmentOperationCallable()
publicfinalOperationCallable<DeleteServiceProjectAttachmentRequest,Empty,OperationMetadata>deleteServiceProjectAttachmentOperationCallable()Deletes a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteServiceProjectAttachmentRequestrequest=
DeleteServiceProjectAttachmentRequest.newBuilder()
.setName(
ServiceProjectAttachmentName.of(
"[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty,OperationMetadata>future=
appHubClient.deleteServiceProjectAttachmentOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteServiceProjectAttachmentRequest,Empty,OperationMetadata> |
|
deleteWorkloadAsync(DeleteWorkloadRequest request)
publicfinalOperationFuture<Empty,OperationMetadata>deleteWorkloadAsync(DeleteWorkloadRequestrequest)Deletes a Workload from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteWorkloadRequestrequest=
DeleteWorkloadRequest.newBuilder()
.setName(
WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]")
.toString())
.setRequestId("requestId693933066")
.build();
appHubClient.deleteWorkloadAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteWorkloadRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteWorkloadAsync(WorkloadName name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteWorkloadAsync(WorkloadNamename)Deletes a Workload from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
WorkloadNamename=WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]");
appHubClient.deleteWorkloadAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
WorkloadName Required. Fully qualified name of the Workload to delete from an Application.
Expected format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteWorkloadAsync(String name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteWorkloadAsync(Stringname)Deletes a Workload from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringname=
WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]").toString();
appHubClient.deleteWorkloadAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the Workload to delete from an Application.
Expected format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteWorkloadCallable()
publicfinalUnaryCallable<DeleteWorkloadRequest,Operation>deleteWorkloadCallable()Deletes a Workload from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteWorkloadRequestrequest=
DeleteWorkloadRequest.newBuilder()
.setName(
WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.deleteWorkloadCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteWorkloadRequest,Operation> |
|
deleteWorkloadOperationCallable()
publicfinalOperationCallable<DeleteWorkloadRequest,Empty,OperationMetadata>deleteWorkloadOperationCallable()Deletes a Workload from an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
DeleteWorkloadRequestrequest=
DeleteWorkloadRequest.newBuilder()
.setName(
WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty,OperationMetadata>future=
appHubClient.deleteWorkloadOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteWorkloadRequest,Empty,OperationMetadata> |
|
detachServiceProjectAttachment(DetachServiceProjectAttachmentRequest request)
publicfinalDetachServiceProjectAttachmentResponsedetachServiceProjectAttachment(DetachServiceProjectAttachmentRequestrequest)Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to.
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(AppHubClientappHubClient=AppHubClient.create()){
DetachServiceProjectAttachmentRequestrequest=
DetachServiceProjectAttachmentRequest.newBuilder()
.setName(LocationName.of("[PROJECT]","[LOCATION]").toString())
.build();
DetachServiceProjectAttachmentResponseresponse=
appHubClient.detachServiceProjectAttachment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DetachServiceProjectAttachmentRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DetachServiceProjectAttachmentResponse |
|
detachServiceProjectAttachment(LocationName name)
publicfinalDetachServiceProjectAttachmentResponsedetachServiceProjectAttachment(LocationNamename)Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to.
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(AppHubClientappHubClient=AppHubClient.create()){
LocationNamename=LocationName.of("[PROJECT]","[LOCATION]");
DetachServiceProjectAttachmentResponseresponse=
appHubClient.detachServiceProjectAttachment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
LocationName Required. Service project id and location to detach from a host project. Only
global location is supported. Expected format: |
| Returns | |
|---|---|
| Type | Description |
DetachServiceProjectAttachmentResponse |
|
detachServiceProjectAttachment(String name)
publicfinalDetachServiceProjectAttachmentResponsedetachServiceProjectAttachment(Stringname)Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringname=LocationName.of("[PROJECT]","[LOCATION]").toString();
DetachServiceProjectAttachmentResponseresponse=
appHubClient.detachServiceProjectAttachment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Service project id and location to detach from a host project. Only
global location is supported. Expected format: |
| Returns | |
|---|---|
| Type | Description |
DetachServiceProjectAttachmentResponse |
|
detachServiceProjectAttachmentCallable()
publicfinalUnaryCallable<DetachServiceProjectAttachmentRequest,DetachServiceProjectAttachmentResponse>detachServiceProjectAttachmentCallable()Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to.
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(AppHubClientappHubClient=AppHubClient.create()){
DetachServiceProjectAttachmentRequestrequest=
DetachServiceProjectAttachmentRequest.newBuilder()
.setName(LocationName.of("[PROJECT]","[LOCATION]").toString())
.build();
ApiFuture<DetachServiceProjectAttachmentResponse>future=
appHubClient.detachServiceProjectAttachmentCallable().futureCall(request);
// Do something.
DetachServiceProjectAttachmentResponseresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DetachServiceProjectAttachmentRequest,DetachServiceProjectAttachmentResponse> |
|
getApplication(ApplicationName name)
publicfinalApplicationgetApplication(ApplicationNamename)Gets an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ApplicationNamename=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]");
Applicationresponse=appHubClient.getApplication(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ApplicationName Required. Fully qualified name of the Application to fetch. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
Application |
|
getApplication(GetApplicationRequest request)
publicfinalApplicationgetApplication(GetApplicationRequestrequest)Gets an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
GetApplicationRequestrequest=
GetApplicationRequest.newBuilder()
.setName(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.build();
Applicationresponse=appHubClient.getApplication(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetApplicationRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Application |
|
getApplication(String name)
publicfinalApplicationgetApplication(Stringname)Gets an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Stringname=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString();
Applicationresponse=appHubClient.getApplication(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the Application to fetch. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
Application |
|
getApplicationCallable()
publicfinalUnaryCallable<GetApplicationRequest,Application>getApplicationCallable()Gets an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
GetApplicationRequestrequest=
GetApplicationRequest.newBuilder()
.setName(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.build();
ApiFuture<Application>future=appHubClient.getApplicationCallable().futureCall(request);
// Do something.
Applicationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetApplicationRequest,Application> |
|
getDiscoveredService(DiscoveredServiceName name)
publicfinalDiscoveredServicegetDiscoveredService(DiscoveredServiceNamename)Gets a Discovered Service in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
DiscoveredServiceNamename=
DiscoveredServiceName.of("[PROJECT]","[LOCATION]","[DISCOVERED_SERVICE]");
DiscoveredServiceresponse=appHubClient.getDiscoveredService(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
DiscoveredServiceName Required. Fully qualified name of the Discovered Service to fetch. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
DiscoveredService |
|
getDiscoveredService(GetDiscoveredServiceRequest request)
publicfinalDiscoveredServicegetDiscoveredService(GetDiscoveredServiceRequestrequest)Gets a Discovered Service in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
GetDiscoveredServiceRequestrequest=
GetDiscoveredServiceRequest.newBuilder()
.setName(
DiscoveredServiceName.of("[PROJECT]","[LOCATION]","[DISCOVERED_SERVICE]")
.toString())
.build();
DiscoveredServiceresponse=appHubClient.getDiscoveredService(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetDiscoveredServiceRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DiscoveredService |
|
getDiscoveredService(String name)
publicfinalDiscoveredServicegetDiscoveredService(Stringname)Gets a Discovered Service in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Stringname=
DiscoveredServiceName.of("[PROJECT]","[LOCATION]","[DISCOVERED_SERVICE]").toString();
DiscoveredServiceresponse=appHubClient.getDiscoveredService(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the Discovered Service to fetch. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
DiscoveredService |
|
getDiscoveredServiceCallable()
publicfinalUnaryCallable<GetDiscoveredServiceRequest,DiscoveredService>getDiscoveredServiceCallable()Gets a Discovered Service in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
GetDiscoveredServiceRequestrequest=
GetDiscoveredServiceRequest.newBuilder()
.setName(
DiscoveredServiceName.of("[PROJECT]","[LOCATION]","[DISCOVERED_SERVICE]")
.toString())
.build();
ApiFuture<DiscoveredService>future=
appHubClient.getDiscoveredServiceCallable().futureCall(request);
// Do something.
DiscoveredServiceresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetDiscoveredServiceRequest,DiscoveredService> |
|
getDiscoveredWorkload(DiscoveredWorkloadName name)
publicfinalDiscoveredWorkloadgetDiscoveredWorkload(DiscoveredWorkloadNamename)Gets a Discovered Workload in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
DiscoveredWorkloadNamename=
DiscoveredWorkloadName.of("[PROJECT]","[LOCATION]","[DISCOVERED_WORKLOAD]");
DiscoveredWorkloadresponse=appHubClient.getDiscoveredWorkload(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
DiscoveredWorkloadName Required. Fully qualified name of the Discovered Workload to fetch. Expected
format: |
| Returns | |
|---|---|
| Type | Description |
DiscoveredWorkload |
|
getDiscoveredWorkload(GetDiscoveredWorkloadRequest request)
publicfinalDiscoveredWorkloadgetDiscoveredWorkload(GetDiscoveredWorkloadRequestrequest)Gets a Discovered Workload in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
GetDiscoveredWorkloadRequestrequest=
GetDiscoveredWorkloadRequest.newBuilder()
.setName(
DiscoveredWorkloadName.of("[PROJECT]","[LOCATION]","[DISCOVERED_WORKLOAD]")
.toString())
.build();
DiscoveredWorkloadresponse=appHubClient.getDiscoveredWorkload(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetDiscoveredWorkloadRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DiscoveredWorkload |
|
getDiscoveredWorkload(String name)
publicfinalDiscoveredWorkloadgetDiscoveredWorkload(Stringname)Gets a Discovered Workload in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Stringname=
DiscoveredWorkloadName.of("[PROJECT]","[LOCATION]","[DISCOVERED_WORKLOAD]").toString();
DiscoveredWorkloadresponse=appHubClient.getDiscoveredWorkload(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the Discovered Workload to fetch. Expected
format: |
| Returns | |
|---|---|
| Type | Description |
DiscoveredWorkload |
|
getDiscoveredWorkloadCallable()
publicfinalUnaryCallable<GetDiscoveredWorkloadRequest,DiscoveredWorkload>getDiscoveredWorkloadCallable()Gets a Discovered Workload in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
GetDiscoveredWorkloadRequestrequest=
GetDiscoveredWorkloadRequest.newBuilder()
.setName(
DiscoveredWorkloadName.of("[PROJECT]","[LOCATION]","[DISCOVERED_WORKLOAD]")
.toString())
.build();
ApiFuture<DiscoveredWorkload>future=
appHubClient.getDiscoveredWorkloadCallable().futureCall(request);
// Do something.
DiscoveredWorkloadresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetDiscoveredWorkloadRequest,DiscoveredWorkload> |
|
getHttpJsonOperationsClient()
publicfinalOperationsClientgetHttpJsonOperationsClient()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)
publicfinalPolicygetIamPolicy(GetIamPolicyRequestrequest)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(AppHubClientappHubClient=AppHubClient.create()){
GetIamPolicyRequestrequest=
GetIamPolicyRequest.newBuilder()
.setResource(
ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policyresponse=appHubClient.getIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.GetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
getIamPolicyCallable()
publicfinalUnaryCallable<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(AppHubClientappHubClient=AppHubClient.create()){
GetIamPolicyRequestrequest=
GetIamPolicyRequest.newBuilder()
.setResource(
ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy>future=appHubClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policyresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
|
getLocation(GetLocationRequest request)
publicfinalLocationgetLocation(GetLocationRequestrequest)Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
GetLocationRequestrequest=GetLocationRequest.newBuilder().setName("name3373707").build();
Locationresponse=appHubClient.getLocation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.GetLocationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.cloud.location.Location |
|
getLocationCallable()
publicfinalUnaryCallable<GetLocationRequest,Location>getLocationCallable()Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
GetLocationRequestrequest=GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location>future=appHubClient.getLocationCallable().futureCall(request);
// Do something.
Locationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getOperationsClient()
publicfinalOperationsClientgetOperationsClient()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)
publicfinalServicegetService(GetServiceRequestrequest)Gets a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
GetServiceRequestrequest=
GetServiceRequest.newBuilder()
.setName(
ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]")
.toString())
.build();
Serviceresponse=appHubClient.getService(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetServiceRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Service |
|
getService(ServiceName name)
publicfinalServicegetService(ServiceNamename)Gets a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ServiceNamename=ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]");
Serviceresponse=appHubClient.getService(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ServiceName Required. Fully qualified name of the Service to fetch. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
Service |
|
getService(String name)
publicfinalServicegetService(Stringname)Gets a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringname=
ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]").toString();
Serviceresponse=appHubClient.getService(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the Service to fetch. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
Service |
|
getServiceCallable()
publicfinalUnaryCallable<GetServiceRequest,Service>getServiceCallable()Gets a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
GetServiceRequestrequest=
GetServiceRequest.newBuilder()
.setName(
ServiceName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[SERVICE]")
.toString())
.build();
ApiFuture<Service>future=appHubClient.getServiceCallable().futureCall(request);
// Do something.
Serviceresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetServiceRequest,Service> |
|
getServiceProjectAttachment(GetServiceProjectAttachmentRequest request)
publicfinalServiceProjectAttachmentgetServiceProjectAttachment(GetServiceProjectAttachmentRequestrequest)Gets a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
GetServiceProjectAttachmentRequestrequest=
GetServiceProjectAttachmentRequest.newBuilder()
.setName(
ServiceProjectAttachmentName.of(
"[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]")
.toString())
.build();
ServiceProjectAttachmentresponse=appHubClient.getServiceProjectAttachment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetServiceProjectAttachmentRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ServiceProjectAttachment |
|
getServiceProjectAttachment(ServiceProjectAttachmentName name)
publicfinalServiceProjectAttachmentgetServiceProjectAttachment(ServiceProjectAttachmentNamename)Gets a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
ServiceProjectAttachmentNamename=
ServiceProjectAttachmentName.of(
"[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]");
ServiceProjectAttachmentresponse=appHubClient.getServiceProjectAttachment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ServiceProjectAttachmentName Required. Fully qualified name of the service project attachment to retrieve.
Expected format:
|
| Returns | |
|---|---|
| Type | Description |
ServiceProjectAttachment |
|
getServiceProjectAttachment(String name)
publicfinalServiceProjectAttachmentgetServiceProjectAttachment(Stringname)Gets a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringname=
ServiceProjectAttachmentName.of("[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]")
.toString();
ServiceProjectAttachmentresponse=appHubClient.getServiceProjectAttachment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the service project attachment to retrieve.
Expected format:
|
| Returns | |
|---|---|
| Type | Description |
ServiceProjectAttachment |
|
getServiceProjectAttachmentCallable()
publicfinalUnaryCallable<GetServiceProjectAttachmentRequest,ServiceProjectAttachment>getServiceProjectAttachmentCallable()Gets a service project attachment.
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(AppHubClientappHubClient=AppHubClient.create()){
GetServiceProjectAttachmentRequestrequest=
GetServiceProjectAttachmentRequest.newBuilder()
.setName(
ServiceProjectAttachmentName.of(
"[PROJECT]","[LOCATION]","[SERVICE_PROJECT_ATTACHMENT]")
.toString())
.build();
ApiFuture<ServiceProjectAttachment>future=
appHubClient.getServiceProjectAttachmentCallable().futureCall(request);
// Do something.
ServiceProjectAttachmentresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetServiceProjectAttachmentRequest,ServiceProjectAttachment> |
|
getSettings()
publicfinalAppHubSettingsgetSettings()| Returns | |
|---|---|
| Type | Description |
AppHubSettings |
|
getStub()
publicAppHubStubgetStub()| Returns | |
|---|---|
| Type | Description |
AppHubStub |
|
getWorkload(GetWorkloadRequest request)
publicfinalWorkloadgetWorkload(GetWorkloadRequestrequest)Gets a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
GetWorkloadRequestrequest=
GetWorkloadRequest.newBuilder()
.setName(
WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]")
.toString())
.build();
Workloadresponse=appHubClient.getWorkload(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetWorkloadRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Workload |
|
getWorkload(WorkloadName name)
publicfinalWorkloadgetWorkload(WorkloadNamename)Gets a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
WorkloadNamename=WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]");
Workloadresponse=appHubClient.getWorkload(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
WorkloadName Required. Fully qualified name of the Workload to fetch. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
Workload |
|
getWorkload(String name)
publicfinalWorkloadgetWorkload(Stringname)Gets a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringname=
WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]").toString();
Workloadresponse=appHubClient.getWorkload(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Fully qualified name of the Workload to fetch. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
Workload |
|
getWorkloadCallable()
publicfinalUnaryCallable<GetWorkloadRequest,Workload>getWorkloadCallable()Gets a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
GetWorkloadRequestrequest=
GetWorkloadRequest.newBuilder()
.setName(
WorkloadName.of("[PROJECT]","[LOCATION]","[APPLICATION]","[WORKLOAD]")
.toString())
.build();
ApiFuture<Workload>future=appHubClient.getWorkloadCallable().futureCall(request);
// Do something.
Workloadresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetWorkloadRequest,Workload> |
|
isShutdown()
publicbooleanisShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
publicbooleanisTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listApplications(ListApplicationsRequest request)
publicfinalAppHubClient.ListApplicationsPagedResponselistApplications(ListApplicationsRequestrequest)Lists Applications in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListApplicationsRequestrequest=
ListApplicationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(Applicationelement:appHubClient.listApplications(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListApplicationsRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListApplicationsPagedResponse |
|
listApplications(LocationName parent)
publicfinalAppHubClient.ListApplicationsPagedResponselistApplications(LocationNameparent)Lists Applications in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(Applicationelement:appHubClient.listApplications(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationName Required. Project and location to list Applications on. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListApplicationsPagedResponse |
|
listApplications(String parent)
publicfinalAppHubClient.ListApplicationsPagedResponselistApplications(Stringparent)Lists Applications in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(Applicationelement:appHubClient.listApplications(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Project and location to list Applications on. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListApplicationsPagedResponse |
|
listApplicationsCallable()
publicfinalUnaryCallable<ListApplicationsRequest,ListApplicationsResponse>listApplicationsCallable()Lists Applications in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListApplicationsRequestrequest=
ListApplicationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListApplicationsResponseresponse=appHubClient.listApplicationsCallable().call(request);
for(Applicationelement:response.getApplicationsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListApplicationsRequest,ListApplicationsResponse> |
|
listApplicationsPagedCallable()
publicfinalUnaryCallable<ListApplicationsRequest,AppHubClient.ListApplicationsPagedResponse>listApplicationsPagedCallable()Lists Applications in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListApplicationsRequestrequest=
ListApplicationsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Application>future=
appHubClient.listApplicationsPagedCallable().futureCall(request);
// Do something.
for(Applicationelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListApplicationsRequest,ListApplicationsPagedResponse> |
|
listDiscoveredServices(ListDiscoveredServicesRequest request)
publicfinalAppHubClient.ListDiscoveredServicesPagedResponselistDiscoveredServices(ListDiscoveredServicesRequestrequest)Lists Discovered Services that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListDiscoveredServicesRequestrequest=
ListDiscoveredServicesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(DiscoveredServiceelement:appHubClient.listDiscoveredServices(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListDiscoveredServicesRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListDiscoveredServicesPagedResponse |
|
listDiscoveredServices(LocationName parent)
publicfinalAppHubClient.ListDiscoveredServicesPagedResponselistDiscoveredServices(LocationNameparent)Lists Discovered Services that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(DiscoveredServiceelement:appHubClient.listDiscoveredServices(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationName Required. Project and location to list Discovered Services on. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListDiscoveredServicesPagedResponse |
|
listDiscoveredServices(String parent)
publicfinalAppHubClient.ListDiscoveredServicesPagedResponselistDiscoveredServices(Stringparent)Lists Discovered Services that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(DiscoveredServiceelement:appHubClient.listDiscoveredServices(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Project and location to list Discovered Services on. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListDiscoveredServicesPagedResponse |
|
listDiscoveredServicesCallable()
publicfinalUnaryCallable<ListDiscoveredServicesRequest,ListDiscoveredServicesResponse>listDiscoveredServicesCallable()Lists Discovered Services that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListDiscoveredServicesRequestrequest=
ListDiscoveredServicesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListDiscoveredServicesResponseresponse=
appHubClient.listDiscoveredServicesCallable().call(request);
for(DiscoveredServiceelement:response.getDiscoveredServicesList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDiscoveredServicesRequest,ListDiscoveredServicesResponse> |
|
listDiscoveredServicesPagedCallable()
publicfinalUnaryCallable<ListDiscoveredServicesRequest,AppHubClient.ListDiscoveredServicesPagedResponse>listDiscoveredServicesPagedCallable()Lists Discovered Services that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListDiscoveredServicesRequestrequest=
ListDiscoveredServicesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<DiscoveredService>future=
appHubClient.listDiscoveredServicesPagedCallable().futureCall(request);
// Do something.
for(DiscoveredServiceelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDiscoveredServicesRequest,ListDiscoveredServicesPagedResponse> |
|
listDiscoveredWorkloads(ListDiscoveredWorkloadsRequest request)
publicfinalAppHubClient.ListDiscoveredWorkloadsPagedResponselistDiscoveredWorkloads(ListDiscoveredWorkloadsRequestrequest)Lists Discovered Workloads that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListDiscoveredWorkloadsRequestrequest=
ListDiscoveredWorkloadsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(DiscoveredWorkloadelement:
appHubClient.listDiscoveredWorkloads(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListDiscoveredWorkloadsRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListDiscoveredWorkloadsPagedResponse |
|
listDiscoveredWorkloads(LocationName parent)
publicfinalAppHubClient.ListDiscoveredWorkloadsPagedResponselistDiscoveredWorkloads(LocationNameparent)Lists Discovered Workloads that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(DiscoveredWorkloadelement:appHubClient.listDiscoveredWorkloads(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationName Required. Project and location to list Discovered Workloads on. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListDiscoveredWorkloadsPagedResponse |
|
listDiscoveredWorkloads(String parent)
publicfinalAppHubClient.ListDiscoveredWorkloadsPagedResponselistDiscoveredWorkloads(Stringparent)Lists Discovered Workloads that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(DiscoveredWorkloadelement:appHubClient.listDiscoveredWorkloads(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Project and location to list Discovered Workloads on. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListDiscoveredWorkloadsPagedResponse |
|
listDiscoveredWorkloadsCallable()
publicfinalUnaryCallable<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsResponse>listDiscoveredWorkloadsCallable()Lists Discovered Workloads that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListDiscoveredWorkloadsRequestrequest=
ListDiscoveredWorkloadsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListDiscoveredWorkloadsResponseresponse=
appHubClient.listDiscoveredWorkloadsCallable().call(request);
for(DiscoveredWorkloadelement:response.getDiscoveredWorkloadsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsResponse> |
|
listDiscoveredWorkloadsPagedCallable()
publicfinalUnaryCallable<ListDiscoveredWorkloadsRequest,AppHubClient.ListDiscoveredWorkloadsPagedResponse>listDiscoveredWorkloadsPagedCallable()Lists Discovered Workloads that can be added to an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListDiscoveredWorkloadsRequestrequest=
ListDiscoveredWorkloadsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<DiscoveredWorkload>future=
appHubClient.listDiscoveredWorkloadsPagedCallable().futureCall(request);
// Do something.
for(DiscoveredWorkloadelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDiscoveredWorkloadsRequest,ListDiscoveredWorkloadsPagedResponse> |
|
listLocations(ListLocationsRequest request)
publicfinalAppHubClient.ListLocationsPagedResponselistLocations(ListLocationsRequestrequest)Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListLocationsRequestrequest=
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for(Locationelement:appHubClient.listLocations(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.ListLocationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListLocationsPagedResponse |
|
listLocationsCallable()
publicfinalUnaryCallable<ListLocationsRequest,ListLocationsResponse>listLocationsCallable()Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListLocationsRequestrequest=
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while(true){
ListLocationsResponseresponse=appHubClient.listLocationsCallable().call(request);
for(Locationelement:response.getLocationsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
|
listLocationsPagedCallable()
publicfinalUnaryCallable<ListLocationsRequest,AppHubClient.ListLocationsPagedResponse>listLocationsPagedCallable()Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
ListLocationsRequestrequest=
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location>future=appHubClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for(Locationelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
listServiceProjectAttachments(ListServiceProjectAttachmentsRequest request)
publicfinalAppHubClient.ListServiceProjectAttachmentsPagedResponselistServiceProjectAttachments(ListServiceProjectAttachmentsRequestrequest)Lists service projects attached to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
ListServiceProjectAttachmentsRequestrequest=
ListServiceProjectAttachmentsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(ServiceProjectAttachmentelement:
appHubClient.listServiceProjectAttachments(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListServiceProjectAttachmentsRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListServiceProjectAttachmentsPagedResponse |
|
listServiceProjectAttachments(LocationName parent)
publicfinalAppHubClient.ListServiceProjectAttachmentsPagedResponselistServiceProjectAttachments(LocationNameparent)Lists service projects attached to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(ServiceProjectAttachmentelement:
appHubClient.listServiceProjectAttachments(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationName Required. Host project ID and location to list service project attachments. Only
global location is supported. Expected format: |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListServiceProjectAttachmentsPagedResponse |
|
listServiceProjectAttachments(String parent)
publicfinalAppHubClient.ListServiceProjectAttachmentsPagedResponselistServiceProjectAttachments(Stringparent)Lists service projects attached to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(ServiceProjectAttachmentelement:
appHubClient.listServiceProjectAttachments(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Host project ID and location to list service project attachments. Only
global location is supported. Expected format: |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListServiceProjectAttachmentsPagedResponse |
|
listServiceProjectAttachmentsCallable()
publicfinalUnaryCallable<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsResponse>listServiceProjectAttachmentsCallable()Lists service projects attached to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
ListServiceProjectAttachmentsRequestrequest=
ListServiceProjectAttachmentsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListServiceProjectAttachmentsResponseresponse=
appHubClient.listServiceProjectAttachmentsCallable().call(request);
for(ServiceProjectAttachmentelement:response.getServiceProjectAttachmentsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsResponse> |
|
listServiceProjectAttachmentsPagedCallable()
publicfinalUnaryCallable<ListServiceProjectAttachmentsRequest,AppHubClient.ListServiceProjectAttachmentsPagedResponse>listServiceProjectAttachmentsPagedCallable()Lists service projects attached to the host project.
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(AppHubClientappHubClient=AppHubClient.create()){
ListServiceProjectAttachmentsRequestrequest=
ListServiceProjectAttachmentsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<ServiceProjectAttachment>future=
appHubClient.listServiceProjectAttachmentsPagedCallable().futureCall(request);
// Do something.
for(ServiceProjectAttachmentelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListServiceProjectAttachmentsRequest,ListServiceProjectAttachmentsPagedResponse> |
|
listServices(ApplicationName parent)
publicfinalAppHubClient.ListServicesPagedResponselistServices(ApplicationNameparent)Lists Services in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ApplicationNameparent=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]");
for(Serviceelement:appHubClient.listServices(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
ApplicationName Required. Fully qualified name of the parent Application to list Services for.
Expected format: |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListServicesPagedResponse |
|
listServices(ListServicesRequest request)
publicfinalAppHubClient.ListServicesPagedResponselistServices(ListServicesRequestrequest)Lists Services in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ListServicesRequestrequest=
ListServicesRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(Serviceelement:appHubClient.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 |
AppHubClient.ListServicesPagedResponse |
|
listServices(String parent)
publicfinalAppHubClient.ListServicesPagedResponselistServices(Stringparent)Lists Services in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString();
for(Serviceelement:appHubClient.listServices(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Fully qualified name of the parent Application to list Services for.
Expected format: |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListServicesPagedResponse |
|
listServicesCallable()
publicfinalUnaryCallable<ListServicesRequest,ListServicesResponse>listServicesCallable()Lists Services in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ListServicesRequestrequest=
ListServicesRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListServicesResponseresponse=appHubClient.listServicesCallable().call(request);
for(Serviceelement:response.getServicesList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListServicesRequest,ListServicesResponse> |
|
listServicesPagedCallable()
publicfinalUnaryCallable<ListServicesRequest,AppHubClient.ListServicesPagedResponse>listServicesPagedCallable()Lists Services in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ListServicesRequestrequest=
ListServicesRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Service>future=appHubClient.listServicesPagedCallable().futureCall(request);
// Do something.
for(Serviceelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListServicesRequest,ListServicesPagedResponse> |
|
listWorkloads(ApplicationName parent)
publicfinalAppHubClient.ListWorkloadsPagedResponselistWorkloads(ApplicationNameparent)Lists Workloads in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ApplicationNameparent=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]");
for(Workloadelement:appHubClient.listWorkloads(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
ApplicationName Required. Fully qualified name of the parent Application to list Workloads for.
Expected format: |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListWorkloadsPagedResponse |
|
listWorkloads(ListWorkloadsRequest request)
publicfinalAppHubClient.ListWorkloadsPagedResponselistWorkloads(ListWorkloadsRequestrequest)Lists Workloads in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ListWorkloadsRequestrequest=
ListWorkloadsRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(Workloadelement:appHubClient.listWorkloads(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListWorkloadsRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListWorkloadsPagedResponse |
|
listWorkloads(String parent)
publicfinalAppHubClient.ListWorkloadsPagedResponselistWorkloads(Stringparent)Lists Workloads in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString();
for(Workloadelement:appHubClient.listWorkloads(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Fully qualified name of the parent Application to list Workloads for.
Expected format: |
| Returns | |
|---|---|
| Type | Description |
AppHubClient.ListWorkloadsPagedResponse |
|
listWorkloadsCallable()
publicfinalUnaryCallable<ListWorkloadsRequest,ListWorkloadsResponse>listWorkloadsCallable()Lists Workloads in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ListWorkloadsRequestrequest=
ListWorkloadsRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListWorkloadsResponseresponse=appHubClient.listWorkloadsCallable().call(request);
for(Workloadelement:response.getWorkloadsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListWorkloadsRequest,ListWorkloadsResponse> |
|
listWorkloadsPagedCallable()
publicfinalUnaryCallable<ListWorkloadsRequest,AppHubClient.ListWorkloadsPagedResponse>listWorkloadsPagedCallable()Lists Workloads in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
ListWorkloadsRequestrequest=
ListWorkloadsRequest.newBuilder()
.setParent(ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Workload>future=appHubClient.listWorkloadsPagedCallable().futureCall(request);
// Do something.
for(Workloadelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListWorkloadsRequest,ListWorkloadsPagedResponse> |
|
lookupDiscoveredService(LocationName parent, String uri)
publicfinalLookupDiscoveredServiceResponselookupDiscoveredService(LocationNameparent,Stringuri)Lists a Discovered Service in a host project and location, with a given resource URI.
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(AppHubClientappHubClient=AppHubClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
Stringuri="uri116076";
LookupDiscoveredServiceResponseresponse=appHubClient.lookupDiscoveredService(parent,uri);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationName Required. Host project ID and location to lookup Discovered Service in. Expected
format: |
uri |
String Required. Resource URI to find DiscoveredService for. Accepts both project number and project ID and does translation when needed. |
| Returns | |
|---|---|
| Type | Description |
LookupDiscoveredServiceResponse |
|
lookupDiscoveredService(LookupDiscoveredServiceRequest request)
publicfinalLookupDiscoveredServiceResponselookupDiscoveredService(LookupDiscoveredServiceRequestrequest)Lists a Discovered Service in a host project and location, with a given resource URI.
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(AppHubClientappHubClient=AppHubClient.create()){
LookupDiscoveredServiceRequestrequest=
LookupDiscoveredServiceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setUri("uri116076")
.build();
LookupDiscoveredServiceResponseresponse=appHubClient.lookupDiscoveredService(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
LookupDiscoveredServiceRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LookupDiscoveredServiceResponse |
|
lookupDiscoveredService(String parent, String uri)
publicfinalLookupDiscoveredServiceResponselookupDiscoveredService(Stringparent,Stringuri)Lists a Discovered Service in a host project and location, with a given resource URI.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
Stringuri="uri116076";
LookupDiscoveredServiceResponseresponse=appHubClient.lookupDiscoveredService(parent,uri);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Host project ID and location to lookup Discovered Service in. Expected
format: |
uri |
String Required. Resource URI to find DiscoveredService for. Accepts both project number and project ID and does translation when needed. |
| Returns | |
|---|---|
| Type | Description |
LookupDiscoveredServiceResponse |
|
lookupDiscoveredServiceCallable()
publicfinalUnaryCallable<LookupDiscoveredServiceRequest,LookupDiscoveredServiceResponse>lookupDiscoveredServiceCallable()Lists a Discovered Service in a host project and location, with a given resource URI.
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(AppHubClientappHubClient=AppHubClient.create()){
LookupDiscoveredServiceRequestrequest=
LookupDiscoveredServiceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setUri("uri116076")
.build();
ApiFuture<LookupDiscoveredServiceResponse>future=
appHubClient.lookupDiscoveredServiceCallable().futureCall(request);
// Do something.
LookupDiscoveredServiceResponseresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<LookupDiscoveredServiceRequest,LookupDiscoveredServiceResponse> |
|
lookupDiscoveredWorkload(LocationName parent, String uri)
publicfinalLookupDiscoveredWorkloadResponselookupDiscoveredWorkload(LocationNameparent,Stringuri)Lists a Discovered Workload in a host project and location, with a given resource URI.
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(AppHubClientappHubClient=AppHubClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
Stringuri="uri116076";
LookupDiscoveredWorkloadResponseresponse=
appHubClient.lookupDiscoveredWorkload(parent,uri);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationName Required. Host project ID and location to lookup Discovered Workload in. Expected
format: |
uri |
String Required. Resource URI to find Discovered Workload for. Accepts both project number and project ID and does translation when needed. |
| Returns | |
|---|---|
| Type | Description |
LookupDiscoveredWorkloadResponse |
|
lookupDiscoveredWorkload(LookupDiscoveredWorkloadRequest request)
publicfinalLookupDiscoveredWorkloadResponselookupDiscoveredWorkload(LookupDiscoveredWorkloadRequestrequest)Lists a Discovered Workload in a host project and location, with a given resource URI.
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(AppHubClientappHubClient=AppHubClient.create()){
LookupDiscoveredWorkloadRequestrequest=
LookupDiscoveredWorkloadRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setUri("uri116076")
.build();
LookupDiscoveredWorkloadResponseresponse=appHubClient.lookupDiscoveredWorkload(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
LookupDiscoveredWorkloadRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LookupDiscoveredWorkloadResponse |
|
lookupDiscoveredWorkload(String parent, String uri)
publicfinalLookupDiscoveredWorkloadResponselookupDiscoveredWorkload(Stringparent,Stringuri)Lists a Discovered Workload in a host project and location, with a given resource URI.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
Stringuri="uri116076";
LookupDiscoveredWorkloadResponseresponse=
appHubClient.lookupDiscoveredWorkload(parent,uri);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Host project ID and location to lookup Discovered Workload in. Expected
format: |
uri |
String Required. Resource URI to find Discovered Workload for. Accepts both project number and project ID and does translation when needed. |
| Returns | |
|---|---|
| Type | Description |
LookupDiscoveredWorkloadResponse |
|
lookupDiscoveredWorkloadCallable()
publicfinalUnaryCallable<LookupDiscoveredWorkloadRequest,LookupDiscoveredWorkloadResponse>lookupDiscoveredWorkloadCallable()Lists a Discovered Workload in a host project and location, with a given resource URI.
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(AppHubClientappHubClient=AppHubClient.create()){
LookupDiscoveredWorkloadRequestrequest=
LookupDiscoveredWorkloadRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setUri("uri116076")
.build();
ApiFuture<LookupDiscoveredWorkloadResponse>future=
appHubClient.lookupDiscoveredWorkloadCallable().futureCall(request);
// Do something.
LookupDiscoveredWorkloadResponseresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<LookupDiscoveredWorkloadRequest,LookupDiscoveredWorkloadResponse> |
|
lookupServiceProjectAttachment(LocationName name)
publicfinalLookupServiceProjectAttachmentResponselookupServiceProjectAttachment(LocationNamename)Lists a service project attachment for a given service project. You can call this API from any project to find if it is attached to a host project.
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(AppHubClientappHubClient=AppHubClient.create()){
LocationNamename=LocationName.of("[PROJECT]","[LOCATION]");
LookupServiceProjectAttachmentResponseresponse=
appHubClient.lookupServiceProjectAttachment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
LocationName Required. Service project ID and location to lookup service project attachment for.
Only global location is supported. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
LookupServiceProjectAttachmentResponse |
|
lookupServiceProjectAttachment(LookupServiceProjectAttachmentRequest request)
publicfinalLookupServiceProjectAttachmentResponselookupServiceProjectAttachment(LookupServiceProjectAttachmentRequestrequest)Lists a service project attachment for a given service project. You can call this API from any project to find if it is attached to a host project.
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(AppHubClientappHubClient=AppHubClient.create()){
LookupServiceProjectAttachmentRequestrequest=
LookupServiceProjectAttachmentRequest.newBuilder()
.setName(LocationName.of("[PROJECT]","[LOCATION]").toString())
.build();
LookupServiceProjectAttachmentResponseresponse=
appHubClient.lookupServiceProjectAttachment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
LookupServiceProjectAttachmentRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LookupServiceProjectAttachmentResponse |
|
lookupServiceProjectAttachment(String name)
publicfinalLookupServiceProjectAttachmentResponselookupServiceProjectAttachment(Stringname)Lists a service project attachment for a given service project. You can call this API from any project to find if it is attached to a host project.
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(AppHubClientappHubClient=AppHubClient.create()){
Stringname=LocationName.of("[PROJECT]","[LOCATION]").toString();
LookupServiceProjectAttachmentResponseresponse=
appHubClient.lookupServiceProjectAttachment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Service project ID and location to lookup service project attachment for.
Only global location is supported. Expected format:
|
| Returns | |
|---|---|
| Type | Description |
LookupServiceProjectAttachmentResponse |
|
lookupServiceProjectAttachmentCallable()
publicfinalUnaryCallable<LookupServiceProjectAttachmentRequest,LookupServiceProjectAttachmentResponse>lookupServiceProjectAttachmentCallable()Lists a service project attachment for a given service project. You can call this API from any project to find if it is attached to a host project.
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(AppHubClientappHubClient=AppHubClient.create()){
LookupServiceProjectAttachmentRequestrequest=
LookupServiceProjectAttachmentRequest.newBuilder()
.setName(LocationName.of("[PROJECT]","[LOCATION]").toString())
.build();
ApiFuture<LookupServiceProjectAttachmentResponse>future=
appHubClient.lookupServiceProjectAttachmentCallable().futureCall(request);
// Do something.
LookupServiceProjectAttachmentResponseresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<LookupServiceProjectAttachmentRequest,LookupServiceProjectAttachmentResponse> |
|
setIamPolicy(SetIamPolicyRequest request)
publicfinalPolicysetIamPolicy(SetIamPolicyRequestrequest)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(AppHubClientappHubClient=AppHubClient.create()){
SetIamPolicyRequestrequest=
SetIamPolicyRequest.newBuilder()
.setResource(
ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policyresponse=appHubClient.setIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.SetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
setIamPolicyCallable()
publicfinalUnaryCallable<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(AppHubClientappHubClient=AppHubClient.create()){
SetIamPolicyRequestrequest=
SetIamPolicyRequest.newBuilder()
.setResource(
ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy>future=appHubClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policyresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
|
shutdown()
publicvoidshutdown()shutdownNow()
publicvoidshutdownNow()testIamPermissions(TestIamPermissionsRequest request)
publicfinalTestIamPermissionsResponsetestIamPermissions(TestIamPermissionsRequestrequest)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(AppHubClientappHubClient=AppHubClient.create()){
TestIamPermissionsRequestrequest=
TestIamPermissionsRequest.newBuilder()
.setResource(
ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.addAllPermissions(newArrayList<String>())
.build();
TestIamPermissionsResponseresponse=appHubClient.testIamPermissions(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.TestIamPermissionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
|
testIamPermissionsCallable()
publicfinalUnaryCallable<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(AppHubClientappHubClient=AppHubClient.create()){
TestIamPermissionsRequestrequest=
TestIamPermissionsRequest.newBuilder()
.setResource(
ApplicationName.of("[PROJECT]","[LOCATION]","[APPLICATION]").toString())
.addAllPermissions(newArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse>future=
appHubClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponseresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
|
updateApplicationAsync(Application application, FieldMask updateMask)
publicfinalOperationFuture<Application,OperationMetadata>updateApplicationAsync(Applicationapplication,FieldMaskupdateMask)Updates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
Applicationapplication=Application.newBuilder().build();
FieldMaskupdateMask=FieldMask.newBuilder().build();
Applicationresponse=appHubClient.updateApplicationAsync(application,updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
application |
Application Required. The resource being updated. |
updateMask |
FieldMask Required. Field mask is used to specify the fields to be overwritten in the Application resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Application,OperationMetadata> |
|
updateApplicationAsync(UpdateApplicationRequest request)
publicfinalOperationFuture<Application,OperationMetadata>updateApplicationAsync(UpdateApplicationRequestrequest)Updates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
UpdateApplicationRequestrequest=
UpdateApplicationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApplication(Application.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Applicationresponse=appHubClient.updateApplicationAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateApplicationRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Application,OperationMetadata> |
|
updateApplicationCallable()
publicfinalUnaryCallable<UpdateApplicationRequest,Operation>updateApplicationCallable()Updates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
UpdateApplicationRequestrequest=
UpdateApplicationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApplication(Application.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.updateApplicationCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateApplicationRequest,Operation> |
|
updateApplicationOperationCallable()
publicfinalOperationCallable<UpdateApplicationRequest,Application,OperationMetadata>updateApplicationOperationCallable()Updates an Application in a host project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(AppHubClientappHubClient=AppHubClient.create()){
UpdateApplicationRequestrequest=
UpdateApplicationRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApplication(Application.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Application,OperationMetadata>future=
appHubClient.updateApplicationOperationCallable().futureCall(request);
// Do something.
Applicationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateApplicationRequest,Application,OperationMetadata> |
|
updateServiceAsync(Service service, FieldMask updateMask)
publicfinalOperationFuture<Service,OperationMetadata>updateServiceAsync(Serviceservice,FieldMaskupdateMask)Updates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Serviceservice=Service.newBuilder().build();
FieldMaskupdateMask=FieldMask.newBuilder().build();
Serviceresponse=appHubClient.updateServiceAsync(service,updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
service |
Service Required. The resource being updated. |
updateMask |
FieldMask Required. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Service,OperationMetadata> |
|
updateServiceAsync(UpdateServiceRequest request)
publicfinalOperationFuture<Service,OperationMetadata>updateServiceAsync(UpdateServiceRequestrequest)Updates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
UpdateServiceRequestrequest=
UpdateServiceRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setService(Service.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Serviceresponse=appHubClient.updateServiceAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateServiceRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Service,OperationMetadata> |
|
updateServiceCallable()
publicfinalUnaryCallable<UpdateServiceRequest,Operation>updateServiceCallable()Updates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
UpdateServiceRequestrequest=
UpdateServiceRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setService(Service.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.updateServiceCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateServiceRequest,Operation> |
|
updateServiceOperationCallable()
publicfinalOperationCallable<UpdateServiceRequest,Service,OperationMetadata>updateServiceOperationCallable()Updates a Service in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
UpdateServiceRequestrequest=
UpdateServiceRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setService(Service.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Service,OperationMetadata>future=
appHubClient.updateServiceOperationCallable().futureCall(request);
// Do something.
Serviceresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateServiceRequest,Service,OperationMetadata> |
|
updateWorkloadAsync(UpdateWorkloadRequest request)
publicfinalOperationFuture<Workload,OperationMetadata>updateWorkloadAsync(UpdateWorkloadRequestrequest)Updates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
UpdateWorkloadRequestrequest=
UpdateWorkloadRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setWorkload(Workload.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Workloadresponse=appHubClient.updateWorkloadAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateWorkloadRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Workload,OperationMetadata> |
|
updateWorkloadAsync(Workload workload, FieldMask updateMask)
publicfinalOperationFuture<Workload,OperationMetadata>updateWorkloadAsync(Workloadworkload,FieldMaskupdateMask)Updates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
Workloadworkload=Workload.newBuilder().build();
FieldMaskupdateMask=FieldMask.newBuilder().build();
Workloadresponse=appHubClient.updateWorkloadAsync(workload,updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
workload |
Workload Required. The resource being updated. |
updateMask |
FieldMask Required. Field mask is used to specify the fields to be overwritten in the Workload resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. The API changes the values of the fields as specified in the update_mask. The API ignores the values of all fields not covered by the update_mask. You can also unset a field by not specifying it in the updated message, but adding the field to the mask. This clears whatever value the field previously had. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Workload,OperationMetadata> |
|
updateWorkloadCallable()
publicfinalUnaryCallable<UpdateWorkloadRequest,Operation>updateWorkloadCallable()Updates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
UpdateWorkloadRequestrequest=
UpdateWorkloadRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setWorkload(Workload.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation>future=appHubClient.updateWorkloadCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateWorkloadRequest,Operation> |
|
updateWorkloadOperationCallable()
publicfinalOperationCallable<UpdateWorkloadRequest,Workload,OperationMetadata>updateWorkloadOperationCallable()Updates a Workload in an Application.
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(AppHubClientappHubClient=AppHubClient.create()){
UpdateWorkloadRequestrequest=
UpdateWorkloadRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setWorkload(Workload.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Workload,OperationMetadata>future=
appHubClient.updateWorkloadOperationCallable().futureCall(request);
// Do something.
Workloadresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateWorkloadRequest,Workload,OperationMetadata> |
|