securityposture

package
v0.214.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package securityposture provides access to the Security Posture API.

For product documentation, see: https://cloud.google.com/security-command-center

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/securityposture/v1"
...
ctx := context.Background()
securitypostureService, err := securityposture.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:

securitypostureService, err := securityposture.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
securitypostureService, err := securityposture.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (
	// See, edit, configure, and delete your Google Cloud data and see the email
	// address for your Google Account.
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetDetails

type AssetDetails struct {
	// Asset: Information about the Cloud Asset Inventory asset that violated a
	// policy. The format of this information can change at any time without prior
	// notice. Your application must not depend on this information in any way.
	Asset string `json:"asset,omitempty"`
	// AssetType: The type of Cloud Asset Inventory asset. For a list of asset
	// types, see Supported asset types
	// (https://cloud.google.com/asset-inventory/docs/supported-asset-types).
	AssetType string `json:"assetType,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Asset") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Asset") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

AssetDetails: Details of a Cloud Asset Inventory asset that caused a violation.

func (AssetDetails) MarshalJSON

func (s AssetDetails) MarshalJSON() ([]byte, error)

type CancelOperationRequest

type CancelOperationRequest struct {
}

CancelOperationRequest: The request message for Operations.CancelOperation.

type ComplianceStandard

type ComplianceStandard struct {
	// Control: Optional. The control in the compliance standard that the policy
	// helps enforce. For example, `AC-3`.
	Control string `json:"control,omitempty"`
	// Standard: Optional. The compliance standard that the policy helps enforce.
	// For example, `NIST SP 800-53`.
	Standard string `json:"standard,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Control") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Control") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ComplianceStandard: Information about a compliance standard that the policy helps enforce.

func (ComplianceStandard) MarshalJSON

func (s ComplianceStandard) MarshalJSON() ([]byte, error)

type Constraint

type Constraint struct {
	// OrgPolicyConstraint: Optional. A predefined organization policy constraint.
	OrgPolicyConstraint *OrgPolicyConstraint `json:"orgPolicyConstraint,omitempty"`
	// OrgPolicyConstraintCustom: Optional. A custom organization policy
	// constraint.
	OrgPolicyConstraintCustom *OrgPolicyConstraintCustom `json:"orgPolicyConstraintCustom,omitempty"`
	// SecurityHealthAnalyticsCustomModule: Optional. A custom module for Security
	// Health Analytics.
	SecurityHealthAnalyticsCustomModule *SecurityHealthAnalyticsCustomModule `json:"securityHealthAnalyticsCustomModule,omitempty"`
	// SecurityHealthAnalyticsModule: Optional. A built-in detector for Security
	// Health Analytics.
	SecurityHealthAnalyticsModule *SecurityHealthAnalyticsModule `json:"securityHealthAnalyticsModule,omitempty"`
	// ForceSendFields is a list of field names (e.g. "OrgPolicyConstraint") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "OrgPolicyConstraint") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Constraint: Metadata for a constraint in a Policy.

func (Constraint) MarshalJSON

func (s Constraint) MarshalJSON() ([]byte, error)

type CreateIaCValidationReportRequest

type CreateIaCValidationReportRequest struct {
	// Iac: Required. The infrastructure-as-code (IaC) configuration to validate.
	Iac *IaC `json:"iac,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Iac") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Iac") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CreateIaCValidationReportRequest: Request message for CreateIaCValidationReport.

func (CreateIaCValidationReportRequest) MarshalJSON

func (s CreateIaCValidationReportRequest) MarshalJSON() ([]byte, error)

type CustomConfig

type CustomConfig struct {
	// CustomOutput: Optional. Definitions of custom source properties to include
	// in findings.
	CustomOutput *CustomOutputSpec `json:"customOutput,omitempty"`
	// Description: Optional. A description of the vulnerability or
	// misconfiguration that the custom module detects. The description appears in
	// each finding. Provide enough information to help an investigator understand
	// the finding. The value must be enclosed in quotation marks.
	Description string `json:"description,omitempty"`
	// Predicate: Required. The Common Expression Language (CEL) expression to
	// evaluate. When the expression evaluates to `true` for a resource, a finding
	// is generated.
	Predicate *Expr `json:"predicate,omitempty"`
	// Recommendation: Required. An explanation of the steps that security teams
	// can take to resolve the detected issue. The explanation appears in each
	// finding.
	Recommendation string `json:"recommendation,omitempty"`
	// ResourceSelector: Required. The resource types that the custom module
	// operates on.
	ResourceSelector *ResourceSelector `json:"resourceSelector,omitempty"`
	// Severity: Required. The severity of findings generated by the custom module.
	//
	// Possible values:
	//   "SEVERITY_UNSPECIFIED" - Default value. This value is unused.
	//   "CRITICAL" - Critical severity.
	//   "HIGH" - High severity.
	//   "MEDIUM" - Medium severity.
	//   "LOW" - Low severity.
	Severity string `json:"severity,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CustomOutput") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CustomOutput") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CustomConfig: A custom module configuration for Security Health Analytics. Use `CustomConfig` to create custom detectors that generate custom findings for resources that you specify.

func (CustomConfig) MarshalJSON

func (s CustomConfig) MarshalJSON() ([]byte, error)

type CustomOutputSpec

type CustomOutputSpec struct {
	// Properties: Optional. The custom source properties that can appear in
	// findings.
	Properties []*Property `json:"properties,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Properties") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Properties") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

CustomOutputSpec: Definitions of custom source properties that can appear in findings.

func (CustomOutputSpec) MarshalJSON

func (s CustomOutputSpec) MarshalJSON() ([]byte, error)

type Empty

type Empty struct {
	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
}

Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

type Expr

type Expr struct {
	// Description: Optional. Description of the expression. This is a longer text
	// which describes the expression, e.g. when hovered over it in a UI.
	Description string `json:"description,omitempty"`
	// Expression: Textual representation of an expression in Common Expression
	// Language syntax.
	Expression string `json:"expression,omitempty"`
	// Location: Optional. String indicating the location of the expression for
	// error reporting, e.g. a file name and a position in the file.
	Location string `json:"location,omitempty"`
	// Title: Optional. Title for the expression, i.e. a short string describing
	// its purpose. This can be used e.g. in UIs which allow to enter the
	// expression.
	Title string `json:"title,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Description") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Expr: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.

func (Expr) MarshalJSON

func (s Expr) MarshalJSON() ([]byte, error)

type ExtractPostureRequest

type ExtractPostureRequest struct {
	// PostureId: Required. An identifier for the posture.
	PostureId string `json:"postureId,omitempty"`
	// Workload: Required. The organization, folder, or project from which policies
	// are extracted. Must be within the organization defined in parent. Use one of
	// the following formats: * `organization/{organization_number}` *
	// `folder/{folder_number}` * `project/{project_number}`
	Workload string `json:"workload,omitempty"`
	// ForceSendFields is a list of field names (e.g. "PostureId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "PostureId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ExtractPostureRequest: Request message for ExtractPosture.

func (ExtractPostureRequest) MarshalJSON

func (s ExtractPostureRequest) MarshalJSON() ([]byte, error)

type GoogleCloudSecuritypostureV1CustomConstraint

type GoogleCloudSecuritypostureV1CustomConstraint struct {
	// ActionType: Whether to allow or deny the action.
	//
	// Possible values:
	//   "ACTION_TYPE_UNSPECIFIED" - Default value. This value is unused.
	//   "ALLOW" - Allow the action.
	//   "DENY" - Deny the action.
	ActionType string `json:"actionType,omitempty"`
	// Condition: A Common Expression Language (CEL) condition expression that must
	// evaluate to `true` for the constraint to be enforced. The maximum length is
	// 1000 characters. For example: +
	// `resource.instanceName.matches('(production|test)_(.+_)?[\d]+')`: Evaluates
	// to `true` if the resource's `instanceName` attribute contains the following:
	// + The prefix `production` or `test` + An underscore (`_`) + Optional: One or
	// more characters, followed by an underscore (`_`) + One or more digits +
	// `resource.management.auto_upgrade == true`: Evaluates to `true` if the
	// resource's `management.auto_upgrade` attribute is `true`.
	Condition string `json:"condition,omitempty"`
	// Description: A description of the constraint. The maximum length is 2000
	// characters.
	Description string `json:"description,omitempty"`
	// DisplayName: A display name for the constraint. The maximum length is 200
	// characters.
	DisplayName string `json:"displayName,omitempty"`
	// MethodTypes: The types of operations that the constraint applies to.
	//
	// Possible values:
	//   "METHOD_TYPE_UNSPECIFIED" - Default value. This value is unused.
	//   "CREATE" - Constraint applied when creating the resource.
	//   "UPDATE" - Constraint applied when updating the resource.
	//   "DELETE" - Not supported. Constraint applied when deleting the resource.
	MethodTypes []string `json:"methodTypes,omitempty"`
	// Name: Immutable. The name of the constraint, in the format
	// `organizations/{organization_id}/customConstraints/custom.{custom_constraint_
	// id}`. For example,
	// `organizations/123456789012/customConstraints/custom.createOnlyE2TypeVms`.
	// Must contain 1 to 62 characters, excluding the prefix
	// `organizations/{organization_id}/customConstraints/custom.`.
	Name string `json:"name,omitempty"`
	// ResourceTypes: Immutable. The resource type that the constraint applies to,
	// in the format `{canonical_service_name}/{resource_type_name}`. For example,
	// `compute.googleapis.com/Instance`.
	ResourceTypes []string `json:"resourceTypes,omitempty"`
	// UpdateTime: Output only. The last time at which the constraint was updated
	// or created.
	UpdateTime string `json:"updateTime,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ActionType") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ActionType") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

GoogleCloudSecuritypostureV1CustomConstraint: A custom, user-defined constraint. You can apply the constraint only to the resource types specified in the constraint, and only within the organization where the constraint is defined. _When you create a custom constraint, it is not enforced automatically._ You must use an organization policy to enforce the constraint (https://cloud.google.com/resource-manager/help/organization-policy/constraints/enforce).

func (GoogleCloudSecuritypostureV1CustomConstraint) MarshalJSON

type GoogleCloudSecuritypostureV1PolicyRule

type GoogleCloudSecuritypostureV1PolicyRule struct {
	// AllowAll: Whether to allow any value for a list constraint. Valid only for
	// list constraints.
	AllowAll bool `json:"allowAll,omitempty"`
	// Condition: A condition that determines whether this rule is used to evaluate
	// the policy. When set, the google.type.Expr.expression field must contain 1
	// to 10 subexpressions, joined by the `||` or `&&` operators. Each
	// subexpression must use the `resource.matchTag()` or `resource.matchTagId()`
	// Common Expression Language (CEL) function. The `resource.matchTag()`
	// function takes the following arguments: * `key_name`: the namespaced name of
	// the tag key, with the organization ID and a slash (`/`) as a prefix; for
	// example, `123456789012/environment` * `value_name`: the short name of the
	// tag value For example: `resource.matchTag('123456789012/environment,
	// 'prod')` The `resource.matchTagId()` function takes the following arguments:
	// * `key_id`: the permanent ID of the tag key; for example,
	// `tagKeys/123456789012` * `value_id`: the permanent ID of the tag value; for
	// example, `tagValues/567890123456` For example:
	// `resource.matchTagId('tagKeys/123456789012', 'tagValues/567890123456')`
	Condition *Expr `json:"condition,omitempty"`
	// DenyAll: Whether to deny all values for a list constraint. Valid only for
	// list constraints.
	DenyAll bool `json:"denyAll,omitempty"`
	// Enforce: Whether to enforce the constraint. Valid only for boolean
	// constraints.
	Enforce bool `json:"enforce,omitempty"`
	// Parameters: Optional. Required for GMCs if parameters defined in
	// constraints. Pass parameter values when policy enforcement is enabled.
	// Ensure that parameter value types match those defined in the constraint
	// definition. For example: { "allowedLocations" : ["us-east1", "us-west1"],
	// "allowAll" : true }
	Parameters googleapi.RawMessage `json:"parameters,omitempty"`
	// ResourceTypes: Optional. The resource types policy can support, only used
	// for Google managed constraint and method type is GOVERN_TAGS.
	ResourceTypes *ResourceTypes `json:"resourceTypes,omitempty"`
	// Values: The allowed and denied values for a list constraint. Valid only for
	// list constraints.
	Values *GoogleCloudSecuritypostureV1PolicyRuleStringValues `json:"values,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AllowAll") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AllowAll") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

GoogleCloudSecuritypostureV1PolicyRule: A rule that defines the allowed and denied values for an organization policy constraint.

func (GoogleCloudSecuritypostureV1PolicyRule) MarshalJSON

func (s GoogleCloudSecuritypostureV1PolicyRule) MarshalJSON() ([]byte, error)

type GoogleCloudSecuritypostureV1PolicyRuleStringValues

type GoogleCloudSecuritypostureV1PolicyRuleStringValues struct {
	// AllowedValues: The allowed values for the constraint.
	AllowedValues []string `json:"allowedValues,omitempty"`
	// DeniedValues: The denied values for the constraint.
	DeniedValues []string `json:"deniedValues,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AllowedValues") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AllowedValues") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

GoogleCloudSecuritypostureV1PolicyRuleStringValues: The allowed and denied values for a list constraint. For all constraints, these fields can contain literal values. Optionally, you can add the `is:` prefix to these values. If the value contains a colon (`:`), then the `is:` prefix is required. Some constraints allow you to specify a portion of the resource hierarchy, known as a _hierarchy subtree_ (https://cloud.google.com/resource-manager/help/organization-policy/hierarchy-subtree), that the constraint applies to. To specify a hierarchy subtree, use the `under:` prefix, followed by a value with one of these formats: - `projects/{project_id}` (for example, `projects/tokyo-rain-123`) - `folders/{folder_id}` (for example, `folders/1234567890123`) - `organizations/{organization_id}` (for example, `organizations/123456789012`) A constraint's `supports_under` field indicates whether you can specify a hierarchy subtree. To learn which predefined constraints let you specify a hierarchy subtree, see the constraints reference (https://cloud.google.com/resource-manager/help/organization-policy/constraints/reference).

func (GoogleCloudSecuritypostureV1PolicyRuleStringValues) MarshalJSON

type IaC

type IaC struct {
	// TfPlan: Optional. A Terraform plan file, formatted as a stringified JSON
	// object. To learn how to generate a Terraform plan file in JSON format, see
	// JSON output format
	// (https://developer.hashicorp.com/terraform/internals/json-format) in the
	// Terraform documentation.
	TfPlan string `json:"tfPlan,omitempty"`
	// ForceSendFields is a list of field names (e.g. "TfPlan") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "TfPlan") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

IaC: Details of an infrastructure-as-code (IaC) configuration.

func (IaC) MarshalJSON

func (s IaC) MarshalJSON() ([]byte, error)

type IaCValidationReport

type IaCValidationReport struct {
	// Note: Additional information about the report.
	Note string `json:"note,omitempty"`
	// Violations: A list of every Violation found in the IaC configuration.
	Violations []*Violation `json:"violations,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Note") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Note") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

IaCValidationReport: Details of an infrastructure-as-code (IaC) validation report.

func (IaCValidationReport) MarshalJSON

func (s IaCValidationReport) MarshalJSON() ([]byte, error)

type ListLocationsResponse

type ListLocationsResponse struct {
	// Locations: A list of locations that matches the specified filter in the
	// request.
	Locations []*Location `json:"locations,omitempty"`
	// NextPageToken: The standard List next-page token.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Locations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Locations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListLocationsResponse: The response message for Locations.ListLocations.

func (ListLocationsResponse) MarshalJSON

func (s ListLocationsResponse) MarshalJSON() ([]byte, error)

type ListOperationsResponse

type ListOperationsResponse struct {
	// NextPageToken: The standard List next-page token.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Operations: A list of operations that matches the specified filter in the
	// request.
	Operations []*Operation `json:"operations,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListOperationsResponse: The response message for Operations.ListOperations.

func (ListOperationsResponse) MarshalJSON

func (s ListOperationsResponse) MarshalJSON() ([]byte, error)

type ListPostureDeploymentsResponse

type ListPostureDeploymentsResponse struct {
	// NextPageToken: A pagination token. To retrieve the next page of results,
	// call the method again with this token.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// PostureDeployments: The list of PostureDeployment resources.
	PostureDeployments []*PostureDeployment `json:"postureDeployments,omitempty"`
	// Unreachable: Locations that were temporarily unavailable and could not be
	// reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListPostureDeploymentsResponse: Response message for ListPostureDeployments.

func (ListPostureDeploymentsResponse) MarshalJSON

func (s ListPostureDeploymentsResponse) MarshalJSON() ([]byte, error)

type ListPostureRevisionsResponse

type ListPostureRevisionsResponse struct {
	// NextPageToken: A pagination token. To retrieve the next page of results,
	// call the method again with this token.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Revisions: The list of revisions for the Posture.
	Revisions []*Posture `json:"revisions,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListPostureRevisionsResponse: Response message for ListPostureRevisions.

func (ListPostureRevisionsResponse) MarshalJSON

func (s ListPostureRevisionsResponse) MarshalJSON() ([]byte, error)

type ListPostureTemplatesResponse

type ListPostureTemplatesResponse struct {
	// NextPageToken: A pagination token. To retrieve the next page of results,
	// call the method again with this token.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// PostureTemplates: The list of PostureTemplate resources.
	PostureTemplates []*PostureTemplate `json:"postureTemplates,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListPostureTemplatesResponse: Response message for ListPostureTemplates.

func (ListPostureTemplatesResponse) MarshalJSON

func (s ListPostureTemplatesResponse) MarshalJSON() ([]byte, error)

type ListPosturesResponse

type ListPosturesResponse struct {
	// NextPageToken: A pagination token. To retrieve the next page of results,
	// call the method again with this token.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Postures: The list of Posture resources.
	Postures []*Posture `json:"postures,omitempty"`
	// Unreachable: Locations that were temporarily unavailable and could not be
	// reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListPosturesResponse: Response message for ListPostures.

func (ListPosturesResponse) MarshalJSON

func (s ListPosturesResponse) MarshalJSON() ([]byte, error)

type ListReportsResponse

type ListReportsResponse struct {
	// NextPageToken: A pagination token. To retrieve the next page of results,
	// call the method again with this token.
	NextPageToken string `json:"nextPageToken,omitempty"`
	// Reports: The list of Report resources.
	Reports []*Report `json:"reports,omitempty"`
	// Unreachable: Locations that were temporarily unavailable and could not be
	// reached.
	Unreachable []string `json:"unreachable,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ListReportsResponse: Response message for ListReports.

func (ListReportsResponse) MarshalJSON

func (s ListReportsResponse) MarshalJSON() ([]byte, error)

type Location

type Location struct {
	// DisplayName: The friendly name for this location, typically a nearby city
	// name. For example, "Tokyo".
	DisplayName string `json:"displayName,omitempty"`
	// Labels: Cross-service attributes for the location. For example
	// {"cloud.googleapis.com/region": "us-east1"}
	Labels map[string]string `json:"labels,omitempty"`
	// LocationId: The canonical id for this location. For example: "us-east1".
	LocationId string `json:"locationId,omitempty"`
	// Metadata: Service-specific metadata. For example the available capacity at
	// the given location.
	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
	// Name: Resource name for the location, which may vary between
	// implementations. For example:
	// "projects/example-project/locations/us-east1"
	Name string `json:"name,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "DisplayName") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "DisplayName") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Location: A resource that represents a Google Cloud location.

func (Location) MarshalJSON

func (s Location) MarshalJSON() ([]byte, error)

type Operation

type Operation struct {
	// Done: If the value is `false`, it means the operation is still in progress.
	// If `true`, the operation is completed, and either `error` or `response` is
	// available.
	Done bool `json:"done,omitempty"`
	// Error: The error result of the operation in case of failure or cancellation.
	Error *Status `json:"error,omitempty"`
	// Metadata: Service-specific metadata associated with the operation. It
	// typically contains progress information and common metadata such as create
	// time. Some services might not provide such metadata. Any method that returns
	// a long-running operation should document the metadata type, if any.
	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
	// Name: The server-assigned name, which is only unique within the same service
	// that originally returns it. If you use the default HTTP mapping, the `name`
	// should be a resource name ending with `operations/{unique_id}`.
	Name string `json:"name,omitempty"`
	// Response: The normal, successful response of the operation. If the original
	// method returns no data on success, such as `Delete`, the response is
	// `google.protobuf.Empty`. If the original method is standard
	// `Get`/`Create`/`Update`, the response should be the resource. For other
	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
	// original method name. For example, if the original method name is
	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
	Response googleapi.RawMessage `json:"response,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Done") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Operation: This resource represents a long-running operation that is the result of a network API call.

func (Operation) MarshalJSON

func (s Operation) MarshalJSON() ([]byte, error)

type OperationMetadata

type OperationMetadata struct {
	// ApiVersion: Output only. The API version used to start the operation.
	ApiVersion string `json:"apiVersion,omitempty"`
	// CreateTime: Output only. The time at which the operation was created.
	CreateTime string `json:"createTime,omitempty"`
	// EndTime: Output only. The time at which the operation finished running.
	EndTime string `json:"endTime,omitempty"`
	// ErrorMessage: Output only. An error message. Returned when a
	// PostureDeployment enters a failure state like UPDATE_FAILED.
	ErrorMessage string `json:"errorMessage,omitempty"`
	// RequestedCancellation: Output only. Whether a request to cancel the
	// operation has been received. For operations that have been cancelled
	// successfully, the Operation.error field contains the error code CANCELLED.
	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
	// StatusMessage: Output only. The status of the operation, if any.
	StatusMessage string `json:"statusMessage,omitempty"`
	// Target: Output only. The server-defined resource path for the target of the
	// operation.
	Target string `json:"target,omitempty"`
	// Verb: Output only. The name of the action executed by the operation.
	Verb string `json:"verb,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

OperationMetadata: Metadata for an Operation.

func (OperationMetadata) MarshalJSON

func (s OperationMetadata) MarshalJSON() ([]byte, error)

type OrgPolicyConstraint

type OrgPolicyConstraint struct {
	// CannedConstraintId: Required. A unique identifier for the constraint.
	CannedConstraintId string `json:"cannedConstraintId,omitempty"`
	// PolicyRules: Required. The rules enforced by the constraint.
	PolicyRules []*GoogleCloudSecuritypostureV1PolicyRule `json:"policyRules,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CannedConstraintId") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CannedConstraintId") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

OrgPolicyConstraint: A predefined organization policy constraint.

func (OrgPolicyConstraint) MarshalJSON

func (s OrgPolicyConstraint) MarshalJSON() ([]byte, error)

type OrgPolicyConstraintCustom

type OrgPolicyConstraintCustom struct {
	// CustomConstraint: Required. Metadata for the constraint.
	CustomConstraint *GoogleCloudSecuritypostureV1CustomConstraint `json:"customConstraint,omitempty"`
	// PolicyRules: Required. The rules enforced by the constraint.
	PolicyRules []*GoogleCloudSecuritypostureV1PolicyRule `json:"policyRules,omitempty"`
	// ForceSendFields is a list of field names (e.g. "CustomConstraint") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CustomConstraint") to include in
	// API requests with the JSON null value. By default, fields with empty values
	// are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

OrgPolicyConstraintCustom: A custom organization policy constraint.

func (OrgPolicyConstraintCustom) MarshalJSON

func (s OrgPolicyConstraintCustom) MarshalJSON() ([]byte, error)

type OrganizationsLocationsOperationsCancelCall

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

func (*OrganizationsLocationsOperationsCancelCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsOperationsCancelCall) Do

Do executes the "securityposture.organizations.locations.operations.cancel" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsOperationsCancelCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsOperationsCancelCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type OrganizationsLocationsOperationsDeleteCall

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

func (*OrganizationsLocationsOperationsDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsOperationsDeleteCall) Do

Do executes the "securityposture.organizations.locations.operations.delete" call. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsOperationsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsOperationsDeleteCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type OrganizationsLocationsOperationsGetCall

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

func (*OrganizationsLocationsOperationsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsOperationsGetCall) Do

Do executes the "securityposture.organizations.locations.operations.get" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsOperationsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsOperationsGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsOperationsGetCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type OrganizationsLocationsOperationsListCall

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

func (*OrganizationsLocationsOperationsListCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsOperationsListCall) Do

Do executes the "securityposture.organizations.locations.operations.list" call. Any non-2xx status code is an error. Response headers are in either *ListOperationsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsOperationsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsOperationsListCall) Filter

Filter sets the optional parameter "filter": The standard list filter.

func (*OrganizationsLocationsOperationsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsOperationsListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OrganizationsLocationsOperationsListCall) PageSize

PageSize sets the optional parameter "pageSize": The standard list page size.

func (*OrganizationsLocationsOperationsListCall) PageToken

PageToken sets the optional parameter "pageToken": The standard list page token.

func (*OrganizationsLocationsOperationsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type OrganizationsLocationsOperationsService

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

func NewOrganizationsLocationsOperationsService

func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService

func (*OrganizationsLocationsOperationsService) Cancel

Cancel: Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.

- name: The name of the operation resource to be cancelled.

func (*OrganizationsLocationsOperationsService) Delete

Delete: Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.

- name: The name of the operation resource to be deleted.

func (*OrganizationsLocationsOperationsService) Get

Get: Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

- name: The name of the operation resource.

func (*OrganizationsLocationsOperationsService) List

List: Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.

- name: The name of the operation's parent resource.

type OrganizationsLocationsPostureDeploymentsCreateCall

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

func (*OrganizationsLocationsPostureDeploymentsCreateCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPostureDeploymentsCreateCall) Do

Do executes the "securityposture.organizations.locations.postureDeployments.create" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPostureDeploymentsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPostureDeploymentsCreateCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPostureDeploymentsCreateCall) PostureDeploymentId

PostureDeploymentId sets the optional parameter "postureDeploymentId": Required. An identifier for the posture deployment.

type OrganizationsLocationsPostureDeploymentsDeleteCall

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

func (*OrganizationsLocationsPostureDeploymentsDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPostureDeploymentsDeleteCall) Do

Do executes the "securityposture.organizations.locations.postureDeployments.delete" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPostureDeploymentsDeleteCall) Etag

Etag sets the optional parameter "etag": An opaque identifier for the current version of the posture deployment. If you provide this value, then it must match the existing value. If the values don't match, then the request fails with an ABORTED error. If you omit this value, then the posture deployment is deleted regardless of its current `etag` value.

func (*OrganizationsLocationsPostureDeploymentsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPostureDeploymentsDeleteCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type OrganizationsLocationsPostureDeploymentsGetCall

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

func (*OrganizationsLocationsPostureDeploymentsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPostureDeploymentsGetCall) Do

Do executes the "securityposture.organizations.locations.postureDeployments.get" call. Any non-2xx status code is an error. Response headers are in either *PostureDeployment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPostureDeploymentsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPostureDeploymentsGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPostureDeploymentsGetCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type OrganizationsLocationsPostureDeploymentsListCall

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

func (*OrganizationsLocationsPostureDeploymentsListCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPostureDeploymentsListCall) Do

Do executes the "securityposture.organizations.locations.postureDeployments.list" call. Any non-2xx status code is an error. Response headers are in either *ListPostureDeploymentsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPostureDeploymentsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPostureDeploymentsListCall) Filter

Filter sets the optional parameter "filter": A filter to apply to the list of postures, in the format defined in AIP-160: Filtering (https://google.aip.dev/160).

func (*OrganizationsLocationsPostureDeploymentsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPostureDeploymentsListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OrganizationsLocationsPostureDeploymentsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of posture deployments to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.

func (*OrganizationsLocationsPostureDeploymentsListCall) PageToken

PageToken sets the optional parameter "pageToken": A pagination token returned from a previous request to list posture deployments. Provide this token to retrieve the next page of results.

func (*OrganizationsLocationsPostureDeploymentsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type OrganizationsLocationsPostureDeploymentsPatchCall

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

func (*OrganizationsLocationsPostureDeploymentsPatchCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPostureDeploymentsPatchCall) Do

Do executes the "securityposture.organizations.locations.postureDeployments.patch" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPostureDeploymentsPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPostureDeploymentsPatchCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPostureDeploymentsPatchCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": Required. The fields in the PostureDeployment to update. You can update only the following fields: * PostureDeployment.posture_id * PostureDeployment.posture_revision_id

type OrganizationsLocationsPostureDeploymentsService

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

func NewOrganizationsLocationsPostureDeploymentsService

func NewOrganizationsLocationsPostureDeploymentsService(s *Service) *OrganizationsLocationsPostureDeploymentsService

func (*OrganizationsLocationsPostureDeploymentsService) Create

Create: Creates a new PostureDeployment in a given project and location.

  • parent: The parent resource name, in the format `organizations/{organization}/locations/global`.

func (*OrganizationsLocationsPostureDeploymentsService) Delete

Delete: Deletes a PostureDeployment.

  • name: The name of the posture deployment, in the format `organizations/{organization}/locations/global/postureDeployments/{posture_ id}`.

func (*OrganizationsLocationsPostureDeploymentsService) Get

Get: Gets details for a PostureDeployment.

  • name: The name of the PostureDeployment, in the format `organizations/{organization}/locations/global/postureDeployments/{posture_ deployment_id}`.

func (*OrganizationsLocationsPostureDeploymentsService) List

List: Lists every PostureDeployment in a project and location.

  • parent: The parent resource name, in the format `organizations/{organization}/locations/global`.

func (*OrganizationsLocationsPostureDeploymentsService) Patch

Patch: Updates an existing PostureDeployment. To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture deployment: 1. Call GetPostureDeployment to get the current version of the deployment. 2. Update the fields in the deployment as needed. 3. Call UpdatePostureDeployment to update the deployment. Ensure that your request includes the `etag` value from the GetPostureDeployment response. **Important:** If you omit the `etag` when you call UpdatePostureDeployment, then the updated deployment unconditionally overwrites the existing deployment.

  • name: Identifier. The name of the posture deployment, in the format `organizations/{organization}/locations/global/postureDeployments/{deployme nt_id}`.

type OrganizationsLocationsPostureTemplatesGetCall

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

func (*OrganizationsLocationsPostureTemplatesGetCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPostureTemplatesGetCall) Do

Do executes the "securityposture.organizations.locations.postureTemplates.get" call. Any non-2xx status code is an error. Response headers are in either *PostureTemplate.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPostureTemplatesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPostureTemplatesGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPostureTemplatesGetCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OrganizationsLocationsPostureTemplatesGetCall) RevisionId

RevisionId sets the optional parameter "revisionId": The posture template revision to retrieve. If not specified, the most recently updated revision is retrieved.

type OrganizationsLocationsPostureTemplatesListCall

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

func (*OrganizationsLocationsPostureTemplatesListCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPostureTemplatesListCall) Do

Do executes the "securityposture.organizations.locations.postureTemplates.list" call. Any non-2xx status code is an error. Response headers are in either *ListPostureTemplatesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPostureTemplatesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPostureTemplatesListCall) Filter

Filter sets the optional parameter "filter": A filter to apply to the list of postures, in the format defined in AIP-160: Filtering (https://google.aip.dev/160).

func (*OrganizationsLocationsPostureTemplatesListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPostureTemplatesListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OrganizationsLocationsPostureTemplatesListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of posture templates to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.

func (*OrganizationsLocationsPostureTemplatesListCall) PageToken

PageToken sets the optional parameter "pageToken": A pagination token returned from a previous request to list posture templates. Provide this token to retrieve the next page of results.

func (*OrganizationsLocationsPostureTemplatesListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type OrganizationsLocationsPostureTemplatesService

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

func NewOrganizationsLocationsPostureTemplatesService

func NewOrganizationsLocationsPostureTemplatesService(s *Service) *OrganizationsLocationsPostureTemplatesService

func (*OrganizationsLocationsPostureTemplatesService) Get

Get: Gets a single revision of a PostureTemplate.

  • name: The name of the PostureTemplate, in the format `organizations/{organization}/locations/global/postureTemplates/{posture_te mplate}`.

func (*OrganizationsLocationsPostureTemplatesService) List

List: Lists every PostureTemplate in a given organization and location.

  • parent: The parent resource name, in the format `organizations/{organization}/locations/global`.

type OrganizationsLocationsPosturesCreateCall

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

func (*OrganizationsLocationsPosturesCreateCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPosturesCreateCall) Do

Do executes the "securityposture.organizations.locations.postures.create" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPosturesCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPosturesCreateCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPosturesCreateCall) PostureId

PostureId sets the optional parameter "postureId": Required. An identifier for the posture.

type OrganizationsLocationsPosturesDeleteCall

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

func (*OrganizationsLocationsPosturesDeleteCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPosturesDeleteCall) Do

Do executes the "securityposture.organizations.locations.postures.delete" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPosturesDeleteCall) Etag

Etag sets the optional parameter "etag": An opaque identifier for the current version of the posture. If you provide this value, then it must match the existing value. If the values don't match, then the request fails with an ABORTED error. If you omit this value, then the posture is deleted regardless of its current `etag` value.

func (*OrganizationsLocationsPosturesDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPosturesDeleteCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type OrganizationsLocationsPosturesExtractCall

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

func (*OrganizationsLocationsPosturesExtractCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPosturesExtractCall) Do

Do executes the "securityposture.organizations.locations.postures.extract" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPosturesExtractCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPosturesExtractCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type OrganizationsLocationsPosturesGetCall

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

func (*OrganizationsLocationsPosturesGetCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPosturesGetCall) Do

Do executes the "securityposture.organizations.locations.postures.get" call. Any non-2xx status code is an error. Response headers are in either *Posture.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPosturesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPosturesGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPosturesGetCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OrganizationsLocationsPosturesGetCall) RevisionId

RevisionId sets the optional parameter "revisionId": The posture revision to retrieve. If not specified, the most recently updated revision is retrieved.

type OrganizationsLocationsPosturesListCall

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

func (*OrganizationsLocationsPosturesListCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPosturesListCall) Do

Do executes the "securityposture.organizations.locations.postures.list" call. Any non-2xx status code is an error. Response headers are in either *ListPosturesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPosturesListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPosturesListCall) Filter

Filter sets the optional parameter "filter": A filter to apply to the list of postures, in the format defined in AIP-160: Filtering (https://google.aip.dev/160).

func (*OrganizationsLocationsPosturesListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPosturesListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OrganizationsLocationsPosturesListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of postures to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.

func (*OrganizationsLocationsPosturesListCall) PageToken

PageToken sets the optional parameter "pageToken": A pagination token returned from a previous request to list postures. Provide this token to retrieve the next page of results.

func (*OrganizationsLocationsPosturesListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type OrganizationsLocationsPosturesListRevisionsCall

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

func (*OrganizationsLocationsPosturesListRevisionsCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPosturesListRevisionsCall) Do

Do executes the "securityposture.organizations.locations.postures.listRevisions" call. Any non-2xx status code is an error. Response headers are in either *ListPostureRevisionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPosturesListRevisionsCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPosturesListRevisionsCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPosturesListRevisionsCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OrganizationsLocationsPosturesListRevisionsCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of posture revisions to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.

func (*OrganizationsLocationsPosturesListRevisionsCall) PageToken

PageToken sets the optional parameter "pageToken": A pagination token from a previous request to list posture revisions. Provide this token to retrieve the next page of results.

func (*OrganizationsLocationsPosturesListRevisionsCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type OrganizationsLocationsPosturesPatchCall

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

func (*OrganizationsLocationsPosturesPatchCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsPosturesPatchCall) Do

Do executes the "securityposture.organizations.locations.postures.patch" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsPosturesPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsPosturesPatchCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsPosturesPatchCall) RevisionId

RevisionId sets the optional parameter "revisionId": Required. The revision ID of the posture to update. If the posture revision that you update is currently deployed, then a new revision of the posture is created.

func (*OrganizationsLocationsPosturesPatchCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": Required. The fields in the Posture to update. You can update only the following fields: * Posture.description * Posture.policy_sets * Posture.state

type OrganizationsLocationsPosturesService

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

func NewOrganizationsLocationsPosturesService

func NewOrganizationsLocationsPosturesService(s *Service) *OrganizationsLocationsPosturesService

func (*OrganizationsLocationsPosturesService) Create

Create: Creates a new Posture.

  • parent: The parent resource name, in the format `organizations/{organization}/locations/global`.

func (*OrganizationsLocationsPosturesService) Delete

Delete: Deletes all revisions of a Posture. You can only delete a posture if none of its revisions are deployed.

  • name: The name of the Posture, in the format `organizations/{organization}/locations/global/postures/{posture_id}`.

func (*OrganizationsLocationsPosturesService) Extract

Extract: Extracts existing policies from an organization, folder, or project, and applies them to another organization, folder, or project as a Posture. If the other organization, folder, or project already has a posture, then the result of the long-running operation is an ALREADY_EXISTS error.

  • parent: The parent resource name, in the format `organizations/{organization}/locations/global`.

func (*OrganizationsLocationsPosturesService) Get

Get: Gets a single revision of a Posture.

  • name: The name of the Posture, in the format `organizations/{organization}/locations/global/postures/{posture_id}`.

func (*OrganizationsLocationsPosturesService) List

List: Lists the most recent revisions of all Posture resources in a specified organization and location.

  • parent: The parent resource name, in the format `organizations/{organization}/locations/global`.

func (*OrganizationsLocationsPosturesService) ListRevisions

ListRevisions: Lists all revisions of a single Posture.

  • name: The name of the Posture, in the format `organizations/{organization}/locations/global/postures/{posture_id}`.

func (*OrganizationsLocationsPosturesService) Patch

Patch: Updates a revision of an existing Posture. If the posture revision that you update is currently deployed, then a new revision of the posture is created. To prevent concurrent updates from overwriting each other, always follow the read-modify-write pattern when you update a posture: 1. Call GetPosture to get the current version of the posture. 2. Update the fields in the posture as needed. 3. Call UpdatePosture to update the posture. Ensure that your request includes the `etag` value from the GetPosture response. **Important:** If you omit the `etag` when you call UpdatePosture, then the updated posture unconditionally overwrites the existing posture.

  • name: Identifier. The name of the posture, in the format `organizations/{organization}/locations/global/postures/{posture_id}`.

type OrganizationsLocationsReportsCreateIaCValidationReportCall

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

func (*OrganizationsLocationsReportsCreateIaCValidationReportCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsReportsCreateIaCValidationReportCall) Do

Do executes the "securityposture.organizations.locations.reports.createIaCValidationReport" call. Any non-2xx status code is an error. Response headers are in either *Operation.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsReportsCreateIaCValidationReportCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsReportsCreateIaCValidationReportCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type OrganizationsLocationsReportsGetCall

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

func (*OrganizationsLocationsReportsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsReportsGetCall) Do

Do executes the "securityposture.organizations.locations.reports.get" call. Any non-2xx status code is an error. Response headers are in either *Report.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsReportsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsReportsGetCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsReportsGetCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type OrganizationsLocationsReportsListCall

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

func (*OrganizationsLocationsReportsListCall) Context

Context sets the context to be used in this call's Do method.

func (*OrganizationsLocationsReportsListCall) Do

Do executes the "securityposture.organizations.locations.reports.list" call. Any non-2xx status code is an error. Response headers are in either *ListReportsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*OrganizationsLocationsReportsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*OrganizationsLocationsReportsListCall) Filter

Filter sets the optional parameter "filter": A filter to apply to the list of reports, in the format defined in AIP-160: Filtering (https://google.aip.dev/160).

func (*OrganizationsLocationsReportsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*OrganizationsLocationsReportsListCall) IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*OrganizationsLocationsReportsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of reports to return. The default value is `500`. If you exceed the maximum value of `1000`, then the service uses the maximum value.

func (*OrganizationsLocationsReportsListCall) PageToken

PageToken sets the optional parameter "pageToken": A pagination token returned from a previous request to list reports. Provide this token to retrieve the next page of results.

func (*OrganizationsLocationsReportsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type OrganizationsLocationsReportsService

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

func NewOrganizationsLocationsReportsService

func NewOrganizationsLocationsReportsService(s *Service) *OrganizationsLocationsReportsService

func (*OrganizationsLocationsReportsService) CreateIaCValidationReport

CreateIaCValidationReport: Validates a specified infrastructure-as-code (IaC) configuration, and creates a Report with the validation results. Only Terraform configurations are supported. Only modified assets are validated.

  • parent: The parent resource name, in the format `organizations/{organization}/locations/global`.

func (*OrganizationsLocationsReportsService) Get

Get: Gets details for a Report.

  • name: The name of the report, in the format `organizations/{organization}/locations/global/reports/{report_id}`.

func (*OrganizationsLocationsReportsService) List

List: Lists every Report in a given organization and location.

  • parent: The parent resource name, in the format `organizations/{organization}/locations/global`.

type OrganizationsLocationsService

type OrganizationsLocationsService struct {
	Operations *OrganizationsLocationsOperationsService

	PostureDeployments *OrganizationsLocationsPostureDeploymentsService

	PostureTemplates *OrganizationsLocationsPostureTemplatesService

	Postures *OrganizationsLocationsPosturesService

	Reports *OrganizationsLocationsReportsService
	// contains filtered or unexported fields
}

func NewOrganizationsLocationsService

func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService

type OrganizationsService

type OrganizationsService struct {
	Locations *OrganizationsLocationsService
	// contains filtered or unexported fields
}

func NewOrganizationsService

func NewOrganizationsService(s *Service) *OrganizationsService

type Policy

type Policy struct {
	// ComplianceStandards: Optional. The compliance standards that the policy
	// helps enforce.
	ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"`
	// Constraint: Required. The constraints that the policy includes.
	Constraint *Constraint `json:"constraint,omitempty"`
	// Description: Optional. A description of the policy.
	Description string `json:"description,omitempty"`
	// PolicyId: Required. A user-specified identifier for the policy. In a
	// PolicySet, each policy must have a unique identifier.
	PolicyId string `json:"policyId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ComplianceStandards") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ComplianceStandards") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Policy: The details of a policy, including the constraints that it includes.

func (Policy) MarshalJSON

func (s Policy) MarshalJSON() ([]byte, error)

type PolicyDetails

type PolicyDetails struct {
	// ComplianceStandards: The compliance standards that the policy maps to. For
	// example, `CIS-2.0 1.15`.
	ComplianceStandards []string `json:"complianceStandards,omitempty"`
	// Constraint: Information about the constraint that was violated. The format
	// of this information can change at any time without prior notice. Your
	// application must not depend on this information in any way.
	Constraint string `json:"constraint,omitempty"`
	// ConstraintType: The type of constraint that was violated.
	//
	// Possible values:
	//   "CONSTRAINT_TYPE_UNSPECIFIED" - Default value. This value is unused.
	//   "SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE" - A custom module for Security
	// Health Analytics.
	//   "ORG_POLICY_CUSTOM" - A custom organization policy constraint.
	//   "SECURITY_HEALTH_ANALYTICS_MODULE" - A built-in detector for Security
	// Health Analytics.
	//   "ORG_POLICY" - A predefined organization policy constraint.
	//   "REGO_POLICY" - A custom rego policy constraint.
	ConstraintType string `json:"constraintType,omitempty"`
	// Description: A description of the policy.
	Description string `json:"description,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ComplianceStandards") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ComplianceStandards") to include
	// in API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PolicyDetails: Details of a policy that was violated.

func (PolicyDetails) MarshalJSON

func (s PolicyDetails) MarshalJSON() ([]byte, error)

type PolicySet

type PolicySet struct {
	// Description: Optional. A description of the policy set.
	Description string `json:"description,omitempty"`
	// Policies: Required. The Policy resources in the policy set. Each policy must
	// have a policy_id that's unique within the policy set.
	Policies []*Policy `json:"policies,omitempty"`
	// PolicySetId: Required. An identifier for the policy set.
	PolicySetId string `json:"policySetId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Description") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PolicySet: A group of one or more Policy resources.

func (PolicySet) MarshalJSON

func (s PolicySet) MarshalJSON() ([]byte, error)

type Posture

type Posture struct {
	// Annotations: Optional. The user-specified annotations for the posture. For
	// details about the values you can use in an annotation, see AIP-148: Standard
	// fields (https://google.aip.dev/148#annotations).
	Annotations map[string]string `json:"annotations,omitempty"`
	// Categories: Output only. The categories that the posture belongs to, as
	// determined by the Security Posture API.
	//
	// Possible values:
	//   "CATEGORY_UNSPECIFIED" - Default value. This value is unused.
	//   "AI" - Artificial intelligence (AI).
	//   "AWS" - Amazon Web Services (AWS) policies.
	//   "GCP" - Google Cloud policies.
	//   "AZURE" - Microsoft Azure policies.
	Categories []string `json:"categories,omitempty"`
	// CreateTime: Output only. The time at which the posture was created.
	CreateTime string `json:"createTime,omitempty"`
	// Description: Optional. A description of the posture.
	Description string `json:"description,omitempty"`
	// Etag: Optional. An opaque identifier for the current version of the posture
	// at the specified `revision_id`. To prevent concurrent updates from
	// overwriting each other, always provide the `etag` when you update a posture.
	// You can also provide the `etag` when you delete a posture, to help ensure
	// that you're deleting the intended version of the posture.
	Etag string `json:"etag,omitempty"`
	// Name: Required. Identifier. The name of the posture, in the format
	// `organizations/{organization}/locations/global/postures/{posture_id}`.
	Name string `json:"name,omitempty"`
	// PolicySets: Required. The PolicySet resources that the posture includes.
	PolicySets []*PolicySet `json:"policySets,omitempty"`
	// Reconciling: Output only. Whether the posture is in the process of being
	// updated.
	Reconciling bool `json:"reconciling,omitempty"`
	// RevisionId: Output only. Immutable. An opaque eight-character string that
	// identifies the revision of the posture. A posture can have multiple
	// revisions; when you deploy a posture, you deploy a specific revision of the
	// posture.
	RevisionId string `json:"revisionId,omitempty"`
	// State: Required. The state of the posture at the specified `revision_id`.
	//
	// Possible values:
	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
	//   "DEPRECATED" - The posture is deprecated and can no longer be deployed.
	//   "DRAFT" - The posture is a draft and is not ready to deploy.
	//   "ACTIVE" - The posture is complete and ready to deploy.
	State string `json:"state,omitempty"`
	// UpdateTime: Output only. The time at which the posture was last updated.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Posture: The details of a posture.

func (Posture) MarshalJSON

func (s Posture) MarshalJSON() ([]byte, error)

type PostureDeployment

type PostureDeployment struct {
	// Annotations: Optional. The user-specified annotations for the posture
	// deployment. For details about the values you can use in an annotation, see
	// AIP-148: Standard fields (https://google.aip.dev/148#annotations).
	Annotations map[string]string `json:"annotations,omitempty"`
	// Categories: Output only. The categories that the posture deployment belongs
	// to, as determined by the Security Posture API.
	//
	// Possible values:
	//   "CATEGORY_UNSPECIFIED" - Default value. This value is unused.
	//   "AI" - Artificial intelligence (AI).
	//   "AWS" - Amazon Web Services (AWS) policies.
	//   "GCP" - Google Cloud policies.
	//   "AZURE" - Microsoft Azure policies.
	Categories []string `json:"categories,omitempty"`
	// CreateTime: Output only. The time at which the posture deployment was
	// created.
	CreateTime string `json:"createTime,omitempty"`
	// Description: Optional. A description of the posture deployment.
	Description string `json:"description,omitempty"`
	// DesiredPostureId: Output only. The posture ID that was specified for the
	// deployment. Present only if the posture deployment is in a failed state.
	DesiredPostureId string `json:"desiredPostureId,omitempty"`
	// DesiredPostureRevisionId: Output only. The revision ID of the posture that
	// was specified for the deployment. Present only if the deployment is in a
	// failed state.
	DesiredPostureRevisionId string `json:"desiredPostureRevisionId,omitempty"`
	// Etag: Optional. An opaque identifier for the current version of the posture
	// deployment. To prevent concurrent updates from overwriting each other,
	// always provide the `etag` when you update a posture deployment. You can also
	// provide the `etag` when you delete a posture deployment, to help ensure that
	// you're deleting the intended posture deployment.
	Etag string `json:"etag,omitempty"`
	// FailureMessage: Output only. A description of why the posture deployment
	// failed. Present only if the deployment is in a failed state.
	FailureMessage string `json:"failureMessage,omitempty"`
	// Name: Required. Identifier. The name of the posture deployment, in the
	// format
	// `organizations/{organization}/locations/global/postureDeployments/{deployment
	// _id}`.
	Name string `json:"name,omitempty"`
	// PostureId: Required. The posture used in the deployment, in the format
	// `organizations/{organization}/locations/global/postures/{posture_id}`.
	PostureId string `json:"postureId,omitempty"`
	// PostureRevisionId: Required. The revision ID of the posture used in the
	// deployment.
	PostureRevisionId string `json:"postureRevisionId,omitempty"`
	// Reconciling: Output only. Whether the posture deployment is in the process
	// of being updated.
	Reconciling bool `json:"reconciling,omitempty"`
	// State: Output only. The state of the posture deployment.
	//
	// Possible values:
	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
	//   "CREATING" - The posture deployment is being created.
	//   "DELETING" - The posture deployment is being deleted.
	//   "UPDATING" - The posture deployment is being updated.
	//   "ACTIVE" - The posture deployment is active and in use.
	//   "CREATE_FAILED" - The posture deployment could not be created.
	//   "UPDATE_FAILED" - The posture deployment could not be updated.
	//   "DELETE_FAILED" - The posture deployment could not be deleted.
	State string `json:"state,omitempty"`
	// TargetResource: Required. The organization, folder, or project where the
	// posture is deployed. Uses one of the following formats: *
	// `organizations/{organization_number}` * `folders/{folder_number}` *
	// `projects/{project_number}`
	TargetResource string `json:"targetResource,omitempty"`
	// UpdateTime: Output only. The time at which the posture deployment was last
	// updated.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Annotations") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Annotations") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PostureDeployment: Details for a Posture deployment on an organization, folder, or project. You can deploy at most one posture to each organization, folder, or project. The parent resource for a posture deployment is always the organization, even if the deployment applies to a folder or project.

func (PostureDeployment) MarshalJSON

func (s PostureDeployment) MarshalJSON() ([]byte, error)

type PostureDetails

type PostureDetails struct {
	// PolicySet: The identifier for the PolicySet that the relevant policy belongs
	// to.
	PolicySet string `json:"policySet,omitempty"`
	// Posture: The posture used in the deployment, in the format
	// `organizations/{organization}/locations/global/postures/{posture_id}`.
	Posture string `json:"posture,omitempty"`
	// PostureDeployment: The name of the posture deployment, in the format
	// `organizations/{organization}/locations/global/postureDeployments/{deployment
	// _id}`.
	PostureDeployment string `json:"postureDeployment,omitempty"`
	// PostureDeploymentTargetResource: The organization, folder, or project where
	// the posture is deployed. Uses one of the following formats: *
	// `organizations/{organization_number}` * `folders/{folder_number}` *
	// `projects/{project_number}`
	PostureDeploymentTargetResource string `json:"postureDeploymentTargetResource,omitempty"`
	// PostureRevisionId: The revision ID of the posture used in the deployment.
	PostureRevisionId string `json:"postureRevisionId,omitempty"`
	// ForceSendFields is a list of field names (e.g. "PolicySet") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "PolicySet") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PostureDetails: Details of a posture deployment.

func (PostureDetails) MarshalJSON

func (s PostureDetails) MarshalJSON() ([]byte, error)

type PostureTemplate

type PostureTemplate struct {
	// Categories: Output only. The categories that the posture template belongs
	// to, as determined by the Security Posture API.
	//
	// Possible values:
	//   "CATEGORY_UNSPECIFIED" - Default value. This value is unused.
	//   "AI" - Artificial intelligence (AI).
	//   "AWS" - Amazon Web Services (AWS) policies.
	//   "GCP" - Google Cloud policies.
	//   "AZURE" - Microsoft Azure policies.
	Categories []string `json:"categories,omitempty"`
	// Description: Output only. A description of the posture template.
	Description string `json:"description,omitempty"`
	// Name: Output only. Identifier. The name of the posture template, in the
	// format
	// `organizations/{organization}/locations/global/postureTemplates/{posture_temp
	// late}`.
	Name string `json:"name,omitempty"`
	// PolicySets: Output only. The PolicySet resources that the posture template
	// includes.
	PolicySets []*PolicySet `json:"policySets,omitempty"`
	// RevisionId: Output only. A string that identifies the revision of the
	// posture template.
	RevisionId string `json:"revisionId,omitempty"`
	// State: Output only. The state of the posture template at the specified
	// `revision_id`.
	//
	// Possible values:
	//   "STATE_UNSPECIFIED" - Default value. This value is unused.
	//   "ACTIVE" - The posture template follows the latest controls and standards.
	//   "DEPRECATED" - The posture template uses outdated controls and standards.
	// We recommend that you use a newer revision of the posture template.
	State string `json:"state,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "Categories") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Categories") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

PostureTemplate: The details of a posture template.

func (PostureTemplate) MarshalJSON

func (s PostureTemplate) MarshalJSON() ([]byte, error)

type ProjectsLocationsGetCall

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

func (*ProjectsLocationsGetCall) Context

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsGetCall) Do

Do executes the "securityposture.projects.locations.get" call. Any non-2xx status code is an error. Response headers are in either *Location.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsLocationsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ProjectsLocationsGetCall) Header

func (c *ProjectsLocationsGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ProjectsLocationsGetCall) IfNoneMatch

func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type ProjectsLocationsListCall

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

func (*ProjectsLocationsListCall) Context

Context sets the context to be used in this call's Do method.

func (*ProjectsLocationsListCall) Do

Do executes the "securityposture.projects.locations.list" call. Any non-2xx status code is an error. Response headers are in either *ListLocationsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ProjectsLocationsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*ProjectsLocationsListCall) Filter

Filter sets the optional parameter "filter": A filter to narrow down results to a preferred subset. The filtering language accepts strings like "displayName=tokyo", and is documented in more detail in AIP-160 (https://google.aip.dev/160).

func (*ProjectsLocationsListCall) Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*ProjectsLocationsListCall) IfNoneMatch

func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*ProjectsLocationsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of results to return. If not set, the service selects a default.

func (*ProjectsLocationsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.

func (*ProjectsLocationsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type ProjectsLocationsService

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

func NewProjectsLocationsService

func NewProjectsLocationsService(s *Service) *ProjectsLocationsService

func (*ProjectsLocationsService) Get

Get: Gets information about a location.

- name: Resource name for the location.

func (*ProjectsLocationsService) List

List: Lists information about the supported locations for this service.

- name: The resource that owns the locations collection, if applicable.

type ProjectsService

type ProjectsService struct {
	Locations *ProjectsLocationsService
	// contains filtered or unexported fields
}

func NewProjectsService

func NewProjectsService(s *Service) *ProjectsService

type Property

type Property struct {
	// Name: Required. The name of the custom source property.
	Name string `json:"name,omitempty"`
	// ValueExpression: Optional. The CEL expression for the value of the custom
	// source property. For resource properties, you can return the value of the
	// property or a string enclosed in quotation marks.
	ValueExpression *Expr `json:"valueExpression,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Name") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Property: A name-value pair used as a custom source property.

func (Property) MarshalJSON

func (s Property) MarshalJSON() ([]byte, error)

type Report

type Report struct {
	// CreateTime: Output only. The time at which the report was created.
	CreateTime string `json:"createTime,omitempty"`
	// IacValidationReport: Output only. An infrastructure-as-code (IaC) validation
	// report.
	IacValidationReport *IaCValidationReport `json:"iacValidationReport,omitempty"`
	// Name: Required. The name of the report, in the format
	// `organizations/{organization}/locations/global/reports/{report_id}`.
	Name string `json:"name,omitempty"`
	// UpdateTime: Output only. The time at which the report was last updated.
	UpdateTime string `json:"updateTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the server.
	googleapi.ServerResponse `json:"-"`
	// ForceSendFields is a list of field names (e.g. "CreateTime") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "CreateTime") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Report: Details of a report.

func (Report) MarshalJSON

func (s Report) MarshalJSON() ([]byte, error)

type ResourceSelector

type ResourceSelector struct {
	// ResourceTypes: Required. The resource types to run the detector on. Each
	// custom module can specify up to 5 resource types.
	ResourceTypes []string `json:"resourceTypes,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ResourceTypes") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ResourceTypes") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ResourceSelector: A selector for the resource types to run the detector on.

func (ResourceSelector) MarshalJSON

func (s ResourceSelector) MarshalJSON() ([]byte, error)

type ResourceTypes

type ResourceTypes struct {
	// Included: Optional. The resource type we currently support.
	// cloud/orgpolicy/customconstraintconfig/prod/resource_types.prototext
	Included []string `json:"included,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Included") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Included") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

ResourceTypes: Set multiple resource types for one policy, eg: resourceTypes: included: - compute.googleapis.com/Instance - compute.googleapis.com/Disk Constraint definition contains an empty resource type in order to support multiple resource types in the policy. Only support Google managed constriaint and method type is GOVERN_TAGS Refer go/multi-resource-support-force-tags-gmc to get more details.

func (ResourceTypes) MarshalJSON

func (s ResourceTypes) MarshalJSON() ([]byte, error)

type SecurityHealthAnalyticsCustomModule

type SecurityHealthAnalyticsCustomModule struct {
	// Config: Required. Configuration settings for the custom module.
	Config *CustomConfig `json:"config,omitempty"`
	// DisplayName: Optional. The display name of the custom module. This value is
	// used as the finding category for all the asset violation findings that the
	// custom module returns. The display name must contain between 1 and 128
	// alphanumeric characters or underscores, and it must start with a lowercase
	// letter.
	DisplayName string `json:"displayName,omitempty"`
	// Id: Output only. Immutable. The unique identifier for the custom module.
	// Contains 1 to 20 digits.
	Id string `json:"id,omitempty"`
	// ModuleEnablementState: Whether the custom module is enabled at a specified
	// level of the resource hierarchy.
	//
	// Possible values:
	//   "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused.
	//   "ENABLED" - The detector or custom module is enabled.
	//   "DISABLED" - The detector or custom module is disabled.
	ModuleEnablementState string `json:"moduleEnablementState,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Config") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Config") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

SecurityHealthAnalyticsCustomModule: A custom module for Security Health Analytics.

func (SecurityHealthAnalyticsCustomModule) MarshalJSON

func (s SecurityHealthAnalyticsCustomModule) MarshalJSON() ([]byte, error)

type SecurityHealthAnalyticsModule

type SecurityHealthAnalyticsModule struct {
	// ModuleEnablementState: Whether the detector is enabled at a specified level
	// of the resource hierarchy.
	//
	// Possible values:
	//   "ENABLEMENT_STATE_UNSPECIFIED" - Default value. This value is unused.
	//   "ENABLED" - The detector or custom module is enabled.
	//   "DISABLED" - The detector or custom module is disabled.
	ModuleEnablementState string `json:"moduleEnablementState,omitempty"`
	// ModuleName: Required. The name of the detector. For example,
	// `BIGQUERY_TABLE_CMEK_DISABLED`. This field is also used as the finding
	// category for all the asset violation findings that the detector returns.
	ModuleName string `json:"moduleName,omitempty"`
	// ForceSendFields is a list of field names (e.g. "ModuleEnablementState") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "ModuleEnablementState") to
	// include in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

SecurityHealthAnalyticsModule: A built-in detector for Security Health Analytics.

func (SecurityHealthAnalyticsModule) MarshalJSON

func (s SecurityHealthAnalyticsModule) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Organizations *OrganizationsService

	Projects *ProjectsService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type Status

type Status struct {
	// Code: The status code, which should be an enum value of google.rpc.Code.
	Code int64 `json:"code,omitempty"`
	// Details: A list of messages that carry the error details. There is a common
	// set of message types for APIs to use.
	Details []googleapi.RawMessage `json:"details,omitempty"`
	// Message: A developer-facing error message, which should be in English. Any
	// user-facing error message should be localized and sent in the
	// google.rpc.Status.details field, or localized by the client.
	Message string `json:"message,omitempty"`
	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "Code") to include in API requests
	// with the JSON null value. By default, fields with empty values are omitted
	// from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

type Violation

type Violation struct {
	// AssetId: The full resource name of the asset that caused the violation. For
	// details about the format of the full resource name for each asset type, see
	// Resource name format
	// (https://cloud.google.com/asset-inventory/docs/resource-name-format).
	AssetId string `json:"assetId,omitempty"`
	// NextSteps: A description of the steps that you can take to fix the
	// violation.
	NextSteps string `json:"nextSteps,omitempty"`
	// PolicyId: The policy that was violated.
	PolicyId string `json:"policyId,omitempty"`
	// Severity: The severity of the violation.
	//
	// Possible values:
	//   "SEVERITY_UNSPECIFIED" - Default value. This value is unused.
	//   "CRITICAL" - Critical severity.
	//   "HIGH" - High severity.
	//   "MEDIUM" - Medium severity.
	//   "LOW" - Low severity.
	Severity string `json:"severity,omitempty"`
	// ViolatedAsset: Details of the Cloud Asset Inventory asset that caused the
	// violation.
	ViolatedAsset *AssetDetails `json:"violatedAsset,omitempty"`
	// ViolatedPolicy: Details of the policy that was violated.
	ViolatedPolicy *PolicyDetails `json:"violatedPolicy,omitempty"`
	// ViolatedPosture: Details for the posture that was violated. This field is
	// present only if the violated policy belongs to a deployed posture.
	ViolatedPosture *PostureDetails `json:"violatedPosture,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AssetId") to unconditionally
	// include in API requests. By default, fields with empty or default values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	// details.
	ForceSendFields []string `json:"-"`
	// NullFields is a list of field names (e.g. "AssetId") to include in API
	// requests with the JSON null value. By default, fields with empty values are
	// omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
	NullFields []string `json:"-"`
}

Violation: Details of a violation.

func (Violation) MarshalJSON

func (s Violation) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL