diff --git a/profiles/2017-03-09/network/mgmt/network/models.go b/profiles/2017-03-09/network/mgmt/network/models.go index 896f18980ee8..e0088ddbb392 100644 --- a/profiles/2017-03-09/network/mgmt/network/models.go +++ b/profiles/2017-03-09/network/mgmt/network/models.go @@ -32,7 +32,6 @@ type ExpressRouteCircuitAuthorizationsClient = original.ExpressRouteCircuitAutho type ExpressRouteCircuitPeeringsClient = original.ExpressRouteCircuitPeeringsClient type ExpressRouteCircuitsClient = original.ExpressRouteCircuitsClient type ExpressRouteServiceProvidersClient = original.ExpressRouteServiceProvidersClient -type InterfacesClient = original.InterfacesClient type LoadBalancersClient = original.LoadBalancersClient type LocalNetworkGatewaysClient = original.LocalNetworkGatewaysClient type ApplicationGatewayCookieBasedAffinity = original.ApplicationGatewayCookieBasedAffinity @@ -513,12 +512,6 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return original.NewExpressRouteServiceProvidersClientWithBaseURI(baseURI, subscriptionID) } -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return original.NewInterfacesClient(subscriptionID) -} -func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID) -} func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return original.NewLoadBalancersClient(subscriptionID) } diff --git a/profiles/latest/network/mgmt/network/models.go b/profiles/latest/network/mgmt/network/models.go index 482345fc8e18..6762f83b585e 100644 --- a/profiles/latest/network/mgmt/network/models.go +++ b/profiles/latest/network/mgmt/network/models.go @@ -40,7 +40,6 @@ type ExpressRouteServiceProvidersClient = original.ExpressRouteServiceProvidersC type InboundNatRulesClient = original.InboundNatRulesClient type InterfaceIPConfigurationsClient = original.InterfaceIPConfigurationsClient type InterfaceLoadBalancersClient = original.InterfaceLoadBalancersClient -type InterfacesClient = original.InterfacesClient type LoadBalancerBackendAddressPoolsClient = original.LoadBalancerBackendAddressPoolsClient type LoadBalancerFrontendIPConfigurationsClient = original.LoadBalancerFrontendIPConfigurationsClient type LoadBalancerLoadBalancingRulesClient = original.LoadBalancerLoadBalancingRulesClient @@ -1180,12 +1179,6 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient { return original.NewInterfaceLoadBalancersClientWithBaseURI(baseURI, subscriptionID) } -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return original.NewInterfacesClient(subscriptionID) -} -func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID) -} func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalancerBackendAddressPoolsClient { return original.NewLoadBalancerBackendAddressPoolsClient(subscriptionID) } diff --git a/profiles/preview/network/mgmt/network/models.go b/profiles/preview/network/mgmt/network/models.go index f0a8c69de982..9e8622d8222e 100644 --- a/profiles/preview/network/mgmt/network/models.go +++ b/profiles/preview/network/mgmt/network/models.go @@ -55,7 +55,6 @@ type InboundNatRulesClient = original.InboundNatRulesClient type InterfaceEndpointsClient = original.InterfaceEndpointsClient type InterfaceIPConfigurationsClient = original.InterfaceIPConfigurationsClient type InterfaceLoadBalancersClient = original.InterfaceLoadBalancersClient -type InterfacesClient = original.InterfacesClient type InterfaceTapConfigurationsClient = original.InterfaceTapConfigurationsClient type LoadBalancerBackendAddressPoolsClient = original.LoadBalancerBackendAddressPoolsClient type LoadBalancerFrontendIPConfigurationsClient = original.LoadBalancerFrontendIPConfigurationsClient @@ -1765,12 +1764,6 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient { return original.NewInterfaceLoadBalancersClientWithBaseURI(baseURI, subscriptionID) } -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return original.NewInterfacesClient(subscriptionID) -} -func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID) -} func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConfigurationsClient { return original.NewInterfaceTapConfigurationsClient(subscriptionID) } diff --git a/profiles/preview/preview/hdinsight/mgmt/hdinsight/models.go b/profiles/preview/preview/hdinsight/mgmt/hdinsight/models.go index 7049eced4e79..38445783a9f9 100644 --- a/profiles/preview/preview/hdinsight/mgmt/hdinsight/models.go +++ b/profiles/preview/preview/hdinsight/mgmt/hdinsight/models.go @@ -19,7 +19,11 @@ package hdinsight -import original "github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight" +import ( + "context" + + original "github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight" +) type ApplicationsClient = original.ApplicationsClient @@ -56,6 +60,14 @@ const ( ActiveDirectory DirectoryType = original.ActiveDirectory ) +type JSONWebKeyEncryptionAlgorithm = original.JSONWebKeyEncryptionAlgorithm + +const ( + RSA15 JSONWebKeyEncryptionAlgorithm = original.RSA15 + RSAOAEP JSONWebKeyEncryptionAlgorithm = original.RSAOAEP + RSAOAEP256 JSONWebKeyEncryptionAlgorithm = original.RSAOAEP256 +) + type OSType = original.OSType const ( @@ -92,6 +104,7 @@ type Cluster = original.Cluster type ClusterCreateParametersExtended = original.ClusterCreateParametersExtended type ClusterCreateProperties = original.ClusterCreateProperties type ClusterDefinition = original.ClusterDefinition +type ClusterDiskEncryptionParameters = original.ClusterDiskEncryptionParameters type ClusterGetProperties = original.ClusterGetProperties type ClusterIdentity = original.ClusterIdentity type ClusterIdentityUserAssignedIdentitiesValue = original.ClusterIdentityUserAssignedIdentitiesValue @@ -108,10 +121,12 @@ type ClustersCreateFuture = original.ClustersCreateFuture type ClustersDeleteFuture = original.ClustersDeleteFuture type ClustersExecuteScriptActionsFuture = original.ClustersExecuteScriptActionsFuture type ClustersResizeFuture = original.ClustersResizeFuture +type ClustersRotateDiskEncryptionKeyFuture = original.ClustersRotateDiskEncryptionKeyFuture type ComputeProfile = original.ComputeProfile type ConfigurationsUpdateFuture = original.ConfigurationsUpdateFuture type ConnectivityEndpoint = original.ConnectivityEndpoint type DataDisksGroups = original.DataDisksGroups +type DiskEncryptionProperties = original.DiskEncryptionProperties type ErrorResponse = original.ErrorResponse type Errors = original.Errors type ExecuteScriptActionParameters = original.ExecuteScriptActionParameters @@ -204,6 +219,9 @@ func PossibleClusterProvisioningStateValues() []ClusterProvisioningState { func PossibleDirectoryTypeValues() []DirectoryType { return original.PossibleDirectoryTypeValues() } +func PossibleJSONWebKeyEncryptionAlgorithmValues() []JSONWebKeyEncryptionAlgorithm { + return original.PossibleJSONWebKeyEncryptionAlgorithmValues() +} func PossibleOSTypeValues() []OSType { return original.PossibleOSTypeValues() } @@ -213,6 +231,36 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { func PossibleTierValues() []Tier { return original.PossibleTierValues() } +func NewApplicationListResultIterator(page ApplicationListResultPage) ApplicationListResultIterator { + return original.NewApplicationListResultIterator(page) +} +func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { + return original.NewApplicationListResultPage(getNextPage) +} +func NewClusterListResultIterator(page ClusterListResultPage) ClusterListResultIterator { + return original.NewClusterListResultIterator(page) +} +func NewClusterListResultPage(getNextPage func(context.Context, ClusterListResult) (ClusterListResult, error)) ClusterListResultPage { + return original.NewClusterListResultPage(getNextPage) +} +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return original.NewOperationListResultIterator(page) +} +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return original.NewOperationListResultPage(getNextPage) +} +func NewScriptActionExecutionHistoryListIterator(page ScriptActionExecutionHistoryListPage) ScriptActionExecutionHistoryListIterator { + return original.NewScriptActionExecutionHistoryListIterator(page) +} +func NewScriptActionExecutionHistoryListPage(getNextPage func(context.Context, ScriptActionExecutionHistoryList) (ScriptActionExecutionHistoryList, error)) ScriptActionExecutionHistoryListPage { + return original.NewScriptActionExecutionHistoryListPage(getNextPage) +} +func NewScriptActionsListIterator(page ScriptActionsListPage) ScriptActionsListIterator { + return original.NewScriptActionsListIterator(page) +} +func NewScriptActionsListPage(getNextPage func(context.Context, ScriptActionsList) (ScriptActionsList, error)) ScriptActionsListPage { + return original.NewScriptActionsListPage(getNextPage) +} func NewOperationsClient(subscriptionID string) OperationsClient { return original.NewOperationsClient(subscriptionID) } diff --git a/profiles/preview/preview/network/mgmt/network/models.go b/profiles/preview/preview/network/mgmt/network/models.go index a3ecb2be065b..53406eeb1fc5 100644 --- a/profiles/preview/preview/network/mgmt/network/models.go +++ b/profiles/preview/preview/network/mgmt/network/models.go @@ -32,7 +32,6 @@ type ExpressRouteCircuitAuthorizationsClient = original.ExpressRouteCircuitAutho type ExpressRouteCircuitPeeringsClient = original.ExpressRouteCircuitPeeringsClient type ExpressRouteCircuitsClient = original.ExpressRouteCircuitsClient type ExpressRouteServiceProvidersClient = original.ExpressRouteServiceProvidersClient -type InterfacesClient = original.InterfacesClient type LoadBalancersClient = original.LoadBalancersClient type LocalNetworkGatewaysClient = original.LocalNetworkGatewaysClient type ApplicationGatewayCookieBasedAffinity = original.ApplicationGatewayCookieBasedAffinity @@ -471,12 +470,6 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return original.NewExpressRouteServiceProvidersClientWithBaseURI(baseURI, subscriptionID) } -func NewInterfacesClient(subscriptionID string) InterfacesClient { - return original.NewInterfacesClient(subscriptionID) -} -func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { - return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID) -} func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return original.NewLoadBalancersClient(subscriptionID) } diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go index 686524b80b08..a3b08e734ed4 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/clusters.go @@ -662,6 +662,85 @@ func (client ClustersClient) ResizeResponder(resp *http.Response) (result autore return } +// RotateDiskEncryptionKey rotate disk encryption key of the specified HDInsight cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// clusterName - the name of the cluster. +// parameters - the parameters for the disk encryption operation. +func (client ClustersClient) RotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterDiskEncryptionParameters) (result ClustersRotateDiskEncryptionKeyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.RotateDiskEncryptionKey") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RotateDiskEncryptionKeyPreparer(ctx, resourceGroupName, clusterName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "hdinsight.ClustersClient", "RotateDiskEncryptionKey", nil, "Failure preparing request") + return + } + + result, err = client.RotateDiskEncryptionKeySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "hdinsight.ClustersClient", "RotateDiskEncryptionKey", result.Response(), "Failure sending request") + return + } + + return +} + +// RotateDiskEncryptionKeyPreparer prepares the RotateDiskEncryptionKey request. +func (client ClustersClient) RotateDiskEncryptionKeyPreparer(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterDiskEncryptionParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/rotatediskencryptionkey", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RotateDiskEncryptionKeySender sends the RotateDiskEncryptionKey request. The method will close the +// http.Response Body if it receives an error. +func (client ClustersClient) RotateDiskEncryptionKeySender(req *http.Request) (future ClustersRotateDiskEncryptionKeyFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RotateDiskEncryptionKeyResponder handles the response to the RotateDiskEncryptionKey request. The method always +// closes the http.Response Body. +func (client ClustersClient) RotateDiskEncryptionKeyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // Update patch HDInsight cluster with the specified parameters. // Parameters: // resourceGroupName - the name of the resource group. diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/hdinsightapi/interfaces.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/hdinsightapi/interfaces.go new file mode 100644 index 000000000000..228de4c10c97 --- /dev/null +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/hdinsightapi/interfaces.go @@ -0,0 +1,101 @@ +package hdinsightapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight" + "github.com/Azure/go-autorest/autorest" +) + +// ClustersClientAPI contains the set of methods on the ClustersClient type. +type ClustersClientAPI interface { + Create(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterCreateParametersExtended) (result hdinsight.ClustersCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ClustersDeleteFuture, err error) + ExecuteScriptActions(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ExecuteScriptActionParameters) (result hdinsight.ClustersExecuteScriptActionsFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.Cluster, err error) + List(ctx context.Context) (result hdinsight.ClusterListResultPage, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result hdinsight.ClusterListResultPage, err error) + Resize(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterResizeParameters) (result hdinsight.ClustersResizeFuture, err error) + RotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterDiskEncryptionParameters) (result hdinsight.ClustersRotateDiskEncryptionKeyFuture, err error) + Update(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterPatchParameters) (result hdinsight.Cluster, err error) +} + +var _ ClustersClientAPI = (*hdinsight.ClustersClient)(nil) + +// ApplicationsClientAPI contains the set of methods on the ApplicationsClient type. +type ApplicationsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters hdinsight.Application) (result hdinsight.ApplicationsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result hdinsight.ApplicationsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result hdinsight.Application, err error) + List(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ApplicationListResultPage, err error) +} + +var _ ApplicationsClientAPI = (*hdinsight.ApplicationsClient)(nil) + +// LocationsClientAPI contains the set of methods on the LocationsClient type. +type LocationsClientAPI interface { + GetCapabilities(ctx context.Context, location string) (result hdinsight.CapabilitiesResult, err error) + ListUsages(ctx context.Context, location string) (result hdinsight.UsagesListResult, err error) +} + +var _ LocationsClientAPI = (*hdinsight.LocationsClient)(nil) + +// ConfigurationsClientAPI contains the set of methods on the ConfigurationsClient type. +type ConfigurationsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, clusterName string, configurationName string) (result hdinsight.SetString, err error) + UpdateHTTPSettings(ctx context.Context, resourceGroupName string, clusterName string, configurationName string, parameters map[string]*string) (result hdinsight.ConfigurationsUpdateHTTPSettingsFuture, err error) +} + +var _ ConfigurationsClientAPI = (*hdinsight.ConfigurationsClient)(nil) + +// ExtensionClientAPI contains the set of methods on the ExtensionClient type. +type ExtensionClientAPI interface { + Create(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, parameters hdinsight.Extension) (result autorest.Response, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, extensionName string) (result autorest.Response, err error) + DisableMonitoring(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ExtensionDisableMonitoringFuture, err error) + EnableMonitoring(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterMonitoringRequest) (result hdinsight.ExtensionEnableMonitoringFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, extensionName string) (result hdinsight.Extension, err error) + GetMonitoringStatus(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ClusterMonitoringResponse, err error) +} + +var _ ExtensionClientAPI = (*hdinsight.ExtensionClient)(nil) + +// ScriptActionsClientAPI contains the set of methods on the ScriptActionsClient type. +type ScriptActionsClientAPI interface { + Delete(ctx context.Context, resourceGroupName string, clusterName string, scriptName string) (result autorest.Response, err error) + GetExecutionDetail(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string) (result hdinsight.RuntimeScriptActionDetail, err error) + ListPersistedScripts(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionsListPage, err error) +} + +var _ ScriptActionsClientAPI = (*hdinsight.ScriptActionsClient)(nil) + +// ScriptExecutionHistoryClientAPI contains the set of methods on the ScriptExecutionHistoryClient type. +type ScriptExecutionHistoryClientAPI interface { + List(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionExecutionHistoryListPage, err error) + Promote(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string) (result autorest.Response, err error) +} + +var _ ScriptExecutionHistoryClientAPI = (*hdinsight.ScriptExecutionHistoryClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result hdinsight.OperationListResultPage, err error) +} + +var _ OperationsClientAPI = (*hdinsight.OperationsClient)(nil) diff --git a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go index b19ea571ddd7..ec4333bd5ad5 100644 --- a/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go +++ b/services/preview/hdinsight/mgmt/2015-03-01-preview/hdinsight/models.go @@ -81,6 +81,23 @@ func PossibleDirectoryTypeValues() []DirectoryType { return []DirectoryType{ActiveDirectory} } +// JSONWebKeyEncryptionAlgorithm enumerates the values for json web key encryption algorithm. +type JSONWebKeyEncryptionAlgorithm string + +const ( + // RSA15 ... + RSA15 JSONWebKeyEncryptionAlgorithm = "RSA1_5" + // RSAOAEP ... + RSAOAEP JSONWebKeyEncryptionAlgorithm = "RSA-OAEP" + // RSAOAEP256 ... + RSAOAEP256 JSONWebKeyEncryptionAlgorithm = "RSA-OAEP-256" +) + +// PossibleJSONWebKeyEncryptionAlgorithmValues returns an array of possible values for the JSONWebKeyEncryptionAlgorithm const type. +func PossibleJSONWebKeyEncryptionAlgorithmValues() []JSONWebKeyEncryptionAlgorithm { + return []JSONWebKeyEncryptionAlgorithm{RSA15, RSAOAEP, RSAOAEP256} +} + // OSType enumerates the values for os type. type OSType string @@ -261,6 +278,11 @@ func (iter ApplicationListResultIterator) Value() Application { return iter.page.Values()[iter.i] } +// Creates a new instance of the ApplicationListResultIterator type. +func NewApplicationListResultIterator(page ApplicationListResultPage) ApplicationListResultIterator { + return ApplicationListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (alr ApplicationListResult) IsEmpty() bool { return alr.Value == nil || len(*alr.Value) == 0 @@ -330,6 +352,11 @@ func (page ApplicationListResultPage) Values() []Application { return *page.alr.Value } +// Creates a new instance of the ApplicationListResultPage type. +func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { + return ApplicationListResultPage{fn: getNextPage} +} + // ApplicationProperties the HDInsight cluster application GET response. type ApplicationProperties struct { // ComputeProfile - The list of roles in the cluster. @@ -546,6 +573,8 @@ type ClusterCreateProperties struct { ComputeProfile *ComputeProfile `json:"computeProfile,omitempty"` // StorageProfile - The storage profile. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + // DiskEncryptionProperties - The disk encryption properties. + DiskEncryptionProperties *DiskEncryptionProperties `json:"diskEncryptionProperties,omitempty"` } // ClusterDefinition the cluster definition. @@ -578,6 +607,16 @@ func (cd ClusterDefinition) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ClusterDiskEncryptionParameters the Disk Encryption Cluster request parameters. +type ClusterDiskEncryptionParameters struct { + // VaultURI - Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net + VaultURI *string `json:"vaultUri,omitempty"` + // KeyName - Key name that is used for enabling disk encryption. + KeyName *string `json:"keyName,omitempty"` + // KeyVersion - Specific key version that is used for enabling disk encryption. + KeyVersion *string `json:"keyVersion,omitempty"` +} + // ClusterGetProperties the properties of cluster. type ClusterGetProperties struct { // ClusterVersion - The version of the cluster. @@ -604,6 +643,8 @@ type ClusterGetProperties struct { Errors *[]Errors `json:"errors,omitempty"` // ConnectivityEndpoints - The list of connectivity endpoints. ConnectivityEndpoints *[]ConnectivityEndpoint `json:"connectivityEndpoints,omitempty"` + // DiskEncryptionProperties - The disk encryption properties. + DiskEncryptionProperties *DiskEncryptionProperties `json:"diskEncryptionProperties,omitempty"` } // ClusterIdentity identity for the cluster. @@ -719,6 +760,11 @@ func (iter ClusterListResultIterator) Value() Cluster { return iter.page.Values()[iter.i] } +// Creates a new instance of the ClusterListResultIterator type. +func NewClusterListResultIterator(page ClusterListResultPage) ClusterListResultIterator { + return ClusterListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (clr ClusterListResult) IsEmpty() bool { return clr.Value == nil || len(*clr.Value) == 0 @@ -788,6 +834,11 @@ func (page ClusterListResultPage) Values() []Cluster { return *page.clr.Value } +// Creates a new instance of the ClusterListResultPage type. +func NewClusterListResultPage(getNextPage func(context.Context, ClusterListResult) (ClusterListResult, error)) ClusterListResultPage { + return ClusterListResultPage{fn: getNextPage} +} + // ClusterListRuntimeScriptActionDetailResult the list runtime script action detail response. type ClusterListRuntimeScriptActionDetailResult struct { // Value - The list of persisted script action details for the cluster. @@ -932,6 +983,29 @@ func (future *ClustersResizeFuture) Result(client ClustersClient) (ar autorest.R return } +// ClustersRotateDiskEncryptionKeyFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ClustersRotateDiskEncryptionKeyFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersRotateDiskEncryptionKeyFuture) Result(client ClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "hdinsight.ClustersRotateDiskEncryptionKeyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("hdinsight.ClustersRotateDiskEncryptionKeyFuture") + return + } + ar.Response = future.Response() + return +} + // ComputeProfile describes the compute profile. type ComputeProfile struct { // Roles - The list of roles in the cluster. @@ -983,6 +1057,20 @@ type DataDisksGroups struct { DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` } +// DiskEncryptionProperties the disk encryption properties +type DiskEncryptionProperties struct { + // VaultURI - Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net + VaultURI *string `json:"vaultUri,omitempty"` + // KeyName - Key name that is used for enabling disk encryption. + KeyName *string `json:"keyName,omitempty"` + // KeyVersion - Specific key version that is used for enabling disk encryption. + KeyVersion *string `json:"keyVersion,omitempty"` + // EncryptionAlgorithm - Algorithm identifier for encryption, default RSA-OAEP. Possible values include: 'RSAOAEP', 'RSAOAEP256', 'RSA15' + EncryptionAlgorithm JSONWebKeyEncryptionAlgorithm `json:"encryptionAlgorithm,omitempty"` + // MsiResourceID - Resource ID of Managed Identity that is used to access the key vault. + MsiResourceID *string `json:"msiResourceId,omitempty"` +} + // ErrorResponse describes the format of Error response. type ErrorResponse struct { // Code - Error code @@ -1172,6 +1260,11 @@ func (iter OperationListResultIterator) Value() Operation { return iter.page.Values()[iter.i] } +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 @@ -1241,6 +1334,11 @@ func (page OperationListResultPage) Values() []Operation { return *page.olr.Value } +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + // OperationResource the azure async operation response. type OperationResource struct { // Status - The async operation state. Possible values include: 'InProgress', 'Succeeded', 'Failed' @@ -1445,6 +1543,11 @@ func (iter ScriptActionExecutionHistoryListIterator) Value() RuntimeScriptAction return iter.page.Values()[iter.i] } +// Creates a new instance of the ScriptActionExecutionHistoryListIterator type. +func NewScriptActionExecutionHistoryListIterator(page ScriptActionExecutionHistoryListPage) ScriptActionExecutionHistoryListIterator { + return ScriptActionExecutionHistoryListIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (saehl ScriptActionExecutionHistoryList) IsEmpty() bool { return saehl.Value == nil || len(*saehl.Value) == 0 @@ -1514,6 +1617,11 @@ func (page ScriptActionExecutionHistoryListPage) Values() []RuntimeScriptActionD return *page.saehl.Value } +// Creates a new instance of the ScriptActionExecutionHistoryListPage type. +func NewScriptActionExecutionHistoryListPage(getNextPage func(context.Context, ScriptActionExecutionHistoryList) (ScriptActionExecutionHistoryList, error)) ScriptActionExecutionHistoryListPage { + return ScriptActionExecutionHistoryListPage{fn: getNextPage} +} + // ScriptActionExecutionSummary the execution summary of a script action. type ScriptActionExecutionSummary struct { // Status - The status of script action execution. @@ -1603,6 +1711,11 @@ func (iter ScriptActionsListIterator) Value() RuntimeScriptActionDetail { return iter.page.Values()[iter.i] } +// Creates a new instance of the ScriptActionsListIterator type. +func NewScriptActionsListIterator(page ScriptActionsListPage) ScriptActionsListIterator { + return ScriptActionsListIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (sal ScriptActionsList) IsEmpty() bool { return sal.Value == nil || len(*sal.Value) == 0 @@ -1672,6 +1785,11 @@ func (page ScriptActionsListPage) Values() []RuntimeScriptActionDetail { return *page.sal.Value } +// Creates a new instance of the ScriptActionsListPage type. +func NewScriptActionsListPage(getNextPage func(context.Context, ScriptActionsList) (ScriptActionsList, error)) ScriptActionsListPage { + return ScriptActionsListPage{fn: getNextPage} +} + // SecurityProfile the security profile which contains Ssh public key for the HDInsight cluster. type SecurityProfile struct { // DirectoryType - The directory type. Possible values include: 'ActiveDirectory' diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/clusters.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/clusters.go index 9ee73164311a..c3f244287d7a 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/clusters.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/clusters.go @@ -662,6 +662,85 @@ func (client ClustersClient) ResizeResponder(resp *http.Response) (result autore return } +// RotateDiskEncryptionKey rotate disk encryption key of the specified HDInsight cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// clusterName - the name of the cluster. +// parameters - the parameters for the disk encryption operation. +func (client ClustersClient) RotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterDiskEncryptionParameters) (result ClustersRotateDiskEncryptionKeyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClustersClient.RotateDiskEncryptionKey") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RotateDiskEncryptionKeyPreparer(ctx, resourceGroupName, clusterName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "hdinsight.ClustersClient", "RotateDiskEncryptionKey", nil, "Failure preparing request") + return + } + + result, err = client.RotateDiskEncryptionKeySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "hdinsight.ClustersClient", "RotateDiskEncryptionKey", result.Response(), "Failure sending request") + return + } + + return +} + +// RotateDiskEncryptionKeyPreparer prepares the RotateDiskEncryptionKey request. +func (client ClustersClient) RotateDiskEncryptionKeyPreparer(ctx context.Context, resourceGroupName string, clusterName string, parameters ClusterDiskEncryptionParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterName": autorest.Encode("path", clusterName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/rotatediskencryptionkey", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RotateDiskEncryptionKeySender sends the RotateDiskEncryptionKey request. The method will close the +// http.Response Body if it receives an error. +func (client ClustersClient) RotateDiskEncryptionKeySender(req *http.Request) (future ClustersRotateDiskEncryptionKeyFuture, err error) { + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RotateDiskEncryptionKeyResponder handles the response to the RotateDiskEncryptionKey request. The method always +// closes the http.Response Body. +func (client ClustersClient) RotateDiskEncryptionKeyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // Update patch HDInsight cluster with the specified parameters. // Parameters: // resourceGroupName - the name of the resource group. diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/hdinsightapi/interfaces.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/hdinsightapi/interfaces.go new file mode 100644 index 000000000000..992b2eb3b91b --- /dev/null +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/hdinsightapi/interfaces.go @@ -0,0 +1,100 @@ +package hdinsightapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight" + "github.com/Azure/go-autorest/autorest" +) + +// ClustersClientAPI contains the set of methods on the ClustersClient type. +type ClustersClientAPI interface { + Create(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterCreateParametersExtended) (result hdinsight.ClustersCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ClustersDeleteFuture, err error) + ExecuteScriptActions(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ExecuteScriptActionParameters) (result hdinsight.ClustersExecuteScriptActionsFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.Cluster, err error) + List(ctx context.Context) (result hdinsight.ClusterListResultPage, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result hdinsight.ClusterListResultPage, err error) + Resize(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterResizeParameters) (result hdinsight.ClustersResizeFuture, err error) + RotateDiskEncryptionKey(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterDiskEncryptionParameters) (result hdinsight.ClustersRotateDiskEncryptionKeyFuture, err error) + Update(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterPatchParameters) (result hdinsight.Cluster, err error) +} + +var _ ClustersClientAPI = (*hdinsight.ClustersClient)(nil) + +// ApplicationsClientAPI contains the set of methods on the ApplicationsClient type. +type ApplicationsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, clusterName string, applicationName string, parameters hdinsight.Application) (result hdinsight.ApplicationsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result hdinsight.ApplicationsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, applicationName string) (result hdinsight.Application, err error) + ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ApplicationListResultPage, err error) +} + +var _ ApplicationsClientAPI = (*hdinsight.ApplicationsClient)(nil) + +// LocationsClientAPI contains the set of methods on the LocationsClient type. +type LocationsClientAPI interface { + ListUsages(ctx context.Context, location string) (result hdinsight.UsagesListResult, err error) +} + +var _ LocationsClientAPI = (*hdinsight.LocationsClient)(nil) + +// ConfigurationsClientAPI contains the set of methods on the ConfigurationsClient type. +type ConfigurationsClientAPI interface { + Get(ctx context.Context, resourceGroupName string, clusterName string, configurationName string) (result hdinsight.SetString, err error) + Update(ctx context.Context, resourceGroupName string, clusterName string, configurationName string, parameters map[string]*string) (result hdinsight.ConfigurationsUpdateFuture, err error) +} + +var _ ConfigurationsClientAPI = (*hdinsight.ConfigurationsClient)(nil) + +// ExtensionsClientAPI contains the set of methods on the ExtensionsClient type. +type ExtensionsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, clusterName string, extensionName string, parameters hdinsight.Extension) (result hdinsight.ExtensionsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, clusterName string, extensionName string) (result hdinsight.ExtensionsDeleteFuture, err error) + DisableMonitoring(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ExtensionsDisableMonitoringFuture, err error) + EnableMonitoring(ctx context.Context, resourceGroupName string, clusterName string, parameters hdinsight.ClusterMonitoringRequest) (result hdinsight.ExtensionsEnableMonitoringFuture, err error) + Get(ctx context.Context, resourceGroupName string, clusterName string, extensionName string) (result hdinsight.Extension, err error) + GetMonitoringStatus(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ClusterMonitoringResponse, err error) +} + +var _ ExtensionsClientAPI = (*hdinsight.ExtensionsClient)(nil) + +// ScriptActionsClientAPI contains the set of methods on the ScriptActionsClient type. +type ScriptActionsClientAPI interface { + Delete(ctx context.Context, resourceGroupName string, clusterName string, scriptName string) (result autorest.Response, err error) + GetExecutionDetail(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string) (result hdinsight.RuntimeScriptActionDetail, err error) + ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionsListPage, err error) +} + +var _ ScriptActionsClientAPI = (*hdinsight.ScriptActionsClient)(nil) + +// ScriptExecutionHistoryClientAPI contains the set of methods on the ScriptExecutionHistoryClient type. +type ScriptExecutionHistoryClientAPI interface { + ListByCluster(ctx context.Context, resourceGroupName string, clusterName string) (result hdinsight.ScriptActionExecutionHistoryListPage, err error) + Promote(ctx context.Context, resourceGroupName string, clusterName string, scriptExecutionID string) (result autorest.Response, err error) +} + +var _ ScriptExecutionHistoryClientAPI = (*hdinsight.ScriptExecutionHistoryClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result hdinsight.OperationListResultPage, err error) +} + +var _ OperationsClientAPI = (*hdinsight.OperationsClient)(nil) diff --git a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go index 90983526e061..ab96e299e968 100644 --- a/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go +++ b/services/preview/hdinsight/mgmt/2018-06-01-preview/hdinsight/models.go @@ -81,6 +81,23 @@ func PossibleDirectoryTypeValues() []DirectoryType { return []DirectoryType{ActiveDirectory} } +// JSONWebKeyEncryptionAlgorithm enumerates the values for json web key encryption algorithm. +type JSONWebKeyEncryptionAlgorithm string + +const ( + // RSA15 ... + RSA15 JSONWebKeyEncryptionAlgorithm = "RSA1_5" + // RSAOAEP ... + RSAOAEP JSONWebKeyEncryptionAlgorithm = "RSA-OAEP" + // RSAOAEP256 ... + RSAOAEP256 JSONWebKeyEncryptionAlgorithm = "RSA-OAEP-256" +) + +// PossibleJSONWebKeyEncryptionAlgorithmValues returns an array of possible values for the JSONWebKeyEncryptionAlgorithm const type. +func PossibleJSONWebKeyEncryptionAlgorithmValues() []JSONWebKeyEncryptionAlgorithm { + return []JSONWebKeyEncryptionAlgorithm{RSA15, RSAOAEP, RSAOAEP256} +} + // OSType enumerates the values for os type. type OSType string @@ -261,6 +278,11 @@ func (iter ApplicationListResultIterator) Value() Application { return iter.page.Values()[iter.i] } +// Creates a new instance of the ApplicationListResultIterator type. +func NewApplicationListResultIterator(page ApplicationListResultPage) ApplicationListResultIterator { + return ApplicationListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (alr ApplicationListResult) IsEmpty() bool { return alr.Value == nil || len(*alr.Value) == 0 @@ -330,6 +352,11 @@ func (page ApplicationListResultPage) Values() []Application { return *page.alr.Value } +// Creates a new instance of the ApplicationListResultPage type. +func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { + return ApplicationListResultPage{fn: getNextPage} +} + // ApplicationProperties the HDInsight cluster application GET response. type ApplicationProperties struct { // ComputeProfile - The list of roles in the cluster. @@ -505,6 +532,8 @@ type ClusterCreateProperties struct { ComputeProfile *ComputeProfile `json:"computeProfile,omitempty"` // StorageProfile - The storage profile. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` + // DiskEncryptionProperties - The disk encryption properties. + DiskEncryptionProperties *DiskEncryptionProperties `json:"diskEncryptionProperties,omitempty"` } // ClusterDefinition the cluster definition. @@ -537,6 +566,16 @@ func (cd ClusterDefinition) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ClusterDiskEncryptionParameters the Disk Encryption Cluster request parameters. +type ClusterDiskEncryptionParameters struct { + // VaultURI - Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net + VaultURI *string `json:"vaultUri,omitempty"` + // KeyName - Key name that is used for enabling disk encryption. + KeyName *string `json:"keyName,omitempty"` + // KeyVersion - Specific key version that is used for enabling disk encryption. + KeyVersion *string `json:"keyVersion,omitempty"` +} + // ClusterGetProperties the properties of cluster. type ClusterGetProperties struct { // ClusterVersion - The version of the cluster. @@ -563,6 +602,8 @@ type ClusterGetProperties struct { Errors *[]Errors `json:"errors,omitempty"` // ConnectivityEndpoints - The list of connectivity endpoints. ConnectivityEndpoints *[]ConnectivityEndpoint `json:"connectivityEndpoints,omitempty"` + // DiskEncryptionProperties - The disk encryption properties. + DiskEncryptionProperties *DiskEncryptionProperties `json:"diskEncryptionProperties,omitempty"` } // ClusterIdentity identity for the cluster. @@ -678,6 +719,11 @@ func (iter ClusterListResultIterator) Value() Cluster { return iter.page.Values()[iter.i] } +// Creates a new instance of the ClusterListResultIterator type. +func NewClusterListResultIterator(page ClusterListResultPage) ClusterListResultIterator { + return ClusterListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (clr ClusterListResult) IsEmpty() bool { return clr.Value == nil || len(*clr.Value) == 0 @@ -747,6 +793,11 @@ func (page ClusterListResultPage) Values() []Cluster { return *page.clr.Value } +// Creates a new instance of the ClusterListResultPage type. +func NewClusterListResultPage(getNextPage func(context.Context, ClusterListResult) (ClusterListResult, error)) ClusterListResultPage { + return ClusterListResultPage{fn: getNextPage} +} + // ClusterListRuntimeScriptActionDetailResult the list runtime script action detail response. type ClusterListRuntimeScriptActionDetailResult struct { // Value - The list of persisted script action details for the cluster. @@ -891,6 +942,29 @@ func (future *ClustersResizeFuture) Result(client ClustersClient) (ar autorest.R return } +// ClustersRotateDiskEncryptionKeyFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ClustersRotateDiskEncryptionKeyFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ClustersRotateDiskEncryptionKeyFuture) Result(client ClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.Done(client) + if err != nil { + err = autorest.NewErrorWithError(err, "hdinsight.ClustersRotateDiskEncryptionKeyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("hdinsight.ClustersRotateDiskEncryptionKeyFuture") + return + } + ar.Response = future.Response() + return +} + // ComputeProfile describes the compute profile. type ComputeProfile struct { // Roles - The list of roles in the cluster. @@ -942,6 +1016,20 @@ type DataDisksGroups struct { DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` } +// DiskEncryptionProperties the disk encryption properties +type DiskEncryptionProperties struct { + // VaultURI - Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net + VaultURI *string `json:"vaultUri,omitempty"` + // KeyName - Key name that is used for enabling disk encryption. + KeyName *string `json:"keyName,omitempty"` + // KeyVersion - Specific key version that is used for enabling disk encryption. + KeyVersion *string `json:"keyVersion,omitempty"` + // EncryptionAlgorithm - Algorithm identifier for encryption, default RSA-OAEP. Possible values include: 'RSAOAEP', 'RSAOAEP256', 'RSA15' + EncryptionAlgorithm JSONWebKeyEncryptionAlgorithm `json:"encryptionAlgorithm,omitempty"` + // MsiResourceID - Resource ID of Managed Identity that is used to access the key vault. + MsiResourceID *string `json:"msiResourceId,omitempty"` +} + // ErrorResponse describes the format of Error response. type ErrorResponse struct { // Code - Error code @@ -1177,6 +1265,11 @@ func (iter OperationListResultIterator) Value() Operation { return iter.page.Values()[iter.i] } +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 @@ -1246,6 +1339,11 @@ func (page OperationListResultPage) Values() []Operation { return *page.olr.Value } +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + // OperationResource the azure async operation response. type OperationResource struct { // Status - The async operation state. Possible values include: 'InProgress', 'Succeeded', 'Failed' @@ -1428,6 +1526,11 @@ func (iter ScriptActionExecutionHistoryListIterator) Value() RuntimeScriptAction return iter.page.Values()[iter.i] } +// Creates a new instance of the ScriptActionExecutionHistoryListIterator type. +func NewScriptActionExecutionHistoryListIterator(page ScriptActionExecutionHistoryListPage) ScriptActionExecutionHistoryListIterator { + return ScriptActionExecutionHistoryListIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (saehl ScriptActionExecutionHistoryList) IsEmpty() bool { return saehl.Value == nil || len(*saehl.Value) == 0 @@ -1497,6 +1600,11 @@ func (page ScriptActionExecutionHistoryListPage) Values() []RuntimeScriptActionD return *page.saehl.Value } +// Creates a new instance of the ScriptActionExecutionHistoryListPage type. +func NewScriptActionExecutionHistoryListPage(getNextPage func(context.Context, ScriptActionExecutionHistoryList) (ScriptActionExecutionHistoryList, error)) ScriptActionExecutionHistoryListPage { + return ScriptActionExecutionHistoryListPage{fn: getNextPage} +} + // ScriptActionExecutionSummary the execution summary of a script action. type ScriptActionExecutionSummary struct { // Status - The status of script action execution. @@ -1586,6 +1694,11 @@ func (iter ScriptActionsListIterator) Value() RuntimeScriptActionDetail { return iter.page.Values()[iter.i] } +// Creates a new instance of the ScriptActionsListIterator type. +func NewScriptActionsListIterator(page ScriptActionsListPage) ScriptActionsListIterator { + return ScriptActionsListIterator{page: page} +} + // IsEmpty returns true if the ListResult contains no values. func (sal ScriptActionsList) IsEmpty() bool { return sal.Value == nil || len(*sal.Value) == 0 @@ -1655,6 +1768,11 @@ func (page ScriptActionsListPage) Values() []RuntimeScriptActionDetail { return *page.sal.Value } +// Creates a new instance of the ScriptActionsListPage type. +func NewScriptActionsListPage(getNextPage func(context.Context, ScriptActionsList) (ScriptActionsList, error)) ScriptActionsListPage { + return ScriptActionsListPage{fn: getNextPage} +} + // SecurityProfile the security profile which contains Ssh public key for the HDInsight cluster. type SecurityProfile struct { // DirectoryType - The directory type. Possible values include: 'ActiveDirectory'