// 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 * as datacatalog from "oci-datacatalog";
import common = require("oci-common");

// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.

const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();

(async () => {
    try {
     // Create a service client
     const client = new datacatalog.DataCatalogClient({ authenticationDetailsProvider: provider });

     // Create a request and dependent object(s).
	const listJobExecutionsRequest: datacatalog.requests.ListJobExecutionsRequest = { 
	catalogId: "ocid1.test.oc1..<unique_ID>EXAMPLE-catalogId-Value",
	jobKey: "EXAMPLE-jobKey-Value",
	lifecycleState: datacatalog.models.JobExecutionState.Canceled,
	timeCreated: new Date("Thu Feb 02 05:04:16 UTC 2040"),
	timeUpdated: new Date("Tue Sep 25 09:52:34 UTC 2046"),
	createdById: "ocid1.test.oc1..<unique_ID>EXAMPLE-createdById-Value",
	updatedById: "ocid1.test.oc1..<unique_ID>EXAMPLE-updatedById-Value",
	jobType: datacatalog.models.JobType.AsyncExportDataAsset,
	subType: "EXAMPLE-subType-Value",
	parentKey: "EXAMPLE-parentKey-Value",
	timeStart: new Date("Sat Jul 30 17:56:40 UTC 2005"),
	timeEnd: new Date("Wed Nov 05 22:31:10 UTC 2014"),
	errorCode: "EXAMPLE-errorCode-Value",
	errorMessage: "EXAMPLE-errorMessage-Value",
	processKey: "EXAMPLE-processKey-Value",
	externalUrl: "EXAMPLE-externalUrl-Value",
	eventKey: "EXAMPLE-eventKey-Value",
	dataEntityKey: "EXAMPLE-dataEntityKey-Value",
	fields: [datacatalog.requests.ListJobExecutionsRequest.Fields.LifecycleState			],
	sortBy: datacatalog.requests.ListJobExecutionsRequest.SortBy.Timecreated,
	sortOrder: datacatalog.requests.ListJobExecutionsRequest.SortOrder.Asc,
	limit: 292,
	page: "EXAMPLE-page-Value",
	opcRequestId: "IM4CC5QM0N3KHRZVF5XV<unique_ID>",

		}; 


     // Send request to the Client.
     const listJobExecutionsResponse = await client.listJobExecutions(listJobExecutionsRequest);
     }
     catch (error) {
         console.log("listJobExecutions Failed with error  " + error);
     }
})();