Documentation

Overview

    Package securitycenter is an auto-generated package for the Cloud Security Command Center API.

    NOTE: This package is in alpha. It is not stable, and is likely to change.
    

    The public Cloud Security Command Center API.

    Index

    Examples

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func DefaultAuthScopes

    func DefaultAuthScopes() []string

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

      Types

      type CallOptions

      type CallOptions struct {
      	CreateSource               []gax.CallOption
      	CreateFinding              []gax.CallOption
      	GetIamPolicy               []gax.CallOption
      	GetOrganizationSettings    []gax.CallOption
      	GetSource                  []gax.CallOption
      	GroupAssets                []gax.CallOption
      	GroupFindings              []gax.CallOption
      	ListAssets                 []gax.CallOption
      	ListFindings               []gax.CallOption
      	ListSources                []gax.CallOption
      	RunAssetDiscovery          []gax.CallOption
      	SetFindingState            []gax.CallOption
      	SetIamPolicy               []gax.CallOption
      	TestIamPermissions         []gax.CallOption
      	UpdateFinding              []gax.CallOption
      	UpdateOrganizationSettings []gax.CallOption
      	UpdateSource               []gax.CallOption
      	UpdateSecurityMarks        []gax.CallOption
      }

        CallOptions contains the retry settings for each method of Client.

        type Client

        type Client 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 *CallOptions
        	// contains filtered or unexported fields
        }

          Client is a client for interacting with Cloud Security Command Center API.

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

          func NewClient

          func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

            NewClient creates a new security center client.

            V1 Beta APIs for Security Center service.

            Example
            Output:
            
            

            func (*Client) Close

            func (c *Client) Close() error

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

              func (*Client) Connection

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

                Connection returns the client's connection to the API service.

                func (*Client) CreateFinding

                  CreateFinding creates a finding. The corresponding source must exist for finding creation to succeed.

                  Example
                  Output:
                  
                  

                  func (*Client) CreateSource

                    CreateSource creates a source.

                    Example
                    Output:
                    
                    

                    func (*Client) GetIamPolicy

                    func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

                      GetIamPolicy gets the access control policy on the specified Source.

                      Example
                      Output:
                      
                      

                      func (*Client) GetOrganizationSettings

                        GetOrganizationSettings gets the settings for an organization.

                        Example
                        Output:
                        
                        

                        func (*Client) GetSource

                          GetSource gets a source.

                          Example
                          Output:
                          
                          

                          func (*Client) GroupAssets

                            GroupAssets filters an organization's assets and groups them by their specified properties.

                            Example
                            Output:
                            
                            

                            func (*Client) GroupFindings

                              GroupFindings filters an organization or source's findings and groups them by their specified properties.

                              To group across all sources provide a - as the source id. Example: /v1beta1/organizations/123/sources/-/findings

                              Example
                              Output:
                              
                              

                              func (*Client) ListAssets

                                ListAssets lists an organization's assets.

                                Example
                                Output:
                                
                                

                                func (*Client) ListFindings

                                  ListFindings lists an organization or source's findings.

                                  To list across all sources provide a - as the source id. Example: /v1beta1/organizations/123/sources/-/findings

                                  Example
                                  Output:
                                  
                                  

                                  func (*Client) ListSources

                                    ListSources lists all sources belonging to an organization.

                                    Example
                                    Output:
                                    
                                    

                                    func (*Client) RunAssetDiscovery

                                      RunAssetDiscovery runs asset discovery. The discovery is tracked with a long-running operation.

                                      This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

                                      Example
                                      Output:
                                      
                                      

                                      func (*Client) RunAssetDiscoveryOperation

                                      func (c *Client) RunAssetDiscoveryOperation(name string) *RunAssetDiscoveryOperation

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

                                        func (*Client) SetFindingState

                                          SetFindingState updates the state of a finding.

                                          Example
                                          Output:
                                          
                                          

                                          func (*Client) SetIamPolicy

                                          func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)

                                            SetIamPolicy sets the access control policy on the specified Source.

                                            Example
                                            Output:
                                            
                                            

                                            func (*Client) TestIamPermissions

                                              TestIamPermissions returns the permissions that a caller has on the specified source.

                                              Example
                                              Output:
                                              
                                              

                                              func (*Client) UpdateFinding

                                                UpdateFinding creates or updates a finding. The corresponding source must exist for a finding creation to succeed.

                                                Example
                                                Output:
                                                
                                                

                                                func (*Client) UpdateOrganizationSettings

                                                  UpdateOrganizationSettings updates an organization's settings.

                                                  Example
                                                  Output:
                                                  
                                                  

                                                  func (*Client) UpdateSecurityMarks

                                                    UpdateSecurityMarks updates security marks.

                                                    Example
                                                    Output:
                                                    
                                                    

                                                    func (*Client) UpdateSource

                                                      UpdateSource updates a source.

                                                      Example
                                                      Output:
                                                      
                                                      

                                                      type FindingIterator

                                                      type FindingIterator struct {
                                                      
                                                      	// 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 []*securitycenterpb.Finding, nextPageToken string, err error)
                                                      	// contains filtered or unexported fields
                                                      }

                                                        FindingIterator manages a stream of *securitycenterpb.Finding.

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

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

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

                                                            type GroupResultIterator

                                                            type GroupResultIterator struct {
                                                            
                                                            	// 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 []*securitycenterpb.GroupResult, nextPageToken string, err error)
                                                            	// contains filtered or unexported fields
                                                            }

                                                              GroupResultIterator manages a stream of *securitycenterpb.GroupResult.

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

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

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

                                                                  type ListAssetsResponse_ListAssetsResultIterator

                                                                  type ListAssetsResponse_ListAssetsResultIterator struct {
                                                                  
                                                                  	// 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 []*securitycenterpb.ListAssetsResponse_ListAssetsResult, nextPageToken string, err error)
                                                                  	// contains filtered or unexported fields
                                                                  }

                                                                    ListAssetsResponse_ListAssetsResultIterator manages a stream of *securitycenterpb.ListAssetsResponse_ListAssetsResult.

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

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

                                                                        type RunAssetDiscoveryOperation

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

                                                                          RunAssetDiscoveryOperation manages a long-running operation from RunAssetDiscovery.

                                                                          func (*RunAssetDiscoveryOperation) Done

                                                                          func (op *RunAssetDiscoveryOperation) Done() bool

                                                                            Done reports whether the long-running operation has completed.

                                                                            func (*RunAssetDiscoveryOperation) 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 (*RunAssetDiscoveryOperation) Poll

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

                                                                                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.

                                                                                func (*RunAssetDiscoveryOperation) Wait

                                                                                  Wait blocks until the long-running operation is completed, returning any error encountered.

                                                                                  See documentation of Poll for error-handling information.

                                                                                  type SourceIterator

                                                                                  type SourceIterator struct {
                                                                                  
                                                                                  	// 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 []*securitycenterpb.Source, nextPageToken string, err error)
                                                                                  	// contains filtered or unexported fields
                                                                                  }

                                                                                    SourceIterator manages a stream of *securitycenterpb.Source.

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

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

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