// 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 goldengate from "oci-goldengate";
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 goldengate.GoldenGateClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const updateDeploymentDetails = {
displayName: "EXAMPLE-displayName-Value",
licenseModel: goldengate.models.LicenseModel.LicenseIncluded,
isByolCpuCoreCountLimitEnabled: false,
byolCpuCoreCountLimit: 317,
environmentType: goldengate.models.EnvironmentType.Production,
description: "EXAMPLE-description-Value",
freeformTags: {
EXAMPLE_KEY_5sBNO :"EXAMPLE_VALUE_rouq24i6dYusDdYFH8iu"
},
definedTags: {
EXAMPLE_KEY_r1UG0 :{
EXAMPLE_KEY_pGkAR :"EXAMPLE--Value"
}
},
nsgIds: ["EXAMPLE--Value" ],
subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
loadBalancerSubnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-loadBalancerSubnetId-Value",
isPublic: false,
fqdn: "EXAMPLE-fqdn-Value",
cpuCoreCount: 13,
isAutoScalingEnabled: false,
placements: [{
availabilityDomain: "EXAMPLE-availabilityDomain-Value",
faultDomain: "EXAMPLE-faultDomain-Value",
}
],
securityAttributes: {
EXAMPLE_KEY_Jesjw :{
EXAMPLE_KEY_vfLZt :"EXAMPLE--Value"
}
},
oggData: {
credentialStore: goldengate.models.CredentialStore.Goldengate,
identityDomainId: "ocid1.test.oc1..<unique_ID>EXAMPLE-identityDomainId-Value",
passwordSecretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-passwordSecretId-Value",
adminUsername: "EXAMPLE-adminUsername-Value",
adminPassword: "EXAMPLE-adminPassword-Value",
certificate: "EXAMPLE-certificate-Value",
key: "EXAMPLE-key-Value",
groupToRolesMapping: {
securityGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-securityGroupId-Value",
administratorGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-administratorGroupId-Value",
operatorGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-operatorGroupId-Value",
userGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-userGroupId-Value",
}
,
}
,
maintenanceWindow: {
day: goldengate.models.Day.Monday,
startHour: 16,
}
,
maintenanceConfiguration: {
isInterimReleaseAutoUpgradeEnabled: false,
interimReleaseUpgradePeriodInDays: 490,
bundleReleaseUpgradePeriodInDays: 691,
majorReleaseUpgradePeriodInDays: 768,
securityPatchUpgradePeriodInDays: 594,
}
,
backupSchedule: {
timeBackupScheduled: new Date("Fri Apr 21 12:18:48 UTC 2000"),
frequencyBackupScheduled: goldengate.models.UpdateBackupScheduleDetails.FrequencyBackupScheduled.Daily,
bucketName: "EXAMPLE-bucketName-Value",
compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
namespaceName: "EXAMPLE-namespaceName-Value",
isMetadataOnly: false,
}
,
}
const updateDeploymentRequest: goldengate.requests.UpdateDeploymentRequest = {
deploymentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-deploymentId-Value",
updateDeploymentDetails: updateDeploymentDetails,
ifMatch: "EXAMPLE-ifMatch-Value",
opcRequestId: "JFNDQI6SS2YQ1XLXHUQ3<unique_ID>",
isLockOverride: false,
};
// Send request to the Client.
const updateDeploymentResponse = await client.updateDeployment(updateDeploymentRequest);
}
catch (error) {
console.log("updateDeployment Failed with error " + error);
}
})();