클라이언트 인증서 생성

지정된 클러스터의 클라이언트 SSL/TLS 인증서를 생성합니다. 이 인증서는 클라이언트 애플리케이션에서 클러스터로의 보안 암호화된 연결을 설정하는 데 사용됩니다.

코드 샘플

C#

AlloyDB에 인증하려면 애플리케이션 기본 사용자 인증 정보를 설정합니다. 자세한 내용은 로컬 개발 환경의 인증 설정을 참조하세요.

using Google.Cloud.AlloyDb.V1;

public sealed partial class GeneratedAlloyDBAdminClientSnippets
{
    /// <summary>Snippet for GenerateClientCertificate</summary>
    /// <remarks>
    /// 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/dotnet/docs/reference/help/client-configuration#endpoint.
    /// </remarks>
    public void GenerateClientCertificate()
    {
        // Create client
        AlloyDBAdminClient alloyDBAdminClient = AlloyDBAdminClient.Create();
        // Initialize request argument(s)
        string parent = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
        // Make the request
        GenerateClientCertificateResponse response = alloyDBAdminClient.GenerateClientCertificate(parent);
    }
}

다음 단계

다른 Google Cloud 제품의 코드 샘플을 검색하고 필터링하려면 Google Cloud 샘플 브라우저 참조하기