Common configuration options
Stay organized with collections
Save and categorize content based on your preferences.
The following options are typically configured using the Settings.newBuilder()
method any client.
Setting Method
Description
setCredentialsProvider
Provides the credentials (Service Account, API Key, etc.) for authentication.
setEndpoint
The address of the API remote host. Used for Regional Endpoints (e.g., us-central1-pubsub.googleapis.com:443) or Private Service Connect.
setTransportChannelProvider
Specifies the transport type (gRPC or HTTP/REST) and manages connection pools.
setHeaderProvider
Allows adding custom headers to every request made by the client.
setUniverseDomain
Overrides the default service domain (defaults to googleapis.com) for Cloud Universe support.
setQuotaProjectId
Sets the project ID used for quota and billing, which may be different from the project being operated on.
// The project that will be billed and have its quota consumed for these API callsStringbillingProjectId="my-central-billing-project";CloudTasksSettingscloudTasksSettings=.setQuotaProjectId(billingProjectId).setTransportChannelProvider(transportChannelProvider).build();CloudTasksClientcloudTasksClient=CloudTasksClient.create(cloudTasksSettings);
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-26 UTC."],[],[]]