v20190319

package
v3.0.385+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Internal error.
	INTERNALERROR = "InternalError"

	// Parameter error.
	INVALIDPARAMETER = "InvalidParameter"
)
View Source
const APIVersion = "2019-03-19"

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) DescribeEvents

func (c *Client) DescribeEvents(request *DescribeEventsRequest) (response *DescribeEventsResponse, err error)

DescribeEvents This API is used to query CloudAudit logs.

error code that may be returned:

INTERNALERROR = "InternalError"
INVALIDPARAMETER = "InvalidParameter"

func (*Client) DescribeEventsWithContext

func (c *Client) DescribeEventsWithContext(ctx context.Context, request *DescribeEventsRequest) (response *DescribeEventsResponse, err error)

DescribeEvents This API is used to query CloudAudit logs.

error code that may be returned:

INTERNALERROR = "InternalError"
INVALIDPARAMETER = "InvalidParameter"

type DescribeEventsRequest

type DescribeEventsRequest struct {
	*tchttp.BaseRequest

	// Start timestamp in seconds (cannot be 90 days after the current time).
	StartTime *uint64 `json:"StartTime,omitempty" name:"StartTime"`

	// End timestamp in seconds (the time range for query is less than 30 days).
	EndTime *uint64 `json:"EndTime,omitempty" name:"EndTime"`

	// Credential for viewing more logs.
	NextToken *uint64 `json:"NextToken,omitempty" name:"NextToken"`

	// Max number of returned logs (up to 50).
	MaxResults *uint64 `json:"MaxResults,omitempty" name:"MaxResults"`

	// Search criterion. Valid values: RequestId, EventName, ActionType (write/read), PrincipalId (sub-account), ResourceType, ResourceName, AccessKeyId, SensitiveAction, ApiErrorCode, and CamErrorCode.
	LookupAttributes []*LookupAttribute `json:"LookupAttributes,omitempty" name:"LookupAttributes"`

	// Whether to return the IP location. `1`: yes, `0`: no.
	IsReturnLocation *uint64 `json:"IsReturnLocation,omitempty" name:"IsReturnLocation"`
}

func NewDescribeEventsRequest

func NewDescribeEventsRequest() (request *DescribeEventsRequest)

func (*DescribeEventsRequest) FromJsonString

func (r *DescribeEventsRequest) 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 (*DescribeEventsRequest) ToJsonString

func (r *DescribeEventsRequest) ToJsonString() string

type DescribeEventsResponse

type DescribeEventsResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// Whether the logset ends.
		ListOver *bool `json:"ListOver,omitempty" name:"ListOver"`

		// Credential for viewing more logs.
		NextToken *uint64 `json:"NextToken,omitempty" name:"NextToken"`

		// Logset.
		// Note: `null` may be returned for this field, indicating that no valid values can be obtained.
		Events []*Event `json:"Events,omitempty" name:"Events"`

		// Total number of events.
		// Note: this field may return `null`, indicating that no valid values can be obtained.
		TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"`

		// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeEventsResponse

func NewDescribeEventsResponse() (response *DescribeEventsResponse)

func (*DescribeEventsResponse) FromJsonString

func (r *DescribeEventsResponse) 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 (*DescribeEventsResponse) ToJsonString

func (r *DescribeEventsResponse) ToJsonString() string

type Event

type Event struct {

	// Log ID
	EventId *string `json:"EventId,omitempty" name:"EventId"`

	// Username
	Username *string `json:"Username,omitempty" name:"Username"`

	// Event Time
	EventTime *string `json:"EventTime,omitempty" name:"EventTime"`

	// Log details
	CloudAuditEvent *string `json:"CloudAuditEvent,omitempty" name:"CloudAuditEvent"`

	// Description of resource type in Chinese (please use this field as required; if you are using other languages, ignore this field)
	ResourceTypeCn *string `json:"ResourceTypeCn,omitempty" name:"ResourceTypeCn"`

	// Authentication error code
	ErrorCode *int64 `json:"ErrorCode,omitempty" name:"ErrorCode"`

	// Event name
	EventName *string `json:"EventName,omitempty" name:"EventName"`

	// Certificate ID
	// Note: `null` may be returned for this field, indicating that no valid values can be obtained.
	SecretId *string `json:"SecretId,omitempty" name:"SecretId"`

	// Request source
	EventSource *string `json:"EventSource,omitempty" name:"EventSource"`

	// Request ID
	RequestID *string `json:"RequestID,omitempty" name:"RequestID"`

	// Resource region
	ResourceRegion *string `json:"ResourceRegion,omitempty" name:"ResourceRegion"`

	// Root account ID
	AccountID *int64 `json:"AccountID,omitempty" name:"AccountID"`

	// Source IP
	// Note: `null` may be returned for this field, indicating that no valid values can be obtained.
	SourceIPAddress *string `json:"SourceIPAddress,omitempty" name:"SourceIPAddress"`

	// Description of event name in Chinese (please use this field as required; if you are using other languages, ignore this field)
	EventNameCn *string `json:"EventNameCn,omitempty" name:"EventNameCn"`

	// Resource pair
	Resources *Resource `json:"Resources,omitempty" name:"Resources"`

	// Event region
	EventRegion *string `json:"EventRegion,omitempty" name:"EventRegion"`

	// IP location
	Location *string `json:"Location,omitempty" name:"Location"`
}

type LookupAttribute

type LookupAttribute struct {

	// Valid values: RequestId, EventName, ReadOnly, Username, ResourceType, ResourceName, AccessKeyId, and EventId
	// Note: `null` may be returned for this field, indicating that no valid values can be obtained.
	AttributeKey *string `json:"AttributeKey,omitempty" name:"AttributeKey"`

	// Value of `AttributeValue`
	// Note: `null` may be returned for this field, indicating that no valid values can be obtained.
	AttributeValue *string `json:"AttributeValue,omitempty" name:"AttributeValue"`
}

type Resource

type Resource struct {

	// Resource type
	ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"`

	// Resource name
	// Note: `null` may be returned for this field, indicating that no valid values can be obtained.
	ResourceName *string `json:"ResourceName,omitempty" name:"ResourceName"`
}

Jump to

Keyboard shortcuts

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