This shows how to override the retry policies for iam_credentials_v1::IAMCredentialsClient:
.
set<google::cloud::iam_credentials_v1::
IAMCredentialsConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
IAMCredentialsRetryPolicyOption>(
IAMCredentialsLimitedErrorCountRetryPolicy(3)
.clone())
IAMCredentialsBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
connection,
.
set<google::cloud::iam_credentials_v1::
IAMCredentialsRetryPolicyOption>(
.clone()));
Options & set(ValueTypeT< T > v)
A service account is a special type of Google account that belongs to your application or a virtual m...
Definition: iam_credentials_client.h:70
Definition: iam_credentials_client.h:33
::google::cloud::internal::LimitedTimeRetryPolicy< iam_credentials_v1_internal::IAMCredentialsRetryTraits > IAMCredentialsLimitedTimeRetryPolicy
Definition: iam_credentials_connection.h:42
std::shared_ptr< IAMCredentialsConnection > MakeIAMCredentialsConnection(Options options={})
A factory function to construct an object of type IAMCredentialsConnection.
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
IAMCredentialsConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::iam_credentials_v1::
IAMCredentialsConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};