// 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 dataintegration from "oci-dataintegration";
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 dataintegration.DataIntegrationClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const updateTaskScheduleDetails = {
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
modelType: "EXAMPLE-modelType-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value",
objectVersion: 672,
objectStatus: 133,
identifier: "EXAMPLE-identifier-Value",
scheduleRef: {
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
modelType: "EXAMPLE-modelType-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value",
objectVersion: 550,
objectStatus: 6,
identifier: "EXAMPLE-identifier-Value",
frequencyDetails: {
modelType: "HOURLY", interval: 478,
time: {
hour: 11,
minute: 3,
second: 37,
}
,
frequency: dataintegration.models.AbstractFrequencyDetails.Frequency.Weekly
}
,
timezone: "EXAMPLE-timezone-Value",
isDaylightAdjustmentEnabled: false,
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Fri Jan 11 05:36:58 UTC 2030"),
timeUpdated: new Date("Tue Aug 25 15:47:32 UTC 2026"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value",
}
,
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_C1eSf :"EXAMPLE_VALUE_1P4xiYLk6RLB6h9bzMkC"
},
registryVersion: 463,
labels: ["EXAMPLE--Value" ],
isFavorite: true,
countStatistics: {
objectTypeCountList: [{
objectType: dataintegration.models.CountStatisticSummary.ObjectType.Task,
objectCount: 287,
}
],
}
,
}
,
}
,
isEnabled: false,
numberOfRetries: 492,
retryDelay: 7094.032,
retryDelayUnit: dataintegration.models.UpdateTaskScheduleDetails.RetryDelayUnit.Hours,
startTimeMillis: 339,
endTimeMillis: 424,
isConcurrentAllowed: false,
isBackfillEnabled: true,
authMode: dataintegration.models.UpdateTaskScheduleDetails.AuthMode.UserCertificate,
expectedDuration: 9053.179,
expectedDurationUnit: dataintegration.models.UpdateTaskScheduleDetails.ExpectedDurationUnit.Hours,
registryMetadata: {
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
labels: ["EXAMPLE--Value" ],
registryVersion: 59,
key: "EXAMPLE-key-Value",
isFavorite: false,
}
,
}
const updateTaskScheduleRequest: dataintegration.requests.UpdateTaskScheduleRequest = {
workspaceId: "ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
applicationKey: "EXAMPLE-applicationKey-Value",
taskScheduleKey: "EXAMPLE-taskScheduleKey-Value",
updateTaskScheduleDetails: updateTaskScheduleDetails,
ifMatch: "EXAMPLE-ifMatch-Value",
opcRequestId: "4IWROPL8BNEZREVSIQUZ<unique_ID>",
};
// Send request to the Client.
const updateTaskScheduleResponse = await client.updateTaskSchedule(updateTaskScheduleRequest);
}
catch (error) {
console.log("updateTaskSchedule Failed with error " + error);
}
})();