v20200721

package
v3.0.1092+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Internal error
	INTERNALERROR = "InternalError"

	// The dependent db encountered an error.
	INTERNALERROR_DEPENDSDB = "InternalError.DependsDb"

	// System error
	INTERNALERROR_SYSTEM = "InternalError.System"

	// Parameter error
	INVALIDPARAMETER = "InvalidParameter"

	// Parameter error
	INVALIDPARAMETER_PARAMERROR = "InvalidParameter.ParamError"

	// Parameter value error
	INVALIDPARAMETERVALUE = "InvalidParameterValue"

	// The resource does not exist.
	RESOURCENOTFOUND = "ResourceNotFound"
)
View Source
const APIVersion = "2020-07-21"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) DescribeStrategies

func (c *Client) DescribeStrategies(request *DescribeStrategiesRequest) (response *DescribeStrategiesResponse, err error)

DescribeStrategies This API is used to query information about assessment items.

error code that may be returned:

INTERNALERROR_DEPENDSDB = "InternalError.DependsDb"
INTERNALERROR_SYSTEM = "InternalError.System"
INVALIDPARAMETER = "InvalidParameter"
RESOURCENOTFOUND = "ResourceNotFound"

func (*Client) DescribeStrategiesWithContext

func (c *Client) DescribeStrategiesWithContext(ctx context.Context, request *DescribeStrategiesRequest) (response *DescribeStrategiesResponse, err error)

DescribeStrategies This API is used to query information about assessment items.

error code that may be returned:

INTERNALERROR_DEPENDSDB = "InternalError.DependsDb"
INTERNALERROR_SYSTEM = "InternalError.System"
INVALIDPARAMETER = "InvalidParameter"
RESOURCENOTFOUND = "ResourceNotFound"

func (*Client) DescribeTaskStrategyRisks

func (c *Client) DescribeTaskStrategyRisks(request *DescribeTaskStrategyRisksRequest) (response *DescribeTaskStrategyRisksResponse, err error)

DescribeTaskStrategyRisks This API is used to query the risky instance list of the assessment item.

error code that may be returned:

INTERNALERROR = "InternalError"
INTERNALERROR_DEPENDSDB = "InternalError.DependsDb"
INTERNALERROR_SYSTEM = "InternalError.System"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_PARAMERROR = "InvalidParameter.ParamError"
INVALIDPARAMETERVALUE = "InvalidParameterValue"
RESOURCENOTFOUND = "ResourceNotFound"

func (*Client) DescribeTaskStrategyRisksWithContext

func (c *Client) DescribeTaskStrategyRisksWithContext(ctx context.Context, request *DescribeTaskStrategyRisksRequest) (response *DescribeTaskStrategyRisksResponse, err error)

DescribeTaskStrategyRisks This API is used to query the risky instance list of the assessment item.

error code that may be returned:

INTERNALERROR = "InternalError"
INTERNALERROR_DEPENDSDB = "InternalError.DependsDb"
INTERNALERROR_SYSTEM = "InternalError.System"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_PARAMERROR = "InvalidParameter.ParamError"
INVALIDPARAMETERVALUE = "InvalidParameterValue"
RESOURCENOTFOUND = "ResourceNotFound"

type Conditions

type Conditions struct {
	// Warning condition ID
	// Note: This field may return null, indicating that no valid values can be obtained.
	ConditionId *uint64 `json:"ConditionId,omitnil,omitempty" name:"ConditionId"`

	// Warning level. 2: medium risk; 3: high risk.
	// Note: This field may return null, indicating that no valid values can be obtained.
	Level *uint64 `json:"Level,omitnil,omitempty" name:"Level"`

	// Warning level description
	// Note: This field may return null, indicating that no valid values can be obtained.
	LevelDesc *string `json:"LevelDesc,omitnil,omitempty" name:"LevelDesc"`

	// Warning condition description
	Desc *string `json:"Desc,omitnil,omitempty" name:"Desc"`
}

type DescribeStrategiesRequest

type DescribeStrategiesRequest struct {
	*tchttp.BaseRequest
}

func NewDescribeStrategiesRequest

func NewDescribeStrategiesRequest() (request *DescribeStrategiesRequest)

func (*DescribeStrategiesRequest) FromJsonString

func (r *DescribeStrategiesRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeStrategiesRequest) ToJsonString

func (r *DescribeStrategiesRequest) ToJsonString() string

type DescribeStrategiesRequestParams

type DescribeStrategiesRequestParams struct {
}

Predefined struct for user

type DescribeStrategiesResponse

type DescribeStrategiesResponse struct {
	*tchttp.BaseResponse
	Response *DescribeStrategiesResponseParams `json:"Response"`
}

func NewDescribeStrategiesResponse

func NewDescribeStrategiesResponse() (response *DescribeStrategiesResponse)

func (*DescribeStrategiesResponse) FromJsonString

func (r *DescribeStrategiesResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeStrategiesResponse) ToJsonString

func (r *DescribeStrategiesResponse) ToJsonString() string

type DescribeStrategiesResponseParams

type DescribeStrategiesResponseParams struct {
	// Assessment item list
	// Note: This field may return null, indicating that no valid values can be obtained.
	Strategies []*Strategies `json:"Strategies,omitnil,omitempty" name:"Strategies"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type DescribeTaskStrategyRisksRequest

type DescribeTaskStrategyRisksRequest struct {
	*tchttp.BaseRequest

	// Assessment item ID
	StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"`

	// Quantity of returns. It is 100 by default, and the maximum value is 200.
	Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// Offset, which is 0 by default.
	Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"`

	// Environment
	Env *string `json:"Env,omitnil,omitempty" name:"Env"`

	// Task type
	TaskType *string `json:"TaskType,omitnil,omitempty" name:"TaskType"`
}

func NewDescribeTaskStrategyRisksRequest

func NewDescribeTaskStrategyRisksRequest() (request *DescribeTaskStrategyRisksRequest)

func (*DescribeTaskStrategyRisksRequest) FromJsonString

func (r *DescribeTaskStrategyRisksRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeTaskStrategyRisksRequest) ToJsonString

func (r *DescribeTaskStrategyRisksRequest) ToJsonString() string

type DescribeTaskStrategyRisksRequestParams

type DescribeTaskStrategyRisksRequestParams struct {
	// Assessment item ID
	StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"`

	// Quantity of returns. It is 100 by default, and the maximum value is 200.
	Limit *uint64 `json:"Limit,omitnil,omitempty" name:"Limit"`

	// Offset, which is 0 by default.
	Offset *uint64 `json:"Offset,omitnil,omitempty" name:"Offset"`

	// Environment
	Env *string `json:"Env,omitnil,omitempty" name:"Env"`

	// Task type
	TaskType *string `json:"TaskType,omitnil,omitempty" name:"TaskType"`
}

Predefined struct for user

type DescribeTaskStrategyRisksResponse

type DescribeTaskStrategyRisksResponse struct {
	*tchttp.BaseResponse
	Response *DescribeTaskStrategyRisksResponseParams `json:"Response"`
}

func NewDescribeTaskStrategyRisksResponse

func NewDescribeTaskStrategyRisksResponse() (response *DescribeTaskStrategyRisksResponse)

func (*DescribeTaskStrategyRisksResponse) FromJsonString

func (r *DescribeTaskStrategyRisksResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeTaskStrategyRisksResponse) ToJsonString

func (r *DescribeTaskStrategyRisksResponse) ToJsonString() string

type DescribeTaskStrategyRisksResponseParams

type DescribeTaskStrategyRisksResponseParams struct {
	// According to this configuration, match the corresponding fields of the risky instance list (Risks), for example:
	// {"Response":{"RequestId":"111","RiskFieldsDesc":[{"Field":"InstanceId","FieldName":"ID","FieldType":"string","FieldDict":{} },{"Field":"InstanceName","FieldName":"Name","FieldType":"string","FieldDict":{}},{"Field":"InstanceState","FieldName":"Status ","FieldType":"string","FieldDict":{"LAUNCH_FAILED":"Creation failed","PENDING":"Creating","REBOOTING":"Re- starting","RUNNING":"Running","SHUTDOWN":"Stop waiting to be terminated","STARTING":"Starting","STOPPED":"Shut down","STOPPING":"Shutting down"," TERMINATING":"Terminating"}},{"Field":"Zone","FieldName":"Available zone","FieldType":"string","FieldDict":{}},{"Field":" PrivateIPAddresses","FieldName":"Private IP addresses","FieldType":"stringSlice","FieldDict":{}},{"Field":"PublicIPAddresses","FieldName":"Public IP addresses","Field Type":"stringSlice","FieldDict":{}},{"Field":"Region","FieldName":"Region","FieldType":"string","FieldDict":{}},{" Field":"Tags","FieldName":"Tags","FieldType":"tags","FieldDict":{}}],"RiskTotalCount":3,"Risks":"[{\"InstanceId\" :\"ins-xxx1\",\"InstanceName\":\"xxx1\",\"InstanceState\":\"RUNNING\",\"PrivateIPAddresses\":[\"1.17.64.2\"],\ " PublicIPAddresses\":null,\"Region\":\"ap-shanghai\",\"Tags\":null,\"Zone\":\"ap-shanghai-2\"},{\"InstanceId\ ":\"ins-xxx2\",\"InstanceName\":\"xxx2\",\"InstanceState\":\"RUNNING\",\"PrivateIPAddresses\":[\"1.17.64.11\"], \"PublicIPAddresses\":null,\"Region\":\"ap-shanghai\",\"Tags\":null,\"Zone\":\"ap-shanghai-2\"}]"," StrategyId":9}}
	// Note: This field may return null, indicating that no valid values can be obtained.
	RiskFieldsDesc []*RiskFieldsDesc `json:"RiskFieldsDesc,omitnil,omitempty" name:"RiskFieldsDesc"`

	// Assessment item ID
	// Note: This field may return null, indicating that no valid values can be obtained.
	StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"`

	// Number of risky instances
	// Note: This field may return null, indicating that no valid values can be obtained.
	RiskTotalCount *uint64 `json:"RiskTotalCount,omitnil,omitempty" name:"RiskTotalCount"`

	// Risky instance details list. Require json decode.
	// Note: This field may return null, indicating that no valid values can be obtained.
	Risks *string `json:"Risks,omitnil,omitempty" name:"Risks"`

	// Number of inspection resources
	// Note: This field may return null, indicating that no valid values can be obtained.
	ResourceCount *uint64 `json:"ResourceCount,omitnil,omitempty" name:"ResourceCount"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type KeyValue

type KeyValue struct {
	// Key name
	Key *string `json:"Key,omitnil,omitempty" name:"Key"`

	// Value corresponding to the key name
	Value *string `json:"Value,omitnil,omitempty" name:"Value"`
}

type RiskFieldsDesc

type RiskFieldsDesc struct {
	// Field ID
	Field *string `json:"Field,omitnil,omitempty" name:"Field"`

	// Field name
	FieldName *string `json:"FieldName,omitnil,omitempty" name:"FieldName"`

	// Field type,
	// string: String type, such as "aa"
	// int: Integer, for example, 111
	// stringSlice : String array type, such as ["a", "b"]
	// tags: Tag type, for example: [{"Key":"kkk","Value":"vvv"},{"Key":"kkk2","Value":"vvv2"}]
	FieldType *string `json:"FieldType,omitnil,omitempty" name:"FieldType"`

	// Dictionary corresponding to the field value
	// Note: This field may return null, indicating that no valid values can be obtained.
	FieldDict []*KeyValue `json:"FieldDict,omitnil,omitempty" name:"FieldDict"`
}

type Strategies

type Strategies struct {
	// Assessment item ID
	// Note: This field may return null, indicating that no valid values can be obtained.
	StrategyId *uint64 `json:"StrategyId,omitnil,omitempty" name:"StrategyId"`

	// Assessment item name
	// Note: This field may return null, indicating that no valid values can be obtained.
	Name *string `json:"Name,omitnil,omitempty" name:"Name"`

	// Assessment item description
	// Note: This field may return null, indicating that no valid values can be obtained.
	Desc *string `json:"Desc,omitnil,omitempty" name:"Desc"`

	// Product ID corresponding to the assessment item
	// Note: This field may return null, indicating that no valid values can be obtained.
	Product *string `json:"Product,omitnil,omitempty" name:"Product"`

	// Product name corresponding to the assessment item
	// Note: This field may return null, indicating that no valid values can be obtained.
	ProductDesc *string `json:"ProductDesc,omitnil,omitempty" name:"ProductDesc"`

	// Optimization suggestions for the assessment item
	// Note: This field may return null, indicating that no valid values can be obtained.
	Repair *string `json:"Repair,omitnil,omitempty" name:"Repair"`

	// Category ID of the assessment item
	// Note: This field may return null, indicating that no valid values can be obtained.
	GroupId *uint64 `json:"GroupId,omitnil,omitempty" name:"GroupId"`

	// Category name of the assessment item
	// Note: This field may return null, indicating that no valid values can be obtained.
	GroupName *string `json:"GroupName,omitnil,omitempty" name:"GroupName"`

	// Risk list of the assessment item
	// Note: This field may return null, indicating that no valid values can be obtained.
	Conditions []*Conditions `json:"Conditions,omitnil,omitempty" name:"Conditions"`
}

Jump to

Keyboard shortcuts

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