| GitHub Repository | Product Reference |
Service Description: Provides methods for handling CdnConfig objects.
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 (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
CdnConfigName name = CdnConfigName.of("[NETWORK_CODE]", "[CDN_CONFIG]");
CdnConfig response = cdnConfigServiceClient.getCdnConfig(name);
}
Note: close() needs to be called on the CdnConfigServiceClient 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 |
|---|---|---|
GetCdnConfig |
Retrieves a |
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.
|
ListCdnConfigs |
Lists |
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.
|
CreateCdnConfig |
Creates a |
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.
|
BatchCreateCdnConfigs |
Batch creates |
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.
|
UpdateCdnConfig |
Updates a |
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.
|
BatchUpdateCdnConfigs |
Batch updates |
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.
|
BatchActivateCdnConfigs |
Batch activates |
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.
|
BatchArchiveCdnConfigs |
Batch archives |
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.
|
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 CdnConfigServiceSettings 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
CdnConfigServiceSettings cdnConfigServiceSettings =
CdnConfigServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CdnConfigServiceClient cdnConfigServiceClient =
CdnConfigServiceClient.create(cdnConfigServiceSettings);
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
CdnConfigServiceSettings cdnConfigServiceSettings =
CdnConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
CdnConfigServiceClient cdnConfigServiceClient =
CdnConfigServiceClient.create(cdnConfigServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final CdnConfigServiceClient create()Constructs an instance of CdnConfigServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
CdnConfigServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(CdnConfigServiceSettings settings)
public static final CdnConfigServiceClient create(CdnConfigServiceSettings settings)Constructs an instance of CdnConfigServiceClient, 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 |
CdnConfigServiceSettings |
| Returns | |
|---|---|
| Type | Description |
CdnConfigServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(CdnConfigServiceStub stub)
public static final CdnConfigServiceClient create(CdnConfigServiceStub stub)Constructs an instance of CdnConfigServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(CdnConfigServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
CdnConfigServiceStub |
| Returns | |
|---|---|
| Type | Description |
CdnConfigServiceClient |
|
Constructors
CdnConfigServiceClient(CdnConfigServiceSettings settings)
protected CdnConfigServiceClient(CdnConfigServiceSettings settings)Constructs an instance of CdnConfigServiceClient, 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 |
CdnConfigServiceSettings |
CdnConfigServiceClient(CdnConfigServiceStub stub)
protected CdnConfigServiceClient(CdnConfigServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
CdnConfigServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
batchActivateCdnConfigs(@Nullable NetworkName parent, List<String> names)
public final BatchActivateCdnConfigsResponse batchActivateCdnConfigs(@Nullable NetworkName parent, List<String> names)Batch activates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchActivateCdnConfigsResponse response =
cdnConfigServiceClient.batchActivateCdnConfigs(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateCdnConfigsResponse |
|
batchActivateCdnConfigs(BatchActivateCdnConfigsRequest request)
public final BatchActivateCdnConfigsResponse batchActivateCdnConfigs(BatchActivateCdnConfigsRequest request)Batch activates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
BatchActivateCdnConfigsRequest request =
BatchActivateCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchActivateCdnConfigsResponse response =
cdnConfigServiceClient.batchActivateCdnConfigs(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchActivateCdnConfigsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchActivateCdnConfigsResponse |
|
batchActivateCdnConfigs(String parent, List<String> names)
public final BatchActivateCdnConfigsResponse batchActivateCdnConfigs(String parent, List<String> names)Batch activates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchActivateCdnConfigsResponse response =
cdnConfigServiceClient.batchActivateCdnConfigs(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateCdnConfigsResponse |
|
batchActivateCdnConfigsCallable()
public final UnaryCallable<BatchActivateCdnConfigsRequest,BatchActivateCdnConfigsResponse> batchActivateCdnConfigsCallable()Batch activates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
BatchActivateCdnConfigsRequest request =
BatchActivateCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchActivateCdnConfigsResponse> future =
cdnConfigServiceClient.batchActivateCdnConfigsCallable().futureCall(request);
// Do something.
BatchActivateCdnConfigsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchActivateCdnConfigsRequest,BatchActivateCdnConfigsResponse> |
|
batchArchiveCdnConfigs(@Nullable NetworkName parent, List<String> names)
public final BatchArchiveCdnConfigsResponse batchArchiveCdnConfigs(@Nullable NetworkName parent, List<String> names)Batch archives CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchArchiveCdnConfigsResponse response =
cdnConfigServiceClient.batchArchiveCdnConfigs(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchArchiveCdnConfigsResponse |
|
batchArchiveCdnConfigs(BatchArchiveCdnConfigsRequest request)
public final BatchArchiveCdnConfigsResponse batchArchiveCdnConfigs(BatchArchiveCdnConfigsRequest request)Batch archives CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
BatchArchiveCdnConfigsRequest request =
BatchArchiveCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchArchiveCdnConfigsResponse response =
cdnConfigServiceClient.batchArchiveCdnConfigs(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchArchiveCdnConfigsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchArchiveCdnConfigsResponse |
|
batchArchiveCdnConfigs(String parent, List<String> names)
public final BatchArchiveCdnConfigsResponse batchArchiveCdnConfigs(String parent, List<String> names)Batch archives CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchArchiveCdnConfigsResponse response =
cdnConfigServiceClient.batchArchiveCdnConfigs(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchArchiveCdnConfigsResponse |
|
batchArchiveCdnConfigsCallable()
public final UnaryCallable<BatchArchiveCdnConfigsRequest,BatchArchiveCdnConfigsResponse> batchArchiveCdnConfigsCallable()Batch archives CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
BatchArchiveCdnConfigsRequest request =
BatchArchiveCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchArchiveCdnConfigsResponse> future =
cdnConfigServiceClient.batchArchiveCdnConfigsCallable().futureCall(request);
// Do something.
BatchArchiveCdnConfigsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchArchiveCdnConfigsRequest,BatchArchiveCdnConfigsResponse> |
|
batchCreateCdnConfigs(@Nullable NetworkName parent, List<CreateCdnConfigRequest> requests)
public final BatchCreateCdnConfigsResponse batchCreateCdnConfigs(@Nullable NetworkName parent, List<CreateCdnConfigRequest> requests)Batch creates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<CreateCdnConfigRequest> requests = new ArrayList<>();
BatchCreateCdnConfigsResponse response =
cdnConfigServiceClient.batchCreateCdnConfigs(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<CreateCdnConfigRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateCdnConfigsResponse |
|
batchCreateCdnConfigs(BatchCreateCdnConfigsRequest request)
public final BatchCreateCdnConfigsResponse batchCreateCdnConfigs(BatchCreateCdnConfigsRequest request)Batch creates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
BatchCreateCdnConfigsRequest request =
BatchCreateCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateCdnConfigRequest>())
.build();
BatchCreateCdnConfigsResponse response =
cdnConfigServiceClient.batchCreateCdnConfigs(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchCreateCdnConfigsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateCdnConfigsResponse |
|
batchCreateCdnConfigs(String parent, List<CreateCdnConfigRequest> requests)
public final BatchCreateCdnConfigsResponse batchCreateCdnConfigs(String parent, List<CreateCdnConfigRequest> requests)Batch creates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<CreateCdnConfigRequest> requests = new ArrayList<>();
BatchCreateCdnConfigsResponse response =
cdnConfigServiceClient.batchCreateCdnConfigs(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<CreateCdnConfigRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateCdnConfigsResponse |
|
batchCreateCdnConfigsCallable()
public final UnaryCallable<BatchCreateCdnConfigsRequest,BatchCreateCdnConfigsResponse> batchCreateCdnConfigsCallable()Batch creates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
BatchCreateCdnConfigsRequest request =
BatchCreateCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateCdnConfigRequest>())
.build();
ApiFuture<BatchCreateCdnConfigsResponse> future =
cdnConfigServiceClient.batchCreateCdnConfigsCallable().futureCall(request);
// Do something.
BatchCreateCdnConfigsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchCreateCdnConfigsRequest,BatchCreateCdnConfigsResponse> |
|
batchUpdateCdnConfigs(@Nullable NetworkName parent, List<UpdateCdnConfigRequest> requests)
public final BatchUpdateCdnConfigsResponse batchUpdateCdnConfigs(@Nullable NetworkName parent, List<UpdateCdnConfigRequest> requests)Batch updates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<UpdateCdnConfigRequest> requests = new ArrayList<>();
BatchUpdateCdnConfigsResponse response =
cdnConfigServiceClient.batchUpdateCdnConfigs(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<UpdateCdnConfigRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateCdnConfigsResponse |
|
batchUpdateCdnConfigs(BatchUpdateCdnConfigsRequest request)
public final BatchUpdateCdnConfigsResponse batchUpdateCdnConfigs(BatchUpdateCdnConfigsRequest request)Batch updates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
BatchUpdateCdnConfigsRequest request =
BatchUpdateCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateCdnConfigRequest>())
.build();
BatchUpdateCdnConfigsResponse response =
cdnConfigServiceClient.batchUpdateCdnConfigs(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchUpdateCdnConfigsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateCdnConfigsResponse |
|
batchUpdateCdnConfigs(String parent, List<UpdateCdnConfigRequest> requests)
public final BatchUpdateCdnConfigsResponse batchUpdateCdnConfigs(String parent, List<UpdateCdnConfigRequest> requests)Batch updates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<UpdateCdnConfigRequest> requests = new ArrayList<>();
BatchUpdateCdnConfigsResponse response =
cdnConfigServiceClient.batchUpdateCdnConfigs(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<UpdateCdnConfigRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateCdnConfigsResponse |
|
batchUpdateCdnConfigsCallable()
public final UnaryCallable<BatchUpdateCdnConfigsRequest,BatchUpdateCdnConfigsResponse> batchUpdateCdnConfigsCallable()Batch updates CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
BatchUpdateCdnConfigsRequest request =
BatchUpdateCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateCdnConfigRequest>())
.build();
ApiFuture<BatchUpdateCdnConfigsResponse> future =
cdnConfigServiceClient.batchUpdateCdnConfigsCallable().futureCall(request);
// Do something.
BatchUpdateCdnConfigsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchUpdateCdnConfigsRequest,BatchUpdateCdnConfigsResponse> |
|
close()
public final void close()createCdnConfig(@Nullable NetworkName parent, CdnConfig cdnConfig)
public final CdnConfig createCdnConfig(@Nullable NetworkName parent, CdnConfig cdnConfig)Creates a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
CdnConfig cdnConfig = CdnConfig.newBuilder().build();
CdnConfig response = cdnConfigServiceClient.createCdnConfig(parent, cdnConfig);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where this |
cdnConfig |
CdnConfigRequired. The |
| Returns | |
|---|---|
| Type | Description |
CdnConfig |
|
createCdnConfig(CreateCdnConfigRequest request)
public final CdnConfig createCdnConfig(CreateCdnConfigRequest request)Creates a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
CreateCdnConfigRequest request =
CreateCdnConfigRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setCdnConfig(CdnConfig.newBuilder().build())
.build();
CdnConfig response = cdnConfigServiceClient.createCdnConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateCdnConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CdnConfig |
|
createCdnConfig(String parent, CdnConfig cdnConfig)
public final CdnConfig createCdnConfig(String parent, CdnConfig cdnConfig)Creates a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
CdnConfig cdnConfig = CdnConfig.newBuilder().build();
CdnConfig response = cdnConfigServiceClient.createCdnConfig(parent, cdnConfig);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this |
cdnConfig |
CdnConfigRequired. The |
| Returns | |
|---|---|
| Type | Description |
CdnConfig |
|
createCdnConfigCallable()
public final UnaryCallable<CreateCdnConfigRequest,CdnConfig> createCdnConfigCallable()Creates a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
CreateCdnConfigRequest request =
CreateCdnConfigRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setCdnConfig(CdnConfig.newBuilder().build())
.build();
ApiFuture<CdnConfig> future =
cdnConfigServiceClient.createCdnConfigCallable().futureCall(request);
// Do something.
CdnConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateCdnConfigRequest,CdnConfig> |
|
getCdnConfig(@Nullable CdnConfigName name)
public final CdnConfig getCdnConfig(@Nullable CdnConfigName name)Retrieves a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
CdnConfigName name = CdnConfigName.of("[NETWORK_CODE]", "[CDN_CONFIG]");
CdnConfig response = cdnConfigServiceClient.getCdnConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.CdnConfigNameRequired. The resource name of the CdnConfig. Format:
|
| Returns | |
|---|---|
| Type | Description |
CdnConfig |
|
getCdnConfig(GetCdnConfigRequest request)
public final CdnConfig getCdnConfig(GetCdnConfigRequest request)Retrieves a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
GetCdnConfigRequest request =
GetCdnConfigRequest.newBuilder()
.setName(CdnConfigName.of("[NETWORK_CODE]", "[CDN_CONFIG]").toString())
.build();
CdnConfig response = cdnConfigServiceClient.getCdnConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetCdnConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CdnConfig |
|
getCdnConfig(String name)
public final CdnConfig getCdnConfig(String name)Retrieves a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
String name = CdnConfigName.of("[NETWORK_CODE]", "[CDN_CONFIG]").toString();
CdnConfig response = cdnConfigServiceClient.getCdnConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the CdnConfig. Format:
|
| Returns | |
|---|---|
| Type | Description |
CdnConfig |
|
getCdnConfigCallable()
public final UnaryCallable<GetCdnConfigRequest,CdnConfig> getCdnConfigCallable()Retrieves a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
GetCdnConfigRequest request =
GetCdnConfigRequest.newBuilder()
.setName(CdnConfigName.of("[NETWORK_CODE]", "[CDN_CONFIG]").toString())
.build();
ApiFuture<CdnConfig> future =
cdnConfigServiceClient.getCdnConfigCallable().futureCall(request);
// Do something.
CdnConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetCdnConfigRequest,CdnConfig> |
|
getSettings()
public final @Nullable CdnConfigServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.CdnConfigServiceSettings |
|
getStub()
public CdnConfigServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
CdnConfigServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listCdnConfigs(@Nullable NetworkName parent)
public final CdnConfigServiceClient.ListCdnConfigsPagedResponse listCdnConfigs(@Nullable NetworkName parent)Lists CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
for (CdnConfig element : cdnConfigServiceClient.listCdnConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent, which owns this collection of CdnConfigs. Format:
|
| Returns | |
|---|---|
| Type | Description |
CdnConfigServiceClient.ListCdnConfigsPagedResponse |
|
listCdnConfigs(ListCdnConfigsRequest request)
public final CdnConfigServiceClient.ListCdnConfigsPagedResponse listCdnConfigs(ListCdnConfigsRequest request)Lists CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
ListCdnConfigsRequest request =
ListCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
for (CdnConfig element : cdnConfigServiceClient.listCdnConfigs(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListCdnConfigsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CdnConfigServiceClient.ListCdnConfigsPagedResponse |
|
listCdnConfigs(String parent)
public final CdnConfigServiceClient.ListCdnConfigsPagedResponse listCdnConfigs(String parent)Lists CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
for (CdnConfig element : cdnConfigServiceClient.listCdnConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of CdnConfigs. Format:
|
| Returns | |
|---|---|
| Type | Description |
CdnConfigServiceClient.ListCdnConfigsPagedResponse |
|
listCdnConfigsCallable()
public final UnaryCallable<ListCdnConfigsRequest,ListCdnConfigsResponse> listCdnConfigsCallable()Lists CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
ListCdnConfigsRequest request =
ListCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
while (true) {
ListCdnConfigsResponse response =
cdnConfigServiceClient.listCdnConfigsCallable().call(request);
for (CdnConfig element : response.getCdnConfigsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListCdnConfigsRequest,ListCdnConfigsResponse> |
|
listCdnConfigsPagedCallable()
public final UnaryCallable<ListCdnConfigsRequest,CdnConfigServiceClient.ListCdnConfigsPagedResponse> listCdnConfigsPagedCallable()Lists CdnConfig objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
ListCdnConfigsRequest request =
ListCdnConfigsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
ApiFuture<CdnConfig> future =
cdnConfigServiceClient.listCdnConfigsPagedCallable().futureCall(request);
// Do something.
for (CdnConfig element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListCdnConfigsRequest,ListCdnConfigsPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateCdnConfig(CdnConfig cdnConfig, FieldMask updateMask)
public final CdnConfig updateCdnConfig(CdnConfig cdnConfig, FieldMask updateMask)Updates a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
CdnConfig cdnConfig = CdnConfig.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
CdnConfig response = cdnConfigServiceClient.updateCdnConfig(cdnConfig, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
cdnConfig |
CdnConfigRequired. The The |
updateMask |
FieldMaskOptional. The list of fields to update. |
| Returns | |
|---|---|
| Type | Description |
CdnConfig |
|
updateCdnConfig(UpdateCdnConfigRequest request)
public final CdnConfig updateCdnConfig(UpdateCdnConfigRequest request)Updates a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
UpdateCdnConfigRequest request =
UpdateCdnConfigRequest.newBuilder()
.setCdnConfig(CdnConfig.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
CdnConfig response = cdnConfigServiceClient.updateCdnConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateCdnConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
CdnConfig |
|
updateCdnConfigCallable()
public final UnaryCallable<UpdateCdnConfigRequest,CdnConfig> updateCdnConfigCallable()Updates a CdnConfig object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CdnConfigServiceClient cdnConfigServiceClient = CdnConfigServiceClient.create()) {
UpdateCdnConfigRequest request =
UpdateCdnConfigRequest.newBuilder()
.setCdnConfig(CdnConfig.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<CdnConfig> future =
cdnConfigServiceClient.updateCdnConfigCallable().futureCall(request);
// Do something.
CdnConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateCdnConfigRequest,CdnConfig> |
|