// 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 refValue interface{}
refValue = "EXAMPLE-refValue-Value"
var rootObjectValue interface{}
rootObjectValue = "EXAMPLE-rootObjectValue-Value"
var objectValue interface{}
objectValue = "EXAMPLE-objectValue-Value"
var scope interface{}
scope = "EXAMPLE-scope-Value"
var defaultValue interface{}
defaultValue = "EXAMPLE-defaultValue-Value"
var rootObjectDefaultValue interface{}
rootObjectDefaultValue = "EXAMPLE-rootObjectDefaultValue-Value"
var type_ interface{}
type_ = "EXAMPLE-type-Value"
req := dataintegration.UpdateTaskRequest{IfMatch: common.String("EXAMPLE-ifMatch-Value"),
OpcRequestId: common.String("MTVTIVWYUTVDN3ASZN3X<unique_ID>"),
TaskKey: common.String("EXAMPLE-taskKey-Value"),
UpdateTaskDetails: dataintegration.UpdateTaskFromOciDataflowTask{Description: common.String("EXAMPLE-description-Value"),
ExecutorShapeDetails: &dataintegration.ShapeDetails{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_8OhrV": dataintegration.ConfigParameterValue{ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(41),
ObjectValue: &objectValue}},
ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")}}},
InputPorts: []dataintegration.InputPort{dataintegration.InputPort{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(412),
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_1GK0b": dataintegration.ConfigParameterValue{StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(838),
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")}},
Fields: []dataintegration.TypedObject{dataintegration.InputProxyField{ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_fxwen": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(514),
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")}},
Description: common.String("EXAMPLE-description-Value"),
Labels: []string{"EXAMPLE--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")},
Key: common.String("EXAMPLE-key-Value"),
ObjectStatus: common.Int(372),
Scope: &scope,
Type: dataintegration.JavaType{ConfigDefinition: &dataintegration.ConfigDefinition{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(741),
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_8HSE3": dataintegration.ConfigParameterDefinition{IsClassFieldValue: common.Bool(false),
IsStatic: common.Bool(false),
ParameterName: common.String("EXAMPLE-parameterName-Value"),
ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
DefaultValue: &defaultValue,
Description: common.String("EXAMPLE-description-Value")}}},
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
ObjectStatus: common.Int(473),
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"),
JavaTypeName: common.String("EXAMPLE-javaTypeName-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value")}}},
Key: common.String("EXAMPLE-key-Value"),
PortType: dataintegration.InputPortPortTypeData,
Description: common.String("EXAMPLE-description-Value")}},
IsConcurrentAllowed: common.Bool(true),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Parameters: []dataintegration.Parameter{dataintegration.Parameter{Key: common.String("EXAMPLE-key-Value"),
ObjectStatus: common.Int(620),
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_IIyQr": dataintegration.ConfigParameterValue{RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(712),
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"),
TypeName: common.String("EXAMPLE-typeName-Value"),
UsedFor: common.String("EXAMPLE-usedFor-Value"),
DefaultValue: &defaultValue,
Name: common.String("EXAMPLE-name-Value"),
OutputAggregationType: dataintegration.ParameterOutputAggregationTypeCount,
RootObjectDefaultValue: &rootObjectDefaultValue,
Type: &type_,
IsInput: common.Bool(true),
IsOutput: common.Bool(true),
ModelVersion: common.String("EXAMPLE-modelVersion-Value")}},
RegistryMetadata: &dataintegration.RegistryMetadata{AggregatorKey: common.String("EXAMPLE-aggregatorKey-Value"),
IsFavorite: common.Bool(false),
Key: common.String("EXAMPLE-key-Value"),
Labels: []string{"EXAMPLE--Value"},
RegistryVersion: common.Int(306)},
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_NY5ha": dataintegration.ConfigParameterValue{IntValue: common.Int(115),
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{ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")},
ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_nF0QK": dataintegration.ConfigParameterValue{ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(267)}}}},
Identifier: common.String("EXAMPLE-identifier-Value"),
Key: common.String("EXAMPLE-key-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(923),
ObjectVersion: common.Int(800),
OpConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_g82SZ": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(177),
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")}},
OutputPorts: []dataintegration.OutputPort{dataintegration.OutputPort{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(772),
PortType: dataintegration.OutputPortPortTypeData,
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_MkaA1": dataintegration.ConfigParameterValue{IntValue: common.Int(2),
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")}},
Description: common.String("EXAMPLE-description-Value"),
Fields: []dataintegration.TypedObject{dataintegration.InputProxyField{Description: common.String("EXAMPLE-description-Value"),
Key: common.String("EXAMPLE-key-Value"),
Labels: []string{"EXAMPLE--Value"},
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(212),
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_JCstB": dataintegration.ConfigParameterValue{IntValue: common.Int(639),
ObjectValue: &objectValue,
ParameterValue: common.String("EXAMPLE-parameterValue-Value"),
RefValue: &refValue,
RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value")}},
ParentRef: &dataintegration.ParentReference{RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
Parent: common.String("EXAMPLE-parent-Value")}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Scope: &scope,
Type: dataintegration.DynamicType{Description: common.String("EXAMPLE-description-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(216),
TypeHandler: dataintegration.RuleTypeConfig{ObjectStatus: common.Int(275),
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_6ifJC": dataintegration.ConfigParameterValue{IntValue: common.Int(155),
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")}},
IsOrderByRule: common.Bool(true),
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
ProjectionRules: []dataintegration.ProjectionRule{dataintegration.NameListRule{IsCaseSensitive: common.Bool(false),
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
RuleType: dataintegration.NameListRuleRuleTypeExclude,
ConfigValues: &dataintegration.ConfigValues{ConfigParamValues: map[string]dataintegration.ConfigParameterValue{"EXAMPLE_KEY_g01Vc": dataintegration.ConfigParameterValue{RootObjectValue: &rootObjectValue,
StringValue: common.String("EXAMPLE-stringValue-Value"),
IntValue: common.Int(915),
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")}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value")},
Scope: &scope,
IsJavaRegexSyntax: common.Bool(true),
MatchingStrategy: dataintegration.NameListRuleMatchingStrategyNameOrTags,
Description: common.String("EXAMPLE-description-Value"),
IsCascade: common.Bool(false),
IsSkipRemainingRulesOnMatch: common.Bool(false),
Names: []string{"EXAMPLE--Value"},
ObjectStatus: common.Int(319)}},
Scope: &scope,
ScopeReference: &dataintegration.ScopeReference{ReferenceType: dataintegration.ScopeReferenceReferenceTypeOciFunctionOutputShape,
RefObjectName: common.String("EXAMPLE-refObjectName-Value"),
ReferenceObject: common.String("EXAMPLE-referenceObject-Value")},
Key: common.String("EXAMPLE-key-Value"),
ModelVersion: common.String("EXAMPLE-modelVersion-Value")},
ConfigDefinition: &dataintegration.ConfigDefinition{ModelVersion: common.String("EXAMPLE-modelVersion-Value"),
Name: common.String("EXAMPLE-name-Value"),
ObjectStatus: common.Int(315),
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_kBQLm": dataintegration.ConfigParameterDefinition{ClassFieldName: common.String("EXAMPLE-classFieldName-Value"),
DefaultValue: &defaultValue,
Description: common.String("EXAMPLE-description-Value"),
IsClassFieldValue: common.Bool(false),
IsStatic: common.Bool(true),
ParameterName: common.String("EXAMPLE-parameterName-Value")}},
IsContained: common.Bool(true),
Key: common.String("EXAMPLE-key-Value")},
Key: common.String("EXAMPLE-key-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")}},
ParentRef: &dataintegration.ParentReference{Parent: common.String("EXAMPLE-parent-Value"),
RootDocId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-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)
}