audit

package
v24.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0, UPL-1.0 Imports: 4 Imported by: 13

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 NewAuditClientWithOboToken

func NewAuditClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client AuditClient, err error)

NewAuditClientWithOboToken Creates a new default Audit client with the given configuration provider. The obotoken will be added to default headers and signed; the configuration provider will be used for the 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 the audit events processed for the specified compartment 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 type of event that happened.
	// The service that produces the event can also add, remove, or change the meaning of a field.
	// A service implementing these type changes would publish a new version of an `eventType` and
	// revise the `eventTypeVersion` field.
	// Example: `com.oraclecloud.ComputeApi.GetInstance`
	EventType *string `mandatory:"false" json:"eventType"`

	// The version of the CloudEvents specification. The structure of the envelope follows the
	// CloudEvents (https://github.com/cloudevents/spec) industry standard format hosted by the
	// Cloud Native Computing Foundation ( CNCF) (https://www.cncf.io/).
	// Audit uses version 0.1 specification of the CloudEvents event envelope.
	// Example: `0.1`
	CloudEventsVersion *string `mandatory:"false" json:"cloudEventsVersion"`

	// The version of the event type. This version applies to the payload of the event, not the envelope.
	// Use `cloudEventsVersion` to determine the version of the envelope.
	// Example: `2.0`
	EventTypeVersion *string `mandatory:"false" json:"eventTypeVersion"`

	// The source of the event.
	// Example: `ComputeApi`
	Source *string `mandatory:"false" json:"source"`

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

	// The time the event occurred, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format.
	// Example: `2019-09-18T00:10:59.252Z`
	EventTime *common.SDKTime `mandatory:"false" json:"eventTime"`

	// The content type of the data contained in `data`.
	// Example: `application/json`
	ContentType *string `mandatory:"false" json:"contentType"`

	Data *Data `mandatory:"false" json:"data"`
}

AuditEvent All the attributes of an audit event. For more information, see Viewing Audit Log Events (https://docs.cloud.oracle.com/iaas/Content/Audit/Tasks/viewinglogevents.htm).

func (AuditEvent) String

func (m AuditEvent) String() string

type Configuration

type Configuration struct {

	// The retention period setting, specified in days. The minimum is 90, the maximum 365.
	// Example: `90`
	RetentionPeriodDays *int `mandatory:"false" json:"retentionPeriodDays"`
}

Configuration The retention period setting, specified in days. For more information, see Setting Audit Log Retention Period (https://docs.cloud.oracle.com/iaas/Content/Audit/Tasks/settingretentionperiod.htm).

func (Configuration) String

func (m Configuration) String() string

type Data

type Data struct {

	// This value links multiple audit events that are part of the same API operation. For example,
	// a long running API operations that emit an event at the start and the end of an operation
	// would use the same value in this field for both events.
	EventGroupingId *string `mandatory:"false" json:"eventGroupingId"`

	// Name of the API operation that generated this event.
	// Example: `GetInstance`
	EventName *string `mandatory:"false" json:"eventName"`

	// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment of the resource
	// emitting the event.
	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.
	// Example: `CompartmentA`
	CompartmentName *string `mandatory:"false" json:"compartmentName"`

	// The name of the resource emitting the event.
	ResourceName *string `mandatory:"false" json:"resourceName"`

	// An OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) or some other ID for the resource
	// emitting the event.
	ResourceId *string `mandatory:"false" json:"resourceId"`

	// The availability domain where the resource resides.
	AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"`

	// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name,
	// type, or namespace. Exists for cross-compatibility only. For more information,
	// see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
	// Example: `{"Department": "Finance"}`
	FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`

	// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more
	// information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
	// Example: `{"Operations": {"CostCenter": "42"}}`
	DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`

	Identity *Identity `mandatory:"false" json:"identity"`

	Request *Request `mandatory:"false" json:"request"`

	Response *Response `mandatory:"false" json:"response"`

	StateChange *StateChange `mandatory:"false" json:"stateChange"`

	// A container object for attribues unique to the resource emitting the event.
	// Example:
	//   -----
	//     {
	//       "imageId": "ocid1.image.oc1.phx.<unique_ID>",
	//       "shape": "VM.Standard1.1",
	//       "type": "CustomerVmi"
	//     }
	//   -----
	AdditionalDetails map[string]interface{} `mandatory:"false" json:"additionalDetails"`
}

Data The payload of the event. Information within `data` comes from the resource emitting the event. Example:

-----
  {
    "eventGroupingId": null,
    "eventName": "GetInstance",
    "compartmentId": "ocid1.tenancy.oc1..<unique_ID>",
    "compartmentName": "compartmentA",
    "resourceName": "my_instance",
    "resourceId": "ocid1.instance.oc1.phx.<unique_ID>",
    "availabilityDomain": "<availability_domain>",
    "freeformTags": null,
    "definedTags": null,
    "identity": {
      "principalName": "ExampleName",
      "principalId": "ocid1.user.oc1..<unique_ID>",
      "authType": "natv",
      "callerName": null,
      "callerId": null,
      "tenantId": "ocid1.tenancy.oc1..<unique_ID>",
      "ipAddress": "172.24.80.88",
      "credentials": null,
      "userAgent": "Jersey/2.23 (HttpUrlConnection 1.8.0_212)",
      "consoleSessionId": null
    },
    "request": {
      "id": "<unique_ID>",
      "path": "/20160918/instances/ocid1.instance.oc1.phx.<unique_ID>",
      "action": "GET",
      "parameters": {},
      "headers": {
        "opc-principal": [
          "{\"tenantId\":\"ocid1.tenancy.oc1..<unique_ID>\",\"subjectId\":\"ocid1.user.oc1..<unique_ID>\",\"claims\":[{\"key\":\"pstype\",\"value\":\"natv\",\"issuer\":\"authService.oracle.com\"},{\"key\":\"h_host\",\"value\":\"iaas.r2.oracleiaas.com\",\"issuer\":\"h\"},{\"key\":\"h_opc-request-id\",\"value\":\"<unique_ID>\",\"issuer\":\"h\"},{\"key\":\"ptype\",\"value\":\"user\",\"issuer\":\"authService.oracle.com\"},{\"key\":\"h_date\",\"value\":\"Wed, 18 Sep 2019 00:10:58 UTC\",\"issuer\":\"h\"},{\"key\":\"h_accept\",\"value\":\"application/json\",\"issuer\":\"h\"},{\"key\":\"authorization\",\"value\":\"Signature headers=\\\"date (request-target) host accept opc-request-id\\\",keyId=\\\"ocid1.tenancy.oc1..<unique_ID>/ocid1.user.oc1..<unique_ID>/8c:b4:5f:18:e7:ec:db:08:b8:fa:d2:2a:7d:11:76:ac\\\",algorithm=\\\"rsa-pss-sha256\\\",signature=\\\"<unique_ID>\\\",version=\\\"1\\\"\",\"issuer\":\"h\"},{\"key\":\"h_(request-target)\",\"value\":\"get /20160918/instances/ocid1.instance.oc1.phx.<unique_ID>\",\"issuer\":\"h\"}]}"
        ],
        "Accept": [
          "application/json"
        ],
        "X-Oracle-Auth-Client-CN": [
          "splat-proxy-se-02302.node.ad2.r2"
        ],
        "X-Forwarded-Host": [
          "compute-api.svc.ad1.r2"
        ],
        "Connection": [
          "close"
        ],
        "User-Agent": [
          "Jersey/2.23 (HttpUrlConnection 1.8.0_212)"
        ],
        "X-Forwarded-For": [
          "172.24.80.88"
        ],
        "X-Real-IP": [
          "172.24.80.88"
        ],
        "oci-original-url": [
          "https://iaas.r2.oracleiaas.com/20160918/instances/ocid1.instance.oc1.phx.<unique_ID>"
        ],
        "opc-request-id": [
          "<unique_ID>"
        ],
        "Date": [
          "Wed, 18 Sep 2019 00:10:58 UTC"
        ]
      }
    },
    "response": {
      "status": "200",
      "responseTime": "2019-09-18T00:10:59.278Z",
      "headers": {
        "ETag": [
          "<unique_ID>"
        ],
        "Connection": [
          "close"
        ],
        "Content-Length": [
          "1828"
        ],
        "opc-request-id": [
          "<unique_ID>"
        ],
        "Date": [
          "Wed, 18 Sep 2019 00:10:59 GMT"
        ],
        "Content-Type": [
          "application/json"
        ]
      },
      "payload": {
        "resourceName": "my_instance",
        "id": "ocid1.instance.oc1.phx.<unique_ID>"
      },
      "message": null
    },
    "stateChange": {
      "previous": null,
      "current": null
    },
    "additionalDetails": {
      "imageId": "ocid1.image.oc1.phx.<unique_ID>",
      "shape": "VM.Standard1.1",
      "type": "CustomerVmi"
    }
  }
-----

func (Data) String

func (m Data) 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 Identity

type Identity struct {

	// The name of the user or service. This value is the friendly name associated with `principalId`.
	// Example: `ExampleName`
	PrincipalName *string `mandatory:"false" json:"principalName"`

	// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the principal.
	PrincipalId *string `mandatory:"false" json:"principalId"`

	// The type of authentication used.
	// Example: `natv`
	AuthType *string `mandatory:"false" json:"authType"`

	// The name of the user or service. This value is the friendly name associated with `callerId`.
	CallerName *string `mandatory:"false" json:"callerName"`

	// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the caller. The caller that made a
	// request on behalf of the prinicpal.
	CallerId *string `mandatory:"false" json:"callerId"`

	// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the tenant.
	TenantId *string `mandatory:"false" json:"tenantId"`

	// The IP address of the source of the request.
	// Example: `172.24.80.88`
	IpAddress *string `mandatory:"false" json:"ipAddress"`

	// 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 (/).
	Credentials *string `mandatory:"false" json:"credentials"`

	// The user agent of the client that made the request.
	// Example: `Jersey/2.23 (HttpUrlConnection 1.8.0_212)`
	UserAgent *string `mandatory:"false" json:"userAgent"`

	// This value identifies any Console session associated with this request.
	ConsoleSessionId *string `mandatory:"false" json:"consoleSessionId"`
}

Identity A container object for identity attributes. Example:

-----
  {
    "principalName": "ExampleName",
    "principalId": "ocid1.user.oc1..<unique_ID>",
    "authType": "natv",
    "callerName": null,
    "callerId": null,
    "tenantId": "ocid1.tenancy.oc1..<unique_ID>",
    "ipAddress": "172.24.80.88",
    "credentials": null,
    "userAgent": "Jersey/2.23 (HttpUrlConnection 1.8.0_212)",
    "consoleSessionId": null
  }
-----

func (Identity) String

func (m Identity) String() string

type ListEventsRequest

type ListEventsRequest struct {

	// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) 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"`

	// For list pagination. The value of the `opc-next-page` response header from the previous "List" call.
	// For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
	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. For important
	// details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
	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 Request

type Request struct {

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

	// The full path of the API request.
	// Example: `/20160918/instances/ocid1.instance.oc1.phx.<unique_ID>`
	Path *string `mandatory:"false" json:"path"`

	// The HTTP method of the request.
	// Example: `GET`
	Action *string `mandatory:"false" json:"action"`

	// The parameters supplied by the caller during this operation.
	Parameters map[string][]string `mandatory:"false" json:"parameters"`

	// The HTTP header fields and values in the request.
	// Example:
	//   -----
	//     {
	//       "opc-principal": [
	//         "{\"tenantId\":\"ocid1.tenancy.oc1..<unique_ID>\",\"subjectId\":\"ocid1.user.oc1..<unique_ID>\",\"claims\":[{\"key\":\"pstype\",\"value\":\"natv\",\"issuer\":\"authService.oracle.com\"},{\"key\":\"h_host\",\"value\":\"iaas.r2.oracleiaas.com\",\"issuer\":\"h\"},{\"key\":\"h_opc-request-id\",\"value\":\"<unique_ID>\",\"issuer\":\"h\"},{\"key\":\"ptype\",\"value\":\"user\",\"issuer\":\"authService.oracle.com\"},{\"key\":\"h_date\",\"value\":\"Wed, 18 Sep 2019 00:10:58 UTC\",\"issuer\":\"h\"},{\"key\":\"h_accept\",\"value\":\"application/json\",\"issuer\":\"h\"},{\"key\":\"authorization\",\"value\":\"Signature headers=\\\"date (request-target) host accept opc-request-id\\\",keyId=\\\"ocid1.tenancy.oc1..<unique_ID>/ocid1.user.oc1..<unique_ID>/8c:b4:5f:18:e7:ec:db:08:b8:fa:d2:2a:7d:11:76:ac\\\",algorithm=\\\"rsa-pss-sha256\\\",signature=\\\"<unique_ID>\\\",version=\\\"1\\\"\",\"issuer\":\"h\"},{\"key\":\"h_(request-target)\",\"value\":\"get /20160918/instances/ocid1.instance.oc1.phx.<unique_ID>\",\"issuer\":\"h\"}]}"
	//       ],
	//       "Accept": [
	//         "application/json"
	//       ],
	//       "X-Oracle-Auth-Client-CN": [
	//         "splat-proxy-se-02302.node.ad2.r2"
	//       ],
	//       "X-Forwarded-Host": [
	//         "compute-api.svc.ad1.r2"
	//       ],
	//       "Connection": [
	//         "close"
	//       ],
	//       "User-Agent": [
	//         "Jersey/2.23 (HttpUrlConnection 1.8.0_212)"
	//       ],
	//       "X-Forwarded-For": [
	//         "172.24.80.88"
	//       ],
	//       "X-Real-IP": [
	//         "172.24.80.88"
	//       ],
	//       "oci-original-url": [
	//         "https://iaas.r2.oracleiaas.com/20160918/instances/ocid1.instance.oc1.phx.<unique_ID>"
	//       ],
	//       "opc-request-id": [
	//         "<unique_ID>"
	//       ],
	//       "Date": [
	//         "Wed, 18 Sep 2019 00:10:58 UTC"
	//       ]
	//     }
	//   -----
	Headers map[string][]string `mandatory:"false" json:"headers"`
}

Request A container object for request attributes. Example:

-----
  {
    "id": "<unique_ID>",
    "path": "/20160918/instances/ocid1.instance.oc1.phx.<unique_ID>",
    "action": "GET",
    "parameters": {},
    "headers": {
      "opc-principal": [
        "{\"tenantId\":\"ocid1.tenancy.oc1..<unique_ID>\",\"subjectId\":\"ocid1.user.oc1..<unique_ID>\",\"claims\":[{\"key\":\"pstype\",\"value\":\"natv\",\"issuer\":\"authService.oracle.com\"},{\"key\":\"h_host\",\"value\":\"iaas.r2.oracleiaas.com\",\"issuer\":\"h\"},{\"key\":\"h_opc-request-id\",\"value\":\"<unique_ID>\",\"issuer\":\"h\"},{\"key\":\"ptype\",\"value\":\"user\",\"issuer\":\"authService.oracle.com\"},{\"key\":\"h_date\",\"value\":\"Wed, 18 Sep 2019 00:10:58 UTC\",\"issuer\":\"h\"},{\"key\":\"h_accept\",\"value\":\"application/json\",\"issuer\":\"h\"},{\"key\":\"authorization\",\"value\":\"Signature headers=\\\"date (request-target) host accept opc-request-id\\\",keyId=\\\"ocid1.tenancy.oc1..<unique_ID>/ocid1.user.oc1..<unique_ID>/8c:b4:5f:18:e7:ec:db:08:b8:fa:d2:2a:7d:11:76:ac\\\",algorithm=\\\"rsa-pss-sha256\\\",signature=\\\"<unique_ID>\\\",version=\\\"1\\\"\",\"issuer\":\"h\"},{\"key\":\"h_(request-target)\",\"value\":\"get /20160918/instances/ocid1.instance.oc1.phx.<unique_ID>\",\"issuer\":\"h\"}]}"
      ],
      "Accept": [
        "application/json"
      ],
      "X-Oracle-Auth-Client-CN": [
        "splat-proxy-se-02302.node.ad2.r2"
      ],
      "X-Forwarded-Host": [
        "compute-api.svc.ad1.r2"
      ],
      "Connection": [
        "close"
      ],
      "User-Agent": [
        "Jersey/2.23 (HttpUrlConnection 1.8.0_212)"
      ],
      "X-Forwarded-For": [
        "172.24.80.88"
      ],
      "X-Real-IP": [
        "172.24.80.88"
      ],
      "oci-original-url": [
        "https://iaas.r2.oracleiaas.com/20160918/instances/ocid1.instance.oc1.phx.<unique_ID>"
      ],
      "opc-request-id": [
        "<unique_ID>"
      ],
      "Date": [
        "Wed, 18 Sep 2019 00:10:58 UTC"
      ]
    }
  }
-----

func (Request) String

func (m Request) String() string

type Response

type Response struct {

	// The status code of the response.
	// Example: `200`
	Status *string `mandatory:"false" json:"status"`

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

	// The headers of the response.
	// Example:
	//   -----
	//     {
	//       "ETag": [
	//         "<unique_ID>"
	//       ],
	//       "Connection": [
	//         "close"
	//       ],
	//       "Content-Length": [
	//         "1828"
	//       ],
	//       "opc-request-id": [
	//         "<unique_ID>"
	//       ],
	//       "Date": [
	//         "Wed, 18 Sep 2019 00:10:59 GMT"
	//       ],
	//       "Content-Type": [
	//         "application/json"
	//       ]
	//     }
	//   -----
	Headers map[string][]string `mandatory:"false" json:"headers"`

	// This value is included for backward compatibility with the Audit version 1 schema, where
	// it contained metadata of interest from the response payload.
	// Example:
	//   -----
	//     {
	//       "resourceName": "my_instance",
	//       "id": "ocid1.instance.oc1.phx.<unique_ID>"
	//     }
	//   -----
	Payload map[string]interface{} `mandatory:"false" json:"payload"`

	// A friendly description of what happened during the operation. Use this for troubleshooting.
	Message *string `mandatory:"false" json:"message"`
}

Response A container object for response attributes. Example:

-----
  {
    "status": "200",
    "responseTime": "2019-09-18T00:10:59.278Z",
    "headers": {
      "ETag": [
        "<unique_ID>"
      ],
      "Connection": [
        "close"
      ],
      "Content-Length": [
        "1828"
      ],
      "opc-request-id": [
        "<unique_ID>"
      ],
      "Date": [
        "Wed, 18 Sep 2019 00:10:59 GMT"
      ],
      "Content-Type": [
        "application/json"
      ]
    },
    "payload": {
      "resourceName": "my_instance",
      "id": "ocid1.instance.oc1.phx.<unique_ID>"
    },
    "message": null
  }
-----

func (Response) String

func (m Response) String() string

type StateChange

type StateChange struct {

	// Provides the previous state of fields that may have changed during an operation. To determine
	// how the current operation changed a resource, compare the information in this attribute to
	// `current`.
	Previous map[string]interface{} `mandatory:"false" json:"previous"`

	// Provides the current state of fields that may have changed during an operation. To determine
	// how the current operation changed a resource, compare the information in this attribute to
	// `previous`.
	Current map[string]interface{} `mandatory:"false" json:"current"`
}

StateChange A container object for state change attributes. Example:

-----
  {
    "previous": null,
    "current": null
  }
-----

func (StateChange) String

func (m StateChange) String() string

type UpdateConfigurationDetails

type UpdateConfigurationDetails struct {

	// The retention period setting, specified in days. The minimum is 90, the maximum 365.
	// Example: `90`
	RetentionPeriodDays *int `mandatory:"true" json:"retentionPeriodDays"`
}

UpdateConfigurationDetails The configuration details for the retention period setting, specified in days. For more information, see Setting Audit Log Retention Period (https://docs.cloud.oracle.com/iaas/Content/Audit/Tasks/settingretentionperiod.htm).

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"`

	// 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

Jump to

Keyboard shortcuts

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