posturemanagementv1

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package posturemanagementv1 : Operations and models for the PostureManagementV1 service

Index

Constants

View Source
const (
	ProfileProfileTypeCustomConst        = "custom"
	ProfileProfileTypePredefinedConst    = "predefined"
	ProfileProfileTypeTemplateGroupConst = "template_group"
)

Constants associated with the Profile.ProfileType property. The type of profile.

View Source
const (
	ScanStatusAbortTaskRequestCompletedConst       = "abort_task_request_completed"
	ScanStatusAbortTaskRequestFailedConst          = "abort_task_request_failed"
	ScanStatusAbortTaskRequestReceivedConst        = "abort_task_request_received"
	ScanStatusControllerAbortedConst               = "controller_aborted"
	ScanStatusDiscoveryCompletedConst              = "discovery_completed"
	ScanStatusDiscoveryInProgressConst             = "discovery_in_progress"
	ScanStatusDiscoveryResultPostedNoErrorConst    = "discovery_result_posted_no_error"
	ScanStatusDiscoveryResultPostedWithErrorConst  = "discovery_result_posted_with_error"
	ScanStatusDiscoveryStartedConst                = "discovery_started"
	ScanStatusErrorInAbortTaskRequestConst         = "error_in_abort_task_request"
	ScanStatusErrorInDiscoveryConst                = "error_in_discovery"
	ScanStatusErrorInFactCollectionConst           = "error_in_fact_collection"
	ScanStatusErrorInFactValidationConst           = "error_in_fact_validation"
	ScanStatusErrorInInventoryConst                = "error_in_inventory"
	ScanStatusErrorInRemediationConst              = "error_in_remediation"
	ScanStatusErrorInValidationConst               = "error_in_validation"
	ScanStatusFactCollectionCompletedConst         = "fact_collection_completed"
	ScanStatusFactCollectionInProgressConst        = "fact_collection_in_progress"
	ScanStatusFactCollectionStartedConst           = "fact_collection_started"
	ScanStatusFactValidationCompletedConst         = "fact_validation_completed"
	ScanStatusFactValidationInProgressConst        = "fact_validation_in_progress"
	ScanStatusFactValidationStartedConst           = "fact_validation_started"
	ScanStatusGatewayAbortedConst                  = "gateway_aborted"
	ScanStatusInventoryCompletedConst              = "inventory_completed"
	ScanStatusInventoryCompletedWithErrorConst     = "inventory_completed_with_error"
	ScanStatusInventoryInProgressConst             = "inventory_in_progress"
	ScanStatusInventoryStartedConst                = "inventory_started"
	ScanStatusNotAcceptedConst                     = "not_accepted"
	ScanStatusPendingConst                         = "pending"
	ScanStatusRemediationCompletedConst            = "remediation_completed"
	ScanStatusRemediationInProgressConst           = "remediation_in_progress"
	ScanStatusRemediationStartedConst              = "remediation_started"
	ScanStatusSentToCollectorConst                 = "sent_to_collector"
	ScanStatusUserAbortedConst                     = "user_aborted"
	ScanStatusValidationCompletedConst             = "validation_completed"
	ScanStatusValidationInProgressConst            = "validation_in_progress"
	ScanStatusValidationResultPostedNoErrorConst   = "validation_result_posted_no_error"
	ScanStatusValidationResultPostedWithErrorConst = "validation_result_posted_with_error"
	ScanStatusValidationStartedConst               = "validation_started"
	ScanStatusWaitingForRefineConst                = "waiting_for_refine"
)

Constants associated with the Scan.Status property. The status of the collector as it completes a scan.

View Source
const (
	ScopeEnvironmentTypeAwsConst       = "aws"
	ScopeEnvironmentTypeAzureConst     = "azure"
	ScopeEnvironmentTypeGcpConst       = "gcp"
	ScopeEnvironmentTypeHostedConst    = "hosted"
	ScopeEnvironmentTypeIBMConst       = "ibm"
	ScopeEnvironmentTypeOnPremiseConst = "on_premise"
	ScopeEnvironmentTypeOpenstackConst = "openstack"
	ScopeEnvironmentTypeServicesConst  = "services"
)

Constants associated with the Scope.EnvironmentType property. The environment that the scope is targeted to.

View Source
const (
	ScopeLastScanTypeAbortTasksConst     = "abort_tasks"
	ScopeLastScanTypeDiscoveryConst      = "discovery"
	ScopeLastScanTypeEvidenceConst       = "evidence"
	ScopeLastScanTypeFactCollectionConst = "fact_collection"
	ScopeLastScanTypeFactValidationConst = "fact_validation"
	ScopeLastScanTypeInventoryConst      = "inventory"
	ScopeLastScanTypeRemediationConst    = "remediation"
	ScopeLastScanTypeScriptConst         = "script"
	ScopeLastScanTypeValidationConst     = "validation"
)

Constants associated with the Scope.LastScanType property. The last type of scan that was run on the scope.

View Source
const DefaultServiceName = "posture_management"

DefaultServiceName is the default key used to find external configuration information.

Variables

This section is empty.

Functions

func GetServiceURLForRegion

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalApplicabilityCriteria

func UnmarshalApplicabilityCriteria(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalApplicabilityCriteria unmarshals an instance of ApplicabilityCriteria from the specified map of raw messages.

func UnmarshalProfile

func UnmarshalProfile(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalProfile unmarshals an instance of Profile from the specified map of raw messages.

func UnmarshalProfilesList

func UnmarshalProfilesList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalProfilesList unmarshals an instance of ProfilesList from the specified map of raw messages.

func UnmarshalResult

func UnmarshalResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResult unmarshals an instance of Result from the specified map of raw messages.

func UnmarshalScan

func UnmarshalScan(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalScan unmarshals an instance of Scan from the specified map of raw messages.

func UnmarshalScope

func UnmarshalScope(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalScope unmarshals an instance of Scope from the specified map of raw messages.

func UnmarshalScopesList

func UnmarshalScopesList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalScopesList unmarshals an instance of ScopesList from the specified map of raw messages.

Types

type ApplicabilityCriteria

type ApplicabilityCriteria struct {
	// A list of environments that a profile can be applied to.
	Environment []string `json:"environment,omitempty"`

	// A list of resources that a profile can be used with.
	Resource []string `json:"resource,omitempty"`

	// The type of environment that a profile is able to be applied to.
	EnvironmentCategory []string `json:"environment_category,omitempty"`

	// The type of resource that a profile is able to be applied to.
	ResourceCategory []string `json:"resource_category,omitempty"`

	// The resource type that the profile applies to.
	ResourceType []string `json:"resource_type,omitempty"`

	// The software that the profile applies to.
	SoftwareDetails interface{} `json:"software_details,omitempty"`

	// The operatoring system that the profile applies to.
	OsDetails interface{} `json:"os_details,omitempty"`

	// Any additional details about the profile.
	AdditionalDetails interface{} `json:"additional_details,omitempty"`

	// The type of environment that your scope is targeted to.
	EnvironmentCategoryDescription map[string]string `json:"environment_category_description,omitempty"`

	// The environment that your scope is targeted to.
	EnvironmentDescription map[string]string `json:"environment_description,omitempty"`

	// The type of resource that your scope is targeted to.
	ResourceCategoryDescription map[string]string `json:"resource_category_description,omitempty"`

	// A further classification of the type of resource that your scope is targeted to.
	ResourceTypeDescription map[string]string `json:"resource_type_description,omitempty"`

	// The resource that is scanned as part of your scope.
	ResourceDescription map[string]string `json:"resource_description,omitempty"`
}

ApplicabilityCriteria : The criteria that defines how a profile applies.

type CreateValidationOptions

type CreateValidationOptions struct {
	// Your IBM Cloud account ID.
	AccountID *string `validate:"required"`

	// The unique ID of the scope.
	ScopeID *string

	// The unique ID of the profile.
	ProfileID *string

	// The ID of the profile group.
	GroupProfileID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateValidationOptions : The CreateValidation options.

func (*CreateValidationOptions) SetAccountID

func (options *CreateValidationOptions) SetAccountID(accountID string) *CreateValidationOptions

SetAccountID : Allow user to set AccountID

func (*CreateValidationOptions) SetGroupProfileID

func (options *CreateValidationOptions) SetGroupProfileID(groupProfileID string) *CreateValidationOptions

SetGroupProfileID : Allow user to set GroupProfileID

func (*CreateValidationOptions) SetHeaders

func (options *CreateValidationOptions) SetHeaders(param map[string]string) *CreateValidationOptions

SetHeaders : Allow user to set Headers

func (*CreateValidationOptions) SetProfileID

func (options *CreateValidationOptions) SetProfileID(profileID string) *CreateValidationOptions

SetProfileID : Allow user to set ProfileID

func (*CreateValidationOptions) SetScopeID

func (options *CreateValidationOptions) SetScopeID(scopeID string) *CreateValidationOptions

SetScopeID : Allow user to set ScopeID

type ListProfilesOptions

type ListProfilesOptions struct {
	// Your account ID.
	AccountID *string `validate:"required"`

	// The name of the profile.
	Name *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListProfilesOptions : The ListProfiles options.

func (*ListProfilesOptions) SetAccountID

func (options *ListProfilesOptions) SetAccountID(accountID string) *ListProfilesOptions

SetAccountID : Allow user to set AccountID

func (*ListProfilesOptions) SetHeaders

func (options *ListProfilesOptions) SetHeaders(param map[string]string) *ListProfilesOptions

SetHeaders : Allow user to set Headers

func (*ListProfilesOptions) SetName

func (options *ListProfilesOptions) SetName(name string) *ListProfilesOptions

SetName : Allow user to set Name

type ListScopesOptions

type ListScopesOptions struct {
	// Your IBM Cloud account ID.
	AccountID *string `validate:"required"`

	// The name of the scope.
	Name *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListScopesOptions : The ListScopes options.

func (*ListScopesOptions) SetAccountID

func (options *ListScopesOptions) SetAccountID(accountID string) *ListScopesOptions

SetAccountID : Allow user to set AccountID

func (*ListScopesOptions) SetHeaders

func (options *ListScopesOptions) SetHeaders(param map[string]string) *ListScopesOptions

SetHeaders : Allow user to set Headers

func (*ListScopesOptions) SetName

func (options *ListScopesOptions) SetName(name string) *ListScopesOptions

SetName : Allow user to set Name

type PostureManagementV1

type PostureManagementV1 struct {
	Service *core.BaseService
}

PostureManagementV1 : With IBM Cloud® Security and Compliance Center, you can embed checks into your every day workflows to help manage your current security and compliance posture. By monitoring for risks, you can identify security vulnerabilities and quickly work to mitigate the impact.

Version: 1.0.0

func NewPostureManagementV1

func NewPostureManagementV1(options *PostureManagementV1Options) (service *PostureManagementV1, err error)

NewPostureManagementV1 : constructs an instance of PostureManagementV1 with passed in options.

func NewPostureManagementV1UsingExternalConfig

func NewPostureManagementV1UsingExternalConfig(options *PostureManagementV1Options) (postureManagement *PostureManagementV1, err error)

NewPostureManagementV1UsingExternalConfig : constructs an instance of PostureManagementV1 with passed in options and external configuration.

func (*PostureManagementV1) Clone

func (postureManagement *PostureManagementV1) Clone() *PostureManagementV1

Clone makes a copy of "postureManagement" suitable for processing requests.

func (*PostureManagementV1) CreateValidation

func (postureManagement *PostureManagementV1) CreateValidation(createValidationOptions *CreateValidationOptions) (result *Result, response *core.DetailedResponse, err error)

CreateValidation : Initiate a validations scan Validations scans determine a specified scope's adherence to regulatory controls by validating the configuration of the resources in your scope to the attached profile. To initiate a scan, you must have configured a collector, provided credentials, and completed both a fact collection and discovery scan. [Learn more](/docs/security-compliance?topic=security-compliance-schedule-scan).

func (*PostureManagementV1) CreateValidationWithContext

func (postureManagement *PostureManagementV1) CreateValidationWithContext(ctx context.Context, createValidationOptions *CreateValidationOptions) (result *Result, response *core.DetailedResponse, err error)

CreateValidationWithContext is an alternate form of the CreateValidation method which supports a Context parameter

func (*PostureManagementV1) DisableRetries

func (postureManagement *PostureManagementV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*PostureManagementV1) EnableRetries

func (postureManagement *PostureManagementV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*PostureManagementV1) GetEnableGzipCompression

func (postureManagement *PostureManagementV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*PostureManagementV1) GetServiceURL

func (postureManagement *PostureManagementV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*PostureManagementV1) ListProfiles

func (postureManagement *PostureManagementV1) ListProfiles(listProfilesOptions *ListProfilesOptions) (result *ProfilesList, response *core.DetailedResponse, err error)

ListProfiles : List profiles List all of the profiles that are available in your account. To view a specific profile, you can filter by name.

func (*PostureManagementV1) ListProfilesWithContext

func (postureManagement *PostureManagementV1) ListProfilesWithContext(ctx context.Context, listProfilesOptions *ListProfilesOptions) (result *ProfilesList, response *core.DetailedResponse, err error)

ListProfilesWithContext is an alternate form of the ListProfiles method which supports a Context parameter

func (*PostureManagementV1) ListScopes

func (postureManagement *PostureManagementV1) ListScopes(listScopesOptions *ListScopesOptions) (result *ScopesList, response *core.DetailedResponse, err error)

ListScopes : List scopes List all of the scopes that are available in your account. To view a specific scope, you can filter by name.

func (*PostureManagementV1) ListScopesWithContext

func (postureManagement *PostureManagementV1) ListScopesWithContext(ctx context.Context, listScopesOptions *ListScopesOptions) (result *ScopesList, response *core.DetailedResponse, err error)

ListScopesWithContext is an alternate form of the ListScopes method which supports a Context parameter

func (*PostureManagementV1) NewCreateValidationOptions

func (*PostureManagementV1) NewCreateValidationOptions(accountID string) *CreateValidationOptions

NewCreateValidationOptions : Instantiate CreateValidationOptions

func (*PostureManagementV1) NewListProfilesOptions

func (*PostureManagementV1) NewListProfilesOptions(accountID string) *ListProfilesOptions

NewListProfilesOptions : Instantiate ListProfilesOptions

func (*PostureManagementV1) NewListScopesOptions

func (*PostureManagementV1) NewListScopesOptions(accountID string) *ListScopesOptions

NewListScopesOptions : Instantiate ListScopesOptions

func (*PostureManagementV1) SetDefaultHeaders

func (postureManagement *PostureManagementV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*PostureManagementV1) SetEnableGzipCompression

func (postureManagement *PostureManagementV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*PostureManagementV1) SetServiceURL

func (postureManagement *PostureManagementV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

type PostureManagementV1Options

type PostureManagementV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

PostureManagementV1Options : Service options

type Profile

type Profile struct {
	// The name of the profile.
	Name *string `json:"name,omitempty"`

	// A description of the profile.
	Description *string `json:"description,omitempty"`

	// The version of the profile.
	Version *int64 `json:"version,omitempty"`

	// The user who created the profile.
	CreatedBy *string `json:"created_by,omitempty"`

	// The user who last modified the profile.
	ModifiedBy *string `json:"modified_by,omitempty"`

	// A reason that you want to delete a profile.
	ReasonForDelete *string `json:"reason_for_delete,omitempty"`

	// The criteria that defines how a profile applies.
	ApplicabilityCriteria *ApplicabilityCriteria `json:"applicability_criteria,omitempty"`

	// An auto-generated unique identifying number of the profile.
	ProfileID *string `json:"profile_id,omitempty"`

	// The base profile that the controls are pulled from.
	BaseProfile *string `json:"base_profile,omitempty"`

	// The type of profile.
	ProfileType *string `json:"profile_type,omitempty"`

	// The time that the profile was created in UTC.
	CreatedTime *strfmt.DateTime `json:"created_time,omitempty"`

	// The time that the profile was most recently modified in UTC.
	ModifiedTime *strfmt.DateTime `json:"modified_time,omitempty"`

	// The profile status. If the profile is enabled, the value is true. If the profile is disabled, the value is false.
	Enabled *bool `json:"enabled,omitempty"`
}

Profile : Profile.

type ProfilesList

type ProfilesList struct {
	// Profiles.
	Profiles []Profile `json:"profiles,omitempty"`
}

ProfilesList : A list of profiles.

type Result

type Result struct {
	// Result.
	Result *bool `json:"result,omitempty"`

	// A message is returned.
	Message *string `json:"message,omitempty"`
}

Result : Result.

type Scan

type Scan struct {
	// An auto-generated unique identifier for the scan.
	ScanID *string `json:"scan_id,omitempty"`

	// An auto-generated unique identifier for discovery.
	DiscoverID *string `json:"discover_id,omitempty"`

	// The status of the collector as it completes a scan.
	Status *string `json:"status,omitempty"`

	// The current status of the collector.
	StatusMessage *string `json:"status_message,omitempty"`
}

Scan : Scan.

type Scope

type Scope struct {
	// A detailed description of the scope.
	Description *string `json:"description,omitempty"`

	// The user who created the scope.
	CreatedBy *string `json:"created_by,omitempty"`

	// The user who most recently modified the scope.
	ModifiedBy *string `json:"modified_by,omitempty"`

	// An auto-generated unique identifier for the scope.
	ScopeID *string `json:"scope_id,omitempty"`

	// A unique name for your scope.
	Name *string `json:"name,omitempty"`

	// Indicates whether scope is enabled/disabled.
	Enabled *bool `json:"enabled,omitempty"`

	// The environment that the scope is targeted to.
	EnvironmentType *string `json:"environment_type,omitempty"`

	// The time that the scope was created in UTC.
	CreatedTime *strfmt.DateTime `json:"created_time,omitempty"`

	// The time that the scope was last modified in UTC.
	ModifiedTime *strfmt.DateTime `json:"modified_time,omitempty"`

	// The last type of scan that was run on the scope.
	LastScanType *string `json:"last_scan_type,omitempty"`

	// A description of the last scan type.
	LastScanTypeDescription *string `json:"last_scan_type_description,omitempty"`

	// The last time that a scan status for a scope was updated in UTC.
	LastScanStatusUpdatedTime *strfmt.DateTime `json:"last_scan_status_updated_time,omitempty"`

	// The unique IDs of the collectors that are attached to the scope.
	CollectorsID []string `json:"collectors_id,omitempty"`

	// A list of the scans that have been run on the scope.
	Scans []Scan `json:"scans,omitempty"`
}

Scope : Scope.

type ScopesList

type ScopesList struct {
	// Scopes.
	Scopes []Scope `json:"scopes,omitempty"`
}

ScopesList : Scopes list.

Jump to

Keyboard shortcuts

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