Using gRPC with Certificate Authority Service

If you are using manually created gRPC libraries to make API calls to Certificate Authority Service, you must add x-goog-request-params: '<request-field>:<resource-name>' as a header. The proper use of x-goog-request-params ensures that the request is routed to the appropriate region for your CA Service resources.

Given below are a few examples of methods with their respective request field and sample header.

Method: CreateCertificateAuthority
Request field: CreateCertificateAuthority.parent
x-goog-request-params: 'parent: projects/PROJECT_ID/locations/LOCATION_ID'
Method: GetCertificateAuthority
Request field: GetCertificateAuthority.name
x-goog-request-params: 'name: projects/PROJECT_ID/locations/LOCATION_ID/certificateAuthorities/CA_NAME'
Method: UpdateCertificateAuthority
Request field: UpdateCertificateAuthority.certificate_authority.name
x-goog-request-params: 'CertificateAuthority.name: projects/PROJECT_ID/locations/LOCATION_ID/certificateAuthorities/CA_NAME'

For the complete list of RPC methods and their respective request fields, see Package google.cloud.security.privateca.v1beta1.

What's next