Class ApiGatewayServiceClient (2.35.0)
Stay organized with collections
Save and categorize content based on your preferences.
- 2.80.0 (latest)
- 2.78.0
- 2.76.0
- 2.75.0
- 2.74.0
- 2.73.0
- 2.72.0
- 2.70.0
- 2.68.0
- 2.67.0
- 2.64.0
- 2.63.0
- 2.62.0
- 2.60.0
- 2.59.0
- 2.58.0
- 2.57.0
- 2.56.0
- 2.55.0
- 2.54.0
- 2.53.0
- 2.52.0
- 2.51.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.7
- 2.2.1
- 2.1.12
Service Description: The API Gateway Service is the interface for managing API Gateways.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GatewayNamename=GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]");
Gatewayresponse=apiGatewayServiceClient.getGateway(name);
}
Note: close() needs to be called on the ApiGatewayServiceClient 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 |
|---|---|---|
ListGateways |
Lists Gateways in a given 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.
|
GetGateway |
Gets details of a single Gateway. |
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.
|
CreateGateway |
Creates a new Gateway in a given 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.
|
UpdateGateway |
Updates the parameters of a single Gateway. |
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.
|
DeleteGateway |
Deletes a single Gateway. |
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.
|
ListApis |
Lists Apis in a given 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.
|
GetApi |
Gets details of a single Api. |
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.
|
CreateApi |
Creates a new Api in a given 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.
|
UpdateApi |
Updates the parameters of a single Api. |
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.
|
DeleteApi |
Deletes a single Api. |
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.
|
ListApiConfigs |
Lists ApiConfigs in a given 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.
|
GetApiConfig |
Gets details of a single ApiConfig. |
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.
|
CreateApiConfig |
Creates a new ApiConfig in a given 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.
|
UpdateApiConfig |
Updates the parameters of a single ApiConfig. |
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.
|
DeleteApiConfig |
Deletes a single ApiConfig. |
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.
|
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 ApiGatewayServiceSettings 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
ApiGatewayServiceSettingsapiGatewayServiceSettings=
ApiGatewayServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ApiGatewayServiceClientapiGatewayServiceClient=
ApiGatewayServiceClient.create(apiGatewayServiceSettings);
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
ApiGatewayServiceSettingsapiGatewayServiceSettings=
ApiGatewayServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
ApiGatewayServiceClientapiGatewayServiceClient=
ApiGatewayServiceClient.create(apiGatewayServiceSettings);
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
ApiGatewayServiceSettingsapiGatewayServiceSettings=
ApiGatewayServiceSettings.newHttpJsonBuilder().build();
ApiGatewayServiceClientapiGatewayServiceClient=
ApiGatewayServiceClient.create(apiGatewayServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
publicstaticfinalApiGatewayServiceClientcreate()Constructs an instance of ApiGatewayServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(ApiGatewayServiceSettings settings)
publicstaticfinalApiGatewayServiceClientcreate(ApiGatewayServiceSettingssettings)Constructs an instance of ApiGatewayServiceClient, 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 |
ApiGatewayServiceSettings |
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(ApiGatewayServiceStub stub)
publicstaticfinalApiGatewayServiceClientcreate(ApiGatewayServiceStubstub)Constructs an instance of ApiGatewayServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(ApiGatewayServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
ApiGatewayServiceStub |
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient |
|
Constructors
ApiGatewayServiceClient(ApiGatewayServiceSettings settings)
protectedApiGatewayServiceClient(ApiGatewayServiceSettingssettings)Constructs an instance of ApiGatewayServiceClient, 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 |
ApiGatewayServiceSettings |
ApiGatewayServiceClient(ApiGatewayServiceStub stub)
protectedApiGatewayServiceClient(ApiGatewayServiceStubstub)| Parameter | |
|---|---|
| Name | Description |
stub |
ApiGatewayServiceStub |
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()createApiAsync(CreateApiRequest request)
publicfinalOperationFuture<Api,OperationMetadata>createApiAsync(CreateApiRequestrequest)Creates a new Api in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateApiRequestrequest=
CreateApiRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setApiId("apiId93021397")
.setApi(Api.newBuilder().build())
.build();
Apiresponse=apiGatewayServiceClient.createApiAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateApiRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Api,OperationMetadata> |
|
createApiAsync(LocationName parent, Api api, String apiId)
publicfinalOperationFuture<Api,OperationMetadata>createApiAsync(LocationNameparent,Apiapi,StringapiId)Creates a new Api in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
Apiapi=Api.newBuilder().build();
StringapiId="apiId93021397";
Apiresponse=apiGatewayServiceClient.createApiAsync(parent,api,apiId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationName Required. Parent resource of the API, of the form:
|
api |
Api Required. API resource. |
apiId |
String Required. Identifier to assign to the API. Must be unique within scope of the parent resource. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Api,OperationMetadata> |
|
createApiAsync(String parent, Api api, String apiId)
publicfinalOperationFuture<Api,OperationMetadata>createApiAsync(Stringparent,Apiapi,StringapiId)Creates a new Api in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
Apiapi=Api.newBuilder().build();
StringapiId="apiId93021397";
Apiresponse=apiGatewayServiceClient.createApiAsync(parent,api,apiId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Parent resource of the API, of the form:
|
api |
Api Required. API resource. |
apiId |
String Required. Identifier to assign to the API. Must be unique within scope of the parent resource. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Api,OperationMetadata> |
|
createApiCallable()
publicfinalUnaryCallable<CreateApiRequest,Operation>createApiCallable()Creates a new Api in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateApiRequestrequest=
CreateApiRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setApiId("apiId93021397")
.setApi(Api.newBuilder().build())
.build();
ApiFuture<Operation>future=apiGatewayServiceClient.createApiCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateApiRequest,Operation> |
|
createApiConfigAsync(ApiName parent, ApiConfig apiConfig, String apiConfigId)
publicfinalOperationFuture<ApiConfig,OperationMetadata>createApiConfigAsync(ApiNameparent,ApiConfigapiConfig,StringapiConfigId)Creates a new ApiConfig in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ApiNameparent=ApiName.of("[PROJECT]","[API]");
ApiConfigapiConfig=ApiConfig.newBuilder().build();
StringapiConfigId="apiConfigId-64952265";
ApiConfigresponse=
apiGatewayServiceClient.createApiConfigAsync(parent,apiConfig,apiConfigId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
ApiName Required. Parent resource of the API Config, of the form:
|
apiConfig |
ApiConfig Required. API resource. |
apiConfigId |
String Required. Identifier to assign to the API Config. Must be unique within scope of the parent resource. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ApiConfig,OperationMetadata> |
|
createApiConfigAsync(CreateApiConfigRequest request)
publicfinalOperationFuture<ApiConfig,OperationMetadata>createApiConfigAsync(CreateApiConfigRequestrequest)Creates a new ApiConfig in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateApiConfigRequestrequest=
CreateApiConfigRequest.newBuilder()
.setParent(ApiName.of("[PROJECT]","[API]").toString())
.setApiConfigId("apiConfigId-64952265")
.setApiConfig(ApiConfig.newBuilder().build())
.build();
ApiConfigresponse=apiGatewayServiceClient.createApiConfigAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateApiConfigRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ApiConfig,OperationMetadata> |
|
createApiConfigAsync(String parent, ApiConfig apiConfig, String apiConfigId)
publicfinalOperationFuture<ApiConfig,OperationMetadata>createApiConfigAsync(Stringparent,ApiConfigapiConfig,StringapiConfigId)Creates a new ApiConfig in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringparent=ApiName.of("[PROJECT]","[API]").toString();
ApiConfigapiConfig=ApiConfig.newBuilder().build();
StringapiConfigId="apiConfigId-64952265";
ApiConfigresponse=
apiGatewayServiceClient.createApiConfigAsync(parent,apiConfig,apiConfigId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Parent resource of the API Config, of the form:
|
apiConfig |
ApiConfig Required. API resource. |
apiConfigId |
String Required. Identifier to assign to the API Config. Must be unique within scope of the parent resource. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ApiConfig,OperationMetadata> |
|
createApiConfigCallable()
publicfinalUnaryCallable<CreateApiConfigRequest,Operation>createApiConfigCallable()Creates a new ApiConfig in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateApiConfigRequestrequest=
CreateApiConfigRequest.newBuilder()
.setParent(ApiName.of("[PROJECT]","[API]").toString())
.setApiConfigId("apiConfigId-64952265")
.setApiConfig(ApiConfig.newBuilder().build())
.build();
ApiFuture<Operation>future=
apiGatewayServiceClient.createApiConfigCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateApiConfigRequest,Operation> |
|
createApiConfigOperationCallable()
publicfinalOperationCallable<CreateApiConfigRequest,ApiConfig,OperationMetadata>createApiConfigOperationCallable()Creates a new ApiConfig in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateApiConfigRequestrequest=
CreateApiConfigRequest.newBuilder()
.setParent(ApiName.of("[PROJECT]","[API]").toString())
.setApiConfigId("apiConfigId-64952265")
.setApiConfig(ApiConfig.newBuilder().build())
.build();
OperationFuture<ApiConfig,OperationMetadata>future=
apiGatewayServiceClient.createApiConfigOperationCallable().futureCall(request);
// Do something.
ApiConfigresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateApiConfigRequest,ApiConfig,OperationMetadata> |
|
createApiOperationCallable()
publicfinalOperationCallable<CreateApiRequest,Api,OperationMetadata>createApiOperationCallable()Creates a new Api in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateApiRequestrequest=
CreateApiRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setApiId("apiId93021397")
.setApi(Api.newBuilder().build())
.build();
OperationFuture<Api,OperationMetadata>future=
apiGatewayServiceClient.createApiOperationCallable().futureCall(request);
// Do something.
Apiresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateApiRequest,Api,OperationMetadata> |
|
createGatewayAsync(CreateGatewayRequest request)
publicfinalOperationFuture<Gateway,OperationMetadata>createGatewayAsync(CreateGatewayRequestrequest)Creates a new Gateway in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateGatewayRequestrequest=
CreateGatewayRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setGatewayId("gatewayId-1354641793")
.setGateway(Gateway.newBuilder().build())
.build();
Gatewayresponse=apiGatewayServiceClient.createGatewayAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateGatewayRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Gateway,OperationMetadata> |
|
createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId)
publicfinalOperationFuture<Gateway,OperationMetadata>createGatewayAsync(LocationNameparent,Gatewaygateway,StringgatewayId)Creates a new Gateway in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
Gatewaygateway=Gateway.newBuilder().build();
StringgatewayId="gatewayId-1354641793";
Gatewayresponse=
apiGatewayServiceClient.createGatewayAsync(parent,gateway,gatewayId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationName Required. Parent resource of the Gateway, of the form:
|
gateway |
Gateway Required. Gateway resource. |
gatewayId |
String Required. Identifier to assign to the Gateway. Must be unique within scope of the parent resource. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Gateway,OperationMetadata> |
|
createGatewayAsync(String parent, Gateway gateway, String gatewayId)
publicfinalOperationFuture<Gateway,OperationMetadata>createGatewayAsync(Stringparent,Gatewaygateway,StringgatewayId)Creates a new Gateway in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
Gatewaygateway=Gateway.newBuilder().build();
StringgatewayId="gatewayId-1354641793";
Gatewayresponse=
apiGatewayServiceClient.createGatewayAsync(parent,gateway,gatewayId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
String Required. Parent resource of the Gateway, of the form:
|
gateway |
Gateway Required. Gateway resource. |
gatewayId |
String Required. Identifier to assign to the Gateway. Must be unique within scope of the parent resource. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Gateway,OperationMetadata> |
|
createGatewayCallable()
publicfinalUnaryCallable<CreateGatewayRequest,Operation>createGatewayCallable()Creates a new Gateway in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateGatewayRequestrequest=
CreateGatewayRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setGatewayId("gatewayId-1354641793")
.setGateway(Gateway.newBuilder().build())
.build();
ApiFuture<Operation>future=
apiGatewayServiceClient.createGatewayCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateGatewayRequest,Operation> |
|
createGatewayOperationCallable()
publicfinalOperationCallable<CreateGatewayRequest,Gateway,OperationMetadata>createGatewayOperationCallable()Creates a new Gateway in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
CreateGatewayRequestrequest=
CreateGatewayRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setGatewayId("gatewayId-1354641793")
.setGateway(Gateway.newBuilder().build())
.build();
OperationFuture<Gateway,OperationMetadata>future=
apiGatewayServiceClient.createGatewayOperationCallable().futureCall(request);
// Do something.
Gatewayresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateGatewayRequest,Gateway,OperationMetadata> |
|
deleteApiAsync(ApiName name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApiAsync(ApiNamename)Deletes a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ApiNamename=ApiName.of("[PROJECT]","[API]");
apiGatewayServiceClient.deleteApiAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ApiName Required. Resource name of the form: |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApiAsync(DeleteApiRequest request)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApiAsync(DeleteApiRequestrequest)Deletes a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteApiRequestrequest=
DeleteApiRequest.newBuilder()
.setName(ApiName.of("[PROJECT]","[API]").toString())
.build();
apiGatewayServiceClient.deleteApiAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteApiRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApiAsync(String name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApiAsync(Stringname)Deletes a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringname=ApiName.of("[PROJECT]","[API]").toString();
apiGatewayServiceClient.deleteApiAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Resource name of the form: |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApiCallable()
publicfinalUnaryCallable<DeleteApiRequest,Operation>deleteApiCallable()Deletes a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteApiRequestrequest=
DeleteApiRequest.newBuilder()
.setName(ApiName.of("[PROJECT]","[API]").toString())
.build();
ApiFuture<Operation>future=apiGatewayServiceClient.deleteApiCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteApiRequest,Operation> |
|
deleteApiConfigAsync(ApiConfigName name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApiConfigAsync(ApiConfigNamename)Deletes a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ApiConfigNamename=ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]");
apiGatewayServiceClient.deleteApiConfigAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ApiConfigName Required. Resource name of the form:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApiConfigAsync(DeleteApiConfigRequest request)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApiConfigAsync(DeleteApiConfigRequestrequest)Deletes a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteApiConfigRequestrequest=
DeleteApiConfigRequest.newBuilder()
.setName(ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]").toString())
.build();
apiGatewayServiceClient.deleteApiConfigAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteApiConfigRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApiConfigAsync(String name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteApiConfigAsync(Stringname)Deletes a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringname=ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]").toString();
apiGatewayServiceClient.deleteApiConfigAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Resource name of the form:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteApiConfigCallable()
publicfinalUnaryCallable<DeleteApiConfigRequest,Operation>deleteApiConfigCallable()Deletes a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteApiConfigRequestrequest=
DeleteApiConfigRequest.newBuilder()
.setName(ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]").toString())
.build();
ApiFuture<Operation>future=
apiGatewayServiceClient.deleteApiConfigCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteApiConfigRequest,Operation> |
|
deleteApiConfigOperationCallable()
publicfinalOperationCallable<DeleteApiConfigRequest,Empty,OperationMetadata>deleteApiConfigOperationCallable()Deletes a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteApiConfigRequestrequest=
DeleteApiConfigRequest.newBuilder()
.setName(ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]").toString())
.build();
OperationFuture<Empty,OperationMetadata>future=
apiGatewayServiceClient.deleteApiConfigOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteApiConfigRequest,Empty,OperationMetadata> |
|
deleteApiOperationCallable()
publicfinalOperationCallable<DeleteApiRequest,Empty,OperationMetadata>deleteApiOperationCallable()Deletes a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteApiRequestrequest=
DeleteApiRequest.newBuilder()
.setName(ApiName.of("[PROJECT]","[API]").toString())
.build();
OperationFuture<Empty,OperationMetadata>future=
apiGatewayServiceClient.deleteApiOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteApiRequest,Empty,OperationMetadata> |
|
deleteGatewayAsync(DeleteGatewayRequest request)
publicfinalOperationFuture<Empty,OperationMetadata>deleteGatewayAsync(DeleteGatewayRequestrequest)Deletes a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteGatewayRequestrequest=
DeleteGatewayRequest.newBuilder()
.setName(GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]").toString())
.build();
apiGatewayServiceClient.deleteGatewayAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteGatewayRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewayAsync(GatewayName name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteGatewayAsync(GatewayNamename)Deletes a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GatewayNamename=GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]");
apiGatewayServiceClient.deleteGatewayAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
GatewayName Required. Resource name of the form:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewayAsync(String name)
publicfinalOperationFuture<Empty,OperationMetadata>deleteGatewayAsync(Stringname)Deletes a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringname=GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]").toString();
apiGatewayServiceClient.deleteGatewayAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Resource name of the form:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewayCallable()
publicfinalUnaryCallable<DeleteGatewayRequest,Operation>deleteGatewayCallable()Deletes a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteGatewayRequestrequest=
DeleteGatewayRequest.newBuilder()
.setName(GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]").toString())
.build();
ApiFuture<Operation>future=
apiGatewayServiceClient.deleteGatewayCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteGatewayRequest,Operation> |
|
deleteGatewayOperationCallable()
publicfinalOperationCallable<DeleteGatewayRequest,Empty,OperationMetadata>deleteGatewayOperationCallable()Deletes a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
DeleteGatewayRequestrequest=
DeleteGatewayRequest.newBuilder()
.setName(GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]").toString())
.build();
OperationFuture<Empty,OperationMetadata>future=
apiGatewayServiceClient.deleteGatewayOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteGatewayRequest,Empty,OperationMetadata> |
|
getApi(ApiName name)
publicfinalApigetApi(ApiNamename)Gets details of a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ApiNamename=ApiName.of("[PROJECT]","[API]");
Apiresponse=apiGatewayServiceClient.getApi(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ApiName Required. Resource name of the form: |
| Returns | |
|---|---|
| Type | Description |
Api |
|
getApi(GetApiRequest request)
publicfinalApigetApi(GetApiRequestrequest)Gets details of a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GetApiRequestrequest=
GetApiRequest.newBuilder().setName(ApiName.of("[PROJECT]","[API]").toString()).build();
Apiresponse=apiGatewayServiceClient.getApi(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetApiRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Api |
|
getApi(String name)
publicfinalApigetApi(Stringname)Gets details of a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringname=ApiName.of("[PROJECT]","[API]").toString();
Apiresponse=apiGatewayServiceClient.getApi(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Resource name of the form: |
| Returns | |
|---|---|
| Type | Description |
Api |
|
getApiCallable()
publicfinalUnaryCallable<GetApiRequest,Api>getApiCallable()Gets details of a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GetApiRequestrequest=
GetApiRequest.newBuilder().setName(ApiName.of("[PROJECT]","[API]").toString()).build();
ApiFuture<Api>future=apiGatewayServiceClient.getApiCallable().futureCall(request);
// Do something.
Apiresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetApiRequest,Api> |
|
getApiConfig(ApiConfigName name)
publicfinalApiConfiggetApiConfig(ApiConfigNamename)Gets details of a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ApiConfigNamename=ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]");
ApiConfigresponse=apiGatewayServiceClient.getApiConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ApiConfigName Required. Resource name of the form:
|
| Returns | |
|---|---|
| Type | Description |
ApiConfig |
|
getApiConfig(GetApiConfigRequest request)
publicfinalApiConfiggetApiConfig(GetApiConfigRequestrequest)Gets details of a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GetApiConfigRequestrequest=
GetApiConfigRequest.newBuilder()
.setName(ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]").toString())
.build();
ApiConfigresponse=apiGatewayServiceClient.getApiConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetApiConfigRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ApiConfig |
|
getApiConfig(String name)
publicfinalApiConfiggetApiConfig(Stringname)Gets details of a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringname=ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]").toString();
ApiConfigresponse=apiGatewayServiceClient.getApiConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Resource name of the form:
|
| Returns | |
|---|---|
| Type | Description |
ApiConfig |
|
getApiConfigCallable()
publicfinalUnaryCallable<GetApiConfigRequest,ApiConfig>getApiConfigCallable()Gets details of a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GetApiConfigRequestrequest=
GetApiConfigRequest.newBuilder()
.setName(ApiConfigName.of("[PROJECT]","[API]","[API_CONFIG]").toString())
.build();
ApiFuture<ApiConfig>future=
apiGatewayServiceClient.getApiConfigCallable().futureCall(request);
// Do something.
ApiConfigresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetApiConfigRequest,ApiConfig> |
|
getGateway(GatewayName name)
publicfinalGatewaygetGateway(GatewayNamename)Gets details of a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GatewayNamename=GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]");
Gatewayresponse=apiGatewayServiceClient.getGateway(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
GatewayName Required. Resource name of the form:
|
| Returns | |
|---|---|
| Type | Description |
Gateway |
|
getGateway(GetGatewayRequest request)
publicfinalGatewaygetGateway(GetGatewayRequestrequest)Gets details of a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GetGatewayRequestrequest=
GetGatewayRequest.newBuilder()
.setName(GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]").toString())
.build();
Gatewayresponse=apiGatewayServiceClient.getGateway(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetGatewayRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Gateway |
|
getGateway(String name)
publicfinalGatewaygetGateway(Stringname)Gets details of a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringname=GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]").toString();
Gatewayresponse=apiGatewayServiceClient.getGateway(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
String Required. Resource name of the form:
|
| Returns | |
|---|---|
| Type | Description |
Gateway |
|
getGatewayCallable()
publicfinalUnaryCallable<GetGatewayRequest,Gateway>getGatewayCallable()Gets details of a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
GetGatewayRequestrequest=
GetGatewayRequest.newBuilder()
.setName(GatewayName.of("[PROJECT]","[LOCATION]","[GATEWAY]").toString())
.build();
ApiFuture<Gateway>future=apiGatewayServiceClient.getGatewayCallable().futureCall(request);
// Do something.
Gatewayresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetGatewayRequest,Gateway> |
|
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 |
|
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 |
|
getSettings()
publicfinalApiGatewayServiceSettingsgetSettings()| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceSettings |
|
getStub()
publicApiGatewayServiceStubgetStub()| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceStub |
|
isShutdown()
publicbooleanisShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
publicbooleanisTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listApiConfigs(ApiName parent)
publicfinalApiGatewayServiceClient.ListApiConfigsPagedResponselistApiConfigs(ApiNameparent)Lists ApiConfigs in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ApiNameparent=ApiName.of("[PROJECT]","[API]");
for(ApiConfigelement:apiGatewayServiceClient.listApiConfigs(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
ApiName Required. Parent resource of the API Config, of the form:
|
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListApiConfigsPagedResponse |
|
listApiConfigs(ListApiConfigsRequest request)
publicfinalApiGatewayServiceClient.ListApiConfigsPagedResponselistApiConfigs(ListApiConfigsRequestrequest)Lists ApiConfigs in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListApiConfigsRequestrequest=
ListApiConfigsRequest.newBuilder()
.setParent(ApiName.of("[PROJECT]","[API]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(ApiConfigelement:apiGatewayServiceClient.listApiConfigs(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListApiConfigsRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListApiConfigsPagedResponse |
|
listApiConfigs(String parent)
publicfinalApiGatewayServiceClient.ListApiConfigsPagedResponselistApiConfigs(Stringparent)Lists ApiConfigs in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringparent=ApiName.of("[PROJECT]","[API]").toString();
for(ApiConfigelement:apiGatewayServiceClient.listApiConfigs(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Parent resource of the API Config, of the form:
|
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListApiConfigsPagedResponse |
|
listApiConfigsCallable()
publicfinalUnaryCallable<ListApiConfigsRequest,ListApiConfigsResponse>listApiConfigsCallable()Lists ApiConfigs in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListApiConfigsRequestrequest=
ListApiConfigsRequest.newBuilder()
.setParent(ApiName.of("[PROJECT]","[API]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListApiConfigsResponseresponse=
apiGatewayServiceClient.listApiConfigsCallable().call(request);
for(ApiConfigelement:response.getApiConfigsList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListApiConfigsRequest,ListApiConfigsResponse> |
|
listApiConfigsPagedCallable()
publicfinalUnaryCallable<ListApiConfigsRequest,ApiGatewayServiceClient.ListApiConfigsPagedResponse>listApiConfigsPagedCallable()Lists ApiConfigs in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListApiConfigsRequestrequest=
ListApiConfigsRequest.newBuilder()
.setParent(ApiName.of("[PROJECT]","[API]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<ApiConfig>future=
apiGatewayServiceClient.listApiConfigsPagedCallable().futureCall(request);
// Do something.
for(ApiConfigelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListApiConfigsRequest,ListApiConfigsPagedResponse> |
|
listApis(ListApisRequest request)
publicfinalApiGatewayServiceClient.ListApisPagedResponselistApis(ListApisRequestrequest)Lists Apis in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListApisRequestrequest=
ListApisRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(Apielement:apiGatewayServiceClient.listApis(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListApisRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListApisPagedResponse |
|
listApis(LocationName parent)
publicfinalApiGatewayServiceClient.ListApisPagedResponselistApis(LocationNameparent)Lists Apis in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(Apielement:apiGatewayServiceClient.listApis(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationName Required. Parent resource of the API, of the form:
|
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListApisPagedResponse |
|
listApis(String parent)
publicfinalApiGatewayServiceClient.ListApisPagedResponselistApis(Stringparent)Lists Apis in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(Apielement:apiGatewayServiceClient.listApis(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Parent resource of the API, of the form:
|
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListApisPagedResponse |
|
listApisCallable()
publicfinalUnaryCallable<ListApisRequest,ListApisResponse>listApisCallable()Lists Apis in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListApisRequestrequest=
ListApisRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListApisResponseresponse=apiGatewayServiceClient.listApisCallable().call(request);
for(Apielement:response.getApisList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListApisRequest,ListApisResponse> |
|
listApisPagedCallable()
publicfinalUnaryCallable<ListApisRequest,ApiGatewayServiceClient.ListApisPagedResponse>listApisPagedCallable()Lists Apis in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListApisRequestrequest=
ListApisRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Api>future=apiGatewayServiceClient.listApisPagedCallable().futureCall(request);
// Do something.
for(Apielement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListApisRequest,ListApisPagedResponse> |
|
listGateways(ListGatewaysRequest request)
publicfinalApiGatewayServiceClient.ListGatewaysPagedResponselistGateways(ListGatewaysRequestrequest)Lists Gateways in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListGatewaysRequestrequest=
ListGatewaysRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for(Gatewayelement:apiGatewayServiceClient.listGateways(request).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListGatewaysRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListGatewaysPagedResponse |
|
listGateways(LocationName parent)
publicfinalApiGatewayServiceClient.ListGatewaysPagedResponselistGateways(LocationNameparent)Lists Gateways in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
LocationNameparent=LocationName.of("[PROJECT]","[LOCATION]");
for(Gatewayelement:apiGatewayServiceClient.listGateways(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationName Required. Parent resource of the Gateway, of the form:
|
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListGatewaysPagedResponse |
|
listGateways(String parent)
publicfinalApiGatewayServiceClient.ListGatewaysPagedResponselistGateways(Stringparent)Lists Gateways in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Stringparent=LocationName.of("[PROJECT]","[LOCATION]").toString();
for(Gatewayelement:apiGatewayServiceClient.listGateways(parent).iterateAll()){
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
String Required. Parent resource of the Gateway, of the form:
|
| Returns | |
|---|---|
| Type | Description |
ApiGatewayServiceClient.ListGatewaysPagedResponse |
|
listGatewaysCallable()
publicfinalUnaryCallable<ListGatewaysRequest,ListGatewaysResponse>listGatewaysCallable()Lists Gateways in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListGatewaysRequestrequest=
ListGatewaysRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while(true){
ListGatewaysResponseresponse=
apiGatewayServiceClient.listGatewaysCallable().call(request);
for(Gatewayelement:response.getGatewaysList()){
// doThingsWith(element);
}
StringnextPageToken=response.getNextPageToken();
if(!Strings.isNullOrEmpty(nextPageToken)){
request=request.toBuilder().setPageToken(nextPageToken).build();
}else{
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListGatewaysRequest,ListGatewaysResponse> |
|
listGatewaysPagedCallable()
publicfinalUnaryCallable<ListGatewaysRequest,ApiGatewayServiceClient.ListGatewaysPagedResponse>listGatewaysPagedCallable()Lists Gateways in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ListGatewaysRequestrequest=
ListGatewaysRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]","[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Gateway>future=
apiGatewayServiceClient.listGatewaysPagedCallable().futureCall(request);
// Do something.
for(Gatewayelement:future.get().iterateAll()){
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListGatewaysRequest,ListGatewaysPagedResponse> |
|
shutdown()
publicvoidshutdown()shutdownNow()
publicvoidshutdownNow()updateApiAsync(Api api, FieldMask updateMask)
publicfinalOperationFuture<Api,OperationMetadata>updateApiAsync(Apiapi,FieldMaskupdateMask)Updates the parameters of a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Apiapi=Api.newBuilder().build();
FieldMaskupdateMask=FieldMask.newBuilder().build();
Apiresponse=apiGatewayServiceClient.updateApiAsync(api,updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
api |
Api Required. API resource. |
updateMask |
FieldMask Field mask is used to specify the fields to be overwritten in the Api resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Api,OperationMetadata> |
|
updateApiAsync(UpdateApiRequest request)
publicfinalOperationFuture<Api,OperationMetadata>updateApiAsync(UpdateApiRequestrequest)Updates the parameters of a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateApiRequestrequest=
UpdateApiRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApi(Api.newBuilder().build())
.build();
Apiresponse=apiGatewayServiceClient.updateApiAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateApiRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Api,OperationMetadata> |
|
updateApiCallable()
publicfinalUnaryCallable<UpdateApiRequest,Operation>updateApiCallable()Updates the parameters of a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateApiRequestrequest=
UpdateApiRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApi(Api.newBuilder().build())
.build();
ApiFuture<Operation>future=apiGatewayServiceClient.updateApiCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateApiRequest,Operation> |
|
updateApiConfigAsync(ApiConfig apiConfig, FieldMask updateMask)
publicfinalOperationFuture<ApiConfig,OperationMetadata>updateApiConfigAsync(ApiConfigapiConfig,FieldMaskupdateMask)Updates the parameters of a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
ApiConfigapiConfig=ApiConfig.newBuilder().build();
FieldMaskupdateMask=FieldMask.newBuilder().build();
ApiConfigresponse=
apiGatewayServiceClient.updateApiConfigAsync(apiConfig,updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
apiConfig |
ApiConfig Required. API Config resource. |
updateMask |
FieldMask Field mask is used to specify the fields to be overwritten in the ApiConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ApiConfig,OperationMetadata> |
|
updateApiConfigAsync(UpdateApiConfigRequest request)
publicfinalOperationFuture<ApiConfig,OperationMetadata>updateApiConfigAsync(UpdateApiConfigRequestrequest)Updates the parameters of a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateApiConfigRequestrequest=
UpdateApiConfigRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApiConfig(ApiConfig.newBuilder().build())
.build();
ApiConfigresponse=apiGatewayServiceClient.updateApiConfigAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateApiConfigRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ApiConfig,OperationMetadata> |
|
updateApiConfigCallable()
publicfinalUnaryCallable<UpdateApiConfigRequest,Operation>updateApiConfigCallable()Updates the parameters of a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateApiConfigRequestrequest=
UpdateApiConfigRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApiConfig(ApiConfig.newBuilder().build())
.build();
ApiFuture<Operation>future=
apiGatewayServiceClient.updateApiConfigCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateApiConfigRequest,Operation> |
|
updateApiConfigOperationCallable()
publicfinalOperationCallable<UpdateApiConfigRequest,ApiConfig,OperationMetadata>updateApiConfigOperationCallable()Updates the parameters of a single ApiConfig.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateApiConfigRequestrequest=
UpdateApiConfigRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApiConfig(ApiConfig.newBuilder().build())
.build();
OperationFuture<ApiConfig,OperationMetadata>future=
apiGatewayServiceClient.updateApiConfigOperationCallable().futureCall(request);
// Do something.
ApiConfigresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateApiConfigRequest,ApiConfig,OperationMetadata> |
|
updateApiOperationCallable()
publicfinalOperationCallable<UpdateApiRequest,Api,OperationMetadata>updateApiOperationCallable()Updates the parameters of a single Api.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateApiRequestrequest=
UpdateApiRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setApi(Api.newBuilder().build())
.build();
OperationFuture<Api,OperationMetadata>future=
apiGatewayServiceClient.updateApiOperationCallable().futureCall(request);
// Do something.
Apiresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateApiRequest,Api,OperationMetadata> |
|
updateGatewayAsync(Gateway gateway, FieldMask updateMask)
publicfinalOperationFuture<Gateway,OperationMetadata>updateGatewayAsync(Gatewaygateway,FieldMaskupdateMask)Updates the parameters of a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
Gatewaygateway=Gateway.newBuilder().build();
FieldMaskupdateMask=FieldMask.newBuilder().build();
Gatewayresponse=apiGatewayServiceClient.updateGatewayAsync(gateway,updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
gateway |
Gateway Required. Gateway resource. |
updateMask |
FieldMask Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Gateway,OperationMetadata> |
|
updateGatewayAsync(UpdateGatewayRequest request)
publicfinalOperationFuture<Gateway,OperationMetadata>updateGatewayAsync(UpdateGatewayRequestrequest)Updates the parameters of a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateGatewayRequestrequest=
UpdateGatewayRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGateway(Gateway.newBuilder().build())
.build();
Gatewayresponse=apiGatewayServiceClient.updateGatewayAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateGatewayRequest The request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Gateway,OperationMetadata> |
|
updateGatewayCallable()
publicfinalUnaryCallable<UpdateGatewayRequest,Operation>updateGatewayCallable()Updates the parameters of a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateGatewayRequestrequest=
UpdateGatewayRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGateway(Gateway.newBuilder().build())
.build();
ApiFuture<Operation>future=
apiGatewayServiceClient.updateGatewayCallable().futureCall(request);
// Do something.
Operationresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateGatewayRequest,Operation> |
|
updateGatewayOperationCallable()
publicfinalOperationCallable<UpdateGatewayRequest,Gateway,OperationMetadata>updateGatewayOperationCallable()Updates the parameters of a single Gateway.
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(ApiGatewayServiceClientapiGatewayServiceClient=ApiGatewayServiceClient.create()){
UpdateGatewayRequestrequest=
UpdateGatewayRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGateway(Gateway.newBuilder().build())
.build();
OperationFuture<Gateway,OperationMetadata>future=
apiGatewayServiceClient.updateGatewayOperationCallable().futureCall(request);
// Do something.
Gatewayresponse=future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateGatewayRequest,Gateway,OperationMetadata> |
|