將 gRPC 與憑證授權單位服務搭配使用
如果您使用手動建立的 gRPC 程式庫呼叫 Certificate Authority Service API,必須將 x-goog-request-params: '<request-field>:<resource-name>'
新增為標頭。正確使用 x-goog-request-params
可確保要求轉送至 CA 服務資源的適當地區。
以下列舉幾個方法,以及各自的要求欄位和標頭範例。
方法:CreateCertificateAuthority 要求欄位:CreateCertificateAuthority.parent x-goog-request-params: 'parent: projects/PROJECT_ID/locations/LOCATION_ID' |
方法:GetCertificateAuthority 要求欄位:GetCertificateAuthority.name x-goog-request-params: 'name: projects/PROJECT_ID/locations/LOCATION_ID/certificateAuthorities/CA_NAME' |
方法:UpdateCertificateAuthority 要求欄位:UpdateCertificateAuthority.certificate_authority.name x-goog-request-params: 'CertificateAuthority.name: projects/PROJECT_ID/locations/LOCATION_ID/certificateAuthorities/CA_NAME' |
如要查看 RPC 方法的完整清單和各自的要求欄位,請參閱「Package google.cloud.security.privateca.v1beta1」。