// 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 ExampleUpdateTask() {
// 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 objectValue interface{}
objectValue = "EXAMPLE-objectValue-Value"
var refValue interface{}
refValue = "EXAMPLE-refValue-Value"
var rootObjectValue interface{}
rootObjectValue = "EXAMPLE-rootObjectValue-Value"
var scope interface{}
scope = "EXAMPLE-scope-Value"
var defaultValue interface{}
defaultValue = "EXAMPLE-defaultValue-Value"
var type_ interface{}
type_ = "EXAMPLE-type-Value"
var rootObjectDefaultValue interface{}
rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
req := dataintegration.UpdateTaskRequest{IfMatch: common.String("EXAMPLE-ifMatch-Value"),
OpcRequestId: common.String("NAVBXVFFFI6G4RCBJQ1X<unique_ID>"),
TaskKey: common.String("EXAMPLE-taskKey-Value"),
UpdateTaskDetails: dataintegration.UpdateTaskFromOciDataflowTask{ObjectVersion: common.Int(89),
OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_QSO9S": dataintegration.ConfigParameterValue{IntValue: common.Int(480),
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")}},
DriverShapeDetails: &dataintegration.ShapeDetails{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_ZvLZv": dataintegration.ConfigParameterValue{IntValue: common.Int(541),
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")}}},
ExecutorShapeDetails: &dataintegration.ShapeDetails{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_qLHOi": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(251),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")}}},
InputPorts: []dataintegration.InputPort{dataintegration.InputPort{PortType: dataintegration.InputPortPortTypeData,
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_bD1iD": dataintegration.ConfigParameterValue{IntValue: common.Int(558),
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(637),
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"),
Fields: []dataintegration.TypedObject{dataintegration.InputProxyField{Labels: []string{"EXAMPLE--Value"},
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(576),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Scope: &scope,
Type: dataintegration.DataType{Description: common.String("EXAMPLE-description-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(177),
TypeSystemName: common.String("EXAMPLE-typeSystemName-Value"),
ConfigDefinition: &dataintegration.ConfigDefinition{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(499),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
ConfigParameterDefinitions: map[string]dataintegration.ConfigParameterDefinition{"EXAMPLE_KEY_z6XTE": dataintegration.ConfigParameterDefinition{IsStatic: common.Bool(false),
ParameterName: common.String("EXAMPLE-parameterName-Value"),
ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
DefaultValue: &defaultValue,
Description: common.String("EXAMPLE-description-Value"),
IsClassFieldValue: common.Bool(false)}},
IsContained: common.Bool(false),
Key: common.String("EXAMPLE-key-Value")},
DtType: dataintegration.DataTypeDtTypePrimitive,
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
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_VFoMA": dataintegration.ConfigParameterValue{IntValue: common.Int(35),
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")}},
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-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")}},
DataflowApplication: &dataintegration.DataflowApplication{ApplicationId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-applicationId-Value"),
CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_DaV0X": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(65)}},
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"),
ObjectStatus: common.Int(623),
Description: common.String("EXAMPLE-description-Value"),
Identifier: common.String("EXAMPLE-identifier-Value"),
IsConcurrentAllowed: common.Bool(false),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
OutputPorts: []dataintegration.OutputPort{dataintegration.OutputPort{Description: common.String("EXAMPLE-description-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Fields: []dataintegration.TypedObject{dataintegration.DecisionOutputPort{Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(957),
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_ILmo7": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(501),
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")}},
DecisionOutputPortType: dataintegration.DecisionOutputPortDecisionOutputPortTypeTrue,
Description: common.String("EXAMPLE-description-Value"),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
PortType: dataintegration.DecisionOutputPortPortTypeModel}},
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(662),
PortType: dataintegration.OutputPortPortTypeData,
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_SVWxU": dataintegration.ConfigParameterValue{RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(154),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value")}}}}},
Parameters: []dataintegration.Parameter{dataintegration.Parameter{Type: &type_,
UsedFor: common.String("EXAMPLE-usedFor-Value"),
ObjectStatus: common.Int(441),
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_iqQkx": dataintegration.ConfigParameterValue{RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(988),
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")}},
IsInput: common.Bool(false),
IsOutput: common.Bool(true),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
OutputAggregationType: dataintegration.ParameterOutputAggregationTypeMin,
RootObjectDefaultValue: &rootObjectDefaultValue,
DefaultValue: &defaultValue,
Description: common.String("EXAMPLE-description-Value"),
Name: common.String("EXAMPLE-name-Value"),
TypeName: common.String("EXAMPLE-typeName-Value")}},
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(433),
AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
IsFavorite: common.Bool(true),
Key: common.String("EXAMPLE-key-Value")}},
WorkspaceId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value")}
// Send the request using the service client
resp, err := client.UpdateTask(context.Background(), req)
helpers.FatalIfError(err)
// Retrieve value from the response.
fmt.Println(resp)
}