// 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).
package main
import (
"context"
"fmt"
"time"
"github.com/oracle/oci-go-sdk/v65/common"
"github.com/oracle/oci-go-sdk/v65/dataintegration"
"github.com/oracle/oci-go-sdk/v65/example/helpers"
)
func ExampleUpdateExternalPublication() {
// 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.
client, err := dataintegration.NewDataIntegrationClientWithConfigurationProvider(common.DefaultConfigProvider())
helpers.FatalIfError(err)
// Create a request and dependent object(s).
var defaultValue interface{}
defaultValue = "EXAMPLE-defaultValue-Value"
req := dataintegration.UpdateExternalPublicationRequest{ExternalPublicationsKey: common.String("EXAMPLE-externalPublicationsKey-Value"),
IfMatch: common.String("EXAMPLE-ifMatch-Value"),
OpcRequestId: common.String("MWWNOISTGWPG2XSPOJGA<unique_ID>"),
TaskKey: common.String("EXAMPLE-taskKey-Value"),
UpdateExternalPublicationDetails: dataintegration.UpdateExternalPublicationDetails{DisplayName: common.String("EXAMPLE-displayName-Value"),
ResourceConfiguration: &dataintegration.ResourceConfiguration{DriverShape: common.String("EXAMPLE-driverShape-Value"),
ExecutorShape: common.String("EXAMPLE-executorShape-Value"),
SparkVersion: common.String("EXAMPLE-sparkVersion-Value"),
TotalExecutors: common.Int(780)},
ApplicationCompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-applicationCompartmentId-Value"),
ApplicationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-applicationId-Value"),
ConfigurationDetails: &dataintegration.ConfigurationDetails{CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
Connection: dataintegration.ConnectionFromAmazonS3{ConnectionProperties: []dataintegration.ConnectionProperty{dataintegration.ConnectionProperty{Name: common.String("EXAMPLE-name-Value"),
Value: common.String("EXAMPLE-value-Value")}},
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Description: common.String("EXAMPLE-description-Value"),
Metadata: &dataintegration.ObjectMetadata{CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(552),
ObjectType: dataintegration.CountStatisticSummaryObjectTypeTask}}},
CreatedBy: common.String("EXAMPLE-createdBy-Value"),
CreatedByName: common.String("EXAMPLE-createdByName-Value"),
IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
IsFavorite: common.Bool(true),
TimeCreated: &common.SDKTime{Time: time.Now()},
TimeUpdated: &common.SDKTime{Time: time.Now()},
UpdatedBy: common.String("EXAMPLE-updatedBy-Value"),
Aggregator: &dataintegration.AggregatorSummary{Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
Type: common.String("EXAMPLE-type-Value"),
Description: common.String("EXAMPLE-description-Value")},
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
InfoFields: map[string]string{"EXAMPLE_KEY_exfy7": "EXAMPLE_VALUE_7mpS2mgqYNKcSkn2Woxz"},
Labels: []string{"EXAMPLE--Value"},
RegistryVersion: common.Int(420),
UpdatedByName: common.String("EXAMPLE-updatedByName-Value")},
ObjectStatus: common.Int(545),
ObjectVersion: common.Int(856),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
AccessKey: &dataintegration.SensitiveAttribute{SecretConfig: dataintegration.OciVaultSecretConfig{SecretId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value")},
Value: common.String("EXAMPLE-value-Value")},
Identifier: common.String("EXAMPLE-identifier-Value"),
KeyMap: map[string]string{"EXAMPLE_KEY_01VcJ": "EXAMPLE_VALUE_7EpI7RVmZrqJ7rDvwOpg"},
Name: common.String("EXAMPLE-name-Value"),
PrimarySchema: &dataintegration.Schema{Identifier: common.String("EXAMPLE-identifier-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(931),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
ResourceName: common.String("EXAMPLE-resourceName-Value"),
DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
ExternalKey: common.String("EXAMPLE-externalKey-Value"),
IsHasContainers: common.Bool(true),
Key: common.String("EXAMPLE-key-Value"),
Metadata: &dataintegration.ObjectMetadata{IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
TimeUpdated: &common.SDKTime{Time: time.Now()},
UpdatedBy: common.String("EXAMPLE-updatedBy-Value"),
UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
CreatedBy: common.String("EXAMPLE-createdBy-Value"),
CreatedByName: common.String("EXAMPLE-createdByName-Value"),
InfoFields: map[string]string{"EXAMPLE_KEY_pEsXp": "EXAMPLE_VALUE_EMjp6JcihLO4eMoIPDZz"},
IsFavorite: common.Bool(false),
Labels: []string{"EXAMPLE--Value"},
RegistryVersion: common.Int(955),
TimeCreated: &common.SDKTime{Time: time.Now()},
Aggregator: &dataintegration.AggregatorSummary{Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
Type: common.String("EXAMPLE-type-Value")},
CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(760),
ObjectType: dataintegration.CountStatisticSummaryObjectTypeFolder}}}},
Name: common.String("EXAMPLE-name-Value"),
ObjectVersion: common.Int(462),
Description: common.String("EXAMPLE-description-Value")},
IsDefault: common.Bool(false),
SecretKey: &dataintegration.SensitiveAttribute{SecretConfig: dataintegration.OciVaultSecretConfig{SecretId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value")},
Value: common.String("EXAMPLE-value-Value")}},
DataAsset: dataintegration.DataAssetFromLakeDetails{ExternalKey: common.String("EXAMPLE-externalKey-Value"),
KeyMap: map[string]string{"EXAMPLE_KEY_B4CHS": "EXAMPLE_VALUE_BjdxwYXNmUXVOAWasSsq"},
Metadata: &dataintegration.ObjectMetadata{Aggregator: &dataintegration.AggregatorSummary{Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
Type: common.String("EXAMPLE-type-Value"),
Description: common.String("EXAMPLE-description-Value")},
CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(399),
ObjectType: dataintegration.CountStatisticSummaryObjectTypeDataAsset}}},
CreatedBy: common.String("EXAMPLE-createdBy-Value"),
IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
InfoFields: map[string]string{"EXAMPLE_KEY_xItfk": "EXAMPLE_VALUE_Cx4VIBm0JUPWbEOEuefr"},
Labels: []string{"EXAMPLE--Value"},
RegistryVersion: common.Int(626),
TimeUpdated: &common.SDKTime{Time: time.Now()},
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
CreatedByName: common.String("EXAMPLE-createdByName-Value"),
IsFavorite: common.Bool(false),
TimeCreated: &common.SDKTime{Time: time.Now()},
UpdatedBy: common.String("EXAMPLE-updatedBy-Value"),
UpdatedByName: common.String("EXAMPLE-updatedByName-Value")},
Name: common.String("EXAMPLE-name-Value"),
ObjectVersion: common.Int(171),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
DefaultConnection: &dataintegration.ConnectionFromLakeDetails{ConnectionProperties: []dataintegration.ConnectionProperty{dataintegration.ConnectionProperty{Name: common.String("EXAMPLE-name-Value"),
Value: common.String("EXAMPLE-value-Value")}},
Identifier: common.String("EXAMPLE-identifier-Value"),
IsDefault: common.Bool(true),
Key: common.String("EXAMPLE-key-Value"),
Metadata: &dataintegration.ObjectMetadata{RegistryVersion: common.Int(237),
TimeCreated: &common.SDKTime{Time: time.Now()},
TimeUpdated: &common.SDKTime{Time: time.Now()},
UpdatedBy: common.String("EXAMPLE-updatedBy-Value"),
UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
Aggregator: &dataintegration.AggregatorSummary{Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
Type: common.String("EXAMPLE-type-Value")},
CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(406),
ObjectType: dataintegration.CountStatisticSummaryObjectTypeProject}}},
CreatedByName: common.String("EXAMPLE-createdByName-Value"),
IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
IsFavorite: common.Bool(true),
Labels: []string{"EXAMPLE--Value"},
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
CreatedBy: common.String("EXAMPLE-createdBy-Value"),
InfoFields: map[string]string{"EXAMPLE_KEY_3lhpj": "EXAMPLE_VALUE_RyyEloS5CwPgSjzB3Gme"}},
Name: common.String("EXAMPLE-name-Value"),
ObjectVersion: common.Int(780),
Description: common.String("EXAMPLE-description-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(161),
ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")},
PrimarySchema: &dataintegration.Schema{ObjectStatus: common.Int(999),
ResourceName: common.String("EXAMPLE-resourceName-Value"),
DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value"),
IsHasContainers: common.Bool(false),
ObjectVersion: common.Int(129),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
ExternalKey: common.String("EXAMPLE-externalKey-Value"),
Key: common.String("EXAMPLE-key-Value"),
Metadata: &dataintegration.ObjectMetadata{TimeCreated: &common.SDKTime{Time: time.Now()},
TimeUpdated: &common.SDKTime{Time: time.Now()},
UpdatedBy: common.String("EXAMPLE-updatedBy-Value"),
Aggregator: &dataintegration.AggregatorSummary{Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
Type: common.String("EXAMPLE-type-Value")},
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(842),
ObjectType: dataintegration.CountStatisticSummaryObjectTypeTask}}},
CreatedBy: common.String("EXAMPLE-createdBy-Value"),
RegistryVersion: common.Int(964),
UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
CreatedByName: common.String("EXAMPLE-createdByName-Value"),
IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
InfoFields: map[string]string{"EXAMPLE_KEY_iC1H0": "EXAMPLE_VALUE_uGnMnqKQXV294Iqj2TxR"},
IsFavorite: common.Bool(false),
Labels: []string{"EXAMPLE--Value"}},
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value")}},
Description: common.String("EXAMPLE-description-Value"),
MetastoreId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-metastoreId-Value"),
NativeTypeSystem: &dataintegration.TypeSystem{Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
TypeMappingFrom: map[string]string{"EXAMPLE_KEY_ki8Jr": "EXAMPLE_VALUE_97XPEgyKtVMKlTooMh5V"},
ObjectStatus: common.Int(944),
ObjectVersion: common.Int(103),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
TypeMappingTo: map[string]string{"EXAMPLE_KEY_8e39V": "EXAMPLE_VALUE_HuI5wmxGT6lRvXkVxQkS"},
Types: []dataintegration.DataType{dataintegration.DataType{ObjectStatus: common.Int(410),
Description: common.String("EXAMPLE-description-Value"),
DtType: dataintegration.DataTypeDtTypeStructured,
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")},
TypeSystemName: common.String("EXAMPLE-typeSystemName-Value"),
ConfigDefinition: &dataintegration.ConfigDefinition{ConfigParameterDefinitions: map[string]dataintegration.ConfigParameterDefinition{"EXAMPLE_KEY_0Fhhx": dataintegration.ConfigParameterDefinition{Description: common.String("EXAMPLE-description-Value"),
IsClassFieldValue: common.Bool(false),
IsStatic: common.Bool(true),
ParameterName: common.String("EXAMPLE-parameterName-Value"),
ParameterType: dataintegration.DerivedType{ObjectStatus: common.Int(568),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Description: common.String("EXAMPLE-description-Value"),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value")},
ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
DefaultValue: &defaultValue}},
IsContained: common.Bool(true),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(470),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}}}},
ObjectStatus: common.Int(621),
Key: common.String("EXAMPLE-key-Value"),
LakeId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-lakeId-Value"),
AssetProperties: map[string]string{"EXAMPLE_KEY_eRxP5": "EXAMPLE_VALUE_4gQWgvfwi8HSE3wb5MVc"},
Identifier: common.String("EXAMPLE-identifier-Value"),
LakeProxyEndpoint: common.String("EXAMPLE-lakeProxyEndpoint-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
Schema: &dataintegration.Schema{Identifier: common.String("EXAMPLE-identifier-Value"),
IsHasContainers: common.Bool(true),
Key: common.String("EXAMPLE-key-Value"),
Metadata: &dataintegration.ObjectMetadata{RegistryVersion: common.Int(709),
TimeCreated: &common.SDKTime{Time: time.Now()},
UpdatedBy: common.String("EXAMPLE-updatedBy-Value"),
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
CountStatistics: &dataintegration.CountStatistic{ObjectTypeCountList: []dataintegration.CountStatisticSummary{dataintegration.CountStatisticSummary{ObjectCount: common.Int64(365),
ObjectType: dataintegration.CountStatisticSummaryObjectTypeApplication}}},
IdentifierPath: common.String("EXAMPLE-identifierPath-Value"),
IsFavorite: common.Bool(false),
TimeUpdated: &common.SDKTime{Time: time.Now()},
UpdatedByName: common.String("EXAMPLE-updatedByName-Value"),
Aggregator: &dataintegration.AggregatorSummary{Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
Type: common.String("EXAMPLE-type-Value")},
CreatedBy: common.String("EXAMPLE-createdBy-Value"),
CreatedByName: common.String("EXAMPLE-createdByName-Value"),
InfoFields: map[string]string{"EXAMPLE_KEY_X8R3w": "EXAMPLE_VALUE_SadxTshdYdacuSWQzuk2"},
Labels: []string{"EXAMPLE--Value"}},
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(493),
ObjectVersion: common.Int(564),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
DefaultConnection: common.String("EXAMPLE-defaultConnection-Value"),
Description: common.String("EXAMPLE-description-Value"),
ExternalKey: common.String("EXAMPLE-externalKey-Value"),
ModelType: common.String("EXAMPLE-modelType-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ResourceName: common.String("EXAMPLE-resourceName-Value")}},
Description: common.String("EXAMPLE-description-Value")},
WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value")}
// Send the request using the service client
resp, err := client.UpdateExternalPublication(context.Background(), req)
helpers.FatalIfError(err)
// Retrieve value from the response.
fmt.Println(resp)
}