# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).
require 'oci'
# Create a default config using DEFAULT profile in default location
# Refer to https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File for more info
config = OCI::ConfigFileLoader.load_config
# Initialize service client with default config file
log_analytics_client = OCI::LogAnalytics::LogAnalyticsClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
validate_endpoint_response =
log_analytics_client.validate_endpoint(
'EXAMPLE-namespaceName-Value',
OCI::LogAnalytics::Models::LogListTypeEndpoint.new(
endpoint_type: 'LOG_LIST',
list_endpoint:
OCI::LogAnalytics::Models::LogListEndpoint.new(
name: 'EXAMPLE-name-Value',
request:
OCI::LogAnalytics::Models::EndpointRequest.new(
url: 'EXAMPLE-url-Value',
method: 'GET',
content_type: 'EXAMPLE-contentType-Value',
payload: 'EXAMPLE-payload-Value',
headers: [
OCI::LogAnalytics::Models::NameValuePair.new(
name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
)
],
form_parameters: [
OCI::LogAnalytics::Models::NameValuePair.new(
name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
)
]
),
description: 'EXAMPLE-description-Value',
model: 'EXAMPLE-model-Value',
endpoint_id: 672,
response:
OCI::LogAnalytics::Models::EndpointResponse.new(
content_type: 'EXAMPLE-contentType-Value',
example: 'EXAMPLE-example-Value'
),
credentials:
OCI::LogAnalytics::Models::EndpointCredentials.new(
credential_type: 'DYNAMIC_TOKEN',
credential_name: 'EXAMPLE-credentialName-Value',
credential_endpoint:
OCI::LogAnalytics::Models::CredentialEndpoint.new(
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
model: 'EXAMPLE-model-Value',
endpoint_id: 518,
response:
OCI::LogAnalytics::Models::EndpointResponse.new(
content_type: 'EXAMPLE-contentType-Value',
example: 'EXAMPLE-example-Value'
),
proxy:
OCI::LogAnalytics::Models::EndpointProxy.new(
url: 'EXAMPLE-url-Value',
credential_name: 'EXAMPLE-credentialName-Value',
credential_type: 'NONE'
)
)
),
proxy:
OCI::LogAnalytics::Models::EndpointProxy.new(
url: 'EXAMPLE-url-Value',
credential_name: 'EXAMPLE-credentialName-Value',
credential_type: 'TOKEN'
),
is_enabled: true,
is_system: true,
endpoint_properties: [
OCI::LogAnalytics::Models::LogAnalyticsProperty.new(
name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
)
]
),
log_endpoints: [
OCI::LogAnalytics::Models::LogEndpoint.new(
name: 'EXAMPLE-name-Value',
request:
OCI::LogAnalytics::Models::EndpointRequest.new(
url: 'EXAMPLE-url-Value',
method: 'GET',
content_type: 'EXAMPLE-contentType-Value',
payload: 'EXAMPLE-payload-Value',
headers: [
OCI::LogAnalytics::Models::NameValuePair.new(
name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
)
],
form_parameters: [
OCI::LogAnalytics::Models::NameValuePair.new(
name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
)
]
),
description: 'EXAMPLE-description-Value',
model: 'EXAMPLE-model-Value',
endpoint_id: 413,
response:
OCI::LogAnalytics::Models::EndpointResponse.new(
content_type: 'EXAMPLE-contentType-Value',
example: 'EXAMPLE-example-Value'
),
credentials:
OCI::LogAnalytics::Models::EndpointCredentials.new(
credential_type: 'NONE',
credential_name: 'EXAMPLE-credentialName-Value',
credential_endpoint:
OCI::LogAnalytics::Models::CredentialEndpoint.new(
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
model: 'EXAMPLE-model-Value',
endpoint_id: 693,
response:
OCI::LogAnalytics::Models::EndpointResponse.new(
content_type: 'EXAMPLE-contentType-Value',
example: 'EXAMPLE-example-Value'
),
proxy:
OCI::LogAnalytics::Models::EndpointProxy.new(
url: 'EXAMPLE-url-Value',
credential_name: 'EXAMPLE-credentialName-Value',
credential_type: 'NONE'
)
)
),
proxy:
OCI::LogAnalytics::Models::EndpointProxy.new(
url: 'EXAMPLE-url-Value',
credential_name: 'EXAMPLE-credentialName-Value',
credential_type: 'BASIC_AUTH'
),
is_enabled: true,
is_system: false,
endpoint_properties: [
OCI::LogAnalytics::Models::LogAnalyticsProperty.new(
name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
)
]
)
]
)
)
# Get the data from response
puts "#{validate_endpoint_response.data}"