From 188dcf59ac66cd9691133929c61f049d95c6667a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 10 Sep 2019 02:41:52 +0000 Subject: [PATCH] Generated from b07009df21da758efcb13fbbd25ce9e450751586 [DataFactory] Update Databricks linked service swagger related to warm pools. --- .../mgmt/2018-06-01/datafactory/models.go | 28 ++++++++++++++----- .../datafactory/activityruns.go | 8 ++++-- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/models.go b/services/datafactory/mgmt/2018-06-01/datafactory/models.go index c1edc18f01d5..2cc906143379 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/models.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/models.go @@ -16296,25 +16296,27 @@ type AzureDatabricksLinkedServiceTypeProperties struct { Domain interface{} `json:"domain,omitempty"` // AccessToken - Access token for databricks REST API. Refer to https://docs.azuredatabricks.net/api/latest/authentication.html. Type: string (or Expression with resultType string). AccessToken BasicSecretBase `json:"accessToken,omitempty"` - // ExistingClusterID - The id of an existing cluster that will be used for all runs of this job. Type: string (or Expression with resultType string). + // ExistingClusterID - The id of an existing interactive cluster that will be used for all runs of this activity. Type: string (or Expression with resultType string). ExistingClusterID interface{} `json:"existingClusterId,omitempty"` - // NewClusterVersion - The Spark version of new cluster. Type: string (or Expression with resultType string). + // InstancePoolID - The id of an existing instance pool that will be used for all runs of this activity. Type: string (or Expression with resultType string). + InstancePoolID interface{} `json:"instancePoolId,omitempty"` + // NewClusterVersion - If not using an existing interactive cluster, this specifies the Spark version of a new job cluster or instance pool nodes created for each run of this activity. Required if instancePoolId is specified. Type: string (or Expression with resultType string). NewClusterVersion interface{} `json:"newClusterVersion,omitempty"` - // NewClusterNumOfWorker - Number of worker nodes that new cluster should have. A string formatted Int32, like '1' means numOfWorker is 1 or '1:10' means auto-scale from 1 as min and 10 as max. Type: string (or Expression with resultType string). + // NewClusterNumOfWorker - If not using an existing interactive cluster, this specifies the number of worker nodes to use for the new job cluster or instance pool. For new job clusters, this a string-formatted Int32, like '1' means numOfWorker is 1 or '1:10' means auto-scale from 1 (min) to 10 (max). For instance pools, this is a string-formatted Int32, and can only specify a fixed number of worker nodes, such as '2'. Required if newClusterVersion is specified. Type: string (or Expression with resultType string). NewClusterNumOfWorker interface{} `json:"newClusterNumOfWorker,omitempty"` - // NewClusterNodeType - The node types of new cluster. Type: string (or Expression with resultType string). + // NewClusterNodeType - The node type of the new job cluster. This property is required if newClusterVersion is specified and instancePoolId is not specified. If instancePoolId is specified, this property is ignored. Type: string (or Expression with resultType string). NewClusterNodeType interface{} `json:"newClusterNodeType,omitempty"` // NewClusterSparkConf - A set of optional, user-specified Spark configuration key-value pairs. NewClusterSparkConf map[string]interface{} `json:"newClusterSparkConf"` // NewClusterSparkEnvVars - A set of optional, user-specified Spark environment variables key-value pairs. NewClusterSparkEnvVars map[string]interface{} `json:"newClusterSparkEnvVars"` - // NewClusterCustomTags - Additional tags for cluster resources. + // NewClusterCustomTags - Additional tags for cluster resources. This property is ignored in instance pool configurations. NewClusterCustomTags map[string]interface{} `json:"newClusterCustomTags"` - // NewClusterDriverNodeType - The driver node type for the new cluster. Type: string (or Expression with resultType string). + // NewClusterDriverNodeType - The driver node type for the new job cluster. This property is ignored in instance pool configurations. Type: string (or Expression with resultType string). NewClusterDriverNodeType interface{} `json:"newClusterDriverNodeType,omitempty"` // NewClusterInitScripts - User-defined initialization scripts for the new cluster. Type: array of strings (or Expression with resultType array of strings). NewClusterInitScripts interface{} `json:"newClusterInitScripts,omitempty"` - // NewClusterEnableElasticDisk - Enable the elastic disk on the new cluster. Type: boolean (or Expression with resultType boolean). + // NewClusterEnableElasticDisk - Enable the elastic disk on the new cluster. This property is now ignored, and takes the default elastic disk behavior in Databricks (elastic disks are always enabled). Type: boolean (or Expression with resultType boolean). NewClusterEnableElasticDisk interface{} `json:"newClusterEnableElasticDisk,omitempty"` // EncryptedCredential - The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). EncryptedCredential interface{} `json:"encryptedCredential,omitempty"` @@ -16330,6 +16332,9 @@ func (adlstp AzureDatabricksLinkedServiceTypeProperties) MarshalJSON() ([]byte, if adlstp.ExistingClusterID != nil { objectMap["existingClusterId"] = adlstp.ExistingClusterID } + if adlstp.InstancePoolID != nil { + objectMap["instancePoolId"] = adlstp.InstancePoolID + } if adlstp.NewClusterVersion != nil { objectMap["newClusterVersion"] = adlstp.NewClusterVersion } @@ -16398,6 +16403,15 @@ func (adlstp *AzureDatabricksLinkedServiceTypeProperties) UnmarshalJSON(body []b } adlstp.ExistingClusterID = existingClusterID } + case "instancePoolId": + if v != nil { + var instancePoolID interface{} + err = json.Unmarshal(*v, &instancePoolID) + if err != nil { + return err + } + adlstp.InstancePoolID = instancePoolID + } case "newClusterVersion": if v != nil { var newClusterVersion interface{} diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go index 6ccdcd449d5a..718dfd3b89aa 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/activityruns.go @@ -74,9 +74,11 @@ func (client ActivityRunsClient) ListByPipelineRun(ctx context.Context, resource {Target: "factoryName", Name: validation.MinLength, Rule: 3, Chain: nil}, {Target: "factoryName", Name: validation.Pattern, Rule: `^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$`, Chain: nil}}}, {TargetValue: linkedServiceName, - Constraints: []validation.Constraint{{Target: "linkedServiceName", Name: validation.MaxLength, Rule: 260, Chain: nil}, - {Target: "linkedServiceName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "linkedServiceName", Name: validation.Pattern, Rule: `^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$`, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "linkedServiceName", Name: validation.Empty, Rule: false, + Chain: []validation.Constraint{{Target: "linkedServiceName", Name: validation.MaxLength, Rule: 260, Chain: nil}, + {Target: "linkedServiceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "linkedServiceName", Name: validation.Pattern, Rule: `^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$`, Chain: nil}, + }}}}}); err != nil { return result, validation.NewError("datafactory.ActivityRunsClient", "ListByPipelineRun", err.Error()) }