# 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).
import 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.config.from_file()
# Initialize service client with default config file
log_analytics_client = oci.log_analytics.LogAnalyticsClient(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(
namespace_name="EXAMPLE-namespaceName-Value",
validate_endpoint_details=oci.log_analytics.models.LogListTypeEndpoint(
endpoint_type="LOG_LIST",
list_endpoint=oci.log_analytics.models.LogListEndpoint(
name="EXAMPLE-name-Value",
request=oci.log_analytics.models.EndpointRequest(
url="EXAMPLE-url-Value",
method="GET",
content_type="EXAMPLE-contentType-Value",
payload="EXAMPLE-payload-Value",
headers=[
oci.log_analytics.models.NameValuePair(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
form_parameters=[
oci.log_analytics.models.NameValuePair(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")]),
description="EXAMPLE-description-Value",
model="EXAMPLE-model-Value",
endpoint_id=65,
response=oci.log_analytics.models.EndpointResponse(
content_type="EXAMPLE-contentType-Value",
example="EXAMPLE-example-Value"),
credentials=oci.log_analytics.models.EndpointCredentials(
credential_type="STATIC_TOKEN",
credential_name="EXAMPLE-credentialName-Value",
credential_endpoint=oci.log_analytics.models.CredentialEndpoint(
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
model="EXAMPLE-model-Value",
endpoint_id=39,
response=oci.log_analytics.models.EndpointResponse(
content_type="EXAMPLE-contentType-Value",
example="EXAMPLE-example-Value"),
proxy=oci.log_analytics.models.EndpointProxy(
url="EXAMPLE-url-Value",
credential_name="EXAMPLE-credentialName-Value",
credential_type="NONE"))),
proxy=oci.log_analytics.models.EndpointProxy(
url="EXAMPLE-url-Value",
credential_name="EXAMPLE-credentialName-Value",
credential_type="BASIC_AUTH"),
is_enabled=False,
is_system=False,
endpoint_properties=[
oci.log_analytics.models.LogAnalyticsProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")]),
log_endpoints=[
oci.log_analytics.models.LogEndpoint(
name="EXAMPLE-name-Value",
request=oci.log_analytics.models.EndpointRequest(
url="EXAMPLE-url-Value",
method="POST",
content_type="EXAMPLE-contentType-Value",
payload="EXAMPLE-payload-Value",
headers=[
oci.log_analytics.models.NameValuePair(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
form_parameters=[
oci.log_analytics.models.NameValuePair(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")]),
description="EXAMPLE-description-Value",
model="EXAMPLE-model-Value",
endpoint_id=253,
response=oci.log_analytics.models.EndpointResponse(
content_type="EXAMPLE-contentType-Value",
example="EXAMPLE-example-Value"),
credentials=oci.log_analytics.models.EndpointCredentials(
credential_type="STATIC_TOKEN",
credential_name="EXAMPLE-credentialName-Value",
credential_endpoint=oci.log_analytics.models.CredentialEndpoint(
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
model="EXAMPLE-model-Value",
endpoint_id=512,
response=oci.log_analytics.models.EndpointResponse(
content_type="EXAMPLE-contentType-Value",
example="EXAMPLE-example-Value"),
proxy=oci.log_analytics.models.EndpointProxy(
url="EXAMPLE-url-Value",
credential_name="EXAMPLE-credentialName-Value",
credential_type="BASIC_AUTH"))),
proxy=oci.log_analytics.models.EndpointProxy(
url="EXAMPLE-url-Value",
credential_name="EXAMPLE-credentialName-Value",
credential_type="NONE"),
is_enabled=True,
is_system=True,
endpoint_properties=[
oci.log_analytics.models.LogAnalyticsProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")])]),
opc_request_id="R8JTEDRXQ8ATA4M4PPBC<unique_ID>")
# Get the data from response
print(validate_endpoint_response.data)