Package cloud.google.com/go/security/privateca/apiv1beta1 (v0.75.0)

Use of Context

The ctx passed to NewClient 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.

For information about setting deadlines, reusing contexts, and more please visit pkg.go.dev/cloud.google.com/go.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

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

ActivateCertificateAuthorityOperation

type ActivateCertificateAuthorityOperation struct {
	// contains filtered or unexported fields
}

ActivateCertificateAuthorityOperation manages a long-running operation from ActivateCertificateAuthority.

func (*ActivateCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*ActivateCertificateAuthorityOperation) Metadata

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

func (*ActivateCertificateAuthorityOperation) Name

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

func (*ActivateCertificateAuthorityOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

See documentation of Poll for error-handling information.

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
	RestoreCertificateAuthority        []gax.CallOption
	ScheduleDeleteCertificateAuthority []gax.CallOption
	UpdateCertificateAuthority         []gax.CallOption
	GetCertificateRevocationList       []gax.CallOption
	ListCertificateRevocationLists     []gax.CallOption
	UpdateCertificateRevocationList    []gax.CallOption
	GetReusableConfig                  []gax.CallOption
	ListReusableConfigs                []gax.CallOption
}

CertificateAuthorityCallOptions contains the retry settings for each method of CertificateAuthorityClient.

CertificateAuthorityClient

type CertificateAuthorityClient struct {

	// LROClient is used internally to handle longrunning operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient

	// The call options for this service.
	CallOptions *CertificateAuthorityCallOptions
	// contains filtered or unexported fields
}

CertificateAuthorityClient is a client for interacting with .

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewCertificateAuthorityClient

func NewCertificateAuthorityClient(ctx context.Context, opts ...option.ClientOption) (*CertificateAuthorityClient, error)

NewCertificateAuthorityClient creates a new certificate authority service client.

[Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private certificate authorities and issued certificates.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"
)

func main() {
	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*CertificateAuthorityClient) ActivateCertificateAuthority

ActivateCertificateAuthority activate a CertificateAuthority that is in state PENDING_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.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.ActivateCertificateAuthorityRequest{
		// TODO: Fill request struct fields.
	}
	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) 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.

func (*CertificateAuthorityClient) CreateCertificate

CreateCertificate create a new Certificate in a given Project, Location from a particular CertificateAuthority.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.CreateCertificateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateCertificate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CertificateAuthorityClient) CreateCertificateAuthority

CreateCertificateAuthority create a new CertificateAuthority in a given Project and Location.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.CreateCertificateAuthorityRequest{
		// TODO: Fill request struct fields.
	}
	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) DisableCertificateAuthority

DisableCertificateAuthority disable a CertificateAuthority.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.DisableCertificateAuthorityRequest{
		// TODO: Fill request struct fields.
	}
	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

EnableCertificateAuthority enable a CertificateAuthority.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.EnableCertificateAuthorityRequest{
		// TODO: Fill request struct fields.
	}
	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) FetchCertificateAuthorityCsr

FetchCertificateAuthorityCsr fetch a certificate signing request (CSR) from a CertificateAuthority that is in state PENDING_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.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.FetchCertificateAuthorityCsrRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.FetchCertificateAuthorityCsr(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CertificateAuthorityClient) GetCertificate

GetCertificate returns a Certificate.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.GetCertificateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetCertificate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CertificateAuthorityClient) GetCertificateAuthority

GetCertificateAuthority returns a CertificateAuthority.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.GetCertificateAuthorityRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetCertificateAuthority(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CertificateAuthorityClient) GetCertificateRevocationList

GetCertificateRevocationList returns a CertificateRevocationList.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.GetCertificateRevocationListRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetCertificateRevocationList(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CertificateAuthorityClient) GetReusableConfig

GetReusableConfig returns a ReusableConfig.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.GetReusableConfigRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetReusableConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CertificateAuthorityClient) ListCertificateAuthorities

ListCertificateAuthorities lists CertificateAuthorities.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"
	"google.golang.org/api/iterator"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.ListCertificateAuthoritiesRequest{
		// TODO: Fill request struct fields.
	}
	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
	}
}

func (*CertificateAuthorityClient) ListCertificateRevocationLists

ListCertificateRevocationLists lists CertificateRevocationLists.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"
	"google.golang.org/api/iterator"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.ListCertificateRevocationListsRequest{
		// TODO: Fill request struct fields.
	}
	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
	}
}

func (*CertificateAuthorityClient) ListCertificates

ListCertificates lists Certificates.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"
	"google.golang.org/api/iterator"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.ListCertificatesRequest{
		// TODO: Fill request struct fields.
	}
	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
	}
}

func (*CertificateAuthorityClient) ListReusableConfigs

ListReusableConfigs lists ReusableConfigs.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"
	"google.golang.org/api/iterator"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.ListReusableConfigsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListReusableConfigs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CertificateAuthorityClient) RestoreCertificateAuthority

RestoreCertificateAuthority restore a CertificateAuthority that is scheduled for deletion.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.RestoreCertificateAuthorityRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.RestoreCertificateAuthority(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) RestoreCertificateAuthorityOperation

func (c *CertificateAuthorityClient) RestoreCertificateAuthorityOperation(name string) *RestoreCertificateAuthorityOperation

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

func (*CertificateAuthorityClient) RevokeCertificate

RevokeCertificate revoke a Certificate.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.RevokeCertificateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.RevokeCertificate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CertificateAuthorityClient) ScheduleDeleteCertificateAuthority

ScheduleDeleteCertificateAuthority schedule a CertificateAuthority for deletion.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.ScheduleDeleteCertificateAuthorityRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.ScheduleDeleteCertificateAuthority(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) ScheduleDeleteCertificateAuthorityOperation

func (c *CertificateAuthorityClient) ScheduleDeleteCertificateAuthorityOperation(name string) *ScheduleDeleteCertificateAuthorityOperation

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

func (*CertificateAuthorityClient) UpdateCertificate

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

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.UpdateCertificateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateCertificate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CertificateAuthorityClient) UpdateCertificateAuthority

UpdateCertificateAuthority update a CertificateAuthority.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.UpdateCertificateAuthorityRequest{
		// TODO: Fill request struct fields.
	}
	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

UpdateCertificateRevocationList update a CertificateRevocationList.

Example

package main

import (
	"context"

	privateca "cloud.google.com/go/security/privateca/apiv1beta1"

	privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"
)

func main() {
	// import privatecapb "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1"

	ctx := context.Background()
	c, err := privateca.NewCertificateAuthorityClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &privatecapb.UpdateCertificateRevocationListRequest{
		// TODO: Fill request struct fields.
	}
	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.

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) Next

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

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

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) Next

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.

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) Next

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

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

CreateCertificateAuthorityOperation

type CreateCertificateAuthorityOperation struct {
	// contains filtered or unexported fields
}

CreateCertificateAuthorityOperation manages a long-running operation from CreateCertificateAuthority.

func (*CreateCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateCertificateAuthorityOperation) Metadata

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

func (*CreateCertificateAuthorityOperation) Name

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

func (*CreateCertificateAuthorityOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

See documentation of Poll for error-handling information.

DisableCertificateAuthorityOperation

type DisableCertificateAuthorityOperation struct {
	// contains filtered or unexported fields
}

DisableCertificateAuthorityOperation manages a long-running operation from DisableCertificateAuthority.

func (*DisableCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*DisableCertificateAuthorityOperation) Metadata

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

func (*DisableCertificateAuthorityOperation) Name

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

func (*DisableCertificateAuthorityOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

See documentation of Poll for error-handling information.

EnableCertificateAuthorityOperation

type EnableCertificateAuthorityOperation struct {
	// contains filtered or unexported fields
}

EnableCertificateAuthorityOperation manages a long-running operation from EnableCertificateAuthority.

func (*EnableCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*EnableCertificateAuthorityOperation) Metadata

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

func (*EnableCertificateAuthorityOperation) Name

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

func (*EnableCertificateAuthorityOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

See documentation of Poll for error-handling information.

RestoreCertificateAuthorityOperation

type RestoreCertificateAuthorityOperation struct {
	// contains filtered or unexported fields
}

RestoreCertificateAuthorityOperation manages a long-running operation from RestoreCertificateAuthority.

func (*RestoreCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*RestoreCertificateAuthorityOperation) Metadata

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

func (*RestoreCertificateAuthorityOperation) Name

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

func (*RestoreCertificateAuthorityOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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 (*RestoreCertificateAuthorityOperation) Wait

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

See documentation of Poll for error-handling information.

ReusableConfigIterator

type ReusableConfigIterator 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.ReusableConfig, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ReusableConfigIterator manages a stream of *privatecapb.ReusableConfig.

func (*ReusableConfigIterator) Next

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 (*ReusableConfigIterator) PageInfo

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

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

ScheduleDeleteCertificateAuthorityOperation

type ScheduleDeleteCertificateAuthorityOperation struct {
	// contains filtered or unexported fields
}

ScheduleDeleteCertificateAuthorityOperation manages a long-running operation from ScheduleDeleteCertificateAuthority.

func (*ScheduleDeleteCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*ScheduleDeleteCertificateAuthorityOperation) Metadata

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

func (*ScheduleDeleteCertificateAuthorityOperation) Name

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

func (*ScheduleDeleteCertificateAuthorityOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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 (*ScheduleDeleteCertificateAuthorityOperation) Wait

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

See documentation of Poll for error-handling information.

UpdateCertificateAuthorityOperation

type UpdateCertificateAuthorityOperation struct {
	// contains filtered or unexported fields
}

UpdateCertificateAuthorityOperation manages a long-running operation from UpdateCertificateAuthority.

func (*UpdateCertificateAuthorityOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateCertificateAuthorityOperation) Metadata

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

func (*UpdateCertificateAuthorityOperation) Name

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

func (*UpdateCertificateAuthorityOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

See documentation of Poll for error-handling information.

UpdateCertificateRevocationListOperation

type UpdateCertificateRevocationListOperation struct {
	// contains filtered or unexported fields
}

UpdateCertificateRevocationListOperation manages a long-running operation from UpdateCertificateRevocationList.

func (*UpdateCertificateRevocationListOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateCertificateRevocationListOperation) Metadata

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

func (*UpdateCertificateRevocationListOperation) Name

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

func (*UpdateCertificateRevocationListOperation) Poll

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

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

If Poll fails, the error is returned and op is unmodified. If Poll succeeds 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

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

See documentation of Poll for error-handling information.