Certificate Authority API v1 - Package cloud.google.com/go/security/privateca/apiv1 (v1.19.2)

Note: To get more information about this package, such as access to older versions, viewthis package on pkg.go.dev.

Package privateca is an auto-generated package for theCertificate Authority API.

The Certificate Authority Service API is a highly-available, scalableservice that enables you to simplify and automate the management ofprivate certificate authorities (CAs) while staying in control of yourprivate keys.

General documentation

For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:

Example usage

To get started with this package, create a client.

// go get cloud.google.com/go/security/privateca/apiv1@latestctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed.The methods of Client are safe for concurrent use by multiple goroutines.The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client, mentioned above.

req:=&privatecapb.ActivateCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ActivateCertificateAuthorityRequest.}op,err:=c.ActivateCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp

Use of Context

The ctx passed to NewCertificateAuthorityClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

Functions

func DefaultAuthScopes

funcDefaultAuthScopes()[]string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

ActivateCertificateAuthorityOperation

typeActivateCertificateAuthorityOperationstruct{// contains filtered or unexported fields}

ActivateCertificateAuthorityOperation manages a long-running operation from ActivateCertificateAuthority.

func (*ActivateCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*ActivateCertificateAuthorityOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ActivateCertificateAuthorityOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ActivateCertificateAuthorityOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ActivateCertificateAuthorityOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CaPoolIterator

typeCaPoolIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*privatecapb.CaPool,nextPageTokenstring,errerror)// contains filtered or unexported fields}

CaPoolIterator manages a stream of *privatecapb.CaPool.

func (*CaPoolIterator) All

func(it*CaPoolIterator)All()iter.Seq2[*privatecapb.CaPool,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*CaPoolIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*CaPoolIterator) PageInfo

func(it*CaPoolIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

CertificateAuthorityCallOptions

typeCertificateAuthorityCallOptionsstruct{CreateCertificate[]gax.CallOptionGetCertificate[]gax.CallOptionListCertificates[]gax.CallOptionRevokeCertificate[]gax.CallOptionUpdateCertificate[]gax.CallOptionActivateCertificateAuthority[]gax.CallOptionCreateCertificateAuthority[]gax.CallOptionDisableCertificateAuthority[]gax.CallOptionEnableCertificateAuthority[]gax.CallOptionFetchCertificateAuthorityCsr[]gax.CallOptionGetCertificateAuthority[]gax.CallOptionListCertificateAuthorities[]gax.CallOptionUndeleteCertificateAuthority[]gax.CallOptionDeleteCertificateAuthority[]gax.CallOptionUpdateCertificateAuthority[]gax.CallOptionCreateCaPool[]gax.CallOptionUpdateCaPool[]gax.CallOptionGetCaPool[]gax.CallOptionListCaPools[]gax.CallOptionDeleteCaPool[]gax.CallOptionFetchCaCerts[]gax.CallOptionGetCertificateRevocationList[]gax.CallOptionListCertificateRevocationLists[]gax.CallOptionUpdateCertificateRevocationList[]gax.CallOptionCreateCertificateTemplate[]gax.CallOptionDeleteCertificateTemplate[]gax.CallOptionGetCertificateTemplate[]gax.CallOptionListCertificateTemplates[]gax.CallOptionUpdateCertificateTemplate[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetIamPolicy[]gax.CallOptionSetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionCancelOperation[]gax.CallOptionDeleteOperation[]gax.CallOptionGetOperation[]gax.CallOptionListOperations[]gax.CallOption}

CertificateAuthorityCallOptions contains the retry settings for each method of CertificateAuthorityClient.

CertificateAuthorityClient

typeCertificateAuthorityClientstruct{// The call options for this service.CallOptions*CertificateAuthorityCallOptions// LROClient is used internally to handle long-running operations.// It is exposed so that its CallOptions can be modified if required.// Users should not Close this client.LROClient*lroauto.OperationsClient// contains filtered or unexported fields}

CertificateAuthorityClient is a client for interacting with Certificate Authority API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

[Certificate AuthorityService][google.cloud.security.privateca.v1.CertificateAuthorityService]manages private certificate authorities and issued certificates.

func NewCertificateAuthorityClient

funcNewCertificateAuthorityClient(ctxcontext.Context,opts...option.ClientOption)(*CertificateAuthorityClient,error)

NewCertificateAuthorityClient creates a new certificate authority service client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.

[Certificate AuthorityService][google.cloud.security.privateca.v1.CertificateAuthorityService]manages private certificate authorities and issued certificates.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}

func NewCertificateAuthorityRESTClient

funcNewCertificateAuthorityRESTClient(ctxcontext.Context,opts...option.ClientOption)(*CertificateAuthorityClient,error)

NewCertificateAuthorityRESTClient creates a new certificate authority service rest client.

[Certificate AuthorityService][google.cloud.security.privateca.v1.CertificateAuthorityService]manages private certificate authorities and issued certificates.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}

func (*CertificateAuthorityClient) ActivateCertificateAuthority

ActivateCertificateAuthority activate aCertificateAuthoritythat is in stateAWAITING_USER_ACTIVATIONand is of typeSUBORDINATE.After the parent Certificate Authority signs a certificate signing requestfromFetchCertificateAuthorityCsr,this method can complete the activation process.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ActivateCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ActivateCertificateAuthorityRequest.}op,err:=c.ActivateCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) ActivateCertificateAuthorityOperation

func(c*CertificateAuthorityClient)ActivateCertificateAuthorityOperation(namestring)*ActivateCertificateAuthorityOperation

ActivateCertificateAuthorityOperation returns a new ActivateCertificateAuthorityOperation from a given name.The name must be that of a previously created ActivateCertificateAuthorityOperation, possibly from a different process.

func (*CertificateAuthorityClient) CancelOperation

CancelOperation is a utility method from google.longrunning.Operations.

Example

packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.CancelOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.}err=c.CancelOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}

func (*CertificateAuthorityClient) Close

Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.

func (*CertificateAuthorityClient) Connection (deprecated)

func(c*CertificateAuthorityClient)Connection()*grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.

func (*CertificateAuthorityClient) CreateCaPool

CreateCaPool create a CaPool.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.CreateCaPoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#CreateCaPoolRequest.}op,err:=c.CreateCaPool(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) CreateCaPoolOperation

func(c*CertificateAuthorityClient)CreateCaPoolOperation(namestring)*CreateCaPoolOperation

CreateCaPoolOperation returns a new CreateCaPoolOperation from a given name.The name must be that of a previously created CreateCaPoolOperation, possibly from a different process.

func (*CertificateAuthorityClient) CreateCertificate

CreateCertificate create a new Certificatein a given Project, Location from a particularCaPool.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.CreateCertificateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#CreateCertificateRequest.}resp,err:=c.CreateCertificate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) CreateCertificateAuthority

CreateCertificateAuthority create a newCertificateAuthorityin a given Project and Location.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.CreateCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#CreateCertificateAuthorityRequest.}op,err:=c.CreateCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) CreateCertificateAuthorityOperation

func(c*CertificateAuthorityClient)CreateCertificateAuthorityOperation(namestring)*CreateCertificateAuthorityOperation

CreateCertificateAuthorityOperation returns a new CreateCertificateAuthorityOperation from a given name.The name must be that of a previously created CreateCertificateAuthorityOperation, possibly from a different process.

func (*CertificateAuthorityClient) CreateCertificateTemplate

CreateCertificateTemplate create a newCertificateTemplatein a given Project and Location.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.CreateCertificateTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#CreateCertificateTemplateRequest.}op,err:=c.CreateCertificateTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) CreateCertificateTemplateOperation

func(c*CertificateAuthorityClient)CreateCertificateTemplateOperation(namestring)*CreateCertificateTemplateOperation

CreateCertificateTemplateOperation returns a new CreateCertificateTemplateOperation from a given name.The name must be that of a previously created CreateCertificateTemplateOperation, possibly from a different process.

func (*CertificateAuthorityClient) DeleteCaPool

DeleteCaPool delete a CaPool.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.DeleteCaPoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#DeleteCaPoolRequest.}op,err:=c.DeleteCaPool(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*CertificateAuthorityClient) DeleteCaPoolOperation

func(c*CertificateAuthorityClient)DeleteCaPoolOperation(namestring)*DeleteCaPoolOperation

DeleteCaPoolOperation returns a new DeleteCaPoolOperation from a given name.The name must be that of a previously created DeleteCaPoolOperation, possibly from a different process.

func (*CertificateAuthorityClient) DeleteCertificateAuthority

DeleteCertificateAuthority delete aCertificateAuthority.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.DeleteCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#DeleteCertificateAuthorityRequest.}op,err:=c.DeleteCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) DeleteCertificateAuthorityOperation

func(c*CertificateAuthorityClient)DeleteCertificateAuthorityOperation(namestring)*DeleteCertificateAuthorityOperation

DeleteCertificateAuthorityOperation returns a new DeleteCertificateAuthorityOperation from a given name.The name must be that of a previously created DeleteCertificateAuthorityOperation, possibly from a different process.

func (*CertificateAuthorityClient) DeleteCertificateTemplate

DeleteCertificateTemplate deleteCertificateTemplate deletes aCertificateTemplate.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.DeleteCertificateTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#DeleteCertificateTemplateRequest.}op,err:=c.DeleteCertificateTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*CertificateAuthorityClient) DeleteCertificateTemplateOperation

func(c*CertificateAuthorityClient)DeleteCertificateTemplateOperation(namestring)*DeleteCertificateTemplateOperation

DeleteCertificateTemplateOperation returns a new DeleteCertificateTemplateOperation from a given name.The name must be that of a previously created DeleteCertificateTemplateOperation, possibly from a different process.

func (*CertificateAuthorityClient) DeleteOperation

DeleteOperation is a utility method from google.longrunning.Operations.

Example

packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.DeleteOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.}err=c.DeleteOperation(ctx,req)iferr!=nil{// TODO: Handle error.}}

func (*CertificateAuthorityClient) DisableCertificateAuthority

DisableCertificateAuthority disable aCertificateAuthority.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.DisableCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#DisableCertificateAuthorityRequest.}op,err:=c.DisableCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) DisableCertificateAuthorityOperation

func(c*CertificateAuthorityClient)DisableCertificateAuthorityOperation(namestring)*DisableCertificateAuthorityOperation

DisableCertificateAuthorityOperation returns a new DisableCertificateAuthorityOperation from a given name.The name must be that of a previously created DisableCertificateAuthorityOperation, possibly from a different process.

func (*CertificateAuthorityClient) EnableCertificateAuthority

EnableCertificateAuthority enable aCertificateAuthority.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.EnableCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#EnableCertificateAuthorityRequest.}op,err:=c.EnableCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) EnableCertificateAuthorityOperation

func(c*CertificateAuthorityClient)EnableCertificateAuthorityOperation(namestring)*EnableCertificateAuthorityOperation

EnableCertificateAuthorityOperation returns a new EnableCertificateAuthorityOperation from a given name.The name must be that of a previously created EnableCertificateAuthorityOperation, possibly from a different process.

func (*CertificateAuthorityClient) FetchCaCerts

FetchCaCerts fetchCaCerts returns the current trust anchor for theCaPool. This will include CAcertificate chains for all certificate authorities in the ENABLED,DISABLED, or STAGED states.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.FetchCaCertsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#FetchCaCertsRequest.}resp,err:=c.FetchCaCerts(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) FetchCertificateAuthorityCsr

FetchCertificateAuthorityCsr fetch a certificate signing request (CSR) from aCertificateAuthoritythat is in stateAWAITING_USER_ACTIVATIONand is of typeSUBORDINATE.The CSR must then be signed by the desired parent Certificate Authority,which could be anotherCertificateAuthorityresource, or could be an on-prem certificate authority. See alsoActivateCertificateAuthority.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.FetchCertificateAuthorityCsrRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#FetchCertificateAuthorityCsrRequest.}resp,err:=c.FetchCertificateAuthorityCsr(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) GetCaPool

GetCaPool returns a CaPool.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.GetCaPoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#GetCaPoolRequest.}resp,err:=c.GetCaPool(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) GetCertificate

GetCertificate returns a Certificate.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.GetCertificateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#GetCertificateRequest.}resp,err:=c.GetCertificate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) GetCertificateAuthority

GetCertificateAuthority returns aCertificateAuthority.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.GetCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#GetCertificateAuthorityRequest.}resp,err:=c.GetCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) GetCertificateRevocationList

GetCertificateRevocationList returns aCertificateRevocationList.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.GetCertificateRevocationListRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#GetCertificateRevocationListRequest.}resp,err:=c.GetCertificateRevocationList(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) GetCertificateTemplate

GetCertificateTemplate returns aCertificateTemplate.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.GetCertificateTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#GetCertificateTemplateRequest.}resp,err:=c.GetCertificateTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Example

packagemainimport("context"iampb"cloud.google.com/go/iam/apiv1/iampb"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) GetLocation

GetLocation gets information about a location.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.GetLocationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.}resp,err:=c.GetLocation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.GetOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.}resp,err:=c.GetOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) ListCaPools

ListCaPools lists CaPools.

Examples

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCaPoolsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCaPoolsRequest.}it:=c.ListCaPools(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*privatecapb.ListCaPoolsResponse)}}
all
packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCaPoolsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCaPoolsRequest.}forresp,err:=rangec.ListCaPools(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*CertificateAuthorityClient) ListCertificateAuthorities

ListCertificateAuthorities listsCertificateAuthorities.

Examples

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCertificateAuthoritiesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateAuthoritiesRequest.}it:=c.ListCertificateAuthorities(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*privatecapb.ListCertificateAuthoritiesResponse)}}
all
packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCertificateAuthoritiesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateAuthoritiesRequest.}forresp,err:=rangec.ListCertificateAuthorities(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*CertificateAuthorityClient) ListCertificateRevocationLists

ListCertificateRevocationLists listsCertificateRevocationLists.

Examples

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCertificateRevocationListsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateRevocationListsRequest.}it:=c.ListCertificateRevocationLists(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*privatecapb.ListCertificateRevocationListsResponse)}}
all
packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCertificateRevocationListsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateRevocationListsRequest.}forresp,err:=rangec.ListCertificateRevocationLists(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*CertificateAuthorityClient) ListCertificateTemplates

ListCertificateTemplates listsCertificateTemplates.

Examples

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCertificateTemplatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateTemplatesRequest.}it:=c.ListCertificateTemplates(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*privatecapb.ListCertificateTemplatesResponse)}}
all
packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCertificateTemplatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateTemplatesRequest.}forresp,err:=rangec.ListCertificateTemplates(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*CertificateAuthorityClient) ListCertificates

ListCertificates lists Certificates.

Examples

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCertificatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificatesRequest.}it:=c.ListCertificates(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*privatecapb.ListCertificatesResponse)}}
all
packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.ListCertificatesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificatesRequest.}forresp,err:=rangec.ListCertificates(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*CertificateAuthorityClient) ListLocations

ListLocations lists information about the supported locations for this service.

Examples

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1""google.golang.org/api/iterator"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}it:=c.ListLocations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*locationpb.ListLocationsResponse)}}
all
packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}forresp,err:=rangec.ListLocations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*CertificateAuthorityClient) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Examples

packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"privateca"cloud.google.com/go/security/privateca/apiv1""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}it:=c.ListOperations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*longrunningpb.ListOperationsResponse)}}
all
packagemainimport("context"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.ListOperationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.}forresp,err:=rangec.ListOperations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*CertificateAuthorityClient) RevokeCertificate

RevokeCertificate revoke a Certificate.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.RevokeCertificateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#RevokeCertificateRequest.}resp,err:=c.RevokeCertificate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Example

packagemainimport("context"iampb"cloud.google.com/go/iam/apiv1/iampb"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may “fail open” without warning.

Example

packagemainimport("context"iampb"cloud.google.com/go/iam/apiv1/iampb"privateca"cloud.google.com/go/security/privateca/apiv1")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) UndeleteCertificateAuthority

UndeleteCertificateAuthority undelete aCertificateAuthoritythat has been deleted.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.UndeleteCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#UndeleteCertificateAuthorityRequest.}op,err:=c.UndeleteCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) UndeleteCertificateAuthorityOperation

func(c*CertificateAuthorityClient)UndeleteCertificateAuthorityOperation(namestring)*UndeleteCertificateAuthorityOperation

UndeleteCertificateAuthorityOperation returns a new UndeleteCertificateAuthorityOperation from a given name.The name must be that of a previously created UndeleteCertificateAuthorityOperation, possibly from a different process.

func (*CertificateAuthorityClient) UpdateCaPool

UpdateCaPool update a CaPool.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.UpdateCaPoolRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#UpdateCaPoolRequest.}op,err:=c.UpdateCaPool(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) UpdateCaPoolOperation

func(c*CertificateAuthorityClient)UpdateCaPoolOperation(namestring)*UpdateCaPoolOperation

UpdateCaPoolOperation returns a new UpdateCaPoolOperation from a given name.The name must be that of a previously created UpdateCaPoolOperation, possibly from a different process.

func (*CertificateAuthorityClient) UpdateCertificate

UpdateCertificate update a Certificate.Currently, the only field you can update is thelabels field.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.UpdateCertificateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#UpdateCertificateRequest.}resp,err:=c.UpdateCertificate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) UpdateCertificateAuthority

UpdateCertificateAuthority update aCertificateAuthority.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.UpdateCertificateAuthorityRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#UpdateCertificateAuthorityRequest.}op,err:=c.UpdateCertificateAuthority(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) UpdateCertificateAuthorityOperation

func(c*CertificateAuthorityClient)UpdateCertificateAuthorityOperation(namestring)*UpdateCertificateAuthorityOperation

UpdateCertificateAuthorityOperation returns a new UpdateCertificateAuthorityOperation from a given name.The name must be that of a previously created UpdateCertificateAuthorityOperation, possibly from a different process.

func (*CertificateAuthorityClient) UpdateCertificateRevocationList

UpdateCertificateRevocationList update aCertificateRevocationList.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.UpdateCertificateRevocationListRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#UpdateCertificateRevocationListRequest.}op,err:=c.UpdateCertificateRevocationList(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) UpdateCertificateRevocationListOperation

func(c*CertificateAuthorityClient)UpdateCertificateRevocationListOperation(namestring)*UpdateCertificateRevocationListOperation

UpdateCertificateRevocationListOperation returns a new UpdateCertificateRevocationListOperation from a given name.The name must be that of a previously created UpdateCertificateRevocationListOperation, possibly from a different process.

func (*CertificateAuthorityClient) UpdateCertificateTemplate

UpdateCertificateTemplate update aCertificateTemplate.

Example

packagemainimport("context"privateca"cloud.google.com/go/security/privateca/apiv1"privatecapb"cloud.google.com/go/security/privateca/apiv1/privatecapb")funcmain(){ctx:=context.Background()// 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://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=privateca.NewCertificateAuthorityClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&privatecapb.UpdateCertificateTemplateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#UpdateCertificateTemplateRequest.}op,err:=c.UpdateCertificateTemplate(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*CertificateAuthorityClient) UpdateCertificateTemplateOperation

func(c*CertificateAuthorityClient)UpdateCertificateTemplateOperation(namestring)*UpdateCertificateTemplateOperation

UpdateCertificateTemplateOperation returns a new UpdateCertificateTemplateOperation from a given name.The name must be that of a previously created UpdateCertificateTemplateOperation, possibly from a different process.

CertificateAuthorityIterator

typeCertificateAuthorityIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*privatecapb.CertificateAuthority,nextPageTokenstring,errerror)// contains filtered or unexported fields}

CertificateAuthorityIterator manages a stream of *privatecapb.CertificateAuthority.

func (*CertificateAuthorityIterator) All

func(it*CertificateAuthorityIterator)All()iter.Seq2[*privatecapb.CertificateAuthority,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*CertificateAuthorityIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*CertificateAuthorityIterator) PageInfo

func(it*CertificateAuthorityIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

CertificateIterator

typeCertificateIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*privatecapb.Certificate,nextPageTokenstring,errerror)// contains filtered or unexported fields}

CertificateIterator manages a stream of *privatecapb.Certificate.

func (*CertificateIterator) All

func(it*CertificateIterator)All()iter.Seq2[*privatecapb.Certificate,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*CertificateIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*CertificateIterator) PageInfo

func(it*CertificateIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

CertificateRevocationListIterator

typeCertificateRevocationListIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*privatecapb.CertificateRevocationList,nextPageTokenstring,errerror)// contains filtered or unexported fields}

CertificateRevocationListIterator manages a stream of *privatecapb.CertificateRevocationList.

func (*CertificateRevocationListIterator) All

func(it*CertificateRevocationListIterator)All()iter.Seq2[*privatecapb.CertificateRevocationList,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*CertificateRevocationListIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*CertificateRevocationListIterator) PageInfo

func(it*CertificateRevocationListIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

CertificateTemplateIterator

typeCertificateTemplateIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*privatecapb.CertificateTemplate,nextPageTokenstring,errerror)// contains filtered or unexported fields}

CertificateTemplateIterator manages a stream of *privatecapb.CertificateTemplate.

func (*CertificateTemplateIterator) All

func(it*CertificateTemplateIterator)All()iter.Seq2[*privatecapb.CertificateTemplate,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*CertificateTemplateIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*CertificateTemplateIterator) PageInfo

func(it*CertificateTemplateIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

CreateCaPoolOperation

typeCreateCaPoolOperationstruct{// contains filtered or unexported fields}

CreateCaPoolOperation manages a long-running operation from CreateCaPool.

func (*CreateCaPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateCaPoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateCaPoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateCaPoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateCaPoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateCertificateAuthorityOperation

typeCreateCertificateAuthorityOperationstruct{// contains filtered or unexported fields}

CreateCertificateAuthorityOperation manages a long-running operation from CreateCertificateAuthority.

func (*CreateCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateCertificateAuthorityOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateCertificateAuthorityOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateCertificateAuthorityOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateCertificateAuthorityOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateCertificateTemplateOperation

typeCreateCertificateTemplateOperationstruct{// contains filtered or unexported fields}

CreateCertificateTemplateOperation manages a long-running operation from CreateCertificateTemplate.

func (*CreateCertificateTemplateOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateCertificateTemplateOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateCertificateTemplateOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateCertificateTemplateOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateCertificateTemplateOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteCaPoolOperation

typeDeleteCaPoolOperationstruct{// contains filtered or unexported fields}

DeleteCaPoolOperation manages a long-running operation from DeleteCaPool.

func (*DeleteCaPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteCaPoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteCaPoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteCaPoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteCaPoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteCertificateAuthorityOperation

typeDeleteCertificateAuthorityOperationstruct{// contains filtered or unexported fields}

DeleteCertificateAuthorityOperation manages a long-running operation from DeleteCertificateAuthority.

func (*DeleteCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteCertificateAuthorityOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteCertificateAuthorityOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteCertificateAuthorityOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteCertificateAuthorityOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteCertificateTemplateOperation

typeDeleteCertificateTemplateOperationstruct{// contains filtered or unexported fields}

DeleteCertificateTemplateOperation manages a long-running operation from DeleteCertificateTemplate.

func (*DeleteCertificateTemplateOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteCertificateTemplateOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteCertificateTemplateOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteCertificateTemplateOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteCertificateTemplateOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DisableCertificateAuthorityOperation

typeDisableCertificateAuthorityOperationstruct{// contains filtered or unexported fields}

DisableCertificateAuthorityOperation manages a long-running operation from DisableCertificateAuthority.

func (*DisableCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*DisableCertificateAuthorityOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DisableCertificateAuthorityOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DisableCertificateAuthorityOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DisableCertificateAuthorityOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

EnableCertificateAuthorityOperation

typeEnableCertificateAuthorityOperationstruct{// contains filtered or unexported fields}

EnableCertificateAuthorityOperation manages a long-running operation from EnableCertificateAuthority.

func (*EnableCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*EnableCertificateAuthorityOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*EnableCertificateAuthorityOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*EnableCertificateAuthorityOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*EnableCertificateAuthorityOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

LocationIterator

typeLocationIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*locationpb.Location,nextPageTokenstring,errerror)// contains filtered or unexported fields}

LocationIterator manages a stream of *locationpb.Location.

func (*LocationIterator) All

func(it*LocationIterator)All()iter.Seq2[*locationpb.Location,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*LocationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*LocationIterator) PageInfo

func(it*LocationIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

OperationIterator

typeOperationIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*longrunningpb.Operation,nextPageTokenstring,errerror)// contains filtered or unexported fields}

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) All

func(it*OperationIterator)All()iter.Seq2[*longrunningpb.Operation,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*OperationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*OperationIterator) PageInfo

func(it*OperationIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

UndeleteCertificateAuthorityOperation

typeUndeleteCertificateAuthorityOperationstruct{// contains filtered or unexported fields}

UndeleteCertificateAuthorityOperation manages a long-running operation from UndeleteCertificateAuthority.

func (*UndeleteCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*UndeleteCertificateAuthorityOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UndeleteCertificateAuthorityOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UndeleteCertificateAuthorityOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UndeleteCertificateAuthorityOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateCaPoolOperation

typeUpdateCaPoolOperationstruct{// contains filtered or unexported fields}

UpdateCaPoolOperation manages a long-running operation from UpdateCaPool.

func (*UpdateCaPoolOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateCaPoolOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateCaPoolOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateCaPoolOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateCaPoolOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateCertificateAuthorityOperation

typeUpdateCertificateAuthorityOperationstruct{// contains filtered or unexported fields}

UpdateCertificateAuthorityOperation manages a long-running operation from UpdateCertificateAuthority.

func (*UpdateCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateCertificateAuthorityOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateCertificateAuthorityOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateCertificateAuthorityOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateCertificateAuthorityOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateCertificateRevocationListOperation

typeUpdateCertificateRevocationListOperationstruct{// contains filtered or unexported fields}

UpdateCertificateRevocationListOperation manages a long-running operation from UpdateCertificateRevocationList.

func (*UpdateCertificateRevocationListOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateCertificateRevocationListOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateCertificateRevocationListOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateCertificateRevocationListOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateCertificateRevocationListOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateCertificateTemplateOperation

typeUpdateCertificateTemplateOperationstruct{// contains filtered or unexported fields}

UpdateCertificateTemplateOperation manages a long-running operation from UpdateCertificateTemplate.

func (*UpdateCertificateTemplateOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateCertificateTemplateOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateCertificateTemplateOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateCertificateTemplateOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateCertificateTemplateOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.