cloudtrail

package
v1.0.175 Latest Latest
Warning

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

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

Documentation

Overview

Package cloudtrailiface provides an interface to enable mocking the CLOUD_TRAIL service client for testing your code.

It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.

Index

Constants

View Source
const (
	ServiceName = "cloudtrail"  // Name of service.
	EndpointsID = ServiceName   // ID to lookup a service endpoint with.
	ServiceID   = "cloud_trail" // ServiceID is a unique identifer of a specific service.
)

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type CLOUDTRAIL

type CLOUDTRAIL struct {
	*client.Client
}

CLOUDTRAIL provides the API operation methods for making requests to CLOUD_TRAIL. See this package's package overview docs for details on the service.

CLOUDTRAIL methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

New create int can support ssl or region locate set

func (*CLOUDTRAIL) LookupEvents

func (c *CLOUDTRAIL) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error)

LookupEvents API operation for CLOUD_TRAIL.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for CLOUD_TRAIL's API operation LookupEvents for usage and error information.

func (*CLOUDTRAIL) LookupEventsCommon

func (c *CLOUDTRAIL) LookupEventsCommon(input *map[string]interface{}) (*map[string]interface{}, error)

LookupEventsCommon API operation for CLOUD_TRAIL.

Returns volcengineerr.Error for service API and SDK errors. Use runtime type assertions with volcengineerr.Error's Code and Message methods to get detailed information about the error.

See the VOLCENGINE API reference guide for CLOUD_TRAIL's API operation LookupEventsCommon for usage and error information.

func (*CLOUDTRAIL) LookupEventsCommonRequest

func (c *CLOUDTRAIL) LookupEventsCommonRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})

LookupEventsCommonRequest generates a "volcengine/request.Request" representing the client's request for the LookupEventsCommon operation. The "output" return value will be populated with the LookupEventsCommon request's response once the request completes successfully.

Use "Send" method on the returned LookupEventsCommon Request to send the API call to the service. the "output" return value is not valid until after LookupEventsCommon Send returns without error.

See LookupEventsCommon for more information on using the LookupEventsCommon API call, and error handling.

// Example sending a request using the LookupEventsCommonRequest method.
req, resp := client.LookupEventsCommonRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*CLOUDTRAIL) LookupEventsCommonWithContext

func (c *CLOUDTRAIL) LookupEventsCommonWithContext(ctx volcengine.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)

LookupEventsCommonWithContext is the same as LookupEventsCommon with the addition of the ability to pass a context and additional request options.

See LookupEventsCommon for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CLOUDTRAIL) LookupEventsRequest

func (c *CLOUDTRAIL) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput)

LookupEventsRequest generates a "volcengine/request.Request" representing the client's request for the LookupEvents operation. The "output" return value will be populated with the LookupEventsCommon request's response once the request completes successfully.

Use "Send" method on the returned LookupEventsCommon Request to send the API call to the service. the "output" return value is not valid until after LookupEventsCommon Send returns without error.

See LookupEvents for more information on using the LookupEvents API call, and error handling.

// Example sending a request using the LookupEventsRequest method.
req, resp := client.LookupEventsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

func (*CLOUDTRAIL) LookupEventsWithContext

func (c *CLOUDTRAIL) LookupEventsWithContext(ctx volcengine.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error)

LookupEventsWithContext is the same as LookupEvents with the addition of the ability to pass a context and additional request options.

See LookupEvents for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. Ifthe context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

type CLOUDTRAILAPI

type CLOUDTRAILAPI interface {
	LookupEventsCommon(*map[string]interface{}) (*map[string]interface{}, error)
	LookupEventsCommonWithContext(volcengine.Context, *map[string]interface{}, ...request.Option) (*map[string]interface{}, error)
	LookupEventsCommonRequest(*map[string]interface{}) (*request.Request, *map[string]interface{})

	LookupEvents(*LookupEventsInput) (*LookupEventsOutput, error)
	LookupEventsWithContext(volcengine.Context, *LookupEventsInput, ...request.Option) (*LookupEventsOutput, error)
	LookupEventsRequest(*LookupEventsInput) (*request.Request, *LookupEventsOutput)
}

CLOUDTRAILAPI provides an interface to enable mocking the cloudtrail.CLOUDTRAIL service client's API operation,

// volcengine sdk func uses an SDK service client to make a request to
// CLOUD_TRAIL.
func myFunc(svc CLOUDTRAILAPI) bool {
    // Make svc.LookupEvents request
}

func main() {
    sess := session.New()
    svc := cloudtrail.New(sess)

    myFunc(svc)
}

type LookupConditionForLookupEventsInput

type LookupConditionForLookupEventsInput struct {
	LookupConditionKey *string `type:"string" json:",omitempty"`

	LookupConditionValue *string `type:"string" json:",omitempty"`
	// contains filtered or unexported fields
}

func (LookupConditionForLookupEventsInput) GoString

GoString returns the string representation

func (*LookupConditionForLookupEventsInput) SetLookupConditionKey

SetLookupConditionKey sets the LookupConditionKey field's value.

func (*LookupConditionForLookupEventsInput) SetLookupConditionValue

SetLookupConditionValue sets the LookupConditionValue field's value.

func (LookupConditionForLookupEventsInput) String

String returns the string representation

type LookupEventsInput

type LookupEventsInput struct {
	EndTime *int64 `type:"int64" json:",omitempty"`

	LookupConditions []*LookupConditionForLookupEventsInput `type:"list" json:",omitempty"`

	MaxResults *int32 `type:"int32" json:",omitempty"`

	NextToken *string `type:"string" json:",omitempty"`

	StartTime *int64 `type:"int64" json:",omitempty"`
	// contains filtered or unexported fields
}

func (LookupEventsInput) GoString

func (s LookupEventsInput) GoString() string

GoString returns the string representation

func (*LookupEventsInput) SetEndTime

func (s *LookupEventsInput) SetEndTime(v int64) *LookupEventsInput

SetEndTime sets the EndTime field's value.

func (*LookupEventsInput) SetLookupConditions

SetLookupConditions sets the LookupConditions field's value.

func (*LookupEventsInput) SetMaxResults

func (s *LookupEventsInput) SetMaxResults(v int32) *LookupEventsInput

SetMaxResults sets the MaxResults field's value.

func (*LookupEventsInput) SetNextToken

func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput

SetNextToken sets the NextToken field's value.

func (*LookupEventsInput) SetStartTime

func (s *LookupEventsInput) SetStartTime(v int64) *LookupEventsInput

SetStartTime sets the StartTime field's value.

func (LookupEventsInput) String

func (s LookupEventsInput) String() string

String returns the string representation

type LookupEventsOutput

type LookupEventsOutput struct {
	Metadata *response.ResponseMetadata

	NextToken *string `type:"string" json:",omitempty"`

	Trails []*TrailForLookupEventsOutput `type:"list" json:",omitempty"`
	// contains filtered or unexported fields
}

func (LookupEventsOutput) GoString

func (s LookupEventsOutput) GoString() string

GoString returns the string representation

func (*LookupEventsOutput) SetNextToken

func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput

SetNextToken sets the NextToken field's value.

func (*LookupEventsOutput) SetTrails

SetTrails sets the Trails field's value.

func (LookupEventsOutput) String

func (s LookupEventsOutput) String() string

String returns the string representation

type RelatedResourceForLookupEventsOutput

type RelatedResourceForLookupEventsOutput struct {
	IntegratedTrn *string `type:"string" json:",omitempty"`

	ResourceID *string `type:"string" json:",omitempty"`

	ResourceType *string `type:"string" json:",omitempty"`

	ResourceTypeDisplay *string `type:"string" json:",omitempty"`

	ServiceCode *string `type:"string" json:",omitempty"`

	SourceType *string `type:"string" json:",omitempty"`
	// contains filtered or unexported fields
}

func (RelatedResourceForLookupEventsOutput) GoString

GoString returns the string representation

func (*RelatedResourceForLookupEventsOutput) SetIntegratedTrn

SetIntegratedTrn sets the IntegratedTrn field's value.

func (*RelatedResourceForLookupEventsOutput) SetResourceID

SetResourceID sets the ResourceID field's value.

func (*RelatedResourceForLookupEventsOutput) SetResourceType

SetResourceType sets the ResourceType field's value.

func (*RelatedResourceForLookupEventsOutput) SetResourceTypeDisplay

SetResourceTypeDisplay sets the ResourceTypeDisplay field's value.

func (*RelatedResourceForLookupEventsOutput) SetServiceCode

SetServiceCode sets the ServiceCode field's value.

func (*RelatedResourceForLookupEventsOutput) SetSourceType

SetSourceType sets the SourceType field's value.

func (RelatedResourceForLookupEventsOutput) String

String returns the string representation

type TrailForLookupEventsOutput

type TrailForLookupEventsOutput struct {
	AccessKeyID *string `type:"string" json:",omitempty"`

	ErrorCode *string `type:"string" json:",omitempty"`

	EventDetail *string `type:"string" json:",omitempty"`

	EventID *string `type:"string" json:",omitempty"`

	EventName *string `type:"string" json:",omitempty"`

	EventNameDisplay *string `type:"string" json:",omitempty"`

	EventSource *string `type:"string" json:",omitempty"`

	EventSourceDisplay *string `type:"string" json:",omitempty"`

	EventTime *string `type:"string" json:",omitempty"`

	Region *string `type:"string" json:",omitempty"`

	RelatedResources []*RelatedResourceForLookupEventsOutput `type:"list" json:",omitempty"`

	RequestID *string `type:"string" json:",omitempty"`

	SourceIPAddress *string `type:"string" json:",omitempty"`

	UserName *string `type:"string" json:",omitempty"`
	// contains filtered or unexported fields
}

func (TrailForLookupEventsOutput) GoString

func (s TrailForLookupEventsOutput) GoString() string

GoString returns the string representation

func (*TrailForLookupEventsOutput) SetAccessKeyID

SetAccessKeyID sets the AccessKeyID field's value.

func (*TrailForLookupEventsOutput) SetErrorCode

SetErrorCode sets the ErrorCode field's value.

func (*TrailForLookupEventsOutput) SetEventDetail

SetEventDetail sets the EventDetail field's value.

func (*TrailForLookupEventsOutput) SetEventID

SetEventID sets the EventID field's value.

func (*TrailForLookupEventsOutput) SetEventName

SetEventName sets the EventName field's value.

func (*TrailForLookupEventsOutput) SetEventNameDisplay

SetEventNameDisplay sets the EventNameDisplay field's value.

func (*TrailForLookupEventsOutput) SetEventSource

SetEventSource sets the EventSource field's value.

func (*TrailForLookupEventsOutput) SetEventSourceDisplay

func (s *TrailForLookupEventsOutput) SetEventSourceDisplay(v string) *TrailForLookupEventsOutput

SetEventSourceDisplay sets the EventSourceDisplay field's value.

func (*TrailForLookupEventsOutput) SetEventTime

SetEventTime sets the EventTime field's value.

func (*TrailForLookupEventsOutput) SetRegion

SetRegion sets the Region field's value.

func (*TrailForLookupEventsOutput) SetRelatedResources

SetRelatedResources sets the RelatedResources field's value.

func (*TrailForLookupEventsOutput) SetRequestID

SetRequestID sets the RequestID field's value.

func (*TrailForLookupEventsOutput) SetSourceIPAddress

SetSourceIPAddress sets the SourceIPAddress field's value.

func (*TrailForLookupEventsOutput) SetUserName

SetUserName sets the UserName field's value.

func (TrailForLookupEventsOutput) String

String returns the string representation

Jump to

Keyboard shortcuts

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