// 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"
"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 ExampleUpdateDataFlow() {
// 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 rootObjectValue interface{}
rootObjectValue = "EXAMPLE-rootObjectValue-Value"
var objectValue interface{}
objectValue = "EXAMPLE-objectValue-Value"
var refValue interface{}
refValue = "EXAMPLE-refValue-Value"
var type_ interface{}
type_ = "EXAMPLE-type-Value"
var defaultValue interface{}
defaultValue = "EXAMPLE-defaultValue-Value"
var rootObjectDefaultValue interface{}
rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
req := dataintegration.UpdateDataFlowRequest{IfMatch: common.String("EXAMPLE-ifMatch-Value"),
OpcRequestId: common.String("3HWBJYNB0ZFARTMOXP67<unique_ID>"),
UpdateDataFlowDetails: dataintegration.UpdateDataFlowDetails{ObjectVersion: common.Int(729),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
RegistryMetadata: &dataintegration.RegistryMetadata{Labels: []string{"EXAMPLE--Value"},
RegistryVersion: common.Int(456),
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
IsFavorite: common.Bool(false),
Key: common.String("EXAMPLE-key-Value")},
Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
ObjectStatus: common.Int(363),
Nodes: []dataintegration.FlowNode{dataintegration.FlowNode{Description: common.String("EXAMPLE-description-Value"),
InputLinks: []dataintegration.InputLink{dataintegration.InputLink{Description: common.String("EXAMPLE-description-Value"),
FromLink: common.String("EXAMPLE-fromLink-Value"),
Port: common.String("EXAMPLE-port-Value"),
FieldMap: dataintegration.DirectFieldMap{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_lpkuO": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(327),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
TargetTypedObject: common.String("EXAMPLE-targetTypedObject-Value"),
ObjectStatus: common.Int(458),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
SourceScopeReference: &dataintegration.ScopeReference{RefObjectName: common.String("EXAMPLE-refObjectName-Value"),
ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
ReferenceType: dataintegration.ScopeReferenceReferenceTypeBoundEntityShapeField},
SourceTypedObject: common.String("EXAMPLE-sourceTypedObject-Value"),
TargetScopeReference: &dataintegration.ScopeReference{RefObjectName: common.String("EXAMPLE-refObjectName-Value"),
ReferenceObject: common.String("EXAMPLE-referenceObject-Value"),
ReferenceType: dataintegration.ScopeReferenceReferenceTypeBoundEntityShape},
Description: common.String("EXAMPLE-description-Value"),
Key: common.String("EXAMPLE-key-Value")},
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(422),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}},
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
OutputLinks: []dataintegration.OutputLink{dataintegration.OutputLink{Port: common.String("EXAMPLE-port-Value"),
ToLinks: []string{"EXAMPLE--Value"},
Description: common.String("EXAMPLE-description-Value"),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(780),
ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")}}},
UiProperties: &dataintegration.UiProperties{CoordinateX: common.Float32(4863.235),
CoordinateY: common.Float32(9284.544)},
ModelType: common.String("EXAMPLE-modelType-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(2),
Operator: dataintegration.EndOperator{Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_1teAn": dataintegration.ConfigParameterValue{RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(374),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value")}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")},
Description: common.String("EXAMPLE-description-Value"),
InputPorts: []dataintegration.InputPort{dataintegration.InputPort{Fields: []dataintegration.TypedObject{dataintegration.ConditionalOutputPort{ObjectStatus: common.Int(117),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
PortType: dataintegration.ConditionalOutputPortPortTypeModel,
SplitCondition: &dataintegration.Expression{ConfigValues: &dataintegration.ConfigValues{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_L7Bbm": dataintegration.ConfigParameterValue{IntValue: common.Int(25),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value")}}},
ExprString: common.String("EXAMPLE-exprString-Value"),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(435),
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"),
Name: common.String("EXAMPLE-name-Value"),
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_R9H9o": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(810),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
ModelVersion: common.String("EXAMPLE-modelVersion-Value")}},
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
PortType: dataintegration.InputPortPortTypeControl,
Description: common.String("EXAMPLE-description-Value"),
ObjectStatus: common.Int(831),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_mZa7u": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(599),
ObjectValue: &objectValue}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}}},
ObjectVersion: common.Int(505),
ObjectStatus: common.Int(222),
Name: common.String("EXAMPLE-name-Value"),
OutputPorts: []dataintegration.TypedObject{dataintegration.ConditionalOutputPort{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
PortType: dataintegration.ConditionalOutputPortPortTypeData,
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_Gu3Iy": dataintegration.ConfigParameterValue{RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(657),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value")}},
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"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(838),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
SplitCondition: &dataintegration.Expression{ObjectStatus: common.Int(391),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_UalmR": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(829),
ObjectValue: &objectValue}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
ExprString: common.String("EXAMPLE-exprString-Value"),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
Key: common.String("EXAMPLE-key-Value")}},
Parameters: []dataintegration.Parameter{dataintegration.Parameter{Key: common.String("EXAMPLE-key-Value"),
OutputAggregationType: dataintegration.ParameterOutputAggregationTypeCount,
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Type: &type_,
UsedFor: common.String("EXAMPLE-usedFor-Value"),
Description: common.String("EXAMPLE-description-Value"),
TypeName: common.String("EXAMPLE-typeName-Value"),
Name: common.String("EXAMPLE-name-Value"),
DefaultValue: &defaultValue,
IsInput: common.Bool(true),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
RootObjectDefaultValue: &rootObjectDefaultValue,
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_HhC7a": dataintegration.ConfigParameterValue{IntValue: common.Int(135),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value")}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
ObjectStatus: common.Int(831),
IsOutput: common.Bool(true)}},
TriggerRule: dataintegration.EndOperatorTriggerRuleSuccess},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}},
Parameters: []dataintegration.Parameter{dataintegration.Parameter{ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Type: &type_,
DefaultValue: &defaultValue,
IsInput: common.Bool(true),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(966),
OutputAggregationType: dataintegration.ParameterOutputAggregationTypeSum,
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_Ld1im": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(336),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}},
IsOutput: common.Bool(true),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
RootObjectDefaultValue: &rootObjectDefaultValue,
TypeName: common.String("EXAMPLE-typeName-Value"),
Description: common.String("EXAMPLE-description-Value"),
UsedFor: common.String("EXAMPLE-usedFor-Value")}},
FlowConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_aUWPY": dataintegration.ConfigParameterValue{RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(288),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value")}},
ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")}},
ModelType: common.String("EXAMPLE-modelType-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value")},
WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value"),
DataFlowKey: common.String("EXAMPLE-dataFlowKey-Value")}
// Send the request using the service client
resp, err := client.UpdateDataFlow(context.Background(), req)
helpers.FatalIfError(err)
// Retrieve value from the response.
fmt.Println(resp)
}