// 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 dbmulticloud from "oci-dbmulticloud";
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 dbmulticloud.OracleDBAzureConnectorClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const updateOracleDbAzureConnectorDetails = {
compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
displayName: "EXAMPLE-displayName-Value",
dbClusterResourceId: "ocid1.test.oc1..<unique_ID>EXAMPLE-dbClusterResourceId-Value",
azureIdentityMechanism: dbmulticloud.models.OracleDbAzureConnector.AzureIdentityMechanism.ServicePrincipal,
azureTenantId: "ocid1.test.oc1..<unique_ID>EXAMPLE-azureTenantId-Value",
azureSubscriptionId: "ocid1.test.oc1..<unique_ID>EXAMPLE-azureSubscriptionId-Value",
azureResourceGroup: "EXAMPLE-azureResourceGroup-Value",
accessToken: "EXAMPLE-accessToken-Value",
privateEndpointIpAddress: "EXAMPLE-privateEndpointIpAddress-Value",
privateEndpointDnsAlias: "EXAMPLE-privateEndpointDnsAlias-Value",
freeformTags: {
EXAMPLE_KEY_fNusZ :"EXAMPLE_VALUE_BmAa1O3TAUVMzExF8mb8"
},
definedTags: {
EXAMPLE_KEY_yhOwP :{
EXAMPLE_KEY_vGyMo :"EXAMPLE--Value"
}
},
}
const updateOracleDbAzureConnectorRequest: dbmulticloud.requests.UpdateOracleDbAzureConnectorRequest = {
oracleDbAzureConnectorId: "ocid1.test.oc1..<unique_ID>EXAMPLE-oracleDbAzureConnectorId-Value",
updateOracleDbAzureConnectorDetails: updateOracleDbAzureConnectorDetails,
ifMatch: "EXAMPLE-ifMatch-Value",
opcRequestId: "6P1YVEWWQHKKJEPIQARJ<unique_ID>",
};
// Send request to the Client.
const updateOracleDbAzureConnectorResponse = await client.updateOracleDbAzureConnector(updateOracleDbAzureConnectorRequest);
}
catch (error) {
console.log("updateOracleDbAzureConnector Failed with error " + error);
}
})();