audit

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2018 License: Apache-2.0, UPL-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditClient

type AuditClient struct {
	common.BaseClient
	// contains filtered or unexported fields
}

AuditClient a client for Audit

func NewAuditClientWithConfigurationProvider

func NewAuditClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client AuditClient, err error)

NewAuditClientWithConfigurationProvider Creates a new default Audit client with the given configuration provider. the configuration provider will be used for the default signer as well as reading the region

func (*AuditClient) ConfigurationProvider

func (client *AuditClient) ConfigurationProvider() *common.ConfigurationProvider

ConfigurationProvider the ConfigurationProvider used in this client, or null if none set

func (AuditClient) GetConfiguration

func (client AuditClient) GetConfiguration(ctx context.Context, request GetConfigurationRequest) (response GetConfigurationResponse, err error)

GetConfiguration Get the configuration

func (AuditClient) ListEvents

func (client AuditClient) ListEvents(ctx context.Context, request ListEventsRequest) (response ListEventsResponse, err error)

ListEvents Returns all audit events for the specified compartment that were processed within the specified time range.

func (*AuditClient) SetRegion

func (client *AuditClient) SetRegion(region string)

SetRegion overrides the region of this client.

func (AuditClient) UpdateConfiguration

func (client AuditClient) UpdateConfiguration(ctx context.Context, request UpdateConfigurationRequest) (response UpdateConfigurationResponse, err error)

UpdateConfiguration Update the configuration

type AuditEvent

type AuditEvent struct {

	// The OCID of the tenant.
	TenantId *string `mandatory:"false" json:"tenantId"`

	// The OCID of the compartment.
	CompartmentId *string `mandatory:"false" json:"compartmentId"`

	// The GUID of the event.
	EventId *string `mandatory:"false" json:"eventId"`

	// The source of the event.
	EventSource *string `mandatory:"false" json:"eventSource"`

	// The type of the event.
	EventType *string `mandatory:"false" json:"eventType"`

	// The time the event occurred, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format.
	EventTime *common.SDKTime `mandatory:"false" json:"eventTime"`

	// The OCID of the user whose action triggered the event.
	PrincipalId *string `mandatory:"false" json:"principalId"`

	// The credential ID of the user. This value is extracted from the HTTP 'Authorization' request header. It consists of the tenantId, userId, and user fingerprint, all delimited by a slash (/).
	CredentialId *string `mandatory:"false" json:"credentialId"`

	// The HTTP method of the request.
	RequestAction *string `mandatory:"false" json:"requestAction"`

	// The opc-request-id of the request.
	RequestId *string `mandatory:"false" json:"requestId"`

	// The user agent of the client that made the request.
	RequestAgent *string `mandatory:"false" json:"requestAgent"`

	// The HTTP header fields and values in the request.
	RequestHeaders map[string][]string `mandatory:"false" json:"requestHeaders"`

	// The IP address of the source of the request.
	RequestOrigin *string `mandatory:"false" json:"requestOrigin"`

	// The query parameter fields and values for the request.
	RequestParameters map[string][]string `mandatory:"false" json:"requestParameters"`

	// The resource targeted by the request.
	RequestResource *string `mandatory:"false" json:"requestResource"`

	// The headers of the response.
	ResponseHeaders map[string][]string `mandatory:"false" json:"responseHeaders"`

	// The status code of the response.
	ResponseStatus *string `mandatory:"false" json:"responseStatus"`

	// The time of the response to the audited request, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format.
	ResponseTime *common.SDKTime `mandatory:"false" json:"responseTime"`

	// Metadata of interest from the response payload. For example, the OCID of a resource.
	ResponsePayload map[string]interface{} `mandatory:"false" json:"responsePayload"`
}

AuditEvent The representation of AuditEvent

func (AuditEvent) String

func (m AuditEvent) String() string

type Configuration

type Configuration struct {

	// The retention period days
	RetentionPeriodDays *int `mandatory:"false" json:"retentionPeriodDays"`
}

Configuration The representation of Configuration

func (Configuration) String

func (m Configuration) String() string

type GetConfigurationRequest

type GetConfigurationRequest struct {

	// ID of the root compartment (tenancy)
	CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
}

GetConfigurationRequest wrapper for the GetConfiguration operation

func (GetConfigurationRequest) String

func (request GetConfigurationRequest) String() string

type GetConfigurationResponse

type GetConfigurationResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// The Configuration instance
	Configuration `presentIn:"body"`
}

GetConfigurationResponse wrapper for the GetConfiguration operation

func (GetConfigurationResponse) String

func (response GetConfigurationResponse) String() string

type ListEventsRequest

type ListEventsRequest struct {

	// The OCID of the compartment.
	CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`

	// Returns events that were processed at or after this start date and time, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format.
	// For example, a start value of `2017-01-15T11:30:00Z` will retrieve a list of all events processed since 30 minutes after the 11th hour of January 15, 2017, in Coordinated Universal Time (UTC).
	// You can specify a value with granularity to the minute. Seconds (and milliseconds, if included) must be set to `0`.
	StartTime *common.SDKTime `mandatory:"true" contributesTo:"query" name:"startTime"`

	// Returns events that were processed before this end date and time, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. For example, a start value of `2017-01-01T00:00:00Z` and an end value of `2017-01-02T00:00:00Z` will retrieve a list of all events processed on January 1, 2017.
	// Similarly, a start value of `2017-01-01T00:00:00Z` and an end value of `2017-02-01T00:00:00Z` will result in a list of all events processed between January 1, 2017 and January 31, 2017.
	// You can specify a value with granularity to the minute. Seconds (and milliseconds, if included) must be set to `0`.
	EndTime *common.SDKTime `mandatory:"true" contributesTo:"query" name:"endTime"`

	// The value of the `opc-next-page` response header from the previous list query.
	Page *string `mandatory:"false" contributesTo:"query" name:"page"`

	// Unique Oracle-assigned identifier for the request.
	// If you need to contact Oracle about a particular request, please provide the request ID.
	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
}

ListEventsRequest wrapper for the ListEvents operation

func (ListEventsRequest) String

func (request ListEventsRequest) String() string

type ListEventsResponse

type ListEventsResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// The []AuditEvent instance
	Items []AuditEvent `presentIn:"body"`

	// For pagination of a list of audit events. When this header appears in the response,
	// it means you received a partial list and there are more results.
	// Include this value as the `page` parameter for the subsequent ListEvents request to get the next batch of events.
	OpcNextPage *string `presentIn:"header" name:"opc-next-page"`

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
	// a particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
}

ListEventsResponse wrapper for the ListEvents operation

func (ListEventsResponse) String

func (response ListEventsResponse) String() string

type UpdateConfigurationDetails

type UpdateConfigurationDetails struct {

	// The retention period days
	RetentionPeriodDays *int `mandatory:"false" json:"retentionPeriodDays"`
}

UpdateConfigurationDetails The representation of UpdateConfigurationDetails

func (UpdateConfigurationDetails) String

type UpdateConfigurationRequest

type UpdateConfigurationRequest struct {

	// ID of the root compartment (tenancy)
	CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`

	// The configuration properties
	UpdateConfigurationDetails `contributesTo:"body"`
}

UpdateConfigurationRequest wrapper for the UpdateConfiguration operation

func (UpdateConfigurationRequest) String

func (request UpdateConfigurationRequest) String() string

type UpdateConfigurationResponse

type UpdateConfigurationResponse struct {

	// The underlying http response
	RawResponse *http.Response

	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
	// particular request, please provide the request ID.
	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`

	// The OCID (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request.
	OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
}

UpdateConfigurationResponse wrapper for the UpdateConfiguration operation

func (UpdateConfigurationResponse) String

func (response UpdateConfigurationResponse) String() string

Jump to

Keyboard shortcuts

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