Documentation
¶
Overview ¶
Package clients holds client libraries used by security automation Cloud Functions.
Index ¶
- func SamplesFromDomain(domain string) ([]string, error)
- type BigQuery
- type CloudResourceManager
- func (c *CloudResourceManager) GetAncestry(ctx context.Context, projectID string) (*crm.GetAncestryResponse, error)
- func (c *CloudResourceManager) GetOrganization(ctx context.Context, name string) (*crm.Organization, error)
- func (c *CloudResourceManager) GetPolicyOrganization(ctx context.Context, name string) (*crm.Policy, error)
- func (c *CloudResourceManager) GetPolicyProject(ctx context.Context, projectID string) (*crm.Policy, error)
- func (c *CloudResourceManager) SetPolicyOrganization(ctx context.Context, name string, p *crm.Policy) (*crm.Policy, error)
- func (c *CloudResourceManager) SetPolicyProject(ctx context.Context, projectID string, p *crm.Policy) (*crm.Policy, error)
- func (c *CloudResourceManager) SetPolicyProjectWithMask(ctx context.Context, projectID string, p *crm.Policy, updateField ...string) (*crm.Policy, error)
- type CloudSQL
- func (s *CloudSQL) InstanceDetails(ctx context.Context, projectID string, instance string) (*sqladmin.DatabaseInstance, error)
- func (s *CloudSQL) PatchInstance(ctx context.Context, projectID, instance string, ...) (*sqladmin.Operation, error)
- func (s *CloudSQL) UpdateUser(ctx context.Context, projectID, instance, host, name string, ...) (*sqladmin.Operation, error)
- func (s *CloudSQL) WaitSQL(projectID string, op *sqladmin.Operation) []error
- type Compute
- func (c *Compute) CreateSnapshot(ctx context.Context, projectID, zone, disk string, rb *compute.Snapshot) (*compute.Operation, error)
- func (c *Compute) DeleteAccessConfig(ctx context.Context, ...) (*compute.Operation, error)
- func (c *Compute) DeleteDiskSnapshot(ctx context.Context, project, snapshot string) (*compute.Operation, error)
- func (c *Compute) DeleteFirewallRule(ctx context.Context, projectID string, rule string) (*compute.Operation, error)
- func (c *Compute) DeleteInstance(ctx context.Context, projectID, zone, instance string) (*compute.Operation, error)
- func (c *Compute) DiskInsert(ctx context.Context, projectID, zone string, disk *compute.Disk) (*compute.Operation, error)
- func (c *Compute) FirewallRule(ctx context.Context, projectID string, ruleID string) (*compute.Firewall, error)
- func (c *Compute) GetInstance(ctx context.Context, project, zone, instance string) (*compute.Instance, error)
- func (c *Compute) InsertFirewallRule(ctx context.Context, projectID string, fw *compute.Firewall) (*compute.Operation, error)
- func (c *Compute) ListDisks(ctx context.Context, projectID, zone string) (*compute.DiskList, error)
- func (c *Compute) ListProjectSnapshots(ctx context.Context, projectID string) (*compute.SnapshotList, error)
- func (c *Compute) PatchFirewallRule(ctx context.Context, projectID string, rule string, rb *compute.Firewall) (*compute.Operation, error)
- func (c *Compute) SetLabels(ctx context.Context, projectID, resource string, ...) (*compute.Operation, error)
- func (c *Compute) StartInstance(ctx context.Context, projectID, zone, instance string) (*compute.Operation, error)
- func (c *Compute) StopInstance(ctx context.Context, projectID, zone, instance string) (*compute.Operation, error)
- func (c *Compute) WaitGlobal(project string, op *compute.Operation) []error
- func (c *Compute) WaitZone(project, zone string, op *compute.Operation) []error
- type Container
- type DomainReport
- type Logger
- type PagerDuty
- type PubSub
- type Sample
- type SecurityCommandCenter
- type SendGrid
- type SendGridClient
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SamplesFromDomain ¶
SamplesFromDomain returns a slice of hashes associated with a domain name.
Types ¶
type BigQuery ¶
type BigQuery struct {
// contains filtered or unexported fields
}
BigQuery client.
func NewBigQuery ¶
NewBigQuery returns the BigQuery client.
func (*BigQuery) DatasetMetadata ¶
func (bq *BigQuery) DatasetMetadata(ctx context.Context, projectID, datasetID string) (*bigquery.DatasetMetadata, error)
DatasetMetadata fetches the metadata for the dataset.
func (*BigQuery) OverwriteDatasetMetadata ¶
func (bq *BigQuery) OverwriteDatasetMetadata(ctx context.Context, projectID, datasetID string, dm bigquery.DatasetMetadataToUpdate) (*bigquery.DatasetMetadata, error)
OverwriteDatasetMetadata modifies specific Dataset metadata fields. This method ignores the existing metadata state (and possibly overwrites other updates) by doing a "blind write". See https://godoc.org/cloud.google.com/go/bigquery#Dataset.Update for details.
type CloudResourceManager ¶
type CloudResourceManager struct {
// contains filtered or unexported fields
}
CloudResourceManager client.
func NewCloudResourceManager ¶
func NewCloudResourceManager(ctx context.Context, authFile string) (*CloudResourceManager, error)
NewCloudResourceManager returns and initalizes the Cloud Resource Manager client.
func (*CloudResourceManager) GetAncestry ¶
func (c *CloudResourceManager) GetAncestry(ctx context.Context, projectID string) (*crm.GetAncestryResponse, error)
GetAncestry returns the ancestry for the given project.
func (*CloudResourceManager) GetOrganization ¶
func (c *CloudResourceManager) GetOrganization(ctx context.Context, name string) (*crm.Organization, error)
GetOrganization returns the organization info by resource name.
func (*CloudResourceManager) GetPolicyOrganization ¶
func (c *CloudResourceManager) GetPolicyOrganization(ctx context.Context, name string) (*crm.Policy, error)
GetPolicyOrganization returns the IAM policy for the given organization resource.
func (*CloudResourceManager) GetPolicyProject ¶
func (c *CloudResourceManager) GetPolicyProject(ctx context.Context, projectID string) (*crm.Policy, error)
GetPolicyProject returns the IAM policy for the given project resource.
func (*CloudResourceManager) SetPolicyOrganization ¶
func (c *CloudResourceManager) SetPolicyOrganization(ctx context.Context, name string, p *crm.Policy) (*crm.Policy, error)
SetPolicyOrganization sets an IAM policy for the given organization resource.
type CloudSQL ¶
type CloudSQL struct {
// contains filtered or unexported fields
}
CloudSQL client.
func NewCloudSQL ¶
NewCloudSQL returns and initializes a Cloud SQL client.
func (*CloudSQL) InstanceDetails ¶
func (s *CloudSQL) InstanceDetails(ctx context.Context, projectID string, instance string) (*sqladmin.DatabaseInstance, error)
InstanceDetails gets detail from a instance in a project
func (*CloudSQL) PatchInstance ¶
func (s *CloudSQL) PatchInstance(ctx context.Context, projectID, instance string, databaseInstance *sqladmin.DatabaseInstance) (*sqladmin.Operation, error)
PatchInstance updates partialy a Cloud SQL instance.
type Compute ¶
type Compute struct {
// contains filtered or unexported fields
}
Compute client.
func NewCompute ¶
NewCompute returns and initializes a Compute client.
func (*Compute) CreateSnapshot ¶
func (c *Compute) CreateSnapshot(ctx context.Context, projectID, zone, disk string, rb *compute.Snapshot) (*compute.Operation, error)
CreateSnapshot creates a snapshot of a specified persistent disk.
func (*Compute) DeleteAccessConfig ¶
func (c *Compute) DeleteAccessConfig(ctx context.Context, project, zone, instance, accessConfig, networkInterface string) (*compute.Operation, error)
DeleteAccessConfig deletes an access config from an instance's network interface.
func (*Compute) DeleteDiskSnapshot ¶
func (c *Compute) DeleteDiskSnapshot(ctx context.Context, project, snapshot string) (*compute.Operation, error)
DeleteDiskSnapshot deletes the given snapshot from the project.
func (*Compute) DeleteFirewallRule ¶
func (c *Compute) DeleteFirewallRule(ctx context.Context, projectID string, rule string) (*compute.Operation, error)
DeleteFirewallRule deletes the firewall rule for the given project.
func (*Compute) DeleteInstance ¶
func (c *Compute) DeleteInstance(ctx context.Context, projectID, zone, instance string) (*compute.Operation, error)
DeleteInstance deletes a given instance in given zone.
func (*Compute) DiskInsert ¶
func (c *Compute) DiskInsert(ctx context.Context, projectID, zone string, disk *compute.Disk) (*compute.Operation, error)
DiskInsert creates a new disk in the project.
func (*Compute) FirewallRule ¶
func (c *Compute) FirewallRule(ctx context.Context, projectID string, ruleID string) (*compute.Firewall, error)
FirewallRule get the details of a firewall rule
func (*Compute) GetInstance ¶
func (c *Compute) GetInstance(ctx context.Context, project, zone, instance string) (*compute.Instance, error)
GetInstance returns the specified compute instance resource.
func (*Compute) InsertFirewallRule ¶
func (c *Compute) InsertFirewallRule(ctx context.Context, projectID string, fw *compute.Firewall) (*compute.Operation, error)
InsertFirewallRule inserts a new firewall rule.
func (*Compute) ListProjectSnapshots ¶
func (c *Compute) ListProjectSnapshots(ctx context.Context, projectID string) (*compute.SnapshotList, error)
ListProjectSnapshots returns a list of snapshot reousrces for a given project.
func (*Compute) PatchFirewallRule ¶
func (c *Compute) PatchFirewallRule(ctx context.Context, projectID string, rule string, rb *compute.Firewall) (*compute.Operation, error)
PatchFirewallRule updates the firewall rule for the given project.
func (*Compute) SetLabels ¶
func (c *Compute) SetLabels(ctx context.Context, projectID, resource string, rb *compute.GlobalSetLabelsRequest) (*compute.Operation, error)
SetLabels sets labels on a snapshot.
func (*Compute) StartInstance ¶
func (c *Compute) StartInstance(ctx context.Context, projectID, zone, instance string) (*compute.Operation, error)
StartInstance starts a given instance in given zone.
func (*Compute) StopInstance ¶
func (c *Compute) StopInstance(ctx context.Context, projectID, zone, instance string) (*compute.Operation, error)
StopInstance instance command to some instance/zone
func (*Compute) WaitGlobal ¶
WaitGlobal will wait for the global operation to complete.
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container client.
func NewContainer ¶
NewContainer returns and initializes a Container client.
type DomainReport ¶
type DomainReport struct {
Samples []Sample `json:"detected_communicating_samples"`
}
DomainReport holds a subset of fields returned in a domain request.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger client.
type PagerDuty ¶
type PagerDuty struct {
// contains filtered or unexported fields
}
PagerDuty client.
func NewPagerDuty ¶
NewPagerDuty returns a PagerDuty client initialized.
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
PubSub client.
type Sample ¶
type Sample struct {
SHA256 string `json:"sha256"`
}
Sample holds a subset of fields returned in a sample request.
type SecurityCommandCenter ¶
type SecurityCommandCenter struct {
// contains filtered or unexported fields
}
SecurityCommandCenter client.
func NewSecurityCommandCenter ¶
func NewSecurityCommandCenter(ctx context.Context, authFile string) (*SecurityCommandCenter, error)
NewSecurityCommandCenter returns and initializes a SecurityCommandCenter client.
func (*SecurityCommandCenter) AddSecurityMarks ¶
func (s *SecurityCommandCenter) AddSecurityMarks(ctx context.Context, request *sccpb.UpdateSecurityMarksRequest) (*sccpb.SecurityMarks, error)
AddSecurityMarks adds security mark to a finding or asset.
func (*SecurityCommandCenter) UpdateFinding ¶
func (s *SecurityCommandCenter) UpdateFinding(ctx context.Context, request *sccpb.UpdateFindingRequest) (*sccpb.Finding, error)
UpdateFinding updates a finding in SCC.
type SendGrid ¶
type SendGrid struct {
Service SendGridClient
}
SendGrid client.
func NewSendGridClient ¶
NewSendGridClient returns and initializes the SendGrid client.
type SendGridClient ¶
SendGridClient client provider -------------------------------------------------/
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage client.
func NewStorage ¶
NewStorage returns and initializes the Storage client.
func (*Storage) BucketPolicy ¶
BucketPolicy gets the IAM policy for the given bucket.
func (*Storage) EnableBucketOnlyPolicy ¶
EnableBucketOnlyPolicy enables the bucket only policy for the given bucket.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
cscc
|
|
apiv1p1alpha1
Package securitycenter is an auto-generated package for the Cloud Security Command Center API.
|
Package securitycenter is an auto-generated package for the Cloud Security Command Center API. |
Package stubs provides testable stubs for clients.
|
Package stubs provides testable stubs for clients. |