Documentation ¶
Index ¶
- type AuditClient
- func (client *AuditClient) ConfigurationProvider() *common.ConfigurationProvider
- func (client AuditClient) GetConfiguration(ctx context.Context, request GetConfigurationRequest) (response GetConfigurationResponse, err error)
- func (client AuditClient) ListEvents(ctx context.Context, request ListEventsRequest) (response ListEventsResponse, err error)
- func (client *AuditClient) SetRegion(region string)
- func (client AuditClient) UpdateConfiguration(ctx context.Context, request UpdateConfigurationRequest) (response UpdateConfigurationResponse, err error)
- type AuditEvent
- type Configuration
- type GetConfigurationRequest
- type GetConfigurationResponse
- type ListEventsRequest
- type ListEventsResponse
- type UpdateConfigurationDetails
- type UpdateConfigurationRequest
- type UpdateConfigurationResponse
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 name of the compartment. This value is the friendly name associated with compartmentId. // This value can change, but the service logs the value that appeared at the time of the audit event. CompartmentName *string `mandatory:"false" json:"compartmentName"` // The GUID of the event. EventId *string `mandatory:"false" json:"eventId"` // The name of the event. // Example: `LaunchInstance` EventName *string `mandatory:"false" json:"eventName"` // 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"` // The name of the user or service. This value is the friendly name associated with principalId. UserName *string `mandatory:"false" json:"userName"` }
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"` // 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"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata }
GetConfigurationRequest wrapper for the GetConfiguration operation
func (GetConfigurationRequest) HTTPRequest ¶ added in v1.3.0
func (request GetConfigurationRequest) HTTPRequest(method, path string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (GetConfigurationRequest) RetryPolicy ¶ added in v1.3.0
func (request GetConfigurationRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
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) HTTPResponse ¶ added in v1.3.0
func (response GetConfigurationResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
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"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata }
ListEventsRequest wrapper for the ListEvents operation
func (ListEventsRequest) HTTPRequest ¶ added in v1.3.0
func (request ListEventsRequest) HTTPRequest(method, path string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (ListEventsRequest) RetryPolicy ¶ added in v1.3.0
func (request ListEventsRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (ListEventsRequest) String ¶
func (request ListEventsRequest) String() string
type ListEventsResponse ¶
type ListEventsResponse struct { // The underlying http response RawResponse *http.Response // A list of []AuditEvent instances 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) HTTPResponse ¶ added in v1.3.0
func (response ListEventsResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
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 ¶
func (m UpdateConfigurationDetails) String() 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"` // 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"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata }
UpdateConfigurationRequest wrapper for the UpdateConfiguration operation
func (UpdateConfigurationRequest) HTTPRequest ¶ added in v1.3.0
func (request UpdateConfigurationRequest) HTTPRequest(method, path string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (UpdateConfigurationRequest) RetryPolicy ¶ added in v1.3.0
func (request UpdateConfigurationRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
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.cloud.oracle.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) HTTPResponse ¶ added in v1.3.0
func (response UpdateConfigurationResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
func (UpdateConfigurationResponse) String ¶
func (response UpdateConfigurationResponse) String() string