package privateca
import "cloud.google.com/go/security/privateca/apiv1"
Package privateca is an auto-generated package for the Certificate Authority API.
The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys.
General documentation
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/security/privateca/apiv1@latest 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_Options c, err := privateca.NewCertificateAuthorityClient(ctx) if err != nil { // TODO: Handle error. } defer c.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) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context
The ctx passed to NewCertificateAuthorityClient is used for authentication requests and for 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.
Index ¶
- func DefaultAuthScopes() []string
- type ActivateCertificateAuthorityOperation
- func (op *ActivateCertificateAuthorityOperation) Done() bool
- func (op *ActivateCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *ActivateCertificateAuthorityOperation) Name() string
- func (op *ActivateCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- func (op *ActivateCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- type CaPoolIterator
- func (it *CaPoolIterator) All() iter.Seq2[*privatecapb.CaPool, error]
- func (it *CaPoolIterator) Next() (*privatecapb.CaPool, error)
- func (it *CaPoolIterator) PageInfo() *iterator.PageInfo
- type CertificateAuthorityCallOptions
- type CertificateAuthorityClient
- func NewCertificateAuthorityClient(ctx context.Context, opts ...option.ClientOption) (*CertificateAuthorityClient, error)
- func NewCertificateAuthorityRESTClient(ctx context.Context, opts ...option.ClientOption) (*CertificateAuthorityClient, error)
- func (c *CertificateAuthorityClient) ActivateCertificateAuthority(ctx context.Context, req *privatecapb.ActivateCertificateAuthorityRequest, opts ...gax.CallOption) (*ActivateCertificateAuthorityOperation, error)
- func (c *CertificateAuthorityClient) ActivateCertificateAuthorityOperation(name string) *ActivateCertificateAuthorityOperation
- func (c *CertificateAuthorityClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
- func (c *CertificateAuthorityClient) Close() error
- func (c *CertificateAuthorityClient) Connection() *grpc.ClientConn
- func (c *CertificateAuthorityClient) CreateCaPool(ctx context.Context, req *privatecapb.CreateCaPoolRequest, opts ...gax.CallOption) (*CreateCaPoolOperation, error)
- func (c *CertificateAuthorityClient) CreateCaPoolOperation(name string) *CreateCaPoolOperation
- func (c *CertificateAuthorityClient) CreateCertificate(ctx context.Context, req *privatecapb.CreateCertificateRequest, opts ...gax.CallOption) (*privatecapb.Certificate, error)
- func (c *CertificateAuthorityClient) CreateCertificateAuthority(ctx context.Context, req *privatecapb.CreateCertificateAuthorityRequest, opts ...gax.CallOption) (*CreateCertificateAuthorityOperation, error)
- func (c *CertificateAuthorityClient) CreateCertificateAuthorityOperation(name string) *CreateCertificateAuthorityOperation
- func (c *CertificateAuthorityClient) CreateCertificateTemplate(ctx context.Context, req *privatecapb.CreateCertificateTemplateRequest, opts ...gax.CallOption) (*CreateCertificateTemplateOperation, error)
- func (c *CertificateAuthorityClient) CreateCertificateTemplateOperation(name string) *CreateCertificateTemplateOperation
- func (c *CertificateAuthorityClient) DeleteCaPool(ctx context.Context, req *privatecapb.DeleteCaPoolRequest, opts ...gax.CallOption) (*DeleteCaPoolOperation, error)
- func (c *CertificateAuthorityClient) DeleteCaPoolOperation(name string) *DeleteCaPoolOperation
- func (c *CertificateAuthorityClient) DeleteCertificateAuthority(ctx context.Context, req *privatecapb.DeleteCertificateAuthorityRequest, opts ...gax.CallOption) (*DeleteCertificateAuthorityOperation, error)
- func (c *CertificateAuthorityClient) DeleteCertificateAuthorityOperation(name string) *DeleteCertificateAuthorityOperation
- func (c *CertificateAuthorityClient) DeleteCertificateTemplate(ctx context.Context, req *privatecapb.DeleteCertificateTemplateRequest, opts ...gax.CallOption) (*DeleteCertificateTemplateOperation, error)
- func (c *CertificateAuthorityClient) DeleteCertificateTemplateOperation(name string) *DeleteCertificateTemplateOperation
- func (c *CertificateAuthorityClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
- func (c *CertificateAuthorityClient) DisableCertificateAuthority(ctx context.Context, req *privatecapb.DisableCertificateAuthorityRequest, opts ...gax.CallOption) (*DisableCertificateAuthorityOperation, error)
- func (c *CertificateAuthorityClient) DisableCertificateAuthorityOperation(name string) *DisableCertificateAuthorityOperation
- func (c *CertificateAuthorityClient) EnableCertificateAuthority(ctx context.Context, req *privatecapb.EnableCertificateAuthorityRequest, opts ...gax.CallOption) (*EnableCertificateAuthorityOperation, error)
- func (c *CertificateAuthorityClient) EnableCertificateAuthorityOperation(name string) *EnableCertificateAuthorityOperation
- func (c *CertificateAuthorityClient) FetchCaCerts(ctx context.Context, req *privatecapb.FetchCaCertsRequest, opts ...gax.CallOption) (*privatecapb.FetchCaCertsResponse, error)
- func (c *CertificateAuthorityClient) FetchCertificateAuthorityCsr(ctx context.Context, req *privatecapb.FetchCertificateAuthorityCsrRequest, opts ...gax.CallOption) (*privatecapb.FetchCertificateAuthorityCsrResponse, error)
- func (c *CertificateAuthorityClient) GetCaPool(ctx context.Context, req *privatecapb.GetCaPoolRequest, opts ...gax.CallOption) (*privatecapb.CaPool, error)
- func (c *CertificateAuthorityClient) GetCertificate(ctx context.Context, req *privatecapb.GetCertificateRequest, opts ...gax.CallOption) (*privatecapb.Certificate, error)
- func (c *CertificateAuthorityClient) GetCertificateAuthority(ctx context.Context, req *privatecapb.GetCertificateAuthorityRequest, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- func (c *CertificateAuthorityClient) GetCertificateRevocationList(ctx context.Context, req *privatecapb.GetCertificateRevocationListRequest, opts ...gax.CallOption) (*privatecapb.CertificateRevocationList, error)
- func (c *CertificateAuthorityClient) GetCertificateTemplate(ctx context.Context, req *privatecapb.GetCertificateTemplateRequest, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
- func (c *CertificateAuthorityClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *CertificateAuthorityClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
- func (c *CertificateAuthorityClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
- func (c *CertificateAuthorityClient) ListCaPools(ctx context.Context, req *privatecapb.ListCaPoolsRequest, opts ...gax.CallOption) *CaPoolIterator
- func (c *CertificateAuthorityClient) ListCertificateAuthorities(ctx context.Context, req *privatecapb.ListCertificateAuthoritiesRequest, opts ...gax.CallOption) *CertificateAuthorityIterator
- func (c *CertificateAuthorityClient) ListCertificateRevocationLists(ctx context.Context, req *privatecapb.ListCertificateRevocationListsRequest, opts ...gax.CallOption) *CertificateRevocationListIterator
- func (c *CertificateAuthorityClient) ListCertificateTemplates(ctx context.Context, req *privatecapb.ListCertificateTemplatesRequest, opts ...gax.CallOption) *CertificateTemplateIterator
- func (c *CertificateAuthorityClient) ListCertificates(ctx context.Context, req *privatecapb.ListCertificatesRequest, opts ...gax.CallOption) *CertificateIterator
- func (c *CertificateAuthorityClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
- func (c *CertificateAuthorityClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
- func (c *CertificateAuthorityClient) RevokeCertificate(ctx context.Context, req *privatecapb.RevokeCertificateRequest, opts ...gax.CallOption) (*privatecapb.Certificate, error)
- func (c *CertificateAuthorityClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *CertificateAuthorityClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
- func (c *CertificateAuthorityClient) UndeleteCertificateAuthority(ctx context.Context, req *privatecapb.UndeleteCertificateAuthorityRequest, opts ...gax.CallOption) (*UndeleteCertificateAuthorityOperation, error)
- func (c *CertificateAuthorityClient) UndeleteCertificateAuthorityOperation(name string) *UndeleteCertificateAuthorityOperation
- func (c *CertificateAuthorityClient) UpdateCaPool(ctx context.Context, req *privatecapb.UpdateCaPoolRequest, opts ...gax.CallOption) (*UpdateCaPoolOperation, error)
- func (c *CertificateAuthorityClient) UpdateCaPoolOperation(name string) *UpdateCaPoolOperation
- func (c *CertificateAuthorityClient) UpdateCertificate(ctx context.Context, req *privatecapb.UpdateCertificateRequest, opts ...gax.CallOption) (*privatecapb.Certificate, error)
- func (c *CertificateAuthorityClient) UpdateCertificateAuthority(ctx context.Context, req *privatecapb.UpdateCertificateAuthorityRequest, opts ...gax.CallOption) (*UpdateCertificateAuthorityOperation, error)
- func (c *CertificateAuthorityClient) UpdateCertificateAuthorityOperation(name string) *UpdateCertificateAuthorityOperation
- func (c *CertificateAuthorityClient) UpdateCertificateRevocationList(ctx context.Context, req *privatecapb.UpdateCertificateRevocationListRequest, opts ...gax.CallOption) (*UpdateCertificateRevocationListOperation, error)
- func (c *CertificateAuthorityClient) UpdateCertificateRevocationListOperation(name string) *UpdateCertificateRevocationListOperation
- func (c *CertificateAuthorityClient) UpdateCertificateTemplate(ctx context.Context, req *privatecapb.UpdateCertificateTemplateRequest, opts ...gax.CallOption) (*UpdateCertificateTemplateOperation, error)
- func (c *CertificateAuthorityClient) UpdateCertificateTemplateOperation(name string) *UpdateCertificateTemplateOperation
- type CertificateAuthorityIterator
- func (it *CertificateAuthorityIterator) All() iter.Seq2[*privatecapb.CertificateAuthority, error]
- func (it *CertificateAuthorityIterator) Next() (*privatecapb.CertificateAuthority, error)
- func (it *CertificateAuthorityIterator) PageInfo() *iterator.PageInfo
- type CertificateIterator
- func (it *CertificateIterator) All() iter.Seq2[*privatecapb.Certificate, error]
- func (it *CertificateIterator) Next() (*privatecapb.Certificate, error)
- func (it *CertificateIterator) PageInfo() *iterator.PageInfo
- type CertificateRevocationListIterator
- func (it *CertificateRevocationListIterator) All() iter.Seq2[*privatecapb.CertificateRevocationList, error]
- func (it *CertificateRevocationListIterator) Next() (*privatecapb.CertificateRevocationList, error)
- func (it *CertificateRevocationListIterator) PageInfo() *iterator.PageInfo
- type CertificateTemplateIterator
- func (it *CertificateTemplateIterator) All() iter.Seq2[*privatecapb.CertificateTemplate, error]
- func (it *CertificateTemplateIterator) Next() (*privatecapb.CertificateTemplate, error)
- func (it *CertificateTemplateIterator) PageInfo() *iterator.PageInfo
- type CreateCaPoolOperation
- func (op *CreateCaPoolOperation) Done() bool
- func (op *CreateCaPoolOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *CreateCaPoolOperation) Name() string
- func (op *CreateCaPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CaPool, error)
- func (op *CreateCaPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CaPool, error)
- type CreateCertificateAuthorityOperation
- func (op *CreateCertificateAuthorityOperation) Done() bool
- func (op *CreateCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *CreateCertificateAuthorityOperation) Name() string
- func (op *CreateCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- func (op *CreateCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- type CreateCertificateTemplateOperation
- func (op *CreateCertificateTemplateOperation) Done() bool
- func (op *CreateCertificateTemplateOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *CreateCertificateTemplateOperation) Name() string
- func (op *CreateCertificateTemplateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
- func (op *CreateCertificateTemplateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
- type DeleteCaPoolOperation
- func (op *DeleteCaPoolOperation) Done() bool
- func (op *DeleteCaPoolOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *DeleteCaPoolOperation) Name() string
- func (op *DeleteCaPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteCaPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteCertificateAuthorityOperation
- func (op *DeleteCertificateAuthorityOperation) Done() bool
- func (op *DeleteCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *DeleteCertificateAuthorityOperation) Name() string
- func (op *DeleteCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- func (op *DeleteCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- type DeleteCertificateTemplateOperation
- func (op *DeleteCertificateTemplateOperation) Done() bool
- func (op *DeleteCertificateTemplateOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *DeleteCertificateTemplateOperation) Name() string
- func (op *DeleteCertificateTemplateOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteCertificateTemplateOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DisableCertificateAuthorityOperation
- func (op *DisableCertificateAuthorityOperation) Done() bool
- func (op *DisableCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *DisableCertificateAuthorityOperation) Name() string
- func (op *DisableCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- func (op *DisableCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- type EnableCertificateAuthorityOperation
- func (op *EnableCertificateAuthorityOperation) Done() bool
- func (op *EnableCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *EnableCertificateAuthorityOperation) Name() string
- func (op *EnableCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- func (op *EnableCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- type LocationIterator
- func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error]
- func (it *LocationIterator) Next() (*locationpb.Location, error)
- func (it *LocationIterator) PageInfo() *iterator.PageInfo
- type OperationIterator
- func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
- func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
- func (it *OperationIterator) PageInfo() *iterator.PageInfo
- type UndeleteCertificateAuthorityOperation
- func (op *UndeleteCertificateAuthorityOperation) Done() bool
- func (op *UndeleteCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *UndeleteCertificateAuthorityOperation) Name() string
- func (op *UndeleteCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- func (op *UndeleteCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- type UpdateCaPoolOperation
- func (op *UpdateCaPoolOperation) Done() bool
- func (op *UpdateCaPoolOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *UpdateCaPoolOperation) Name() string
- func (op *UpdateCaPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CaPool, error)
- func (op *UpdateCaPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CaPool, error)
- type UpdateCertificateAuthorityOperation
- func (op *UpdateCertificateAuthorityOperation) Done() bool
- func (op *UpdateCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *UpdateCertificateAuthorityOperation) Name() string
- func (op *UpdateCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- func (op *UpdateCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
- type UpdateCertificateRevocationListOperation
- func (op *UpdateCertificateRevocationListOperation) Done() bool
- func (op *UpdateCertificateRevocationListOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *UpdateCertificateRevocationListOperation) Name() string
- func (op *UpdateCertificateRevocationListOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateRevocationList, error)
- func (op *UpdateCertificateRevocationListOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateRevocationList, error)
- type UpdateCertificateTemplateOperation
- func (op *UpdateCertificateTemplateOperation) Done() bool
- func (op *UpdateCertificateTemplateOperation) Metadata() (*privatecapb.OperationMetadata, error)
- func (op *UpdateCertificateTemplateOperation) Name() string
- func (op *UpdateCertificateTemplateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
- func (op *UpdateCertificateTemplateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
Examples ¶
- CertificateAuthorityClient.ActivateCertificateAuthority
- CertificateAuthorityClient.CancelOperation
- CertificateAuthorityClient.CreateCaPool
- CertificateAuthorityClient.CreateCertificate
- CertificateAuthorityClient.CreateCertificateAuthority
- CertificateAuthorityClient.CreateCertificateTemplate
- CertificateAuthorityClient.DeleteCaPool
- CertificateAuthorityClient.DeleteCertificateAuthority
- CertificateAuthorityClient.DeleteCertificateTemplate
- CertificateAuthorityClient.DeleteOperation
- CertificateAuthorityClient.DisableCertificateAuthority
- CertificateAuthorityClient.EnableCertificateAuthority
- CertificateAuthorityClient.FetchCaCerts
- CertificateAuthorityClient.FetchCertificateAuthorityCsr
- CertificateAuthorityClient.GetCaPool
- CertificateAuthorityClient.GetCertificate
- CertificateAuthorityClient.GetCertificateAuthority
- CertificateAuthorityClient.GetCertificateRevocationList
- CertificateAuthorityClient.GetCertificateTemplate
- CertificateAuthorityClient.GetIamPolicy
- CertificateAuthorityClient.GetLocation
- CertificateAuthorityClient.GetOperation
- CertificateAuthorityClient.ListCaPools
- CertificateAuthorityClient.ListCaPools (All)
- CertificateAuthorityClient.ListCertificateAuthorities
- CertificateAuthorityClient.ListCertificateAuthorities (All)
- CertificateAuthorityClient.ListCertificateRevocationLists
- CertificateAuthorityClient.ListCertificateRevocationLists (All)
- CertificateAuthorityClient.ListCertificateTemplates
- CertificateAuthorityClient.ListCertificateTemplates (All)
- CertificateAuthorityClient.ListCertificates
- CertificateAuthorityClient.ListCertificates (All)
- CertificateAuthorityClient.ListLocations
- CertificateAuthorityClient.ListLocations (All)
- CertificateAuthorityClient.ListOperations
- CertificateAuthorityClient.ListOperations (All)
- CertificateAuthorityClient.RevokeCertificate
- CertificateAuthorityClient.SetIamPolicy
- CertificateAuthorityClient.TestIamPermissions
- CertificateAuthorityClient.UndeleteCertificateAuthority
- CertificateAuthorityClient.UpdateCaPool
- CertificateAuthorityClient.UpdateCertificate
- CertificateAuthorityClient.UpdateCertificateAuthority
- CertificateAuthorityClient.UpdateCertificateRevocationList
- CertificateAuthorityClient.UpdateCertificateTemplate
- NewCertificateAuthorityClient
- NewCertificateAuthorityRESTClient
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type ActivateCertificateAuthorityOperation ¶
type ActivateCertificateAuthorityOperation struct {
// contains filtered or unexported fields
}
ActivateCertificateAuthorityOperation manages a long-running operation from ActivateCertificateAuthority.
func (*ActivateCertificateAuthorityOperation) Done ¶
func (op *ActivateCertificateAuthorityOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ActivateCertificateAuthorityOperation) Metadata ¶
func (op *ActivateCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *ActivateCertificateAuthorityOperation) Name() string
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 ¶
func (op *ActivateCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
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 and the 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 ¶
func (op *ActivateCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CaPoolIterator ¶
type CaPoolIterator struct { // 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. Response interface{} // 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. InternalFetch func(pageSize int, pageToken string) (results []*privatecapb.CaPool, nextPageToken string, err error) // 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, the iterator will stop after that iteration.
func (*CaPoolIterator) Next ¶
func (it *CaPoolIterator) Next() (*privatecapb.CaPool, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. 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.
type CertificateAuthorityCallOptions ¶
type CertificateAuthorityCallOptions struct { CreateCertificate []gax.CallOption GetCertificate []gax.CallOption ListCertificates []gax.CallOption RevokeCertificate []gax.CallOption UpdateCertificate []gax.CallOption ActivateCertificateAuthority []gax.CallOption CreateCertificateAuthority []gax.CallOption DisableCertificateAuthority []gax.CallOption EnableCertificateAuthority []gax.CallOption FetchCertificateAuthorityCsr []gax.CallOption GetCertificateAuthority []gax.CallOption ListCertificateAuthorities []gax.CallOption UndeleteCertificateAuthority []gax.CallOption DeleteCertificateAuthority []gax.CallOption UpdateCertificateAuthority []gax.CallOption CreateCaPool []gax.CallOption UpdateCaPool []gax.CallOption GetCaPool []gax.CallOption ListCaPools []gax.CallOption DeleteCaPool []gax.CallOption FetchCaCerts []gax.CallOption GetCertificateRevocationList []gax.CallOption ListCertificateRevocationLists []gax.CallOption UpdateCertificateRevocationList []gax.CallOption CreateCertificateTemplate []gax.CallOption DeleteCertificateTemplate []gax.CallOption GetCertificateTemplate []gax.CallOption ListCertificateTemplates []gax.CallOption UpdateCertificateTemplate []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption GetIamPolicy []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption CancelOperation []gax.CallOption DeleteOperation []gax.CallOption GetOperation []gax.CallOption ListOperations []gax.CallOption }
CertificateAuthorityCallOptions contains the retry settings for each method of CertificateAuthorityClient.
type CertificateAuthorityClient ¶
type CertificateAuthorityClient struct { // 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 Authority Service][google.cloud.security.privateca.v1.CertificateAuthorityService] manages private certificate authorities and issued certificates.
func NewCertificateAuthorityClient ¶
func NewCertificateAuthorityClient(ctx context.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 Authority
Service][google.cloud.security.privateca.v1.CertificateAuthorityService]
manages private certificate authorities and issued certificates.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewCertificateAuthorityRESTClient ¶
func NewCertificateAuthorityRESTClient(ctx context.Context, opts ...option.ClientOption) (*CertificateAuthorityClient, error)
NewCertificateAuthorityRESTClient creates a new certificate authority service rest client.
[Certificate Authority
Service][google.cloud.security.privateca.v1.CertificateAuthorityService]
manages private certificate authorities and issued certificates.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*CertificateAuthorityClient) ActivateCertificateAuthority ¶
func (c *CertificateAuthorityClient) ActivateCertificateAuthority(ctx context.Context, req *privatecapb.ActivateCertificateAuthorityRequest, opts ...gax.CallOption) (*ActivateCertificateAuthorityOperation, error)
ActivateCertificateAuthority activate a
CertificateAuthority
that is in state
AWAITING_USER_ACTIVATION
and is of type
SUBORDINATE.
After the parent Certificate Authority signs a certificate signing request
from
FetchCertificateAuthorityCsr,
this method can complete the activation process.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) ActivateCertificateAuthorityOperation ¶
func (c *CertificateAuthorityClient) ActivateCertificateAuthorityOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
}
func (*CertificateAuthorityClient) Close ¶
func (c *CertificateAuthorityClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*CertificateAuthorityClient) Connection ¶
func (c *CertificateAuthorityClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*CertificateAuthorityClient) CreateCaPool ¶
func (c *CertificateAuthorityClient) CreateCaPool(ctx context.Context, req *privatecapb.CreateCaPoolRequest, opts ...gax.CallOption) (*CreateCaPoolOperation, error)
CreateCaPool create a CaPool.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) CreateCaPoolOperation ¶
func (c *CertificateAuthorityClient) CreateCaPoolOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) CreateCertificate(ctx context.Context, req *privatecapb.CreateCertificateRequest, opts ...gax.CallOption) (*privatecapb.Certificate, error)
CreateCertificate create a new Certificate
in a given Project, Location from a particular
CaPool.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) CreateCertificateAuthority ¶
func (c *CertificateAuthorityClient) CreateCertificateAuthority(ctx context.Context, req *privatecapb.CreateCertificateAuthorityRequest, opts ...gax.CallOption) (*CreateCertificateAuthorityOperation, error)
CreateCertificateAuthority create a new
CertificateAuthority
in a given Project and Location.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) CreateCertificateAuthorityOperation ¶
func (c *CertificateAuthorityClient) CreateCertificateAuthorityOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) CreateCertificateTemplate(ctx context.Context, req *privatecapb.CreateCertificateTemplateRequest, opts ...gax.CallOption) (*CreateCertificateTemplateOperation, error)
CreateCertificateTemplate create a new
CertificateTemplate
in a given Project and Location.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) CreateCertificateTemplateOperation ¶
func (c *CertificateAuthorityClient) CreateCertificateTemplateOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) DeleteCaPool(ctx context.Context, req *privatecapb.DeleteCaPoolRequest, opts ...gax.CallOption) (*DeleteCaPoolOperation, error)
DeleteCaPool delete a CaPool.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*CertificateAuthorityClient) DeleteCaPoolOperation ¶
func (c *CertificateAuthorityClient) DeleteCaPoolOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) DeleteCertificateAuthority(ctx context.Context, req *privatecapb.DeleteCertificateAuthorityRequest, opts ...gax.CallOption) (*DeleteCertificateAuthorityOperation, error)
DeleteCertificateAuthority delete a
CertificateAuthority.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) DeleteCertificateAuthorityOperation ¶
func (c *CertificateAuthorityClient) DeleteCertificateAuthorityOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) DeleteCertificateTemplate(ctx context.Context, req *privatecapb.DeleteCertificateTemplateRequest, opts ...gax.CallOption) (*DeleteCertificateTemplateOperation, error)
DeleteCertificateTemplate deleteCertificateTemplate deletes a
CertificateTemplate.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*CertificateAuthorityClient) DeleteCertificateTemplateOperation ¶
func (c *CertificateAuthorityClient) DeleteCertificateTemplateOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
}
func (*CertificateAuthorityClient) DisableCertificateAuthority ¶
func (c *CertificateAuthorityClient) DisableCertificateAuthority(ctx context.Context, req *privatecapb.DisableCertificateAuthorityRequest, opts ...gax.CallOption) (*DisableCertificateAuthorityOperation, error)
DisableCertificateAuthority disable a
CertificateAuthority.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) DisableCertificateAuthorityOperation ¶
func (c *CertificateAuthorityClient) DisableCertificateAuthorityOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) EnableCertificateAuthority(ctx context.Context, req *privatecapb.EnableCertificateAuthorityRequest, opts ...gax.CallOption) (*EnableCertificateAuthorityOperation, error)
EnableCertificateAuthority enable a
CertificateAuthority.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) EnableCertificateAuthorityOperation ¶
func (c *CertificateAuthorityClient) EnableCertificateAuthorityOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) FetchCaCerts(ctx context.Context, req *privatecapb.FetchCaCertsRequest, opts ...gax.CallOption) (*privatecapb.FetchCaCertsResponse, error)
FetchCaCerts fetchCaCerts returns the current trust anchor for the
CaPool. This will include CA
certificate chains for all certificate authorities in the ENABLED,
DISABLED, or STAGED states.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) FetchCertificateAuthorityCsr ¶
func (c *CertificateAuthorityClient) FetchCertificateAuthorityCsr(ctx context.Context, req *privatecapb.FetchCertificateAuthorityCsrRequest, opts ...gax.CallOption) (*privatecapb.FetchCertificateAuthorityCsrResponse, error)
FetchCertificateAuthorityCsr fetch a certificate signing request (CSR) from a
CertificateAuthority
that is in state
AWAITING_USER_ACTIVATION
and is of type
SUBORDINATE.
The CSR must then be signed by the desired parent Certificate Authority,
which could be another
CertificateAuthority
resource, or could be an on-prem certificate authority. See also
ActivateCertificateAuthority.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) GetCaPool ¶
func (c *CertificateAuthorityClient) GetCaPool(ctx context.Context, req *privatecapb.GetCaPoolRequest, opts ...gax.CallOption) (*privatecapb.CaPool, error)
GetCaPool returns a CaPool.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) GetCertificate ¶
func (c *CertificateAuthorityClient) GetCertificate(ctx context.Context, req *privatecapb.GetCertificateRequest, opts ...gax.CallOption) (*privatecapb.Certificate, error)
GetCertificate returns a Certificate.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) GetCertificateAuthority ¶
func (c *CertificateAuthorityClient) GetCertificateAuthority(ctx context.Context, req *privatecapb.GetCertificateAuthorityRequest, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
GetCertificateAuthority returns a
CertificateAuthority.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) GetCertificateRevocationList ¶
func (c *CertificateAuthorityClient) GetCertificateRevocationList(ctx context.Context, req *privatecapb.GetCertificateRevocationListRequest, opts ...gax.CallOption) (*privatecapb.CertificateRevocationList, error)
GetCertificateRevocationList returns a
CertificateRevocationList.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) GetCertificateTemplate ¶
func (c *CertificateAuthorityClient) GetCertificateTemplate(ctx context.Context, req *privatecapb.GetCertificateTemplateRequest, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
GetCertificateTemplate returns a
CertificateTemplate.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) GetIamPolicy ¶
func (c *CertificateAuthorityClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy
if the resource exists and does not have a policy set.
Code:play
Example¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) GetLocation ¶
func (c *CertificateAuthorityClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) GetOperation ¶
func (c *CertificateAuthorityClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Code:play
Example¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) ListCaPools ¶
func (c *CertificateAuthorityClient) ListCaPools(ctx context.Context, req *privatecapb.ListCaPoolsRequest, opts ...gax.CallOption) *CaPoolIterator
ListCaPools lists CaPools.
Code:play
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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)
}
}
Example (All)¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &privatecapb.ListCaPoolsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCaPoolsRequest.
}
for resp, err := range c.ListCaPools(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CertificateAuthorityClient) ListCertificateAuthorities ¶
func (c *CertificateAuthorityClient) ListCertificateAuthorities(ctx context.Context, req *privatecapb.ListCertificateAuthoritiesRequest, opts ...gax.CallOption) *CertificateAuthorityIterator
ListCertificateAuthorities lists
CertificateAuthorities.
Code:play
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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)
}
}
Example (All)¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &privatecapb.ListCertificateAuthoritiesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateAuthoritiesRequest.
}
for resp, err := range c.ListCertificateAuthorities(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CertificateAuthorityClient) ListCertificateRevocationLists ¶
func (c *CertificateAuthorityClient) ListCertificateRevocationLists(ctx context.Context, req *privatecapb.ListCertificateRevocationListsRequest, opts ...gax.CallOption) *CertificateRevocationListIterator
ListCertificateRevocationLists lists
CertificateRevocationLists.
Code:play
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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)
}
}
Example (All)¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &privatecapb.ListCertificateRevocationListsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateRevocationListsRequest.
}
for resp, err := range c.ListCertificateRevocationLists(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CertificateAuthorityClient) ListCertificateTemplates ¶
func (c *CertificateAuthorityClient) ListCertificateTemplates(ctx context.Context, req *privatecapb.ListCertificateTemplatesRequest, opts ...gax.CallOption) *CertificateTemplateIterator
ListCertificateTemplates lists
CertificateTemplates.
Code:play
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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)
}
}
Example (All)¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &privatecapb.ListCertificateTemplatesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificateTemplatesRequest.
}
for resp, err := range c.ListCertificateTemplates(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CertificateAuthorityClient) ListCertificates ¶
func (c *CertificateAuthorityClient) ListCertificates(ctx context.Context, req *privatecapb.ListCertificatesRequest, opts ...gax.CallOption) *CertificateIterator
ListCertificates lists Certificates.
Code:play
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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)
}
}
Example (All)¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &privatecapb.ListCertificatesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/security/privateca/apiv1/privatecapb#ListCertificatesRequest.
}
for resp, err := range c.ListCertificates(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CertificateAuthorityClient) ListLocations ¶
func (c *CertificateAuthorityClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Code:play
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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)
}
}
Example (All)¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
for resp, err := range c.ListLocations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CertificateAuthorityClient) ListOperations ¶
func (c *CertificateAuthorityClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Code:play
Code:play
Example¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
privateca "cloud.google.com/go/security/privateca/apiv1"
"google.golang.org/api/iterator"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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()
if err == iterator.Done {
break
}
if err != 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)
}
}
Example (All)¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CertificateAuthorityClient) RevokeCertificate ¶
func (c *CertificateAuthorityClient) RevokeCertificate(ctx context.Context, req *privatecapb.RevokeCertificateRequest, opts ...gax.CallOption) (*privatecapb.Certificate, error)
RevokeCertificate revoke a Certificate.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) SetIamPolicy ¶
func (c *CertificateAuthorityClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
errors.
Code:play
Example¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) TestIamPermissions ¶
func (c *CertificateAuthorityClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization
checking. This operation may “fail open” without warning.
Code:play
Example¶
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
privateca "cloud.google.com/go/security/privateca/apiv1"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) UndeleteCertificateAuthority ¶
func (c *CertificateAuthorityClient) UndeleteCertificateAuthority(ctx context.Context, req *privatecapb.UndeleteCertificateAuthorityRequest, opts ...gax.CallOption) (*UndeleteCertificateAuthorityOperation, error)
UndeleteCertificateAuthority undelete a
CertificateAuthority
that has been deleted.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) UndeleteCertificateAuthorityOperation ¶
func (c *CertificateAuthorityClient) UndeleteCertificateAuthorityOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) UpdateCaPool(ctx context.Context, req *privatecapb.UpdateCaPoolRequest, opts ...gax.CallOption) (*UpdateCaPoolOperation, error)
UpdateCaPool update a CaPool.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) UpdateCaPoolOperation ¶
func (c *CertificateAuthorityClient) UpdateCaPoolOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) UpdateCertificate(ctx context.Context, req *privatecapb.UpdateCertificateRequest, opts ...gax.CallOption) (*privatecapb.Certificate, error)
UpdateCertificate update a Certificate.
Currently, the only field you can update is the
labels field.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) UpdateCertificateAuthority ¶
func (c *CertificateAuthorityClient) UpdateCertificateAuthority(ctx context.Context, req *privatecapb.UpdateCertificateAuthorityRequest, opts ...gax.CallOption) (*UpdateCertificateAuthorityOperation, error)
UpdateCertificateAuthority update a
CertificateAuthority.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) UpdateCertificateAuthorityOperation ¶
func (c *CertificateAuthorityClient) UpdateCertificateAuthorityOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) UpdateCertificateRevocationList(ctx context.Context, req *privatecapb.UpdateCertificateRevocationListRequest, opts ...gax.CallOption) (*UpdateCertificateRevocationListOperation, error)
UpdateCertificateRevocationList update a
CertificateRevocationList.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) UpdateCertificateRevocationListOperation ¶
func (c *CertificateAuthorityClient) UpdateCertificateRevocationListOperation(name string) *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 ¶
func (c *CertificateAuthorityClient) UpdateCertificateTemplate(ctx context.Context, req *privatecapb.UpdateCertificateTemplateRequest, opts ...gax.CallOption) (*UpdateCertificateTemplateOperation, error)
UpdateCertificateTemplate update a
CertificateTemplate.
Code:play
Example¶
package main
import (
"context"
privateca "cloud.google.com/go/security/privateca/apiv1"
privatecapb "cloud.google.com/go/security/privateca/apiv1/privatecapb"
)
func main() {
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_Options
c, err := privateca.NewCertificateAuthorityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.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)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CertificateAuthorityClient) UpdateCertificateTemplateOperation ¶
func (c *CertificateAuthorityClient) UpdateCertificateTemplateOperation(name string) *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.
type CertificateAuthorityIterator ¶
type CertificateAuthorityIterator struct { // 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. Response interface{} // 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. InternalFetch func(pageSize int, pageToken string) (results []*privatecapb.CertificateAuthority, nextPageToken string, err error) // 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, the iterator will stop after that iteration.
func (*CertificateAuthorityIterator) Next ¶
func (it *CertificateAuthorityIterator) Next() (*privatecapb.CertificateAuthority, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. 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.
type CertificateIterator ¶
type CertificateIterator struct { // 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. Response interface{} // 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. InternalFetch func(pageSize int, pageToken string) (results []*privatecapb.Certificate, nextPageToken string, err error) // 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, the iterator will stop after that iteration.
func (*CertificateIterator) Next ¶
func (it *CertificateIterator) Next() (*privatecapb.Certificate, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. 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.
type CertificateRevocationListIterator ¶
type CertificateRevocationListIterator struct { // 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. Response interface{} // 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. InternalFetch func(pageSize int, pageToken string) (results []*privatecapb.CertificateRevocationList, nextPageToken string, err error) // 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, the iterator will stop after that iteration.
func (*CertificateRevocationListIterator) Next ¶
func (it *CertificateRevocationListIterator) Next() (*privatecapb.CertificateRevocationList, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. 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.
type CertificateTemplateIterator ¶
type CertificateTemplateIterator struct { // 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. Response interface{} // 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. InternalFetch func(pageSize int, pageToken string) (results []*privatecapb.CertificateTemplate, nextPageToken string, err error) // 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, the iterator will stop after that iteration.
func (*CertificateTemplateIterator) Next ¶
func (it *CertificateTemplateIterator) Next() (*privatecapb.CertificateTemplate, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. 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.
type CreateCaPoolOperation ¶
type CreateCaPoolOperation struct {
// contains filtered or unexported fields
}
CreateCaPoolOperation manages a long-running operation from CreateCaPool.
func (*CreateCaPoolOperation) Done ¶
func (op *CreateCaPoolOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCaPoolOperation) Metadata ¶
func (op *CreateCaPoolOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *CreateCaPoolOperation) Name() string
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 ¶
func (op *CreateCaPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CaPool, error)
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 and the 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 ¶
func (op *CreateCaPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CaPool, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateCertificateAuthorityOperation ¶
type CreateCertificateAuthorityOperation struct {
// contains filtered or unexported fields
}
CreateCertificateAuthorityOperation manages a long-running operation from CreateCertificateAuthority.
func (*CreateCertificateAuthorityOperation) Done ¶
func (op *CreateCertificateAuthorityOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCertificateAuthorityOperation) Metadata ¶
func (op *CreateCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *CreateCertificateAuthorityOperation) Name() string
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 ¶
func (op *CreateCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
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 and the 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 ¶
func (op *CreateCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type CreateCertificateTemplateOperation ¶
type CreateCertificateTemplateOperation struct {
// contains filtered or unexported fields
}
CreateCertificateTemplateOperation manages a long-running operation from CreateCertificateTemplate.
func (*CreateCertificateTemplateOperation) Done ¶
func (op *CreateCertificateTemplateOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateCertificateTemplateOperation) Metadata ¶
func (op *CreateCertificateTemplateOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *CreateCertificateTemplateOperation) Name() string
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 ¶
func (op *CreateCertificateTemplateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
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 and the 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 ¶
func (op *CreateCertificateTemplateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteCaPoolOperation ¶
type DeleteCaPoolOperation struct {
// contains filtered or unexported fields
}
DeleteCaPoolOperation manages a long-running operation from DeleteCaPool.
func (*DeleteCaPoolOperation) Done ¶
func (op *DeleteCaPoolOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteCaPoolOperation) Metadata ¶
func (op *DeleteCaPoolOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *DeleteCaPoolOperation) Name() string
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 ¶
func (op *DeleteCaPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
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 and the 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 ¶
func (op *DeleteCaPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteCertificateAuthorityOperation ¶
type DeleteCertificateAuthorityOperation struct {
// contains filtered or unexported fields
}
DeleteCertificateAuthorityOperation manages a long-running operation from DeleteCertificateAuthority.
func (*DeleteCertificateAuthorityOperation) Done ¶
func (op *DeleteCertificateAuthorityOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteCertificateAuthorityOperation) Metadata ¶
func (op *DeleteCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *DeleteCertificateAuthorityOperation) Name() string
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 ¶
func (op *DeleteCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
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 and the 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 ¶
func (op *DeleteCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteCertificateTemplateOperation ¶
type DeleteCertificateTemplateOperation struct {
// contains filtered or unexported fields
}
DeleteCertificateTemplateOperation manages a long-running operation from DeleteCertificateTemplate.
func (*DeleteCertificateTemplateOperation) Done ¶
func (op *DeleteCertificateTemplateOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteCertificateTemplateOperation) Metadata ¶
func (op *DeleteCertificateTemplateOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *DeleteCertificateTemplateOperation) Name() string
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 ¶
func (op *DeleteCertificateTemplateOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
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 and the 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 ¶
func (op *DeleteCertificateTemplateOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DisableCertificateAuthorityOperation ¶
type DisableCertificateAuthorityOperation struct {
// contains filtered or unexported fields
}
DisableCertificateAuthorityOperation manages a long-running operation from DisableCertificateAuthority.
func (*DisableCertificateAuthorityOperation) Done ¶
func (op *DisableCertificateAuthorityOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DisableCertificateAuthorityOperation) Metadata ¶
func (op *DisableCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *DisableCertificateAuthorityOperation) Name() string
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 ¶
func (op *DisableCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
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 and the 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 ¶
func (op *DisableCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type EnableCertificateAuthorityOperation ¶
type EnableCertificateAuthorityOperation struct {
// contains filtered or unexported fields
}
EnableCertificateAuthorityOperation manages a long-running operation from EnableCertificateAuthority.
func (*EnableCertificateAuthorityOperation) Done ¶
func (op *EnableCertificateAuthorityOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*EnableCertificateAuthorityOperation) Metadata ¶
func (op *EnableCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *EnableCertificateAuthorityOperation) Name() string
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 ¶
func (op *EnableCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
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 and the 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 ¶
func (op *EnableCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type LocationIterator ¶
type LocationIterator struct { // 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. Response interface{} // 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. InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) // 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, the iterator will stop after that iteration.
func (*LocationIterator) Next ¶
func (it *LocationIterator) Next() (*locationpb.Location, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. 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.
type OperationIterator ¶
type OperationIterator struct { // 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. Response interface{} // 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. InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) // 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, the iterator will stop after that iteration.
func (*OperationIterator) Next ¶
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. 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.
type UndeleteCertificateAuthorityOperation ¶
type UndeleteCertificateAuthorityOperation struct {
// contains filtered or unexported fields
}
UndeleteCertificateAuthorityOperation manages a long-running operation from UndeleteCertificateAuthority.
func (*UndeleteCertificateAuthorityOperation) Done ¶
func (op *UndeleteCertificateAuthorityOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UndeleteCertificateAuthorityOperation) Metadata ¶
func (op *UndeleteCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *UndeleteCertificateAuthorityOperation) Name() string
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 ¶
func (op *UndeleteCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
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 and the 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 ¶
func (op *UndeleteCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateCaPoolOperation ¶
type UpdateCaPoolOperation struct {
// contains filtered or unexported fields
}
UpdateCaPoolOperation manages a long-running operation from UpdateCaPool.
func (*UpdateCaPoolOperation) Done ¶
func (op *UpdateCaPoolOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateCaPoolOperation) Metadata ¶
func (op *UpdateCaPoolOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *UpdateCaPoolOperation) Name() string
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 ¶
func (op *UpdateCaPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CaPool, error)
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 and the 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 ¶
func (op *UpdateCaPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CaPool, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateCertificateAuthorityOperation ¶
type UpdateCertificateAuthorityOperation struct {
// contains filtered or unexported fields
}
UpdateCertificateAuthorityOperation manages a long-running operation from UpdateCertificateAuthority.
func (*UpdateCertificateAuthorityOperation) Done ¶
func (op *UpdateCertificateAuthorityOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateCertificateAuthorityOperation) Metadata ¶
func (op *UpdateCertificateAuthorityOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *UpdateCertificateAuthorityOperation) Name() string
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 ¶
func (op *UpdateCertificateAuthorityOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
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 and the 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 ¶
func (op *UpdateCertificateAuthorityOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateAuthority, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateCertificateRevocationListOperation ¶
type UpdateCertificateRevocationListOperation struct {
// contains filtered or unexported fields
}
UpdateCertificateRevocationListOperation manages a long-running operation from UpdateCertificateRevocationList.
func (*UpdateCertificateRevocationListOperation) Done ¶
func (op *UpdateCertificateRevocationListOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateCertificateRevocationListOperation) Metadata ¶
func (op *UpdateCertificateRevocationListOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *UpdateCertificateRevocationListOperation) Name() string
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 ¶
func (op *UpdateCertificateRevocationListOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateRevocationList, error)
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 and the 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 ¶
func (op *UpdateCertificateRevocationListOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateRevocationList, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type UpdateCertificateTemplateOperation ¶
type UpdateCertificateTemplateOperation struct {
// contains filtered or unexported fields
}
UpdateCertificateTemplateOperation manages a long-running operation from UpdateCertificateTemplate.
func (*UpdateCertificateTemplateOperation) Done ¶
func (op *UpdateCertificateTemplateOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateCertificateTemplateOperation) Metadata ¶
func (op *UpdateCertificateTemplateOperation) Metadata() (*privatecapb.OperationMetadata, error)
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 ¶
func (op *UpdateCertificateTemplateOperation) Name() string
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 ¶
func (op *UpdateCertificateTemplateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
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 and the 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 ¶
func (op *UpdateCertificateTemplateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*privatecapb.CertificateTemplate, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
Source Files ¶
auxiliary.go auxiliary_go123.go certificate_authority_client.go doc.go helpers.go version.go
Directories ¶
Path | Synopsis |
---|---|
privateca/apiv1/privatecapb |
- Version
- v1.18.3 (latest)
- Published
- Jan 2, 2025
- Platform
- linux/amd64
- Imports
- 31 packages
- Last checked
- 6 days ago –
Tools for package owners.